1 /*@z24.c:Print Service:PrintInit()@*******************************************/
2 /*                                                                           */
3 /*  THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39)                       */
4 /*  COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston                             */
5 /*                                                                           */
6 /*  Jeffrey H. Kingston (jeff@it.usyd.edu.au)                                */
7 /*  School of Information Technologies                                       */
8 /*  The University of Sydney 2006                                            */
9 /*  AUSTRALIA                                                                */
10 /*                                                                           */
11 /*  PDF Back End by Vincent Tan, February 1998.                              */
12 /*                                                                           */
13 /*  This program is free software; you can redistribute it and/or modify     */
14 /*  it under the terms of the GNU General Public License as published by     */
15 /*  the Free Software Foundation; either Version 3, or (at your option)      */
16 /*  any later version.                                                       */
17 /*                                                                           */
18 /*  This program is distributed in the hope that it will be useful,          */
19 /*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
20 /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
21 /*  GNU General Public License for more details.                             */
22 /*                                                                           */
23 /*  You should have received a copy of the GNU General Public License        */
24 /*  along with this program; if not, write to the Free Software              */
25 /*  Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA   */
26 /*                                                                           */
27 /*  FILE:         z24.c                                                      */
28 /*  MODULE:       Print Service                                              */
29 /*  EXTERNS:      EightBitToPrintForm                                        */
30 /*                                                                           */
31 /*  This module used to be a combined implementation of all the back         */
32 /*  ends.  Now these have been split off into separate files, there is       */
33 /*  very little left in this module.                                         */
34 /*                                                                           */
35 /*****************************************************************************/
36 #include "externs.h"
37 
38 
39 /*@::EightBitToPrintForm()@***************************************************/
40 /*                                                                           */
41 /*  char *EightBitToPrintForm[]                                              */
42 /*                                                                           */
43 /*  Given 8-bit character i, returns a string of characters that will be     */
44 /*  interpreted by PostScript as character i when read within a string.      */
45 /*                                                                           */
46 /*      CHAR_OUT==1    Printable ASCII literal, others as escape sequences   */
47 /*      CHAR_OUT==2    Printable ISO-LATIN-1 literal, others escaped         */
48 /*                                                                           */
49 /*****************************************************************************/
50 
51 char *EightBitToPrintForm[] = {
52 #if CHAR_OUT==0
53     "",      "\\001", "\\002", "\\003", "\\004", "\\005", "\\006", "\\007",
54     "\\010", "\\011", "\\012", "\\013", "\\014", "\\015", "\\016", "\\017",
55     "\\020", "\\021", "\\022", "\\023", "\\024", "\\025", "\\026", "\\027",
56     "\\030", "\\031", "\\032", "\\033", "\\034", "\\035", "\\036", "\\037",
57     " ",     "!",     "\"",    "#",     "$",     "%",     "&",     "'",
58     "\\(",   "\\)",   "*",     "+",     ",",     "-",     ".",     "/",
59     "0",     "1",     "2",     "3",     "4",     "5",     "6",     "7",
60     "8",     "9",     ":",     ";",     "<",     "=",     ">",     "?",
61     "@",     "A",     "B",     "C",     "D",     "E",     "F",     "G",
62     "H",     "I",     "J",     "K",     "L",     "M",     "N",     "O",
63     "P",     "Q",     "R",     "S",     "T",     "U",     "V",     "W",
64     "X",     "Y",     "Z",     "[",     "\\\\",  "]",     "^",     "_",
65     "`",     "a",     "b",     "c",     "d",     "e",     "f",     "g",
66     "h",     "i",     "j",     "k",     "l",     "m",     "n",     "o",
67     "p",     "q",     "r",     "s",     "t",     "u",     "v",     "w",
68     "x",     "y",     "z",     "{",     "|",     "}",     "~",     "\\177",
69     "\\200", "\\201", "\\202", "\\203", "\\204", "\\205", "\\206", "\\207",
70     "\\210", "\\211", "\\212", "\\213", "\\214", "\\215", "\\216", "\\217",
71     "\\220", "\\221", "\\222", "\\223", "\\224", "\\225", "\\226", "\\227",
72     "\\230", "\\231", "\\232", "\\233", "\\234", "\\235", "\\236", "\\237",
73     "\\240", "\\241", "\\242", "\\243", "\\244", "\\245", "\\246", "\\247",
74     "\\250", "\\251", "\\252", "\\253", "\\254", "\\255", "\\256", "\\257",
75     "\\260", "\\261", "\\262", "\\263", "\\264", "\\265", "\\266", "\\267",
76     "\\270", "\\271", "\\272", "\\273", "\\274", "\\275", "\\276", "\\277",
77     "\\300", "\\301", "\\302", "\\303", "\\304", "\\305", "\\306", "\\307",
78     "\\310", "\\311", "\\312", "\\313", "\\314", "\\315", "\\316", "\\317",
79     "\\320", "\\321", "\\322", "\\323", "\\324", "\\325", "\\326", "\\327",
80     "\\330", "\\331", "\\332", "\\333", "\\334", "\\335", "\\336", "\\337",
81     "\\340", "\\341", "\\342", "\\343", "\\344", "\\345", "\\346", "\\347",
82     "\\350", "\\351", "\\352", "\\353", "\\354", "\\355", "\\356", "\\357",
83     "\\360", "\\361", "\\362", "\\363", "\\364", "\\365", "\\366", "\\367",
84     "\\370", "\\371", "\\372", "\\373", "\\374", "\\375", "\\376", "\\377"
85 #else
86 #if CHAR_OUT==1
87     "",      "\\001", "\\002", "\\003", "\\004", "\\005", "\\006", "\\007",
88     "\\010", "\\011", "\\012", "\\013", "\\014", "\\015", "\\016", "\\017",
89     "\\020", "\\021", "\\022", "\\023", "\\024", "\\025", "\\026", "\\027",
90     "\\030", "\\031", "\\032", "\\033", "\\034", "\\035", "\\036", "\\037",
91     " ",     "!",     "\"",    "#",     "$",     "%",     "&",     "'",
92     "\\(",   "\\)",   "*",     "+",     ",",     "-",     ".",     "/",
93     "0",     "1",     "2",     "3",     "4",     "5",     "6",     "7",
94     "8",     "9",     ":",     ";",     "<",     "=",     ">",     "?",
95     "@",     "A",     "B",     "C",     "D",     "E",     "F",     "G",
96     "H",     "I",     "J",     "K",     "L",     "M",     "N",     "O",
97     "P",     "Q",     "R",     "S",     "T",     "U",     "V",     "W",
98     "X",     "Y",     "Z",     "[",     "\\\\",  "]",     "^",     "_",
99     "`",     "a",     "b",     "c",     "d",     "e",     "f",     "g",
100     "h",     "i",     "j",     "k",     "l",     "m",     "n",     "o",
101     "p",     "q",     "r",     "s",     "t",     "u",     "v",     "w",
102     "x",     "y",     "z",     "{",     "|",     "}",     "~",     "\\177",
103     "\\200", "\\201", "\\202", "\\203", "\\204", "\\205", "\\206", "\\207",
104     "\\210", "\\211", "\\212", "\\213", "\\214", "\\215", "\\216", "\\217",
105     "\220",  "\221",  "\222",  "\223",  "\224",  "\225",  "\226",  "\227",
106     "\230",  "\\231", "\232",  "\233",  "\\234", "\235",  "\236",  "\237",
107     "\240",  "\241",  "\242",  "\243",  "\244",  "\245",  "\246",  "\247",
108     "\250",  "\251",  "\252",  "\253",  "\254",  "\255",  "\256",  "\257",
109     "\260",  "\261",  "\262",  "\263",  "\264",  "\265",  "\266",  "\267",
110     "\270",  "\271",  "\272",  "\273",  "\274",  "\275",  "\276",  "\277",
111     "\300",  "\301",  "\302",  "\303",  "\304",  "\305",  "\306",  "\307",
112     "\310",  "\311",  "\312",  "\313",  "\314",  "\315",  "\316",  "\317",
113     "\320",  "\321",  "\322",  "\323",  "\324",  "\325",  "\326",  "\327",
114     "\330",  "\331",  "\332",  "\333",  "\334",  "\335",  "\336",  "\337",
115     "\340",  "\341",  "\342",  "\343",  "\344",  "\345",  "\346",  "\347",
116     "\350",  "\351",  "\352",  "\353",  "\354",  "\355",  "\356",  "\357",
117     "\360",  "\361",  "\362",  "\363",  "\364",  "\365",  "\366",  "\367",
118     "\370",  "\371",  "\372",  "\373",  "\374",  "\375",  "\376",  "\377"
119 #else
120 If you are trying to compile this you have the wrong CHAR_OUT value!
121 #endif
122 #endif
123 };
124