1 /* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 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. 20 * 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. 32 */ 33 34 #if 0 35 #ifndef lint 36 static char sccsid[] = "@(#)lpdchar.c 8.1 (Berkeley) 6/6/93"; 37 #endif /* not lint */ 38 #endif 39 40 #include "lp.cdefs.h" /* A cross-platform version of <sys/cdefs.h> */ 41 __FBSDID("$FreeBSD$"); 42 43 /* 44 * Character set for line printer daemon 45 */ 46 #include "lp.local.h" 47 #include "extern.h" 48 49 #define c_______ 0 50 #define c______1 01 51 #define c_____1_ 02 52 #define c____1__ 04 53 #define c____11_ 06 54 #define c___1___ 010 55 #define c___1__1 011 56 #define c___1_1_ 012 57 #define c___11__ 014 58 #define c__1____ 020 59 #define c__1__1_ 022 60 #define c__1_1__ 024 61 #define c__11___ 030 62 #define c__111__ 034 63 #define c__111_1 035 64 #define c__1111_ 036 65 #define c__11111 037 66 #define c_1_____ 040 67 #define c_1____1 041 68 #define c_1___1_ 042 69 #define c_1__1__ 044 70 #define c_1_1___ 050 71 #define c_1_1__1 051 72 #define c_1_1_1_ 052 73 #define c_11____ 060 74 #define c_11_11_ 066 75 #define c_111___ 070 76 #define c_111__1 071 77 #define c_111_1_ 072 78 #define c_1111__ 074 79 #define c_1111_1 075 80 #define c_11111_ 076 81 #define c_111111 077 82 #define c1______ 0100 83 #define c1_____1 0101 84 #define c1____1_ 0102 85 #define c1____11 0103 86 #define c1___1__ 0104 87 #define c1___1_1 0105 88 #define c1___11_ 0106 89 #define c1__1___ 0110 90 #define c1__1__1 0111 91 #define c1__11_1 0115 92 #define c1__1111 0117 93 #define c1_1____ 0120 94 #define c1_1___1 0121 95 #define c1_1_1_1 0125 96 #define c1_1_11_ 0126 97 #define c1_111__ 0134 98 #define c1_1111_ 0136 99 #define c11____1 0141 100 #define c11___1_ 0142 101 #define c11___11 0143 102 #define c11_1___ 0150 103 #define c11_1__1 0151 104 #define c111_11_ 0166 105 #define c1111___ 0170 106 #define c11111__ 0174 107 #define c111111_ 0176 108 #define c1111111 0177 109 110 char scnkey[][HEIGHT] = /* this is relatively easy to modify */ 111 /* just look: */ 112 { 113 { c_______, 114 c_______, 115 c_______, 116 c_______, 117 c_______, 118 c_______, 119 c_______, 120 c_______, 121 c_______ }, /* */ 122 123 { c__11___, 124 c__11___, 125 c__11___, 126 c__11___, 127 c__11___, 128 c_______, 129 c_______, 130 c__11___, 131 c__11___ }, /* ! */ 132 133 { c_1__1__, 134 c_1__1__, 135 c_______, 136 c_______, 137 c_______, 138 c_______, 139 c_______, 140 c_______, 141 c_______ }, /* " */ 142 143 { c_______, 144 c__1_1__, 145 c__1_1__, 146 c1111111, 147 c__1_1__, 148 c1111111, 149 c__1_1__, 150 c__1_1__, 151 c_______ }, /* # */ 152 153 { c___1___, 154 c_11111_, 155 c1__1__1, 156 c1__1___, 157 c_11111_, 158 c___1__1, 159 c1__1__1, 160 c_11111_, 161 c___1___ }, /* $ */ 162 163 { c_1_____, 164 c1_1___1, 165 c_1___1_, 166 c____1__, 167 c___1___, 168 c__1____, 169 c_1___1_, 170 c1___1_1, 171 c_____1_ }, /* % */ 172 173 { c_11____, 174 c1__1___, 175 c1___1__, 176 c_1_1___, 177 c__1____, 178 c_1_1__1, 179 c1___11_, 180 c1___11_, 181 c_111__1 }, /* & */ 182 183 { c___11__, 184 c___11__, 185 c___1___, 186 c__1____, 187 c_______, 188 c_______, 189 c_______, 190 c_______, 191 c_______ }, /* ' */ 192 193 { c____1__, 194 c___1___, 195 c__1____, 196 c__1____, 197 c__1____, 198 c__1____, 199 c__1____, 200 c___1___, 201 c____1__ }, /* ( */ 202 203 { c__1____, 204 c___1___, 205 c____1__, 206 c____1__, 207 c____1__, 208 c____1__, 209 c____1__, 210 c___1___, 211 c__1____ }, /* ) */ 212 213 { c_______, 214 c___1___, 215 c1__1__1, 216 c_1_1_1_, 217 c__111__, 218 c_1_1_1_, 219 c1__1__1, 220 c___1___, 221 c_______ }, /* * */ 222 223 { c_______, 224 c___1___, 225 c___1___, 226 c___1___, 227 c1111111, 228 c___1___, 229 c___1___, 230 c___1___, 231 c_______ }, /* + */ 232 233 { c_______, 234 c_______, 235 c_______, 236 c_______, 237 c__11___, 238 c__11___, 239 c__1____, 240 c_1_____, 241 c_______ }, /* , */ 242 243 { c_______, 244 c_______, 245 c_______, 246 c_______, 247 c1111111, 248 c_______, 249 c_______, 250 c_______, 251 c_______ }, /* - */ 252 253 { c_______, 254 c_______, 255 c_______, 256 c_______, 257 c_______, 258 c_______, 259 c_______, 260 c__11___, 261 c__11___ }, /* . */ 262 263 { c_______, 264 c______1, 265 c_____1_, 266 c____1__, 267 c___1___, 268 c__1____, 269 c_1_____, 270 c1______, 271 c_______ }, /* / */ 272 273 { c_11111_, 274 c1_____1, 275 c1____11, 276 c1___1_1, 277 c1__1__1, 278 c1_1___1, 279 c11____1, 280 c1_____1, 281 c_11111_ }, /* 0 */ 282 283 { c___1___, 284 c__11___, 285 c_1_1___, 286 c___1___, 287 c___1___, 288 c___1___, 289 c___1___, 290 c___1___, 291 c_11111_ }, /* 1 */ 292 293 { c_11111_, 294 c1_____1, 295 c______1, 296 c_____1_, 297 c__111__, 298 c_1_____, 299 c1______, 300 c1______, 301 c1111111 }, /* 2 */ 302 303 { c_11111_, 304 c1_____1, 305 c______1, 306 c______1, 307 c__1111_, 308 c______1, 309 c______1, 310 c1_____1, 311 c_11111_ }, /* 3 */ 312 313 { c_____1_, 314 c____11_, 315 c___1_1_, 316 c__1__1_, 317 c_1___1_, 318 c1____1_, 319 c1111111, 320 c_____1_, 321 c_____1_ }, /* 4 */ 322 323 { c1111111, 324 c1______, 325 c1______, 326 c11111__, 327 c_____1_, 328 c______1, 329 c______1, 330 c1____1_, 331 c_1111__ }, /* 5 */ 332 333 { c__1111_, 334 c_1_____, 335 c1______, 336 c1______, 337 c1_1111_, 338 c11____1, 339 c1_____1, 340 c1_____1, 341 c_11111_ }, /* 6 */ 342 343 { c1111111, 344 c1_____1, 345 c_____1_, 346 c____1__, 347 c___1___, 348 c__1____, 349 c__1____, 350 c__1____, 351 c__1____ }, /* 7 */ 352 353 { c_11111_, 354 c1_____1, 355 c1_____1, 356 c1_____1, 357 c_11111_, 358 c1_____1, 359 c1_____1, 360 c1_____1, 361 c_11111_ }, /* 8 */ 362 363 { c_11111_, 364 c1_____1, 365 c1_____1, 366 c1_____1, 367 c_111111, 368 c______1, 369 c______1, 370 c1_____1, 371 c_1111__ }, /* 9 */ 372 373 { c_______, 374 c_______, 375 c_______, 376 c__11___, 377 c__11___, 378 c_______, 379 c_______, 380 c__11___, 381 c__11___ }, /* : */ 382 383 384 { c__11___, 385 c__11___, 386 c_______, 387 c_______, 388 c__11___, 389 c__11___, 390 c__1____, 391 c_1_____, 392 c_______ }, /* ; */ 393 394 { c____1__, 395 c___1___, 396 c__1____, 397 c_1_____, 398 c1______, 399 c_1_____, 400 c__1____, 401 c___1___, 402 c____1__ }, /* < */ 403 404 { c_______, 405 c_______, 406 c_______, 407 c1111111, 408 c_______, 409 c1111111, 410 c_______, 411 c_______, 412 c_______ }, /* = */ 413 414 { c__1____, 415 c___1___, 416 c____1__, 417 c_____1_, 418 c______1, 419 c_____1_, 420 c____1__, 421 c___1___, 422 c__1____ }, /* > */ 423 424 { c__1111_, 425 c_1____1, 426 c_1____1, 427 c______1, 428 c____11_, 429 c___1___, 430 c___1___, 431 c_______, 432 c___1___ }, /* ? */ 433 434 { c__1111_, 435 c_1____1, 436 c1__11_1, 437 c1_1_1_1, 438 c1_1_1_1, 439 c1_1111_, 440 c1______, 441 c_1____1, 442 c__1111_ }, /* @ */ 443 444 { c__111__, 445 c_1___1_, 446 c1_____1, 447 c1_____1, 448 c1111111, 449 c1_____1, 450 c1_____1, 451 c1_____1, 452 c1_____1 }, /* A */ 453 454 { c111111_, 455 c_1____1, 456 c_1____1, 457 c_1____1, 458 c_11111_, 459 c_1____1, 460 c_1____1, 461 c_1____1, 462 c111111_ }, /* B */ 463 464 { c__1111_, 465 c_1____1, 466 c1______, 467 c1______, 468 c1______, 469 c1______, 470 c1______, 471 c_1____1, 472 c__1111_ }, /* C */ 473 474 { c11111__, 475 c_1___1_, 476 c_1____1, 477 c_1____1, 478 c_1____1, 479 c_1____1, 480 c_1____1, 481 c_1___1_, 482 c11111__ }, /* D */ 483 484 { c1111111, 485 c1______, 486 c1______, 487 c1______, 488 c111111_, 489 c1______, 490 c1______, 491 c1______, 492 c1111111 }, /* E */ 493 494 { c1111111, 495 c1______, 496 c1______, 497 c1______, 498 c111111_, 499 c1______, 500 c1______, 501 c1______, 502 c1______ }, /* F */ 503 504 { c__1111_, 505 c_1____1, 506 c1______, 507 c1______, 508 c1______, 509 c1__1111, 510 c1_____1, 511 c_1____1, 512 c__1111_ }, /* G */ 513 514 { c1_____1, 515 c1_____1, 516 c1_____1, 517 c1_____1, 518 c1111111, 519 c1_____1, 520 c1_____1, 521 c1_____1, 522 c1_____1 }, /* H */ 523 524 { c_11111_, 525 c___1___, 526 c___1___, 527 c___1___, 528 c___1___, 529 c___1___, 530 c___1___, 531 c___1___, 532 c_11111_ }, /* I */ 533 534 { c__11111, 535 c____1__, 536 c____1__, 537 c____1__, 538 c____1__, 539 c____1__, 540 c____1__, 541 c1___1__, 542 c_111___ }, /* J */ 543 544 { c1_____1, 545 c1____1_, 546 c1___1__, 547 c1__1___, 548 c1_1____, 549 c11_1___, 550 c1___1__, 551 c1____1_, 552 c1_____1 }, /* K */ 553 554 { c1______, 555 c1______, 556 c1______, 557 c1______, 558 c1______, 559 c1______, 560 c1______, 561 c1______, 562 c1111111 }, /* L */ 563 564 { c1_____1, 565 c11___11, 566 c1_1_1_1, 567 c1__1__1, 568 c1_____1, 569 c1_____1, 570 c1_____1, 571 c1_____1, 572 c1_____1 }, /* M */ 573 574 { c1_____1, 575 c11____1, 576 c1_1___1, 577 c1__1__1, 578 c1___1_1, 579 c1____11, 580 c1_____1, 581 c1_____1, 582 c1_____1 }, /* N */ 583 584 { c__111__, 585 c_1___1_, 586 c1_____1, 587 c1_____1, 588 c1_____1, 589 c1_____1, 590 c1_____1, 591 c_1___1_, 592 c__111__ }, /* O */ 593 594 { c111111_, 595 c1_____1, 596 c1_____1, 597 c1_____1, 598 c111111_, 599 c1______, 600 c1______, 601 c1______, 602 c1______ }, /* P */ 603 604 { c__111__, 605 c_1___1_, 606 c1_____1, 607 c1_____1, 608 c1_____1, 609 c1__1__1, 610 c1___1_1, 611 c_1___1_, 612 c__111_1 }, /* Q */ 613 614 { c111111_, 615 c1_____1, 616 c1_____1, 617 c1_____1, 618 c111111_, 619 c1__1___, 620 c1___1__, 621 c1____1_, 622 c1_____1 }, /* R */ 623 624 { c_11111_, 625 c1_____1, 626 c1______, 627 c1______, 628 c_11111_, 629 c______1, 630 c______1, 631 c1_____1, 632 c_11111_ }, /* S */ 633 634 { c1111111, 635 c___1___, 636 c___1___, 637 c___1___, 638 c___1___, 639 c___1___, 640 c___1___, 641 c___1___, 642 c___1___ }, /* T */ 643 644 { c1_____1, 645 c1_____1, 646 c1_____1, 647 c1_____1, 648 c1_____1, 649 c1_____1, 650 c1_____1, 651 c1_____1, 652 c_11111_ }, /* U */ 653 654 { c1_____1, 655 c1_____1, 656 c1_____1, 657 c_1___1_, 658 c_1___1_, 659 c__1_1__, 660 c__1_1__, 661 c___1___, 662 c___1___ }, /* V */ 663 664 { c1_____1, 665 c1_____1, 666 c1_____1, 667 c1_____1, 668 c1__1__1, 669 c1__1__1, 670 c1_1_1_1, 671 c11___11, 672 c1_____1 }, /* W */ 673 674 { c1_____1, 675 c1_____1, 676 c_1___1_, 677 c__1_1__, 678 c___1___, 679 c__1_1__, 680 c_1___1_, 681 c1_____1, 682 c1_____1 }, /* X */ 683 684 { c1_____1, 685 c1_____1, 686 c_1___1_, 687 c__1_1__, 688 c___1___, 689 c___1___, 690 c___1___, 691 c___1___, 692 c___1___ }, /* Y */ 693 694 { c1111111, 695 c______1, 696 c_____1_, 697 c____1__, 698 c___1___, 699 c__1____, 700 c_1_____, 701 c1______, 702 c1111111 }, /* Z */ 703 704 { c_1111__, 705 c_1_____, 706 c_1_____, 707 c_1_____, 708 c_1_____, 709 c_1_____, 710 c_1_____, 711 c_1_____, 712 c_1111__ }, /* [ */ 713 714 { c_______, 715 c1______, 716 c_1_____, 717 c__1____, 718 c___1___, 719 c____1__, 720 c_____1_, 721 c______1, 722 c_______ }, /* \ */ 723 724 { c__1111_, 725 c_____1_, 726 c_____1_, 727 c_____1_, 728 c_____1_, 729 c_____1_, 730 c_____1_, 731 c_____1_, 732 c__1111_ }, /* ] */ 733 734 { c___1___, 735 c__1_1__, 736 c_1___1_, 737 c1_____1, 738 c_______, 739 c_______, 740 c_______, 741 c_______ }, /* ^ */ 742 743 { c_______, 744 c_______, 745 c_______, 746 c_______, 747 c_______, 748 c_______, 749 c_______, 750 c1111111, 751 c_______ }, /* _ */ 752 753 { c__11___, 754 c__11___, 755 c___1___, 756 c____1__, 757 c_______, 758 c_______, 759 c_______, 760 c_______, 761 c_______ }, /* ` */ 762 763 { c_______, 764 c_______, 765 c_______, 766 c_1111__, 767 c_____1_, 768 c_11111_, 769 c1_____1, 770 c1____11, 771 c_1111_1 }, /* a */ 772 773 { c1______, 774 c1______, 775 c1______, 776 c1_111__, 777 c11___1_, 778 c1_____1, 779 c1_____1, 780 c11___1_, 781 c1_111__ }, /* b */ 782 783 { c_______, 784 c_______, 785 c_______, 786 c_1111__, 787 c1____1_, 788 c1______, 789 c1______, 790 c1____1_, 791 c_1111__ }, /* c */ 792 793 { c_____1_, 794 c_____1_, 795 c_____1_, 796 c_111_1_, 797 c1___11_, 798 c1____1_, 799 c1____1_, 800 c1___11_, 801 c_111_1_ }, /* d */ 802 803 { c_______, 804 c_______, 805 c_______, 806 c_1111__, 807 c1____1_, 808 c111111_, 809 c1______, 810 c1____1_, 811 c_1111__ }, /* e */ 812 813 { c___11__, 814 c__1__1_, 815 c__1____, 816 c__1____, 817 c11111__, 818 c__1____, 819 c__1____, 820 c__1____, 821 c__1____ }, /* f */ 822 823 { c_111_1_, 824 c1___11_, 825 c1____1_, 826 c1____1_, 827 c1___11_, 828 c_111_1_, 829 c_____1_, 830 c1____1_, 831 c_1111__ }, /* g */ 832 833 { c1______, 834 c1______, 835 c1______, 836 c1_111__, 837 c11___1_, 838 c1____1_, 839 c1____1_, 840 c1____1_, 841 c1____1_ }, /* h */ 842 843 { c_______, 844 c___1___, 845 c_______, 846 c__11___, 847 c___1___, 848 c___1___, 849 c___1___, 850 c___1___, 851 c__111__ }, /* i */ 852 853 { c____11_, 854 c_____1_, 855 c_____1_, 856 c_____1_, 857 c_____1_, 858 c_____1_, 859 c_____1_, 860 c_1___1_, 861 c__111__ }, /* j */ 862 863 { c1______, 864 c1______, 865 c1______, 866 c1___1__, 867 c1__1___, 868 c1_1____, 869 c11_1___, 870 c1___1__, 871 c1____1_ }, /* k */ 872 873 { c__11___, 874 c___1___, 875 c___1___, 876 c___1___, 877 c___1___, 878 c___1___, 879 c___1___, 880 c___1___, 881 c__111__ }, /* l */ 882 883 { c_______, 884 c_______, 885 c_______, 886 c1_1_11_, 887 c11_1__1, 888 c1__1__1, 889 c1__1__1, 890 c1__1__1, 891 c1__1__1 }, /* m */ 892 893 { c_______, 894 c_______, 895 c_______, 896 c1_111__, 897 c11___1_, 898 c1____1_, 899 c1____1_, 900 c1____1_, 901 c1____1_ }, /* n */ 902 903 { c_______, 904 c_______, 905 c_______, 906 c_1111__, 907 c1____1_, 908 c1____1_, 909 c1____1_, 910 c1____1_, 911 c_1111__ }, /* o */ 912 913 { c1_111__, 914 c11___1_, 915 c1____1_, 916 c1____1_, 917 c11___1_, 918 c1_111__, 919 c1______, 920 c1______, 921 c1______ }, /* p */ 922 923 { c_111_1_, 924 c1___11_, 925 c1____1_, 926 c1____1_, 927 c1___11_, 928 c_111_1_, 929 c_____1_, 930 c_____1_, 931 c_____1_ }, /* q */ 932 933 { c_______, 934 c_______, 935 c_______, 936 c1_111__, 937 c11___1_, 938 c1______, 939 c1______, 940 c1______, 941 c1______ }, /* r */ 942 943 { c_______, 944 c_______, 945 c_______, 946 c_1111__, 947 c1____1_, 948 c_11____, 949 c___11__, 950 c1____1_, 951 c_1111__ }, /* s */ 952 953 { c_______, 954 c__1____, 955 c__1____, 956 c11111__, 957 c__1____, 958 c__1____, 959 c__1____, 960 c__1__1_, 961 c___11__ }, /* t */ 962 963 { c_______, 964 c_______, 965 c_______, 966 c1____1_, 967 c1____1_, 968 c1____1_, 969 c1____1_, 970 c1___11_, 971 c_111_1_ }, /* u */ 972 973 { c_______, 974 c_______, 975 c_______, 976 c1_____1, 977 c1_____1, 978 c1_____1, 979 c_1___1_, 980 c__1_1__, 981 c___1___ }, /* v */ 982 983 { c_______, 984 c_______, 985 c_______, 986 c1_____1, 987 c1__1__1, 988 c1__1__1, 989 c1__1__1, 990 c1__1__1, 991 c_11_11_ }, /* w */ 992 993 { c_______, 994 c_______, 995 c_______, 996 c1____1_, 997 c_1__1__, 998 c__11___, 999 c__11___, 1000 c_1__1__, 1001 c1____1_ }, /* x */ 1002 1003 { c1____1_, 1004 c1____1_, 1005 c1____1_, 1006 c1____1_, 1007 c1___11_, 1008 c_111_1_, 1009 c_____1_, 1010 c1____1_, 1011 c_1111__ }, /* y */ 1012 1013 { c_______, 1014 c_______, 1015 c_______, 1016 c111111_, 1017 c____1__, 1018 c___1___, 1019 c__1____, 1020 c_1_____, 1021 c111111_ }, /* z */ 1022 1023 { c___11__, 1024 c__1____, 1025 c__1____, 1026 c__1____, 1027 c_1_____, 1028 c__1____, 1029 c__1____, 1030 c__1____, 1031 c___11__ }, /* } */ 1032 1033 { c___1___, 1034 c___1___, 1035 c___1___, 1036 c___1___, 1037 c___1___, 1038 c___1___, 1039 c___1___, 1040 c___1___, 1041 c___1___ }, /* | */ 1042 1043 { c__11___, 1044 c____1__, 1045 c____1__, 1046 c____1__, 1047 c_____1_, 1048 c____1__, 1049 c____1__, 1050 c____1__, 1051 c__11___ }, /* } */ 1052 1053 { c_11____, 1054 c1__1__1, 1055 c____11_, 1056 c_______, 1057 c_______, 1058 c_______, 1059 c_______, 1060 c_______, 1061 c_______ }, /* ~ */ 1062 1063 { c_1__1__, 1064 c1__1__1, 1065 c__1__1_, 1066 c_1__1__, 1067 c1__1__1, 1068 c__1__1_, 1069 c_1__1__, 1070 c1__1__1, 1071 c__1__1_ } /* rub-out */ 1072 }; 1073