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