******************************************************************* * * * CTB Make for use with GEM Spooler v2.2 * * * * (c) Steven Van Rossen, Marc Billiet June 1992 * * * ******************************************************************* What ? ------ CTBMAKE.TTP converts CTS files to CTB files. CTS files are text files (ASCII) that describe how an ASCII character should be sent to the printer. They are the "source" for the GEM Spooler character translation files: *.CTB How to build a CTS file ? ------------------------- 1. Introduction --------------- The syntax of a CTS file is quite powerful. You can assign every character code a series of printer codes that will replace the character before it is sent to the printer. This way, you can totally adapt the spooler's output to your printer's capabilities. To help you define these CTS files, CTBMAKE allows you to define macros (C programmers are familiar with this technique). Macros can be nested (one macro makes a call to an other macro) and can be defined in a so called include file... 2. Syntax description --------------------- CTS files understand the following keywords and symbols (optional keywords are put between square brackets [] ): ---- Symbols: ---- * Marks a comment line, e.g. : * Here comes my CTS: xxx x: 0, 1, ..., 9. Numbers. e.g. : 192, 65, 97, 127 $ Prefix for hex numbers, e.g. : $ff % Prefix for binary numbers, e.g. : %10110001 = Equals. e.g. : 139 = 105, 8, 22 'x' Single quotes indicate an ASCII character x, e.g. : '' = 'i', 8, 22 "CTS name" Double quotes indicate the name of this CTS. This name will appear in GEM Spooler's Printer dialog when the CTB (compiled CTS) is loaded. Maximum 16 characters. E.g. : "HP Germany" Keywords: include "myfile" Include directive. This directive tells CTBMAKE to compile all information in "myfile" macro MYMACRO [(myparam)] code1, code2, ... [(myparam)] ... Define a macro. e.g. : macro ESCAPE 27 macro HPROMAN8 ESCAPE,40,56,85 macro NORMAL HPROMAN8 macro IBM1 ESCAPE, '7' macro IBM2 ESCAPE, '6' macro INTERNATIONAL ESCAPE, 'R' macro USA INTERNATIONAL, 0 macro GERMAN(char) INTERNATIONAL, 2, char, USA A macro with parameter (myparam) will be executed with a value. This value will replace myparam in the sequence of replacement codes. Macros can be nested (one macro calls another macro) but not recursive (a macro that makes a call to itself results in an endless loop). A nested macro can not have parameters. You can use previously defined macros when defining a new macro (as shown above). E.g., to print the german character : 126 = GERMAN(126) (calls macro INTERNATIONAL) For a complete example of a CTS file, please look at the end of this text file. Starting CTBMAKE ---------------- CTBMAKE.TTP is a program that needs parameters (parameters enclosed in [] are optional). The syntax is: [drive:path]infile [[drive:path]outfile] If the outfile is not specified, CTBMAKE will use the infile's name but with the extension CTB as outfile. An example: run CTBMAKE.TTP (double click it) on your desktop and a command line will appear; enter the source path and source file: c:\cts\epson.cts and hit OK. CTBMAKE will convert EPSON.CTS to EPSON.CTB CTBMAKE can also be run from a TOS shell, e.g. : ctbmake c:\cts\epson.cts will create a file named epson.ctb in c:\cts Read the GEM Spooler manual for further information on Character Tables. Marc Billiet & Steven Van Rossen, June 1992 Example of a CTS file: * ----------------------------------------------- * * GEM Spooler v2.2 Character Table Source * * ----------------------------------------------- * * Filter name: "PC-8 Denmark" * Macro's: macro NORMAL PC8DENM macro HPROMAN8(x) 27,40,56,85,x,NORMAL macro ASCII(ascii) 27,40,48,85,ascii,NORMAL macro ECMA-94(x) 27,40,48,78,x,NORMAL macro PC8(x) 27,40,49,48,85,x,NORMAL macro PC850(x) 27,40,49,50,85,x,NORMAL macro PC8DENM 27,40,49,49,85 macro ISO04(x) 27,40,49,69,x,NORMAL macro ISO11(x) 27,40,48,83,x,NORMAL macro ISO15(x) 27,40,48,73,x,NORMAL macro ISO16(x) 27,40,52,83,x,NORMAL macro ISO17(x) 27,40,50,83,x,NORMAL macro ISO21(x) 27,40,49,71,x,NORMAL macro ISO60(x) 27,40,48,68,x,NORMAL macro ISO69(x) 27,40,49,70,x,NORMAL macro LEGAL(x) 27,40,49,85,x,NORMAL * Character translation data: '' = 128 '' = 129 '' = 130 '' = 131 '' = 132 '' = 133 '' = 134 '' = 135 '' = 136 '' = 137 '' = 138 '' = 139 '' = 140 '' = 141 '' = 142 '' = 143 '' = 144 '' = 145 '' = 146 '' = 147 '' = 148 '' = 149 '' = 150 '' = 151 '' = 152 '' = 153 '' = 154 '' = PC8(155) '' = 156 '' = PC8(157) '' = PC8(225) '' = PC8(159) '' = 160 '' = 161 '' = 162 '' = 163 '' = 164 '' = 165 '' = PC8(166) '' = PC8(167) '' = 168 '' = 218 '' = 191 '' = PC8(171) '' = PC8(172) '' = 173 '' = PC8(174) '' = PC8(175) '' = 169 '' = 166 '' = 157 '' = 155 '' = HPROMAN8(161) '' = 170 '' = 167 '' = HPROMAN8(171) '' = HPROMAN8(168) '' = LEGAL(125) '' = 20 '' = LEGAL(94) '' = LEGAL(92) '' = LEGAL(126) '' = 21 '' = 236 '' = 224 '' = 225 '' = 226 '' = 227 '' = 228 '' = 229 '' = 230 '' = 231 '' = 232 '' = 233 '' = 234 '' = 235 '' = 237 '' = 238 '' = 239 '' = 240 '' = 241 '' = 242 '' = 243 '' = 244 '' = 245 '' = 246 '' = 247 '' = 248 '' = 249 '' = 250 '' = 251 '' = 252 '' = 253 '' = PC-850(252) '' = ECMA-94(175) * End of CTS