gitrev.sh: disable dirty-tree check
[dragonfly.git] / usr.sbin / lpr / lpd / lpdchar.c
blobad0e74e49044dda22eb11342eff93d4c791770d5
1 /*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
33 * @(#)lpdchar.c 8.1 (Berkeley) 6/6/93
34 * $FreeBSD: src/usr.sbin/lpr/lpd/lpdchar.c,v 1.5 1999/08/28 01:16:52 peter Exp $
35 * $DragonFly: src/usr.sbin/lpr/lpd/lpdchar.c,v 1.2 2003/06/17 04:29:56 dillon Exp $
39 * Character set for line printer daemon
41 #include "lp.local.h"
42 #include "extern.h"
44 #define c_______ 0
45 #define c______1 01
46 #define c_____1_ 02
47 #define c____1__ 04
48 #define c____11_ 06
49 #define c___1___ 010
50 #define c___1__1 011
51 #define c___1_1_ 012
52 #define c___11__ 014
53 #define c__1____ 020
54 #define c__1__1_ 022
55 #define c__1_1__ 024
56 #define c__11___ 030
57 #define c__111__ 034
58 #define c__111_1 035
59 #define c__1111_ 036
60 #define c__11111 037
61 #define c_1_____ 040
62 #define c_1____1 041
63 #define c_1___1_ 042
64 #define c_1__1__ 044
65 #define c_1_1___ 050
66 #define c_1_1__1 051
67 #define c_1_1_1_ 052
68 #define c_11____ 060
69 #define c_11_11_ 066
70 #define c_111___ 070
71 #define c_111__1 071
72 #define c_111_1_ 072
73 #define c_1111__ 074
74 #define c_1111_1 075
75 #define c_11111_ 076
76 #define c_111111 077
77 #define c1______ 0100
78 #define c1_____1 0101
79 #define c1____1_ 0102
80 #define c1____11 0103
81 #define c1___1__ 0104
82 #define c1___1_1 0105
83 #define c1___11_ 0106
84 #define c1__1___ 0110
85 #define c1__1__1 0111
86 #define c1__11_1 0115
87 #define c1__1111 0117
88 #define c1_1____ 0120
89 #define c1_1___1 0121
90 #define c1_1_1_1 0125
91 #define c1_1_11_ 0126
92 #define c1_111__ 0134
93 #define c1_1111_ 0136
94 #define c11____1 0141
95 #define c11___1_ 0142
96 #define c11___11 0143
97 #define c11_1___ 0150
98 #define c11_1__1 0151
99 #define c111_11_ 0166
100 #define c1111___ 0170
101 #define c11111__ 0174
102 #define c111111_ 0176
103 #define c1111111 0177
105 char scnkey[][HEIGHT] = /* this is relatively easy to modify */
106 /* just look: */
108 { c_______,
109 c_______,
110 c_______,
111 c_______,
112 c_______,
113 c_______,
114 c_______,
115 c_______,
116 c_______ }, /* */
118 { c__11___,
119 c__11___,
120 c__11___,
121 c__11___,
122 c__11___,
123 c_______,
124 c_______,
125 c__11___,
126 c__11___ }, /* ! */
128 { c_1__1__,
129 c_1__1__,
130 c_______,
131 c_______,
132 c_______,
133 c_______,
134 c_______,
135 c_______,
136 c_______ }, /* " */
138 { c_______,
139 c__1_1__,
140 c__1_1__,
141 c1111111,
142 c__1_1__,
143 c1111111,
144 c__1_1__,
145 c__1_1__,
146 c_______ }, /* # */
148 { c___1___,
149 c_11111_,
150 c1__1__1,
151 c1__1___,
152 c_11111_,
153 c___1__1,
154 c1__1__1,
155 c_11111_,
156 c___1___ }, /* $ */
158 { c_1_____,
159 c1_1___1,
160 c_1___1_,
161 c____1__,
162 c___1___,
163 c__1____,
164 c_1___1_,
165 c1___1_1,
166 c_____1_ }, /* % */
168 { c_11____,
169 c1__1___,
170 c1___1__,
171 c_1_1___,
172 c__1____,
173 c_1_1__1,
174 c1___11_,
175 c1___11_,
176 c_111__1 }, /* & */
178 { c___11__,
179 c___11__,
180 c___1___,
181 c__1____,
182 c_______,
183 c_______,
184 c_______,
185 c_______,
186 c_______ }, /* ' */
188 { c____1__,
189 c___1___,
190 c__1____,
191 c__1____,
192 c__1____,
193 c__1____,
194 c__1____,
195 c___1___,
196 c____1__ }, /* ( */
198 { c__1____,
199 c___1___,
200 c____1__,
201 c____1__,
202 c____1__,
203 c____1__,
204 c____1__,
205 c___1___,
206 c__1____ }, /* ) */
208 { c_______,
209 c___1___,
210 c1__1__1,
211 c_1_1_1_,
212 c__111__,
213 c_1_1_1_,
214 c1__1__1,
215 c___1___,
216 c_______ }, /* * */
218 { c_______,
219 c___1___,
220 c___1___,
221 c___1___,
222 c1111111,
223 c___1___,
224 c___1___,
225 c___1___,
226 c_______ }, /* + */
228 { c_______,
229 c_______,
230 c_______,
231 c_______,
232 c__11___,
233 c__11___,
234 c__1____,
235 c_1_____,
236 c_______ }, /* , */
238 { c_______,
239 c_______,
240 c_______,
241 c_______,
242 c1111111,
243 c_______,
244 c_______,
245 c_______,
246 c_______ }, /* - */
248 { c_______,
249 c_______,
250 c_______,
251 c_______,
252 c_______,
253 c_______,
254 c_______,
255 c__11___,
256 c__11___ }, /* . */
258 { c_______,
259 c______1,
260 c_____1_,
261 c____1__,
262 c___1___,
263 c__1____,
264 c_1_____,
265 c1______,
266 c_______ }, /* / */
268 { c_11111_,
269 c1_____1,
270 c1____11,
271 c1___1_1,
272 c1__1__1,
273 c1_1___1,
274 c11____1,
275 c1_____1,
276 c_11111_ }, /* 0 */
278 { c___1___,
279 c__11___,
280 c_1_1___,
281 c___1___,
282 c___1___,
283 c___1___,
284 c___1___,
285 c___1___,
286 c_11111_ }, /* 1 */
288 { c_11111_,
289 c1_____1,
290 c______1,
291 c_____1_,
292 c__111__,
293 c_1_____,
294 c1______,
295 c1______,
296 c1111111 }, /* 2 */
298 { c_11111_,
299 c1_____1,
300 c______1,
301 c______1,
302 c__1111_,
303 c______1,
304 c______1,
305 c1_____1,
306 c_11111_ }, /* 3 */
308 { c_____1_,
309 c____11_,
310 c___1_1_,
311 c__1__1_,
312 c_1___1_,
313 c1____1_,
314 c1111111,
315 c_____1_,
316 c_____1_ }, /* 4 */
318 { c1111111,
319 c1______,
320 c1______,
321 c11111__,
322 c_____1_,
323 c______1,
324 c______1,
325 c1____1_,
326 c_1111__ }, /* 5 */
328 { c__1111_,
329 c_1_____,
330 c1______,
331 c1______,
332 c1_1111_,
333 c11____1,
334 c1_____1,
335 c1_____1,
336 c_11111_ }, /* 6 */
338 { c1111111,
339 c1_____1,
340 c_____1_,
341 c____1__,
342 c___1___,
343 c__1____,
344 c__1____,
345 c__1____,
346 c__1____ }, /* 7 */
348 { c_11111_,
349 c1_____1,
350 c1_____1,
351 c1_____1,
352 c_11111_,
353 c1_____1,
354 c1_____1,
355 c1_____1,
356 c_11111_ }, /* 8 */
358 { c_11111_,
359 c1_____1,
360 c1_____1,
361 c1_____1,
362 c_111111,
363 c______1,
364 c______1,
365 c1_____1,
366 c_1111__ }, /* 9 */
368 { c_______,
369 c_______,
370 c_______,
371 c__11___,
372 c__11___,
373 c_______,
374 c_______,
375 c__11___,
376 c__11___ }, /* : */
379 { c__11___,
380 c__11___,
381 c_______,
382 c_______,
383 c__11___,
384 c__11___,
385 c__1____,
386 c_1_____,
387 c_______ }, /* ; */
389 { c____1__,
390 c___1___,
391 c__1____,
392 c_1_____,
393 c1______,
394 c_1_____,
395 c__1____,
396 c___1___,
397 c____1__ }, /* < */
399 { c_______,
400 c_______,
401 c_______,
402 c1111111,
403 c_______,
404 c1111111,
405 c_______,
406 c_______,
407 c_______ }, /* = */
409 { c__1____,
410 c___1___,
411 c____1__,
412 c_____1_,
413 c______1,
414 c_____1_,
415 c____1__,
416 c___1___,
417 c__1____ }, /* > */
419 { c__1111_,
420 c_1____1,
421 c_1____1,
422 c______1,
423 c____11_,
424 c___1___,
425 c___1___,
426 c_______,
427 c___1___ }, /* ? */
429 { c__1111_,
430 c_1____1,
431 c1__11_1,
432 c1_1_1_1,
433 c1_1_1_1,
434 c1_1111_,
435 c1______,
436 c_1____1,
437 c__1111_ }, /* @ */
439 { c__111__,
440 c_1___1_,
441 c1_____1,
442 c1_____1,
443 c1111111,
444 c1_____1,
445 c1_____1,
446 c1_____1,
447 c1_____1 }, /* A */
449 { c111111_,
450 c_1____1,
451 c_1____1,
452 c_1____1,
453 c_11111_,
454 c_1____1,
455 c_1____1,
456 c_1____1,
457 c111111_ }, /* B */
459 { c__1111_,
460 c_1____1,
461 c1______,
462 c1______,
463 c1______,
464 c1______,
465 c1______,
466 c_1____1,
467 c__1111_ }, /* C */
469 { c11111__,
470 c_1___1_,
471 c_1____1,
472 c_1____1,
473 c_1____1,
474 c_1____1,
475 c_1____1,
476 c_1___1_,
477 c11111__ }, /* D */
479 { c1111111,
480 c1______,
481 c1______,
482 c1______,
483 c111111_,
484 c1______,
485 c1______,
486 c1______,
487 c1111111 }, /* E */
489 { c1111111,
490 c1______,
491 c1______,
492 c1______,
493 c111111_,
494 c1______,
495 c1______,
496 c1______,
497 c1______ }, /* F */
499 { c__1111_,
500 c_1____1,
501 c1______,
502 c1______,
503 c1______,
504 c1__1111,
505 c1_____1,
506 c_1____1,
507 c__1111_ }, /* G */
509 { c1_____1,
510 c1_____1,
511 c1_____1,
512 c1_____1,
513 c1111111,
514 c1_____1,
515 c1_____1,
516 c1_____1,
517 c1_____1 }, /* H */
519 { c_11111_,
520 c___1___,
521 c___1___,
522 c___1___,
523 c___1___,
524 c___1___,
525 c___1___,
526 c___1___,
527 c_11111_ }, /* I */
529 { c__11111,
530 c____1__,
531 c____1__,
532 c____1__,
533 c____1__,
534 c____1__,
535 c____1__,
536 c1___1__,
537 c_111___ }, /* J */
539 { c1_____1,
540 c1____1_,
541 c1___1__,
542 c1__1___,
543 c1_1____,
544 c11_1___,
545 c1___1__,
546 c1____1_,
547 c1_____1 }, /* K */
549 { c1______,
550 c1______,
551 c1______,
552 c1______,
553 c1______,
554 c1______,
555 c1______,
556 c1______,
557 c1111111 }, /* L */
559 { c1_____1,
560 c11___11,
561 c1_1_1_1,
562 c1__1__1,
563 c1_____1,
564 c1_____1,
565 c1_____1,
566 c1_____1,
567 c1_____1 }, /* M */
569 { c1_____1,
570 c11____1,
571 c1_1___1,
572 c1__1__1,
573 c1___1_1,
574 c1____11,
575 c1_____1,
576 c1_____1,
577 c1_____1 }, /* N */
579 { c__111__,
580 c_1___1_,
581 c1_____1,
582 c1_____1,
583 c1_____1,
584 c1_____1,
585 c1_____1,
586 c_1___1_,
587 c__111__ }, /* O */
589 { c111111_,
590 c1_____1,
591 c1_____1,
592 c1_____1,
593 c111111_,
594 c1______,
595 c1______,
596 c1______,
597 c1______ }, /* P */
599 { c__111__,
600 c_1___1_,
601 c1_____1,
602 c1_____1,
603 c1_____1,
604 c1__1__1,
605 c1___1_1,
606 c_1___1_,
607 c__111_1 }, /* Q */
609 { c111111_,
610 c1_____1,
611 c1_____1,
612 c1_____1,
613 c111111_,
614 c1__1___,
615 c1___1__,
616 c1____1_,
617 c1_____1 }, /* R */
619 { c_11111_,
620 c1_____1,
621 c1______,
622 c1______,
623 c_11111_,
624 c______1,
625 c______1,
626 c1_____1,
627 c_11111_ }, /* S */
629 { c1111111,
630 c___1___,
631 c___1___,
632 c___1___,
633 c___1___,
634 c___1___,
635 c___1___,
636 c___1___,
637 c___1___ }, /* T */
639 { c1_____1,
640 c1_____1,
641 c1_____1,
642 c1_____1,
643 c1_____1,
644 c1_____1,
645 c1_____1,
646 c1_____1,
647 c_11111_ }, /* U */
649 { c1_____1,
650 c1_____1,
651 c1_____1,
652 c_1___1_,
653 c_1___1_,
654 c__1_1__,
655 c__1_1__,
656 c___1___,
657 c___1___ }, /* V */
659 { c1_____1,
660 c1_____1,
661 c1_____1,
662 c1_____1,
663 c1__1__1,
664 c1__1__1,
665 c1_1_1_1,
666 c11___11,
667 c1_____1 }, /* W */
669 { c1_____1,
670 c1_____1,
671 c_1___1_,
672 c__1_1__,
673 c___1___,
674 c__1_1__,
675 c_1___1_,
676 c1_____1,
677 c1_____1 }, /* X */
679 { c1_____1,
680 c1_____1,
681 c_1___1_,
682 c__1_1__,
683 c___1___,
684 c___1___,
685 c___1___,
686 c___1___,
687 c___1___ }, /* Y */
689 { c1111111,
690 c______1,
691 c_____1_,
692 c____1__,
693 c___1___,
694 c__1____,
695 c_1_____,
696 c1______,
697 c1111111 }, /* Z */
699 { c_1111__,
700 c_1_____,
701 c_1_____,
702 c_1_____,
703 c_1_____,
704 c_1_____,
705 c_1_____,
706 c_1_____,
707 c_1111__ }, /* [ */
709 { c_______,
710 c1______,
711 c_1_____,
712 c__1____,
713 c___1___,
714 c____1__,
715 c_____1_,
716 c______1,
717 c_______ }, /* \ */
719 { c__1111_,
720 c_____1_,
721 c_____1_,
722 c_____1_,
723 c_____1_,
724 c_____1_,
725 c_____1_,
726 c_____1_,
727 c__1111_ }, /* ] */
729 { c___1___,
730 c__1_1__,
731 c_1___1_,
732 c1_____1,
733 c_______,
734 c_______,
735 c_______,
736 c_______ }, /* ^ */
738 { c_______,
739 c_______,
740 c_______,
741 c_______,
742 c_______,
743 c_______,
744 c_______,
745 c1111111,
746 c_______ }, /* _ */
748 { c__11___,
749 c__11___,
750 c___1___,
751 c____1__,
752 c_______,
753 c_______,
754 c_______,
755 c_______,
756 c_______ }, /* ` */
758 { c_______,
759 c_______,
760 c_______,
761 c_1111__,
762 c_____1_,
763 c_11111_,
764 c1_____1,
765 c1____11,
766 c_1111_1 }, /* a */
768 { c1______,
769 c1______,
770 c1______,
771 c1_111__,
772 c11___1_,
773 c1_____1,
774 c1_____1,
775 c11___1_,
776 c1_111__ }, /* b */
778 { c_______,
779 c_______,
780 c_______,
781 c_1111__,
782 c1____1_,
783 c1______,
784 c1______,
785 c1____1_,
786 c_1111__ }, /* c */
788 { c_____1_,
789 c_____1_,
790 c_____1_,
791 c_111_1_,
792 c1___11_,
793 c1____1_,
794 c1____1_,
795 c1___11_,
796 c_111_1_ }, /* d */
798 { c_______,
799 c_______,
800 c_______,
801 c_1111__,
802 c1____1_,
803 c111111_,
804 c1______,
805 c1____1_,
806 c_1111__ }, /* e */
808 { c___11__,
809 c__1__1_,
810 c__1____,
811 c__1____,
812 c11111__,
813 c__1____,
814 c__1____,
815 c__1____,
816 c__1____ }, /* f */
818 { c_111_1_,
819 c1___11_,
820 c1____1_,
821 c1____1_,
822 c1___11_,
823 c_111_1_,
824 c_____1_,
825 c1____1_,
826 c_1111__ }, /* g */
828 { c1______,
829 c1______,
830 c1______,
831 c1_111__,
832 c11___1_,
833 c1____1_,
834 c1____1_,
835 c1____1_,
836 c1____1_ }, /* h */
838 { c_______,
839 c___1___,
840 c_______,
841 c__11___,
842 c___1___,
843 c___1___,
844 c___1___,
845 c___1___,
846 c__111__ }, /* i */
848 { c____11_,
849 c_____1_,
850 c_____1_,
851 c_____1_,
852 c_____1_,
853 c_____1_,
854 c_____1_,
855 c_1___1_,
856 c__111__ }, /* j */
858 { c1______,
859 c1______,
860 c1______,
861 c1___1__,
862 c1__1___,
863 c1_1____,
864 c11_1___,
865 c1___1__,
866 c1____1_ }, /* k */
868 { c__11___,
869 c___1___,
870 c___1___,
871 c___1___,
872 c___1___,
873 c___1___,
874 c___1___,
875 c___1___,
876 c__111__ }, /* l */
878 { c_______,
879 c_______,
880 c_______,
881 c1_1_11_,
882 c11_1__1,
883 c1__1__1,
884 c1__1__1,
885 c1__1__1,
886 c1__1__1 }, /* m */
888 { c_______,
889 c_______,
890 c_______,
891 c1_111__,
892 c11___1_,
893 c1____1_,
894 c1____1_,
895 c1____1_,
896 c1____1_ }, /* n */
898 { c_______,
899 c_______,
900 c_______,
901 c_1111__,
902 c1____1_,
903 c1____1_,
904 c1____1_,
905 c1____1_,
906 c_1111__ }, /* o */
908 { c1_111__,
909 c11___1_,
910 c1____1_,
911 c1____1_,
912 c11___1_,
913 c1_111__,
914 c1______,
915 c1______,
916 c1______ }, /* p */
918 { c_111_1_,
919 c1___11_,
920 c1____1_,
921 c1____1_,
922 c1___11_,
923 c_111_1_,
924 c_____1_,
925 c_____1_,
926 c_____1_ }, /* q */
928 { c_______,
929 c_______,
930 c_______,
931 c1_111__,
932 c11___1_,
933 c1______,
934 c1______,
935 c1______,
936 c1______ }, /* r */
938 { c_______,
939 c_______,
940 c_______,
941 c_1111__,
942 c1____1_,
943 c_11____,
944 c___11__,
945 c1____1_,
946 c_1111__ }, /* s */
948 { c_______,
949 c__1____,
950 c__1____,
951 c11111__,
952 c__1____,
953 c__1____,
954 c__1____,
955 c__1__1_,
956 c___11__ }, /* t */
958 { c_______,
959 c_______,
960 c_______,
961 c1____1_,
962 c1____1_,
963 c1____1_,
964 c1____1_,
965 c1___11_,
966 c_111_1_ }, /* u */
968 { c_______,
969 c_______,
970 c_______,
971 c1_____1,
972 c1_____1,
973 c1_____1,
974 c_1___1_,
975 c__1_1__,
976 c___1___ }, /* v */
978 { c_______,
979 c_______,
980 c_______,
981 c1_____1,
982 c1__1__1,
983 c1__1__1,
984 c1__1__1,
985 c1__1__1,
986 c_11_11_ }, /* w */
988 { c_______,
989 c_______,
990 c_______,
991 c1____1_,
992 c_1__1__,
993 c__11___,
994 c__11___,
995 c_1__1__,
996 c1____1_ }, /* x */
998 { c1____1_,
999 c1____1_,
1000 c1____1_,
1001 c1____1_,
1002 c1___11_,
1003 c_111_1_,
1004 c_____1_,
1005 c1____1_,
1006 c_1111__ }, /* y */
1008 { c_______,
1009 c_______,
1010 c_______,
1011 c111111_,
1012 c____1__,
1013 c___1___,
1014 c__1____,
1015 c_1_____,
1016 c111111_ }, /* z */
1018 { c___11__,
1019 c__1____,
1020 c__1____,
1021 c__1____,
1022 c_1_____,
1023 c__1____,
1024 c__1____,
1025 c__1____,
1026 c___11__ }, /* } */
1028 { c___1___,
1029 c___1___,
1030 c___1___,
1031 c___1___,
1032 c___1___,
1033 c___1___,
1034 c___1___,
1035 c___1___,
1036 c___1___ }, /* | */
1038 { c__11___,
1039 c____1__,
1040 c____1__,
1041 c____1__,
1042 c_____1_,
1043 c____1__,
1044 c____1__,
1045 c____1__,
1046 c__11___ }, /* } */
1048 { c_11____,
1049 c1__1__1,
1050 c____11_,
1051 c_______,
1052 c_______,
1053 c_______,
1054 c_______,
1055 c_______,
1056 c_______ }, /* ~ */
1058 { c_1__1__,
1059 c1__1__1,
1060 c__1__1_,
1061 c_1__1__,
1062 c1__1__1,
1063 c__1__1_,
1064 c_1__1__,
1065 c1__1__1,
1066 c__1__1_ } /* rub-out */