Remove the NO_CRYPT build option.
[dragonfly.git] / usr.bin / banner / chset.c
bloba04f0a53b754cf9369feab83caa9698cc986d22f
1 /* $OpenBSD: chset.c,v 1.6 2017/05/27 07:55:44 tedu Exp $ */
2 /* $NetBSD: chset.c,v 1.2 1995/04/09 06:00:26 cgd Exp $ */
4 /*
5 * Changes for banner(1)
6 * @(#)Copyright (c) 1995, Simon J. Gerraty.
8 * This is free software. It comes with NO WARRANTY.
9 * Permission to use, modify and distribute this source code
10 * is granted subject to the following conditions.
11 * 1/ that the above copyright notice and this notice
12 * are preserved in all copies and that due credit be given
13 * to the author.
14 * 2/ that any changes to this code are clearly commented
15 * as such so that the author does not get blamed for bugs
16 * other than his own.
18 * Please send copies of changes and bug-fixes to:
19 * sjg@zen.void.oz.au
23 * Copyright (c) 1983, 1993
24 * The Regents of the University of California. All rights reserved.
26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions
28 * are met:
29 * 1. Redistributions of source code must retain the above copyright
30 * notice, this list of conditions and the following disclaimer.
31 * 2. Redistributions in binary form must reproduce the above copyright
32 * notice, this list of conditions and the following disclaimer in the
33 * documentation and/or other materials provided with the distribution.
34 * 3. Neither the name of the University nor the names of its contributors
35 * may be used to endorse or promote products derived from this software
36 * without specific prior written permission.
38 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
39 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
41 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
42 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
44 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
45 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 * SUCH DAMAGE.
51 #include "banner.h"
54 * <sjg> the following were all re-generated by a perl script,
55 * to fill in the gaps needed by the banner(1) char set.
57 #define c_______ 0
58 #define c______1 1
59 #define c_____1_ 2
60 #define c_____11 3
61 #define c____1__ 4
62 #define c____1_1 5
63 #define c____11_ 6
64 #define c____111 7
65 #define c___1___ 8
66 #define c___1__1 9
67 #define c___1_1_ 10
68 #define c___1_11 11
69 #define c___11__ 12
70 #define c___11_1 13
71 #define c___111_ 14
72 #define c___1111 15
73 #define c__1____ 16
74 #define c__1___1 17
75 #define c__1__1_ 18
76 #define c__1__11 19
77 #define c__1_1__ 20
78 #define c__1_1_1 21
79 #define c__1_11_ 22
80 #define c__1_111 23
81 #define c__11___ 24
82 #define c__11__1 25
83 #define c__11_1_ 26
84 #define c__11_11 27
85 #define c__111__ 28
86 #define c__111_1 29
87 #define c__1111_ 30
88 #define c__11111 31
89 #define c_1_____ 32
90 #define c_1____1 33
91 #define c_1___1_ 34
92 #define c_1___11 35
93 #define c_1__1__ 36
94 #define c_1__1_1 37
95 #define c_1__11_ 38
96 #define c_1__111 39
97 #define c_1_1___ 40
98 #define c_1_1__1 41
99 #define c_1_1_1_ 42
100 #define c_1_1_11 43
101 #define c_1_11__ 44
102 #define c_1_11_1 45
103 #define c_1_111_ 46
104 #define c_1_1111 47
105 #define c_11____ 48
106 #define c_11___1 49
107 #define c_11__1_ 50
108 #define c_11__11 51
109 #define c_11_1__ 52
110 #define c_11_1_1 53
111 #define c_11_11_ 54
112 #define c_11_111 55
113 #define c_111___ 56
114 #define c_111__1 57
115 #define c_111_1_ 58
116 #define c_111_11 59
117 #define c_1111__ 60
118 #define c_1111_1 61
119 #define c_11111_ 62
120 #define c_111111 63
121 #define c1______ 64
122 #define c1_____1 65
123 #define c1____1_ 66
124 #define c1____11 67
125 #define c1___1__ 68
126 #define c1___1_1 69
127 #define c1___11_ 70
128 #define c1___111 71
129 #define c1__1___ 72
130 #define c1__1__1 73
131 #define c1__1_1_ 74
132 #define c1__1_11 75
133 #define c1__11__ 76
134 #define c1__11_1 77
135 #define c1__111_ 78
136 #define c1__1111 79
137 #define c1_1____ 80
138 #define c1_1___1 81
139 #define c1_1__1_ 82
140 #define c1_1__11 83
141 #define c1_1_1__ 84
142 #define c1_1_1_1 85
143 #define c1_1_11_ 86
144 #define c1_1_111 87
145 #define c1_11___ 88
146 #define c1_11__1 89
147 #define c1_11_1_ 90
148 #define c1_11_11 91
149 #define c1_111__ 92
150 #define c1_111_1 93
151 #define c1_1111_ 94
152 #define c1_11111 95
153 #define c11_____ 96
154 #define c11____1 97
155 #define c11___1_ 98
156 #define c11___11 99
157 #define c11__1__ 100
158 #define c11__1_1 101
159 #define c11__11_ 102
160 #define c11__111 103
161 #define c11_1___ 104
162 #define c11_1__1 105
163 #define c11_1_1_ 106
164 #define c11_1_11 107
165 #define c11_11__ 108
166 #define c11_11_1 109
167 #define c11_111_ 110
168 #define c11_1111 111
169 #define c111____ 112
170 #define c111___1 113
171 #define c111__1_ 114
172 #define c111__11 115
173 #define c111_1__ 116
174 #define c111_1_1 117
175 #define c111_11_ 118
176 #define c111_111 119
177 #define c1111___ 120
178 #define c1111__1 121
179 #define c1111_1_ 122
180 #define c1111_11 123
181 #define c11111__ 124
182 #define c11111_1 125
183 #define c111111_ 126
184 #define c1111111 127
187 const char scnkey[][HEIGHT] = /* this is relatively easy to modify */
188 /* just look: */
190 /* <sjg> this is the real banner char set */
192 c_______,
193 c_______,
194 c_______,
195 c_______,
196 c_______,
197 c_______,
198 c_______,
199 c_______
200 }, /* */
203 c__111__,
204 c__111__,
205 c__111__,
206 c___1___,
207 c_______,
208 c__111__,
209 c__111__,
210 c_______
211 }, /* ! */
213 c111_111,
214 c111_111,
215 c_1___1_,
216 c_______,
217 c_______,
218 c_______,
219 c_______,
220 c_______
221 }, /* " */
223 c__1_1__,
224 c__1_1__,
225 c1111111,
226 c__1_1__,
227 c1111111,
228 c__1_1__,
229 c__1_1__,
230 c_______
231 }, /* # */
233 c_11111_,
234 c1__1__1,
235 c1__1___,
236 c_11111_,
237 c___1__1,
238 c1__1__1,
239 c_11111_,
240 c_______
241 }, /* $ */
243 c111___1,
244 c1_1__1_,
245 c111_1__,
246 c___1___,
247 c__1_111,
248 c_1__1_1,
249 c1___111,
250 c_______
251 }, /* % */
253 c__11___,
254 c_1__1__,
255 c__11___,
256 c_111___,
257 c1___1_1,
258 c1____1_,
259 c_111__1,
260 c_______
261 }, /* & */
263 c__111__,
264 c__111__,
265 c___1___,
266 c__1____,
267 c_______,
268 c_______,
269 c_______,
270 c_______
271 }, /* ' */
273 c___11__,
274 c__1____,
275 c_1_____,
276 c_1_____,
277 c_1_____,
278 c__1____,
279 c___11__,
280 c_______
281 }, /* ( */
283 c__11___,
284 c____1__,
285 c_____1_,
286 c_____1_,
287 c_____1_,
288 c____1__,
289 c__11___,
290 c_______
291 }, /* ) */
293 c_______,
294 c_1___1_,
295 c__1_1__,
296 c1111111,
297 c__1_1__,
298 c_1___1_,
299 c_______,
300 c_______
301 }, /* * */
303 c_______,
304 c___1___,
305 c___1___,
306 c_11111_,
307 c___1___,
308 c___1___,
309 c_______,
310 c_______
311 }, /* + */
313 c_______,
314 c_______,
315 c_______,
316 c__111__,
317 c__111__,
318 c___1___,
319 c__1____,
320 c_______
321 }, /* , */
323 c_______,
324 c_______,
325 c_______,
326 c_11111_,
327 c_______,
328 c_______,
329 c_______,
330 c_______
331 }, /* - */
333 c_______,
334 c_______,
335 c_______,
336 c_______,
337 c__111__,
338 c__111__,
339 c__111__,
340 c_______
341 }, /* . */
343 c______1,
344 c_____1_,
345 c____1__,
346 c___1___,
347 c__1____,
348 c_1_____,
349 c1______,
350 c_______
351 }, /* / */
353 c__111__,
354 c_1___1_,
355 c1_____1,
356 c1_____1,
357 c1_____1,
358 c_1___1_,
359 c__111__,
360 c_______
361 }, /* 0 */
363 c___1___,
364 c__11___,
365 c_1_1___,
366 c___1___,
367 c___1___,
368 c___1___,
369 c_11111_,
370 c_______
371 }, /* 1 */
373 c_11111_,
374 c1_____1,
375 c______1,
376 c_11111_,
377 c1______,
378 c1______,
379 c1111111,
380 c_______
381 }, /* 2 */
383 c_11111_,
384 c1_____1,
385 c______1,
386 c_11111_,
387 c______1,
388 c1_____1,
389 c_11111_,
390 c_______
391 }, /* 3 */
393 c1______,
394 c1____1_,
395 c1____1_,
396 c1____1_,
397 c1111111,
398 c_____1_,
399 c_____1_,
400 c_______
401 }, /* 4 */
403 c1111111,
404 c1______,
405 c1______,
406 c111111_,
407 c______1,
408 c1_____1,
409 c_11111_,
410 c_______
411 }, /* 5 */
413 c_11111_,
414 c1_____1,
415 c1______,
416 c111111_,
417 c1_____1,
418 c1_____1,
419 c_11111_,
420 c_______
421 }, /* 6 */
423 c1111111,
424 c1____1_,
425 c____1__,
426 c___1___,
427 c__1____,
428 c__1____,
429 c__1____,
430 c_______
431 }, /* 7 */
433 c_11111_,
434 c1_____1,
435 c1_____1,
436 c_11111_,
437 c1_____1,
438 c1_____1,
439 c_11111_,
440 c_______
441 }, /* 8 */
443 c_11111_,
444 c1_____1,
445 c1_____1,
446 c_111111,
447 c______1,
448 c1_____1,
449 c_11111_,
450 c_______
451 }, /* 9 */
453 c___1___,
454 c__111__,
455 c___1___,
456 c_______,
457 c___1___,
458 c__111__,
459 c___1___,
460 c_______
461 }, /* : */
463 c__111__,
464 c__111__,
465 c_______,
466 c__111__,
467 c__111__,
468 c___1___,
469 c__1____,
470 c_______
471 }, /* ; */
473 c____1__,
474 c___1___,
475 c__1____,
476 c_1_____,
477 c__1____,
478 c___1___,
479 c____1__,
480 c_______
481 }, /* < */
483 c_______,
484 c_______,
485 c_11111_,
486 c_______,
487 c_11111_,
488 c_______,
489 c_______,
490 c_______
491 }, /* = */
493 c__1____,
494 c___1___,
495 c____1__,
496 c_____1_,
497 c____1__,
498 c___1___,
499 c__1____,
500 c_______
501 }, /* > */
503 c_11111_,
504 c1_____1,
505 c______1,
506 c___111_,
507 c___1___,
508 c_______,
509 c___1___,
510 c_______
511 }, /* ? */
513 c_11111_,
514 c1_____1,
515 c1_111_1,
516 c1_111_1,
517 c1_1111_,
518 c1______,
519 c_11111_,
520 c_______
521 }, /* @ */
523 c___1___,
524 c__1_1__,
525 c_1___1_,
526 c1_____1,
527 c1111111,
528 c1_____1,
529 c1_____1,
530 c_______
531 }, /* A */
533 c111111_,
534 c1_____1,
535 c1_____1,
536 c111111_,
537 c1_____1,
538 c1_____1,
539 c111111_,
540 c_______
541 }, /* B */
543 c_11111_,
544 c1_____1,
545 c1______,
546 c1______,
547 c1______,
548 c1_____1,
549 c_11111_,
550 c_______
551 }, /* C */
553 c111111_,
554 c1_____1,
555 c1_____1,
556 c1_____1,
557 c1_____1,
558 c1_____1,
559 c111111_,
560 c_______
561 }, /* D */
563 c1111111,
564 c1______,
565 c1______,
566 c11111__,
567 c1______,
568 c1______,
569 c1111111,
570 c_______
571 }, /* E */
573 c1111111,
574 c1______,
575 c1______,
576 c11111__,
577 c1______,
578 c1______,
579 c1______,
580 c_______
581 }, /* F */
583 c_11111_,
584 c1_____1,
585 c1______,
586 c1__1111,
587 c1_____1,
588 c1_____1,
589 c_11111_,
590 c_______
591 }, /* G */
593 c1_____1,
594 c1_____1,
595 c1_____1,
596 c1111111,
597 c1_____1,
598 c1_____1,
599 c1_____1,
600 c_______
601 }, /* H */
603 c__111__,
604 c___1___,
605 c___1___,
606 c___1___,
607 c___1___,
608 c___1___,
609 c__111__,
610 c_______
611 }, /* I */
613 c______1,
614 c______1,
615 c______1,
616 c______1,
617 c1_____1,
618 c1_____1,
619 c_11111_,
620 c_______
621 }, /* J */
623 c1____1_,
624 c1___1__,
625 c1__1___,
626 c111____,
627 c1__1___,
628 c1___1__,
629 c1____1_,
630 c_______
631 }, /* K */
633 c1______,
634 c1______,
635 c1______,
636 c1______,
637 c1______,
638 c1______,
639 c1111111,
640 c_______
641 }, /* L */
643 c1_____1,
644 c11___11,
645 c1_1_1_1,
646 c1__1__1,
647 c1_____1,
648 c1_____1,
649 c1_____1,
650 c_______
651 }, /* M */
653 c1_____1,
654 c11____1,
655 c1_1___1,
656 c1__1__1,
657 c1___1_1,
658 c1____11,
659 c1_____1,
660 c_______
661 }, /* N */
663 c1111111,
664 c1_____1,
665 c1_____1,
666 c1_____1,
667 c1_____1,
668 c1_____1,
669 c1111111,
670 c_______
671 }, /* O */
673 c111111_,
674 c1_____1,
675 c1_____1,
676 c111111_,
677 c1______,
678 c1______,
679 c1______,
680 c_______
681 }, /* P */
683 c_11111_,
684 c1_____1,
685 c1_____1,
686 c1_____1,
687 c1___1_1,
688 c1____1_,
689 c_1111_1,
690 c_______
691 }, /* Q */
693 c111111_,
694 c1_____1,
695 c1_____1,
696 c111111_,
697 c1___1__,
698 c1____1_,
699 c1_____1,
700 c_______
701 }, /* R */
703 c_11111_,
704 c1_____1,
705 c1______,
706 c_11111_,
707 c______1,
708 c1_____1,
709 c_11111_,
710 c_______
711 }, /* S */
713 c1111111,
714 c___1___,
715 c___1___,
716 c___1___,
717 c___1___,
718 c___1___,
719 c___1___,
720 c_______
721 }, /* T */
723 c1_____1,
724 c1_____1,
725 c1_____1,
726 c1_____1,
727 c1_____1,
728 c1_____1,
729 c_11111_,
730 c_______
731 }, /* U */
733 c1_____1,
734 c1_____1,
735 c1_____1,
736 c1_____1,
737 c_1___1_,
738 c__1_1__,
739 c___1___,
740 c_______
741 }, /* V */
743 c1_____1,
744 c1__1__1,
745 c1__1__1,
746 c1__1__1,
747 c1__1__1,
748 c1__1__1,
749 c_11_11_,
750 c_______
751 }, /* W */
753 c1_____1,
754 c_1___1_,
755 c__1_1__,
756 c___1___,
757 c__1_1__,
758 c_1___1_,
759 c1_____1,
760 c_______
761 }, /* X */
763 c1_____1,
764 c_1___1_,
765 c__1_1__,
766 c___1___,
767 c___1___,
768 c___1___,
769 c___1___,
770 c_______
771 }, /* Y */
773 c1111111,
774 c_____1_,
775 c____1__,
776 c___1___,
777 c__1____,
778 c_1_____,
779 c1111111,
780 c_______
781 }, /* Z */
783 c_11111_,
784 c_1_____,
785 c_1_____,
786 c_1_____,
787 c_1_____,
788 c_1_____,
789 c_11111_,
790 c_______
791 }, /* [ */
793 c1______,
794 c_1_____,
795 c__1____,
796 c___1___,
797 c____1__,
798 c_____1_,
799 c______1,
800 c_______
801 }, /* \ */
803 c_11111_,
804 c_____1_,
805 c_____1_,
806 c_____1_,
807 c_____1_,
808 c_____1_,
809 c_11111_,
810 c_______
811 }, /* ] */
813 c___1___,
814 c__1_1__,
815 c_1___1_,
816 c_______,
817 c_______,
818 c_______,
819 c_______,
820 c_______
821 }, /* ^ */
823 c_______,
824 c_______,
825 c_______,
826 c_______,
827 c_______,
828 c_______,
829 c1111111,
830 c_______
831 }, /* _ */
833 c__111__,
834 c__111__,
835 c___1___,
836 c____1__,
837 c_______,
838 c_______,
839 c_______,
840 c_______
841 }, /* ` */
843 c_______,
844 c___11__,
845 c__1__1_,
846 c_1____1,
847 c_111111,
848 c_1____1,
849 c_1____1,
850 c_______
851 }, /* a */
853 c_______,
854 c_11111_,
855 c_1____1,
856 c_11111_,
857 c_1____1,
858 c_1____1,
859 c_11111_,
860 c_______
861 }, /* b */
863 c_______,
864 c__1111_,
865 c_1____1,
866 c_1_____,
867 c_1_____,
868 c_1____1,
869 c__1111_,
870 c_______
871 }, /* c */
873 c_______,
874 c_11111_,
875 c_1____1,
876 c_1____1,
877 c_1____1,
878 c_1____1,
879 c_11111_,
880 c_______
881 }, /* d */
883 c_______,
884 c_111111,
885 c_1_____,
886 c_11111_,
887 c_1_____,
888 c_1_____,
889 c_111111,
890 c_______
891 }, /* e */
893 c_______,
894 c_111111,
895 c_1_____,
896 c_11111_,
897 c_1_____,
898 c_1_____,
899 c_1_____,
900 c_______
901 }, /* f */
903 c_______,
904 c__1111_,
905 c_1____1,
906 c_1_____,
907 c_1__111,
908 c_1____1,
909 c__1111_,
910 c_______
911 }, /* g */
913 c_______,
914 c_1____1,
915 c_1____1,
916 c_111111,
917 c_1____1,
918 c_1____1,
919 c_1____1,
920 c_______
921 }, /* h */
923 c_______,
924 c____1__,
925 c____1__,
926 c____1__,
927 c____1__,
928 c____1__,
929 c____1__,
930 c_______
931 }, /* i */
933 c_______,
934 c______1,
935 c______1,
936 c______1,
937 c______1,
938 c_1____1,
939 c__1111_,
940 c_______
941 }, /* j */
943 c_______,
944 c_1____1,
945 c_1___1_,
946 c_1111__,
947 c_1__1__,
948 c_1___1_,
949 c_1____1,
950 c_______
951 }, /* k */
953 c_______,
954 c_1_____,
955 c_1_____,
956 c_1_____,
957 c_1_____,
958 c_1_____,
959 c_111111,
960 c_______
961 }, /* l */
963 c_______,
964 c_1____1,
965 c_11__11,
966 c_1_11_1,
967 c_1____1,
968 c_1____1,
969 c_1____1,
970 c_______
971 }, /* m */
973 c_______,
974 c_1____1,
975 c_11___1,
976 c_1_1__1,
977 c_1__1_1,
978 c_1___11,
979 c_1____1,
980 c_______
981 }, /* n */
983 c_______,
984 c__1111_,
985 c_1____1,
986 c_1____1,
987 c_1____1,
988 c_1____1,
989 c__1111_,
990 c_______
991 }, /* o */
993 c_______,
994 c_11111_,
995 c_1____1,
996 c_1____1,
997 c_11111_,
998 c_1_____,
999 c_1_____,
1000 c_______
1001 }, /* p */
1003 c_______,
1004 c__1111_,
1005 c_1____1,
1006 c_1____1,
1007 c_1__1_1,
1008 c_1___1_,
1009 c__111_1,
1010 c_______
1011 }, /* q */
1013 c_______,
1014 c_11111_,
1015 c_1____1,
1016 c_1____1,
1017 c_11111_,
1018 c_1___1_,
1019 c_1____1,
1020 c_______
1021 }, /* r */
1023 c_______,
1024 c__1111_,
1025 c_1_____,
1026 c__1111_,
1027 c______1,
1028 c_1____1,
1029 c__1111_,
1030 c_______
1031 }, /* s */
1033 c_______,
1034 c__11111,
1035 c____1__,
1036 c____1__,
1037 c____1__,
1038 c____1__,
1039 c____1__,
1040 c_______
1041 }, /* t */
1043 c_______,
1044 c_1____1,
1045 c_1____1,
1046 c_1____1,
1047 c_1____1,
1048 c_1____1,
1049 c__1111_,
1050 c_______
1051 }, /* u */
1053 c_______,
1054 c_1____1,
1055 c_1____1,
1056 c_1____1,
1057 c_1____1,
1058 c__1__1_,
1059 c___11__,
1060 c_______
1061 }, /* v */
1063 c_______,
1064 c_1____1,
1065 c_1____1,
1066 c_1____1,
1067 c_1_11_1,
1068 c_11__11,
1069 c_1____1,
1070 c_______
1071 }, /* w */
1073 c_______,
1074 c_1____1,
1075 c__1__1_,
1076 c___11__,
1077 c___11__,
1078 c__1__1_,
1079 c_1____1,
1080 c_______
1081 }, /* x */
1083 c_______,
1084 c__1___1,
1085 c___1_1_,
1086 c____1__,
1087 c____1__,
1088 c____1__,
1089 c____1__,
1090 c_______
1091 }, /* y */
1093 c_______,
1094 c_111111,
1095 c_____1_,
1096 c____1__,
1097 c___1___,
1098 c__1____,
1099 c_111111,
1100 c_______
1101 }, /* z */
1103 c__111__,
1104 c_1_____,
1105 c_1_____,
1106 c11_____,
1107 c_1_____,
1108 c_1_____,
1109 c__111__,
1110 c_______
1111 }, /* { */
1113 c___1___,
1114 c___1___,
1115 c___1___,
1116 c_______,
1117 c___1___,
1118 c___1___,
1119 c___1___,
1120 c_______
1121 }, /* | */
1123 c__111__,
1124 c_____1_,
1125 c_____1_,
1126 c_____11,
1127 c_____1_,
1128 c_____1_,
1129 c__111__,
1130 c_______
1131 }, /* } */
1133 c_11____,
1134 c1__1__1,
1135 c____11_,
1136 c_______,
1137 c_______,
1138 c_______,
1139 c_______,
1140 c_______
1141 }, /* ~ */
1144 c_1__1__,
1145 c1__1__1,
1146 c__1__1_,
1147 c_1__1__,
1148 c1__1__1,
1149 c__1__1_,
1150 c_1__1__,
1151 c1__1__1
1152 } /* rub-out */