[BACK]Return to hpgl.trm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot / term

Annotation of OpenXM_contrib/gnuplot/term/hpgl.trm, Revision 1.1.1.3

1.1       maekawa     1: /*
1.1.1.3 ! ohara       2:  * $Id: hpgl.trm,v 1.7.2.3 2002/03/11 12:27:57 broeker Exp $
1.1       maekawa     3:  */
                      4:
                      5: /* GNUPLOT - hpgl.trm */
                      6:
                      7: /*[
                      8:  * Copyright 1990 - 1993, 1998
                      9:  *
                     10:  * Permission to use, copy, and distribute this software and its
                     11:  * documentation for any purpose with or without fee is hereby granted,
                     12:  * provided that the above copyright notice appear in all copies and
                     13:  * that both that copyright notice and this permission notice appear
                     14:  * in supporting documentation.
                     15:  *
                     16:  * Permission to modify the software is granted, but not the right to
                     17:  * distribute the complete modified source code.  Modifications are to
                     18:  * be distributed as patches to the released version.  Permission to
                     19:  * distribute binaries produced by compiling modified sources is granted,
                     20:  * provided you
                     21:  *   1. distribute the corresponding source modifications from the
                     22:  *    released version in the form of a patch file along with the binaries,
                     23:  *   2. add special version identification to distinguish your version
                     24:  *    in addition to the base release version number,
                     25:  *   3. provide your name and address as the primary contact for the
                     26:  *    support of your modified version, and
                     27:  *   4. retain our contact information in regard to use of the base
                     28:  *    software.
                     29:  * Permission to distribute the released version of the source code along
                     30:  * with corresponding source modifications in the form of a patch file is
                     31:  * granted with same provisions 2 through 4 for binary distributions.
                     32:  *
                     33:  * This software is provided "as is" without express or implied warranty
                     34:  * to the extent permitted by applicable law.
                     35: ]*/
                     36:
                     37: /*
1.1.1.3 ! ohara      38:  * This file is included by ../term.h.
1.1       maekawa    39:  *
                     40:  * This terminal driver supports:
                     41:  *  hpgl, hp7550, hp7580b, HP Laserjet III
                     42:  *  hp7550 has been replaced by  "hpgl 8 eject"
                     43:  *  hp7580b has been replaced by "hpgl 4"
                     44:  *
                     45:  * AUTHORS
                     46:  *  Colin Kelley, Thomas Williams, Russell Lang
                     47:  *
                     48:  * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
                     49:  *
                     50:  */
                     51:
                     52: /*
                     53:  *
                     54:  * MODIFIED for expanded HPGL/2 and PCL utilites
                     55:  *  Tom Swiler (tom@silica.mse.ufl.edu)
                     56:  * Modified June 1995 Ian MacPhedran to support newterm format
                     57:  * Modified October 1995 Ian MacPhedran to simplify HPGL terminals
                     58:  * Modified January 96 by David Denholm and Emmanuel Bigler for cp850
                     59:  *                               and iso international character sets
1.1.1.3 ! ohara      60:  * Modified February 99 by Jeremy Brenes to give PCL5 terminal optional
        !            61:  * multi-pen support (6 pen default), a default 34" plotting width for
        !            62:  * use with large color plotters such as the HP Designjet 750C,
        !            63:  * various alternative plot sizes, and variable fontsizes;
        !            64:  * Also decreased the HPGL terminal's fixed fontsize to make it more
        !            65:  * reasonable when plots get scaled to 34"
        !            66:  * Modified July 99 by Jeremy Brenes to make extended plot area smaller;
        !            67:  * added solid/dashed lines option, additional font types, mixed fonts
        !            68:  * Modified November 99 by Jeremy Brenes to add a postscript pointtypes
        !            69:  * option, special purpose negative pointtypes, and a pointsize function
        !            70:  *
1.1       maekawa    71:  */
                     72: #define HPGL
                     73: #define PCL
                     74:
                     75: #include "driver.h"
                     76:
                     77: #ifdef TERM_REGISTER
                     78: register_term(hpgl)
                     79: register_term(pcl5)
                     80: #endif /* TERM_REGISTER */
                     81:
                     82: #ifdef TERM_PROTO
                     83: TERM_PUBLIC void HPGL_options __PROTO((void));
                     84: TERM_PUBLIC void HPGL2_options __PROTO((void));
                     85: TERM_PUBLIC void PCL_options __PROTO((void));
                     86: TERM_PUBLIC void HPGL_init __PROTO((void));
                     87: /* TERM_PUBLIC void HPGL2_init __PROTO((void)); */
                     88: TERM_PUBLIC void PCL_init __PROTO((void));
                     89: TERM_PUBLIC void HPGL_graphics __PROTO((void));
                     90: TERM_PUBLIC void HPGL2_graphics __PROTO((void));
                     91: TERM_PUBLIC void PCL_graphics __PROTO((void));
                     92: TERM_PUBLIC void HPGL_text __PROTO((void));
                     93: /* TERM_PUBLIC void HPGL2_text __PROTO((void)); */
                     94: TERM_PUBLIC void PCL_text __PROTO((void));
                     95: TERM_PUBLIC void HPGL_linetype __PROTO((int linetype));
                     96: TERM_PUBLIC void HPGL2_linetype __PROTO((int linetype));
                     97: TERM_PUBLIC void HPGL_put_text __PROTO((unsigned int x, unsigned int y, char *str));
                     98: TERM_PUBLIC void HPGL2_put_text __PROTO((unsigned int x, unsigned int y, char *str));
                     99: TERM_PUBLIC void HPGL_move __PROTO((unsigned int x, unsigned int y));
                    100: TERM_PUBLIC void HPGL_vector __PROTO((unsigned int x, unsigned int y));
                    101: TERM_PUBLIC void HPGL2_move __PROTO((unsigned int x, unsigned int y));
                    102: TERM_PUBLIC void HPGL2_vector __PROTO((unsigned int x, unsigned int y));
                    103: TERM_PUBLIC void HPGL2_encode __PROTO((int d));
                    104: TERM_PUBLIC int HPGL_text_angle __PROTO((int ang));
                    105: TERM_PUBLIC int HPGL2_text_angle __PROTO((int ang));
                    106: TERM_PUBLIC void HPGL_reset __PROTO((void));
                    107: /* TERM_PUBLIC void HPGL2_reset __PROTO((void)); */
                    108: TERM_PUBLIC void PCL_reset __PROTO((void));
                    109: TERM_PUBLIC int HPGL2_justify_text __PROTO((enum JUSTIFY just));
1.1.1.3 ! ohara     110: TERM_PUBLIC int HPGL2_set_font __PROTO((char *font));
        !           111: TERM_PUBLIC void HPGL2_point __PROTO((unsigned int x, unsigned int y, int number));
        !           112: TERM_PUBLIC void HPGL2_neg_point __PROTO((unsigned int x, unsigned int y, int number));
        !           113: TERM_PUBLIC void HPGL2_pointsize __PROTO((double size));
1.1       maekawa   114: #define GOT_HPGL_PROTO
                    115: #endif /* TERM_PROTO */
                    116:
                    117: #ifndef TERM_PROTO_ONLY
                    118: #ifdef TERM_BODY
                    119: /*
1.1.1.3 ! ohara     120:  * The maximum plot size, in plotter units.
        !           121:  * Note that the actual size of larger plots may be limited by
        !           122:  * available printer memory.
1.1       maekawa   123:  */
                    124:
                    125: #define HPGL_PUPI      1016    /* Plotter units per inch */
                    126:
                    127: #define HPGL_XMAX_A    10000
                    128: #define HPGL_YMAX_A    7500
                    129:
1.1.1.3 ! ohara     130: #define HPGL_XMAX_B    13000
        !           131: #define HPGL_YMAX_B    7500
        !           132:
        !           133: #define HPGL_XMAX_C    45333
        !           134: #define HPGL_YMAX_C    34000
        !           135:
        !           136: #define HPGL_XMAX_D    52000
        !           137: #define HPGL_YMAX_D    34000
1.1       maekawa   138:
                    139: #define HPGL_XMAX      HPGL_XMAX_A
                    140: #define HPGL_YMAX      HPGL_YMAX_A
                    141:
1.1.1.3 ! ohara     142: #define PCL_XMAX       HPGL_XMAX_C
        !           143: #define PCL_YMAX       (HPGL_YMAX_C-60)
1.1       maekawa   144:
                    145: /*
                    146:  * Tic sizes
                    147:  */
                    148:
                    149: #define HPGL_VTIC      (HPGL_YMAX/70)
                    150: #define HPGL_HTIC      (HPGL_YMAX/70)
                    151:
1.1.1.3 ! ohara     152: #define PCL_VTIC       ((HPGL_YMAX_C-60)/320)
        !           153: #define PCL_HTIC       ((HPGL_YMAX_C-60)/320)
1.1       maekawa   154:
                    155: /*
                    156:  * Font size for HPGL
                    157:  */
                    158:
1.1.1.3 ! ohara     159: #define HPGL_VCHAR     (HPGL_YMAX/100*8/10)    /* 0.8% */
        !           160: #define HPGL_HCHAR     (HPGL_XMAX/100*3/10)    /* 0.3% */
1.1       maekawa   161:
                    162: /*
                    163:  * Font size for HPGL/2
                    164:  */
                    165:
1.1.1.3 ! ohara     166: #define HPGL2_DEF_POINT        12      /* Height of font */
1.1       maekawa   167:
                    168: #define HPGL2_DEF_PITCH        (3 * 72 / (HPGL2_DEF_POINT * 2))
                    169: #define HPGL2_VCHAR    ((int) HPGL_PUPI * HPGL2_DEF_POINT / 72)
                    170: #define HPGL2_HCHAR    (HPGL2_VCHAR * 2 / 3)
                    171:
                    172: /*
1.1.1.3 ! ohara     173:  * Point size for HPGL/2
        !           174:  */
        !           175:
        !           176: static double HPGL2_psize = 1.0;       /* Default point size */
        !           177:
        !           178: /*
        !           179:  * Number of available pointtypes for HPGL/2
        !           180:  */
        !           181:
        !           182: #define  HPGL2_NUM_NOPSPOINTS 6;       /* for nopspoints option */
        !           183: #define  HPGL2_NUM_PSPOINTS 75;        /* for pspoints option */
        !           184:
        !           185: /*
1.1       maekawa   186:  * Control constants
                    187:  */
                    188:
                    189: #define DOWN           0       /* Pen is down */
                    190: #define UP             1       /* Pen is up */
                    191: #define UNKNOWN                -10     /* Unknown status for lots of things */
                    192:
                    193: /*
                    194:  * For Polyline Encoded, either use base 64 or base 32.
                    195:  * Save space with base 64, but get 8-bit characters.
                    196:  */
                    197:
                    198: #ifdef NEXT
                    199: /* unluckily TRUE is defined as ((boolean_t)1) in mach/boolean.h */
                    200: #define HPGL2_BASE64 1
                    201: #else
                    202: #define HPGL2_BASE64 TRUE
                    203: #endif
                    204:
                    205: #if HPGL2_BASE64
                    206: #define HPGL2_BITS 6
                    207: #define HPGL2_LOW_OFFS 63
                    208: #define HPGL2_HIGH_OFFS 191
                    209: #define HPGL2_MASK 63
                    210: #else
                    211: #define HPGL2_BITS 5
                    212: #define HPGL2_LOW_OFFS 63
                    213: #define HPGL2_HIGH_OFFS 95
                    214: #define HPGL2_MASK 31
                    215: #endif
                    216:
                    217: /*
                    218:  * Data structures for options
                    219:  */
                    220:
                    221: struct HPGL2_font_str {
                    222:     char *compare, *name;
                    223:     int symbol_set, spacing;
                    224:     double pitch, height;
                    225:     int posture, stroke_weight, typeface;
                    226: };
                    227:
                    228: struct PCL_mode_str {
                    229:     char *compare, *name, *command;
                    230:     int xmax, ymax;
                    231: };
                    232:
                    233: /*
                    234:  * The default font goes first.  Although it is the ugliest,  the
1.1.1.3 ! ohara     235:  * stick font is probably supported by the most devices.
1.1       maekawa   236:  */
                    237:
1.1.1.3 ! ohara     238: static struct HPGL2_font_str GPFAR HPGL2_font_table[] = {
1.1       maekawa   239:     {"u$nivers", "univers", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4148},
                    240:     {"s$tick", "stick", 277, 0, HPGL2_DEF_PITCH, 0.0, 0, 0, 48},
1.1.1.3 ! ohara     241:     {"cg_t$imes", "cg_times", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4101},
        !           242:     {"z$apf_dingbats", "zapf_dingbats", 364, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4141},
        !           243:     {"an$tique_olive", "antique_olive", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4168},
        !           244:     {"ar$ial", "arial", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 16602},
        !           245:     {"cou$rier", "courier", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4099},
        !           246:     {"g$aramond_antigua", "garamond_antigua", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4197},
        !           247:     {"l$etter_gothic", "letter_gothic", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4102},
        !           248:     {"cg_o$mega", "cg_omega", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4113},
        !           249:     {"al$bertus", "albertus", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 1, 4362},
        !           250:     {"ti$mes_new_roman", "times_new_roman", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 16901},
        !           251:     {"cl$arendon", "clarendon", 277, 1, 0.0, HPGL2_DEF_POINT, 4, 3, 4140},
        !           252:     {"cor$onet", "coronet", 277, 1, 0.0, HPGL2_DEF_POINT, 1, 0, 4116},
        !           253:     {"m$arigold", "marigold", 277, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 4297},
        !           254:     {"tr$uetype_symbols", "truetype_symbols", 621, 1, 0.0, HPGL2_DEF_POINT, 0, 0, 16686},
        !           255:     {"w$ingdings", "wingdings", 18540, 1, 0.0, HPGL2_DEF_POINT, 1, 0, 31402}
1.1       maekawa   256: };
                    257:
                    258: #define HPGL2_FONTS (sizeof(HPGL2_font_table) / sizeof (struct HPGL2_font_str))
                    259: static struct HPGL2_font_str *HPGL2_font = &HPGL2_font_table[0];
                    260:
                    261: /*
                    262:  * The default mode goes first.  Landscape style plots are probably the
                    263:  * most compatable with other HPGL devices.
                    264:  */
                    265:
1.1.1.3 ! ohara     266: static struct PCL_mode_str GPFAR PCL_mode_table[] = {
1.1       maekawa   267:     {"l$andscape", "landscape", "\033&l1O", PCL_XMAX, PCL_YMAX},
                    268:     {"p$ortrait", "portrait", "\033&l0O", PCL_YMAX, PCL_XMAX}
                    269: };
                    270:
                    271: #define PCL_MODES (sizeof(PCL_mode_table) / sizeof (struct PCL_mode_str))
                    272: static struct PCL_mode_str *PCL_mode = &PCL_mode_table[0];
                    273:
                    274: /*
1.1.1.3 ! ohara     275:  * Various line types and widths to distinguish data sets in monochrome
1.1       maekawa   276:  */
                    277:
1.1.1.3 ! ohara     278: static char * GPFAR HPGL2_lt[] = { "", ",2", ",2", ",2", ",2", ",2", ",2", ",2" },
        !           279:             * GPFAR HPGL2_pw[] = { ".24", ".16", ".08"};
1.1       maekawa   280:
                    281: #define HPGL2_LINETYPES (sizeof(HPGL2_lt) / sizeof(char *))
                    282: #define HPGL2_PENWIDTHS (sizeof(HPGL2_pw) / sizeof(char *))
                    283:
                    284: /* encoding vector for cp850 , characters 128 (0200) -> 255 (0377) */
                    285:
1.1.1.3 ! ohara     286: static char hpgl_cp_850[128][4] = {
1.1       maekawa   287:
                    288: /* 0200 */ "\0164\017",
                    289: /* 0201 */ "\016O\017",
                    290: /* 0202 */ "\016E\017",
                    291: /* 0203 */ "\016@\017",
                    292: /* 0204 */ "\016L\017",
                    293: /* 0205 */ "\016H\017",
                    294: /* 0206 */ "\016T\017",
                    295: /* 0207 */ "\0165\017",
                    296:
                    297: /* 0210 */ "\016A\017",
                    298: /* 0211 */ "\016M\017",
                    299: /* 0212 */ "\016I\017",
                    300: /* 0213 */ "\016]\017",
                    301: /* 0214 */ "\016Q\017",
                    302: /* 0215 */ "\016Y\017",
                    303: /* 0216 */ "\016X\017",
                    304: /* 0217 */ "\016P\017",
                    305:
                    306: /* 0220 */ "\016\134\017",
                    307: /* 0221 */ "\016W\017",
                    308: /* 0222 */ "\016S\017",
                    309: /* 0223 */ "\016B\017",
                    310: /* 0224 */ "\016N\017",
                    311: /* 0225 */ "\016J\017",
                    312: /* 0226 */ "\016C\017",
                    313: /* 0227 */ "\016K\017",
                    314:
                    315: /* 0230 */ "\016o\017",
                    316: /* 0231 */ "\016Z\017",
                    317: /* 0232 */ "\016[\017",
                    318: /* 0233 */ "\016V\017",
                    319: /* 0234 */ "\016;\017",
                    320: /* 0235 */ "\016R\017",
                    321: /* 0236 */ "",
                    322: /* 0237 */ "\016>\017",
                    323:
                    324: /* 0240 */ "\016D\017",
                    325: /* 0241 */ "\016U\017",
                    326: /* 0242 */ "\016F\017",
                    327: /* 0243 */ "\016G\017",
                    328: /* 0244 */ "\0167\017",
                    329: /* 0245 */ "\0166\017",
                    330: /* 0246 */ "\016y\017",
                    331: /* 0247 */ "\016z\017",
                    332:
                    333: /* 0250 */ "\0169\017",
                    334:
                    335: /* 0251 */ "",
                    336: /* 0252 */ "",
                    337:
                    338: /* 0253 */ "\016x\017",
                    339: /* 0254 */ "\016w\017",
                    340: /* 0255 */ "\0168\017",
                    341: /* 0256 */ "\016{\017",
                    342: /* 0257 */ "\016}\017",
                    343:
                    344: /* 0260 */ "",
                    345: /* 0261 */ "",
                    346: /* 0262 */ "",
                    347: /* 0263 */ "",
                    348: /* 0264 */ "",
                    349:
                    350: /* 0265 */ "\016`\017",
                    351: /* 0266 */ "\016\042\017",
                    352: /* 0267 */ "\016!\017",
                    353:
                    354: /* 0270 */ "",
                    355: /* 0271 */ "",
                    356: /* 0272 */ "",
                    357: /* 0273 */ "",
                    358: /* 0274 */ "",
                    359:
                    360: /* 0275 */ "\016?\017",
                    361: /* 0276 */ "\016<\017",
                    362:
                    363: /* 0277 */ "",
                    364:
                    365: /* 0300 */ "",
                    366: /* 0301 */ "",
                    367: /* 0302 */ "",
                    368: /* 0303 */ "",
                    369: /* 0304 */ "",
                    370: /* 0305 */ "",
                    371:
                    372: /* 0306 */ "\016b\017",
                    373: /* 0307 */ "\016a\017",
                    374:
                    375: /* 0310 */ "",
                    376: /* 0311 */ "",
                    377: /* 0312 */ "",
                    378: /* 0313 */ "",
                    379: /* 0314 */ "",
                    380: /* 0315 */ "",
                    381: /* 0316 */ "",
                    382:
                    383: /* 0317 */ "\016:\017",
                    384:
                    385: /* 0320 */ "\016d\017",
                    386: /* 0321 */ "\016c\017",
                    387: /* 0322 */ "\016$\017",
                    388: /* 0323 */ "\016%\017",
                    389: /* 0324 */ "\016#\017",
                    390:
                    391: /* 0325 */ "",
                    392:
                    393: /* 0326 */ "\016e\017",
                    394: /* 0327 */ "\016&\017",
                    395:
                    396: /* 0330 */ "\016'\017",
                    397:
                    398: /* 0331 */ "",
                    399: /* 0332 */ "",
                    400: /* 0333 */ "",
                    401: /* 0334 */ "",
                    402: /* 0335 */ "",
                    403:
                    404: /* 0336 */ "\016f\017",
                    405: /* 0337 */ "",
                    406:
                    407: /* 0340 */ "\016g\017",
                    408: /* 0341 */ "\016^\017",
                    409: /* 0342 */ "\016_\017",
                    410: /* 0343 */ "\016h\017",
                    411: /* 0344 */ "\016j\017",
                    412: /* 0345 */ "\016i\017",
                    413: /* 0346 */ "",
                    414: /* 0347 */ "\016q\017",
                    415:
                    416: /* 0350 */ "\016p\017",
                    417: /* 0351 */ "\016m\017",
                    418: /* 0352 */ "\016.\017",
                    419: /* 0353 */ "\016-\017",
                    420: /* 0354 */ "",
                    421: /* 0355 */ "",
                    422: /* 0356 */ "\0160\017",
                    423: /* 0357 */ "\016(\017",
                    424:
                    425: /* 0360 */ "\016v\017",
                    426: /* 0361 */ "\016~\017",
                    427: /* 0362 */ "",
                    428: /* 0363 */ "",
                    429: /* 0364 */ "",
                    430: /* 0365 */ "\016=\017",
                    431: /* 0366 */ "",
                    432: /* 0367 */ "",
                    433:
                    434: /* 0370 */ "\016z\017",
                    435: /* 0371 */ "\016+\017",
                    436: /* 0372 */ "",
                    437: /* 0373 */ "",
                    438: /* 0374 */ "",
                    439: /* 0375 */ "",
                    440: /* 0376 */ "",
                    441: /* 0377 */ ""
                    442: };
                    443:
                    444:
                    445: /* encoding vector for iso-8859-1 , characters 128 (0200) -> 255 (0377) */
                    446:
1.1.1.3 ! ohara     447: static char hpgl_iso_8859_1[128][4] = {
1.1       maekawa   448:
                    449: /* 0200 */ "",
                    450: /* 0201 */ "",
                    451: /* 0202 */ "",
                    452: /* 0203 */ "",
                    453: /* 0204 */ "",
                    454: /* 0205 */ "",
                    455: /* 0206 */ "",
                    456: /* 0207 */ "",
                    457:
                    458: /* 0210 */ "",
                    459: /* 0211 */ "",
                    460: /* 0212 */ "",
                    461: /* 0213 */ "",
                    462: /* 0214 */ "",
                    463: /* 0215 */ "",
                    464: /* 0216 */ "",
                    465: /* 0217 */ "",
                    466:
                    467: /* 0220 */ "",
                    468: /* 0221 */ "\016\017",
                    469: /* 0222 */ "\016\017",
                    470: /* 0223 */ "",
                    471: /* 0224 */ "",
                    472: /* 0225 */ "",
                    473: /* 0226 */ "",
                    474: /* 0227 */ "",
                    475:
                    476: /* 0230 */ "",
                    477: /* 0231 */ "",
                    478: /* 0232 */ "",
                    479: /* 0233 */ "",
                    480: /* 0234 */ "",
                    481: /* 0235 */ "",
                    482: /* 0236 */ "",
                    483: /* 0237 */ "",
                    484:
                    485: /* 0240 */ "",
                    486: /* 0241 */ "\0168\017",
                    487: /* 0242 */ "\0165\017",
                    488: /* 0243 */ "\016;\017",
                    489: /* 0244 */ "\016:\017",
                    490: /* 0245 */ "\016<\017",
                    491: /* 0246 */ "\017|\017",
                    492: /* 0247 */ "\016=\017",
                    493:
                    494: /* 0250 */ "\016+\017",
                    495: /* 0251 */ "",
                    496: /* 0252 */ "\016y\017",
                    497: /* 0253 */ "\016{\017",
                    498: /* 0254 */ "",
                    499: /* 0255 */ "",
                    500: /* 0256 */ "",
                    501: /* 0257 */ "\0160\017",
                    502:
                    503: /* 0260 */ "\016z\017",
                    504: /* 0261 */ "\016~\017",
                    505: /* 0262 */ "",
                    506: /* 0263 */ "",
                    507: /* 0264 */ "",
                    508: /* 0265 */ "",
                    509: /* 0266 */ "",
                    510: /* 0267 */ "",
                    511:
                    512: /* 0270 */ "",
                    513: /* 0271 */ "",
                    514: /* 0272 */ "\016z\017",
                    515: /* 0273 */ "\016}\017",
                    516: /* 0274 */ "\016w\017",
                    517: /* 0275 */ "\016x\017",
                    518: /* 0276 */ "",
                    519: /* 0277 */ "\0169\017",
                    520:
                    521: /* 0300 */ "\016!\017",
                    522: /* 0301 */ "\016`\017",
                    523: /* 0302 */ "\016\042\017",
                    524: /* 0303 */ "\016a\017",
                    525: /* 0304 */ "\016X\017",
                    526: /* 0305 */ "\016P\017",
                    527: /* 0306 */ "\016S\017",
                    528: /* 0307 */ "\0164\017",
                    529:
                    530: /* 0310 */ "\016#\017",
                    531: /* 0311 */ "\016\134\017",
                    532: /* 0312 */ "\016$\017",
                    533: /* 0313 */ "\016%\017",
                    534: /* 0314 */ "\016f\017",
                    535: /* 0315 */ "\016e\017",
                    536: /* 0316 */ "\016\046\017",
                    537: /* 0317 */ "\016'\017",
                    538:
                    539: /* 0320 */ "\016c\017",
                    540: /* 0321 */ "\0166\017",
                    541: /* 0322 */ "\016h\017",
                    542: /* 0323 */ "\016g\017",
                    543: /* 0324 */ "\016_\017",
                    544: /* 0325 */ "\016i\017",
                    545: /* 0326 */ "\016Z\017",
                    546: /* 0327 */ "",
                    547:
                    548: /* 0330 */ "\016R\017",
                    549: /* 0331 */ "\016-\017",
                    550: /* 0332 */ "\016m\017",
                    551: /* 0333 */ "\016.\017",
                    552: /* 0334 */ "\016[\017",
                    553: /* 0335 */ "",
                    554: /* 0336 */ "\016p\017",
                    555: /* 0337 */ "\016^\017",
                    556:
                    557: /* 0340 */ "\016H\017",
                    558: /* 0341 */ "\016D\017",
                    559: /* 0342 */ "\016@\017",
                    560: /* 0343 */ "\016b\017",
                    561: /* 0344 */ "\016L\017",
                    562: /* 0345 */ "\016T\017",
                    563: /* 0346 */ "\016W\017",
                    564: /* 0347 */ "\0165\017",
                    565:
                    566: /* 0350 */ "\016I\017",
                    567: /* 0351 */ "\016E\017",
                    568: /* 0352 */ "\016A\017",
                    569: /* 0353 */ "\016M\017",
                    570: /* 0354 */ "\016Y\017",
                    571: /* 0355 */ "\016U\017",
                    572: /* 0356 */ "\016Q\017",
                    573: /* 0357 */ "\016]\017",
                    574:
                    575: /* 0360 */ "\016d\017",
                    576: /* 0361 */ "\0167\017",
                    577: /* 0362 */ "\016J\017",
                    578: /* 0363 */ "\016F\017",
                    579: /* 0364 */ "\016B\017",
                    580: /* 0365 */ "\016j\017",
                    581: /* 0366 */ "\016N\017",
                    582: /* 0367 */ "",
                    583:
                    584: /* 0370 */ "\016V\017",
                    585: /* 0371 */ "\016K\017",
                    586: /* 0372 */ "\016G\017",
                    587: /* 0373 */ "\016C\017",
                    588: /* 0374 */ "\016O\017",
                    589: /* 0375 */ "",
                    590: /* 0376 */ "\016q\017",
                    591: /* 0377 */ "\016o\017"
                    592: };
                    593:
                    594:
                    595: /*
                    596:  * Static variables to keep track of where we are, etc.
                    597:  */
                    598:
1.1.1.3 ! ohara     599: static int HPGL_ang = 0, HPGL_x = UNKNOWN, HPGL_y = UNKNOWN, HPGL_penstate = UNKNOWN, HPGL_pentype, HPGL2_pentype
        !           600:     = UNKNOWN, HPGL2_in_pe, HPGL2_lost;
1.1       maekawa   601:
                    602: /*
                    603:  * The subroutines, grouped by function for different versions.
                    604:  */
                    605:
                    606: static int HPGL_numpen, HPGL_eject;
                    607:
1.1.1.3 ! ohara     608: TERM_PUBLIC void
        !           609: HPGL_options()
1.1       maekawa   610: {
                    611:     HPGL_numpen = 6;           /* default to six pens */
                    612:     HPGL_eject = 0;            /* default to no eject */
                    613:
                    614:     while (!END_OF_COMMAND) {
                    615:        if (almost_equals(c_token, "eje$ct"))
                    616:            HPGL_eject = 1;
                    617:        else if (isanumber(c_token)) {
                    618:            HPGL_numpen = (int) real(&token[c_token].l_val);
                    619:            if (HPGL_numpen <= 0) {
                    620:                HPGL_numpen = 6;
                    621:                int_error("Number of pens must be positive", c_token);
                    622:            }
                    623:        } else
                    624:            int_error("expecting \"eject\" or number of pens", c_token);
                    625:
                    626:        c_token++;
                    627:     }
                    628:
                    629:
1.1.1.3 ! ohara     630:     sprintf(term_options, "%d pens %s",
        !           631:            HPGL_numpen, HPGL_eject ? "eject" : "noeject");
1.1       maekawa   632: }
                    633:
1.1.1.3 ! ohara     634: static int HPGL2_color = 1, HPGL2_numpen = 6;  /* default to 6 pen color */
        !           635: int HPGL2_dashed = 0;          /* current dashed linetype */
        !           636: int HPGL2_solid = 1;           /* default to solid lines */
        !           637: int HPGL2_font_num = 0;                /* font from options */
        !           638: int HPGL2_font_num_current = 0;        /* current font */
        !           639: int pspointset = 0;            /* default to standard point types */
        !           640: double HPGL2_point_size = HPGL2_DEF_POINT;     /* pointsize from options */
        !           641: double HPGL2_point_size_current = 0;   /* current pointsize */
        !           642:
        !           643: TERM_PUBLIC void
        !           644: HPGL2_options()
1.1       maekawa   645: {
                    646:     struct termentry *t = term;
                    647:     int i;
1.1.1.3 ! ohara     648:     char tmp_options[MAX_ID_LEN+1];
        !           649:
        !           650:     if (!END_OF_COMMAND && almost_equals(c_token, "mono$chrome")) {
        !           651:        HPGL2_color = 0;
        !           652:        c_token++;
        !           653:     } else if (!END_OF_COMMAND && almost_equals(c_token, "col$or")) {
        !           654:        HPGL2_color = 1;
        !           655:        c_token++;
        !           656:        if (!END_OF_COMMAND && isanumber(c_token)) {
        !           657:            HPGL2_numpen = (int) real(&token[c_token].l_val);
        !           658:            if (HPGL2_numpen <= 0) {
        !           659:                HPGL2_numpen = 6;
        !           660:                int_error("Number of pens must be a positive", c_token);
        !           661:            }
        !           662:            c_token++;
        !           663:        }
        !           664:     }
        !           665:     if (!END_OF_COMMAND && almost_equals(c_token, "sol$id")) {
        !           666:        HPGL2_solid = 1;
        !           667:        c_token++;
        !           668:     } else if (!END_OF_COMMAND && almost_equals(c_token, "das$hed")) {
        !           669:        HPGL2_solid = 0;
        !           670:        c_token++;
        !           671:     }
        !           672:     if (!END_OF_COMMAND && almost_equals(c_token, "f$ont")) {
        !           673:        c_token++;
        !           674:        if (!END_OF_COMMAND) {
        !           675:            for (i = 0; i < HPGL2_FONTS && !almost_equals(c_token, HPGL2_font_table[i].compare); i++);
        !           676:            if (i < HPGL2_FONTS) {
        !           677:                HPGL2_font = &HPGL2_font_table[i];
        !           678:                HPGL2_font_num = i;
        !           679:                HPGL2_font_num_current = HPGL2_font_num;
        !           680:            } else
        !           681:                int_error
        !           682:                    ("expecting font: stick, cg_times, univers, zapf_dingbats, antique_olive,\narial, courier, garamond_antigua, letter_gothic, cg_omega, albertus,\ntimes_new_roman, clarendon, coronet, marigold, truetype_symbols, or wingdings",
        !           683:                     c_token);
        !           684:            c_token++;
1.1       maekawa   685:        } else
1.1.1.3 ! ohara     686:            int_error
        !           687:                ("expecting font: stick, cg_times, univers, zapf_dingbats, antique_olive,\narial, courier, garamond_antigua, letter_gothic, cg_omega, albertus,\ntimes_new_roman, clarendon, coronet, marigold, truetype_symbols, or wingdings",
        !           688:                 c_token);
        !           689:     }
        !           690:     if (!END_OF_COMMAND && almost_equals(c_token, "s$ize")) {
1.1       maekawa   691:        c_token++;
                    692:        if (!END_OF_COMMAND) {
1.1.1.3 ! ohara     693:            if ((HPGL2_point_size = real(&token[c_token].l_val)) > 0.0) {
        !           694:                HPGL2_point_size_current = HPGL2_point_size;
        !           695:                t->v_char = (int) HPGL_PUPI *HPGL2_point_size / 72;
1.1       maekawa   696:                t->h_char = t->v_char * 2 / 3;
                    697:                if (HPGL2_font->spacing)
1.1.1.3 ! ohara     698:                    HPGL2_font->height = HPGL2_point_size;
1.1       maekawa   699:                else
1.1.1.3 ! ohara     700:                    HPGL2_font->pitch = 72 * 3 / (HPGL2_point_size * 2);
1.1       maekawa   701:            } else
1.1.1.3 ! ohara     702:                int_error("expecting point size: real number", c_token);
1.1       maekawa   703:            c_token++;
1.1.1.3 ! ohara     704:        } else
        !           705:            int_error("expecting point size: real number", c_token);
1.1       maekawa   706:     }
1.1.1.3 ! ohara     707:     if (!END_OF_COMMAND && almost_equals(c_token, "n$opspoints")) {
        !           708:        c_token++;
        !           709:        pspointset = 0;
        !           710:     } else if (!END_OF_COMMAND && almost_equals(c_token, "p$spoints")) {
        !           711:        c_token++;
        !           712:        pspointset = 1;
        !           713:     }
        !           714:     sprintf(tmp_options, "\ndisplay: %s", HPGL2_color ? "color" : "monochrome");
        !           715:     strcat(term_options, tmp_options);
        !           716:     if (HPGL2_color == 1) {
        !           717:        sprintf(tmp_options, "\npens: %d", HPGL2_numpen);
        !           718:        strcat(term_options, tmp_options);
        !           719:     }
        !           720:     sprintf(tmp_options, "\nlines: %s", HPGL2_solid ? "solid" : "dashed");
        !           721:     strcat(term_options, tmp_options);
        !           722:     sprintf(tmp_options, "\nfont: %s", HPGL2_font->name);
1.1       maekawa   723:     strcat(term_options, tmp_options);
                    724:     if (HPGL2_font->spacing) {
1.1.1.3 ! ohara     725:        sprintf(tmp_options, "\nfont height: %f", HPGL2_font->height);
1.1       maekawa   726:        strcat(term_options, tmp_options);
                    727:     } else {
1.1.1.3 ! ohara     728:        sprintf(tmp_options, "\nfont pitch: %f\n", HPGL2_font->pitch);
1.1       maekawa   729:        strcat(term_options, tmp_options);
                    730:     }
1.1.1.3 ! ohara     731:     sprintf(tmp_options, "\npoint types: %s", pspointset ? "pspoints" : "nopspoints");
        !           732:     strcat(term_options, tmp_options);
1.1       maekawa   733: }
                    734:
1.1.1.3 ! ohara     735: char *PCL_dim = "noextended";  /* default plotting dimensions */
        !           736:
        !           737: TERM_PUBLIC void
        !           738: PCL_options()
1.1       maekawa   739: {
                    740:     int i;
1.1.1.3 ! ohara     741:     if (!END_OF_COMMAND && almost_equals(c_token, "m$ode")) {
        !           742:        c_token++;
        !           743:        if (!END_OF_COMMAND) {
        !           744:            for (i = 0; i < PCL_MODES && !almost_equals(c_token, PCL_mode_table[i].compare); i++);
        !           745:            if (i < PCL_MODES)
        !           746:                PCL_mode = &PCL_mode_table[i];
        !           747:            else
        !           748:                int_error("expecting mode: portrait or landscape", c_token);
        !           749:            c_token++;
        !           750:        } else
1.1       maekawa   751:            int_error("expecting mode: portrait or landscape", c_token);
1.1.1.3 ! ohara     752:     }
        !           753:     if (!END_OF_COMMAND && almost_equals(c_token, "ext$ended")) {
        !           754:        PCL_mode->xmax = (HPGL_XMAX_D);
        !           755:        PCL_mode->ymax = (HPGL_YMAX_D - 60);
        !           756:        PCL_dim = "extended";
        !           757:        c_token++;
        !           758:     } else if (!END_OF_COMMAND && almost_equals(c_token, "noext$ended")) {
        !           759:        PCL_mode->xmax = (HPGL_XMAX_C);
        !           760:        PCL_mode->ymax = (HPGL_YMAX_C - 60);
        !           761:        PCL_dim = "noextended";
        !           762:        c_token++;
        !           763:     } else if (!END_OF_COMMAND && almost_equals(c_token, "leg$al")) {
        !           764:        PCL_mode->xmax = (HPGL_XMAX_B);
        !           765:        PCL_mode->ymax = (HPGL_YMAX_B - 60);
        !           766:        PCL_dim = "legal";
        !           767:        c_token++;
        !           768:     } else if (!END_OF_COMMAND && almost_equals(c_token, "let$ter")) {
        !           769:        PCL_mode->xmax = (HPGL_XMAX_A);
        !           770:        PCL_mode->ymax = (HPGL_YMAX_A - 60);
        !           771:        PCL_dim = "letter";
1.1       maekawa   772:        c_token++;
                    773:     }
1.1.1.3 ! ohara     774:     sprintf(term_options, "\nmode: %s\ndimensions: %s", PCL_mode->name, PCL_dim);
1.1       maekawa   775:     HPGL2_options();
                    776: }
                    777:
1.1.1.3 ! ohara     778: TERM_PUBLIC void
        !           779: HPGL_init()
1.1       maekawa   780: {
                    781: }
                    782:
                    783: /* void HPGL2_init ()
                    784: {
                    785: } */
                    786:
1.1.1.3 ! ohara     787: TERM_PUBLIC void
        !           788: PCL_init()
1.1       maekawa   789: {
                    790:     struct termentry *t = term;
                    791: /*
                    792:  * Reset printer, set to one copy, orientation of user's choice.
                    793:  * Make the change to the new orientation all at once.
                    794:  */
                    795:     fprintf(gpoutfile, "\033E\033&l1X%s\n", PCL_mode->command);
                    796:     t->xmax = PCL_mode->xmax;
                    797:     t->ymax = PCL_mode->ymax;
1.1.1.3 ! ohara     798: /*
        !           799:  * Enter HPGL/2 graphics mode
        !           800:  * Necessary here to keep the first DI0,1DI1,0 orientation command from being
        !           801:  * printed as literal text on the page for some devices. Hopefully this
        !           802:  * workaround has no bad consequences elsewhere; omit this line if it does.
        !           803:  */
        !           804:     fputs("\033%0B", gpoutfile);
1.1       maekawa   805: }
                    806:
1.1.1.3 ! ohara     807: TERM_PUBLIC void
        !           808: HPGL_graphics()
1.1       maekawa   809: {
                    810:     fputs("\033.Y\n\033.I81;;17:\033.N;19:\033.M500:\n", gpoutfile);
                    811: /*            1
                    812:        1. enable eavesdropping
                    813: */
                    814:     fprintf(gpoutfile,
                    815:            "IN;%s\nSC0,%d,0,%d;\nSR%f,%f;\n",
                    816:            ((encoding == ENCODING_CP_850) || (encoding == ENCODING_ISO_8859_1)) ?
                    817:            "CA7;" : "",
                    818:            HPGL_XMAX, HPGL_YMAX,
                    819:            ((double) (HPGL_HCHAR) * 200 / 3 / HPGL_XMAX),
                    820:            ((double) (HPGL_VCHAR) * 100 / 2 / HPGL_YMAX));
                    821: /*      1    2             3
                    822:        1. reset to power-up defaults
                    823:        2. set SCaling
                    824:        3. set character size
                    825: */
                    826:     HPGL_ang = 0;
                    827: }
                    828:
1.1.1.3 ! ohara     829: TERM_PUBLIC void
        !           830: HPGL2_graphics()
1.1       maekawa   831: {
                    832: /*
                    833:  * IN - Initialize
                    834:  * SP - Select pen
                    835:  * SD - Set default font
                    836:  */
                    837:     fprintf(gpoutfile, "INSP1SD1,%d,2,%d,",
                    838:            HPGL2_font->symbol_set, HPGL2_font->spacing);
                    839:     if (HPGL2_font->spacing)
                    840:        fprintf(gpoutfile, "4,%f,", HPGL2_font->height);
                    841:     else
                    842:        fprintf(gpoutfile, "3,%f,", HPGL2_font->pitch);
1.1.1.3 ! ohara     843:     fprintf(gpoutfile, "5,%d,6,%d,7,%d;SS;\n",
        !           844:            HPGL2_font->posture, HPGL2_font->stroke_weight, HPGL2_font->typeface);
        !           845: /*
        !           846:  * Add a set of user-defined dashed linetypes if the dashed option is
        !           847:  * selected. Of course, the UL's below can be edited to user preference.
        !           848:  */
        !           849:     if (HPGL2_solid == 0) {
        !           850:        fprintf(gpoutfile, "UL1,100;\n");
        !           851:        fprintf(gpoutfile, "UL2,8,8,9,8,8,9,8,8,9,8,8,9;\n");
        !           852:        fprintf(gpoutfile, "UL3,6,6,6,7,6,6,6,7,6,6,6,7,6,6,6,7;\n");
        !           853:        fprintf(gpoutfile, "UL4,5,5,5,10,5,5,5,10,5,5,5,10;\n");
        !           854:        fprintf(gpoutfile, "UL5,5,5,5,5,5,8,5,5,5,5,5,8,5,5,5,5,5,9;\n");
        !           855:        fprintf(gpoutfile, "UL6,8,8,0,9,8,8,0,9,8,8,0,9;\n");
        !           856:        fprintf(gpoutfile, "UL7,4,4,4,4,0,4,4,4,4,4,0,4,4,4,4,4,0,4;\n");
        !           857:        fprintf(gpoutfile, "UL8,6,6,6,6,6,6,0,6,6,6,6,6,6,6,0,6;\n");
        !           858:     }
1.1       maekawa   859: /*
                    860:  * Control variables
                    861:  */
                    862:     HPGL_ang = 0;              /* Horizontal */
                    863:     HPGL2_in_pe = FALSE;       /* Not in PE command */
                    864:     HPGL2_lost = TRUE;         /* Pen position is unknown */
                    865:     HPGL_penstate = UP;                /* Pen is up */
                    866: }
                    867:
1.1.1.3 ! ohara     868: TERM_PUBLIC void
        !           869: PCL_graphics()
1.1       maekawa   870: {
                    871: /*
                    872:  * Enter HPGL/2 graphics mode
                    873:  */
                    874:     fputs("\033%0B", gpoutfile);
                    875:     HPGL2_graphics();
                    876: }
                    877:
1.1.1.3 ! ohara     878: TERM_PUBLIC void
        !           879: HPGL_text()
1.1       maekawa   880: {
                    881:     if (HPGL_eject == 0) {
                    882:        fputs("PUSP0;\033.Z\n\0", gpoutfile);
                    883: /*              1 2   3
                    884:        1. pen up
                    885:        2. park pen
                    886:        3. disable eavesdropping
                    887: */
                    888:     } else {
                    889:        fputs("PUSP0;PG;\033.Z\n\0", gpoutfile);
                    890: /*              1 2   3  4
                    891:        1. pen up
                    892:        2. park pen
                    893:        3. page eject
                    894:        4. disable eavesdropping
                    895: */
                    896:     }
                    897:     HPGL_penstate = UP;
                    898: }
                    899:
                    900: #if 0                          /* not used */
1.1.1.3 ! ohara     901: void
        !           902: HPGL2_text()
1.1       maekawa   903: {
                    904: /*
                    905:  * If in Polyline Encoded command, leave Polyline Encoded command
                    906:  */
                    907:     if (HPGL2_in_pe) {
                    908:        fputs(";\n", gpoutfile);
                    909:        HPGL2_in_pe = 0;
                    910:     }
                    911: /*
                    912:  * Pen up, park pen
                    913:  */
                    914:     fputs("PUSP0;", gpoutfile);
1.1.1.3 ! ohara     915:     HPGL_penstate = UP;
1.1       maekawa   916: }
                    917: #endif
                    918:
1.1.1.3 ! ohara     919: TERM_PUBLIC void
        !           920: PCL_text()
1.1       maekawa   921: {
                    922:     if (HPGL2_in_pe) {
                    923:        fputs(";\n", gpoutfile);
                    924:        HPGL2_in_pe = 0;
                    925:     }
                    926: /*
                    927:  * Go into PCL mode and eject the page
                    928:  */
                    929:     fputs("\033%1A\033&l0H\n\0", gpoutfile);
                    930: }
                    931:
1.1.1.3 ! ohara     932: TERM_PUBLIC void
        !           933: HPGL_linetype(linetype)
1.1       maekawa   934: int linetype;
                    935: {
                    936: /* allow for set number of pens */
                    937:     linetype = (linetype + 2) % HPGL_numpen + 1;
                    938: /* only select pen if necessary */
                    939:     if (HPGL_pentype != linetype) {
                    940:        fprintf(gpoutfile, "PU;\nSP%d;\n", linetype);
                    941:        HPGL_pentype = linetype;
                    942:        HPGL_penstate = UP;
                    943:     }
                    944: }
                    945:
1.1.1.3 ! ohara     946: TERM_PUBLIC void
        !           947: HPGL2_linetype(linetype)
1.1       maekawa   948: int linetype;
                    949: {
                    950: /*
                    951:  * If in Polyline Encoded command, leave Polyline Encoded command
                    952:  */
                    953:     if (HPGL2_in_pe) {
                    954:        fputs(";\n", gpoutfile);
                    955:        HPGL2_in_pe = 0;
                    956:     }
1.1.1.3 ! ohara     957: /* allow for set number of pens for color displays */
        !           958:     if (HPGL2_color == 1) {
1.1       maekawa   959:        if (linetype >= 0) {
1.1.1.3 ! ohara     960:            if (HPGL2_solid == 0)
        !           961:                HPGL2_dashed = linetype % HPGL2_LINETYPES + 1;
        !           962:            linetype = (linetype + 2) % HPGL2_numpen + 1;
        !           963:        }
        !           964: /* only select pen if necessary */
        !           965:        if (linetype != HPGL2_pentype) {
        !           966:            if (linetype >= 0) {
        !           967:                if (HPGL2_solid == 0) {
        !           968:                    fprintf(gpoutfile, "PU;\nSP%d;\nLT%d;", linetype, HPGL2_dashed);
        !           969:                } else
        !           970:                    fprintf(gpoutfile, "PU;\nSP%d;\nLT;", linetype);
        !           971: /* Borders and Tics */
        !           972:            } else if (linetype == -2) {
        !           973:                fprintf(gpoutfile, "PU;\nSP1;\nPW.2LT");
        !           974: /* Axes and Grids */
        !           975:            } else if (linetype == -1)
        !           976:                fprintf(gpoutfile, "PU;\nSP1;\nPW.2LT1,.25");
        !           977:            HPGL_penstate = UP;
        !           978:            HPGL2_pentype = linetype;
        !           979:        }
        !           980: /* allow for lots of linetypes for monochrome displays */
        !           981:     } else {
        !           982:        if (linetype >= 0) {
        !           983:            if (HPGL2_solid == 0)
        !           984:                HPGL2_dashed = linetype % HPGL2_LINETYPES + 1;
        !           985:            linetype = linetype % (HPGL2_LINETYPES * HPGL2_PENWIDTHS);
        !           986:        }
        !           987: /* only select pen if necessary */
        !           988:        if (linetype != HPGL2_pentype) {
        !           989:            if (linetype >= 0) {
        !           990:                if (HPGL2_solid == 0) {
        !           991:                    fprintf(gpoutfile, "PW%sLT%d%s", HPGL2_pw[linetype / HPGL2_LINETYPES], HPGL2_dashed,
        !           992:                            HPGL2_lt[linetype % HPGL2_LINETYPES]);
        !           993:                } else
        !           994:                    fprintf(gpoutfile, "PW%sLT", HPGL2_pw[linetype / HPGL2_LINETYPES]);
        !           995: /* Borders and Tics */
        !           996:            } else if (linetype == -2) {
        !           997:                fprintf(gpoutfile, "PW.2LT");
        !           998: /* Axes and Grids */
        !           999:            } else if (linetype == -1)
        !          1000:                fprintf(gpoutfile, "PW.1LT1,.25");
        !          1001:            HPGL2_pentype = linetype;
        !          1002:        }
1.1       maekawa  1003:     }
                   1004: }
                   1005:
1.1.1.3 ! ohara    1006: TERM_PUBLIC void
        !          1007: HPGL_put_text(x, y, str)
1.1       maekawa  1008: unsigned int x, y;
                   1009: char *str;
                   1010: {
                   1011:     if (HPGL_ang == 1)
                   1012:        HPGL_move(x + HPGL_VCHAR / 4, y);
                   1013:     else
                   1014:        HPGL_move(x, y - HPGL_VCHAR / 4);
                   1015:     if (encoding == ENCODING_CP_850) {
                   1016:        unsigned char *s;
                   1017:        fputs("LB", gpoutfile);
                   1018:        for (s = (unsigned char *) str; *s; ++s)
                   1019:            if (*s >= 128 && hpgl_cp_850[*s - 128][0])
                   1020:                fputs(hpgl_cp_850[*s - 128], gpoutfile);
                   1021:            else
                   1022:                putc(*s, gpoutfile);
                   1023:        fputs("\003\n", gpoutfile);
                   1024:     } else if (encoding == ENCODING_ISO_8859_1) {
                   1025:        unsigned char *s;
                   1026:        fputs("LB", gpoutfile);
                   1027:        for (s = (unsigned char *) str; *s; ++s)
                   1028:            if (*s >= 128 && hpgl_iso_8859_1[*s - 128][0])
                   1029:                fputs(hpgl_iso_8859_1[*s - 128], gpoutfile);
                   1030:            else
                   1031:                putc(*s, gpoutfile);
                   1032:        fputs("\003\n", gpoutfile);
                   1033:     } else
                   1034:        fprintf(gpoutfile, "LB%s\003\n", str);
                   1035: }
                   1036:
1.1.1.3 ! ohara    1037: TERM_PUBLIC void
        !          1038: HPGL2_put_text(x, y, str)
1.1       maekawa  1039: unsigned int x, y;
                   1040: char *str;
                   1041: {
                   1042:     struct termentry *t = term;
                   1043: /*
                   1044:  * Position the pen
                   1045:  */
                   1046:     if (HPGL_ang == 1)
                   1047:        HPGL2_move(x + t->v_char / 4, y);
                   1048:     else
                   1049:        HPGL2_move(x, y - t->v_char / 4);
                   1050: /*
                   1051:  * If in Polyline Encoded command, leave Polyline Encoded command
                   1052:  */
                   1053:     if (HPGL2_in_pe) {
                   1054:        fputs(";\n", gpoutfile);
                   1055:        HPGL2_in_pe = 0;
                   1056:     }
                   1057: /*
                   1058:  * Print the text string
                   1059:  */
                   1060:     fprintf(gpoutfile, "LB%s\003\n", str);
                   1061:     HPGL2_lost = 1;
                   1062: }
1.1.1.3 ! ohara    1063:
1.1       maekawa  1064: /*
                   1065:  * Some early HPGL plotters (e.g. HP7220C) require the
                   1066:  * Pen Up/Down and Pen (move) Absolute commands to be separate.
                   1067:  */
                   1068:
1.1.1.3 ! ohara    1069: TERM_PUBLIC void
        !          1070: HPGL_move(x, y)
1.1       maekawa  1071: unsigned int x, y;
                   1072: {
                   1073:     if (HPGL_x != x || HPGL_y != y) {  /* only move if necessary */
                   1074:        fprintf(gpoutfile, "PU;PA%d,%d;\n", x, y);
                   1075:        HPGL_penstate = UP;
                   1076:        HPGL_x = x;
                   1077:        HPGL_y = y;
                   1078:     }
                   1079: }
                   1080:
1.1.1.3 ! ohara    1081: TERM_PUBLIC void
        !          1082: HPGL_vector(x, y)
1.1       maekawa  1083: unsigned int x, y;
                   1084: {
                   1085:     if (HPGL_penstate != DOWN) {
                   1086:        fprintf(gpoutfile, "PD;PA%d,%d;\n", x, y);
                   1087:        HPGL_penstate = DOWN;
                   1088:     } else
                   1089:        fprintf(gpoutfile, "PA%d,%d;\n", x, y);
                   1090:     HPGL_x = x;
                   1091:     HPGL_y = y;
                   1092: }
                   1093:
1.1.1.3 ! ohara    1094: TERM_PUBLIC void
        !          1095: HPGL2_move(x, y)
1.1       maekawa  1096: unsigned int x, y;
                   1097: {
                   1098:     register int dx, dy;
                   1099:     if (HPGL2_in_pe) {
                   1100:        dx = x - HPGL_x;
                   1101:        dy = y - HPGL_y;
                   1102:        fputs("<", gpoutfile);
                   1103:     } else {
                   1104: #if HPGL2_BASE64
                   1105:        fputs("PE<", gpoutfile);
                   1106: #else
                   1107:        fputs("PE7<", gpoutfile);
                   1108: #endif
                   1109:        if (HPGL2_lost) {
                   1110:            dx = x;
                   1111:            dy = y;
                   1112:            HPGL2_lost = 0;
                   1113:            fputs("=", gpoutfile);
                   1114:        } else {
                   1115:            dx = x - HPGL_x;
                   1116:            dy = y - HPGL_y;
                   1117:        }
                   1118:        HPGL2_in_pe = 1;
                   1119:     }
                   1120: #if HPGL2_EXPLICIT_PD
                   1121:     if (HPGL_penstate == DOWN)
                   1122:        HPGL_penstate = UP;
                   1123: #endif
                   1124:     HPGL2_encode(dx);
                   1125:     HPGL2_encode(dy);
                   1126:     fputs("\n", gpoutfile);
                   1127:     HPGL_x = x;
                   1128:     HPGL_y = y;
                   1129: }
                   1130:
1.1.1.3 ! ohara    1131: TERM_PUBLIC void
        !          1132: HPGL2_vector(x, y)
1.1       maekawa  1133: unsigned int x, y;
                   1134: {
                   1135:     register int dx, dy;
                   1136:     if (HPGL2_in_pe) {
                   1137:        dx = x - HPGL_x;
                   1138:        dy = y - HPGL_y;
                   1139:     } else {
                   1140: #if HPGL2_BASE64
                   1141:        fputs("PE", gpoutfile);
                   1142: #else
                   1143:        fputs("PE7", gpoutfile);
                   1144: #endif
                   1145:        if (HPGL2_lost) {
                   1146:            dx = x;
                   1147:            dy = y;
                   1148:            HPGL2_lost = 0;
                   1149:            fputs("=", gpoutfile);
                   1150:        } else {
                   1151:            dx = x - HPGL_x;
                   1152:            dy = y - HPGL_y;
                   1153:        }
                   1154:        HPGL2_in_pe = 1;
                   1155:     }
                   1156: #if HPGL2_EXPLICIT_PD
                   1157: /*
                   1158:  * Put the pen down in the current position,
                   1159:  * relative vector of 0,0.
                   1160:  */
                   1161:     if (HPGL_penstate == UP) {
                   1162:        fputc((char) HPGL2_HIGH_OFFS, gpoutfile);
                   1163:        fputc((char) HPGL2_HIGH_OFFS, gpoutfile);
                   1164:        HPGL_penstate = DOWN;
                   1165:     }
                   1166: #endif
                   1167:     HPGL2_encode(dx);
                   1168:     HPGL2_encode(dy);
                   1169:     fputs("\n", gpoutfile);
                   1170:     HPGL_x = x;
                   1171:     HPGL_y = y;
                   1172: }
                   1173:
                   1174: /*
                   1175:  * Routine to encode position in base 32 or base 64 characters
                   1176:  */
                   1177:
1.1.1.3 ! ohara    1178: TERM_PUBLIC void
        !          1179: HPGL2_encode(d)
1.1       maekawa  1180: register int d;
                   1181: {
                   1182:     register int c;
                   1183:     if ((d <<= 1) < 0)
                   1184:        d = 1 - d;
                   1185:     do {
                   1186:        c = d & HPGL2_MASK;
                   1187:        d >>= HPGL2_BITS;
                   1188:        if (d > 0)
                   1189:            fputc((char) (c + HPGL2_LOW_OFFS), gpoutfile);
                   1190:        else
                   1191:            fputc((char) (c + HPGL2_HIGH_OFFS), gpoutfile);
                   1192:     } while (d > 0);
                   1193: }
                   1194:
1.1.1.3 ! ohara    1195: TERM_PUBLIC int
        !          1196: HPGL_text_angle(ang)
1.1       maekawa  1197: int ang;
                   1198: {
                   1199:     HPGL_ang = ang;
                   1200:     if (ang == 1)
                   1201: /*
                   1202:  *  Vertical
                   1203:  */
                   1204:        fputs("DI0,1;\n", gpoutfile);
                   1205:     else
                   1206: /*
                   1207:  * Horizontal
                   1208:  */
                   1209:        fputs("DI1,0;\n", gpoutfile);
                   1210:     return TRUE;
                   1211: }
                   1212:
1.1.1.3 ! ohara    1213: TERM_PUBLIC int
        !          1214: HPGL2_text_angle(ang)
1.1       maekawa  1215: int ang;
                   1216: {
                   1217: /*
                   1218:  * If in Polyline Encoded command, leave Polyline Encoded command
                   1219:  */
                   1220:     if (HPGL2_in_pe) {
                   1221:        fputs(";", gpoutfile);
                   1222:        HPGL2_in_pe = 0;
                   1223:     }
                   1224:     if (ang == 1)
                   1225: /*
                   1226:  *  Vertical
                   1227:  */
                   1228:        fputs("DI0,1", gpoutfile);
                   1229:     else
                   1230: /*
                   1231:  * Horizontal
                   1232:  */
                   1233:        fputs("DI1,0", gpoutfile);
                   1234:     HPGL_ang = ang;
                   1235:     return TRUE;
                   1236: }
                   1237:
1.1.1.3 ! ohara    1238: TERM_PUBLIC void
        !          1239: HPGL_reset()
1.1       maekawa  1240: {
                   1241: /*
                   1242:  * do nothing
                   1243:  */
                   1244: }
                   1245:
                   1246: #if 0
1.1.1.3 ! ohara    1247: void
        !          1248: HPGL2_reset()
1.1       maekawa  1249: {
                   1250: /*
                   1251:  * Park the pen
                   1252:  * Advance a page
                   1253:  * End with ";"
                   1254:  */
                   1255:     fputs("SP0PG;\n", gpoutfile);
                   1256: }
                   1257:
                   1258: #endif
                   1259:
1.1.1.3 ! ohara    1260: TERM_PUBLIC void
        !          1261: PCL_reset()
1.1       maekawa  1262: {
                   1263: /*
                   1264:  * Return to PCL mode
                   1265:  * Printer reset (conditional eject)
                   1266:  */
                   1267:     fputs("\033%0A\033E\n", gpoutfile);
                   1268: }
                   1269:
1.1.1.3 ! ohara    1270: TERM_PUBLIC int
        !          1271: HPGL2_justify_text(just)
1.1       maekawa  1272: enum JUSTIFY just;
                   1273: {
                   1274: /*
                   1275:  * If in Polyline Encoded command, leave Polyline Encoded command
                   1276:  */
                   1277:     if (HPGL2_in_pe) {
                   1278:        fputs(";\n", gpoutfile);
                   1279:        HPGL2_in_pe = 0;
                   1280:     }
                   1281:     switch (just) {
                   1282:     case LEFT:
                   1283:        fputs("LO1", gpoutfile);
                   1284:        break;
                   1285:     case CENTRE:
                   1286:        fputs("LO4", gpoutfile);
                   1287:        break;
                   1288:     case RIGHT:
                   1289:        fputs("LO7", gpoutfile);
                   1290:        break;
                   1291:     default:
                   1292:        return 0;
                   1293:     }
                   1294:     return 1;
                   1295: }
                   1296:
1.1.1.3 ! ohara    1297: TERM_PUBLIC int
        !          1298: HPGL2_set_font(font)
        !          1299: char *font;
        !          1300: {
        !          1301:     struct termentry *t = term;
        !          1302:     char name[MAX_ID_LEN+1];
        !          1303:     int i, sep, int_size, sep2;
        !          1304:     double size;
        !          1305: /*
        !          1306:  * If in Polyline Encoded command, leave Polyline Encoded command
        !          1307:  */
        !          1308:     if (HPGL2_in_pe) {
        !          1309:        fputs(";\n", gpoutfile);
        !          1310:        HPGL2_in_pe = 0;
        !          1311:     }
        !          1312: /* determine font, use default from options if invalid */
        !          1313:     sep = strcspn(font, ",");
        !          1314:     strncpy(name, font, sep);
        !          1315:     name[sep] = NUL;
        !          1316:     for (i = 0; i < HPGL2_FONTS; i++) {
        !          1317:        sep2 = strcspn(HPGL2_font_table[i].compare, "$");
        !          1318:        if (strncmp(name, HPGL2_font_table[i].compare, sep2) == 0)
        !          1319:            break;
        !          1320:     }
        !          1321:     if (i >= HPGL2_FONTS)
        !          1322:        i = HPGL2_font_num;
        !          1323: /* determine font size, use default from options if invalid */
        !          1324:     sscanf(&(font[sep + 1]), "%d", &int_size);
        !          1325:     if (int_size > 0) {
        !          1326:        size = int_size;
        !          1327:     } else
        !          1328:        size = HPGL2_point_size;
        !          1329: /* apply font changes only if necessary */
        !          1330:     if (size == HPGL2_point_size_current && i == HPGL2_font_num_current)
        !          1331:        return FALSE;
        !          1332:     HPGL2_font = &HPGL2_font_table[i];
        !          1333:     HPGL2_font_num_current = i;
        !          1334:     HPGL2_point_size_current = size;
        !          1335:     t->v_char = (int) HPGL_PUPI *HPGL2_point_size_current / 72;
        !          1336:     t->h_char = t->v_char * 2 / 3;
        !          1337:     fprintf(gpoutfile, "SD1,%d,2,%d,",
        !          1338:            HPGL2_font->symbol_set, HPGL2_font->spacing);
        !          1339:     if (HPGL2_font->spacing) {
        !          1340:        HPGL2_font->height = HPGL2_point_size_current;
        !          1341:        fprintf(gpoutfile, "4,%f,", HPGL2_font->height);
        !          1342:     } else {
        !          1343:        HPGL2_font->pitch = 72 * 3 / (HPGL2_point_size_current * 2);
        !          1344:        fprintf(gpoutfile, "3,%f,", HPGL2_font->pitch);
        !          1345:     }
        !          1346:     fprintf(gpoutfile, "5,%d,6,%d,7,%d;SS;\n",
        !          1347:            HPGL2_font->posture,
        !          1348:            HPGL2_font->stroke_weight, HPGL2_font->typeface);
        !          1349:     return TRUE;
        !          1350: }
        !          1351:
        !          1352: TERM_PUBLIC void
        !          1353: HPGL2_point(x, y, number)
        !          1354: unsigned int x, y;
        !          1355: int number;
        !          1356: {
        !          1357:     int htic, vtic;
        !          1358:     if (pspointset) {          /* postscript style points */
        !          1359:        if (number < 0) {
        !          1360:            HPGL2_neg_point(x, y, number);
        !          1361:        } else {
        !          1362:            htic = (int) (HPGL2_psize * PCL_HTIC / 2);
        !          1363:            vtic = (int) (HPGL2_psize * PCL_VTIC / 2);
        !          1364:            number %= HPGL2_NUM_PSPOINTS;
        !          1365:            switch (number) {
        !          1366:            case 0:             /* plus */
        !          1367:                HPGL2_move(x - htic, y);
        !          1368:                HPGL2_vector(x - htic, y);
        !          1369:                HPGL2_vector(x + htic, y);
        !          1370:                HPGL2_move(x, y - vtic);
        !          1371:                HPGL2_vector(x, y - vtic);
        !          1372:                HPGL2_vector(x, y + vtic);
        !          1373:                break;
        !          1374:            case 1:             /* X */
        !          1375:                HPGL2_move(x - htic, y - vtic);
        !          1376:                HPGL2_vector(x - htic, y - vtic);
        !          1377:                HPGL2_vector(x + htic, y + vtic);
        !          1378:                HPGL2_move(x - htic, y + vtic);
        !          1379:                HPGL2_vector(x - htic, y + vtic);
        !          1380:                HPGL2_vector(x + htic, y - vtic);
        !          1381:                break;
        !          1382:            case 2:             /* star */
        !          1383:                HPGL2_move(x - htic, y);
        !          1384:                HPGL2_vector(x - htic, y);
        !          1385:                HPGL2_vector(x + htic, y);
        !          1386:                HPGL2_move(x, y - vtic);
        !          1387:                HPGL2_vector(x, y - vtic);
        !          1388:                HPGL2_vector(x, y + vtic);
        !          1389:                HPGL2_move(x - htic, y - vtic);
        !          1390:                HPGL2_vector(x - htic, y - vtic);
        !          1391:                HPGL2_vector(x + htic, y + vtic);
        !          1392:                HPGL2_move(x - htic, y + vtic);
        !          1393:                HPGL2_vector(x - htic, y + vtic);
        !          1394:                HPGL2_vector(x + htic, y - vtic);
        !          1395:                break;
        !          1396:            case 3:             /* hollow square 1 */
        !          1397:                HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          1398:                HPGL2_vector(x + (3 * htic / 4), y - (3 * vtic / 4));
        !          1399:                HPGL2_vector(x + (3 * htic / 4), y + (3 * vtic / 4));
        !          1400:                HPGL2_vector(x - (3 * htic / 4), y + (3 * vtic / 4));
        !          1401:                HPGL2_vector(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          1402:                HPGL2_move(x, y);
        !          1403:                HPGL2_vector(x, y);
        !          1404:                break;
        !          1405:            case 4:             /* solid square 1 */
        !          1406:                HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          1407:                fputs(";\n", gpoutfile);
        !          1408:                HPGL2_in_pe = 0;
        !          1409:                fprintf(gpoutfile, "RA%.2f,%.2f;EP;\n", ((double) x + (3 * htic / 4)), ((double) y + (3 * vtic / 4)));
        !          1410:                break;
        !          1411:            case 5:             /* hollow circle 1 */
        !          1412:                HPGL2_move(x, y);
        !          1413:                HPGL2_vector(x, y);
        !          1414:                fputs(";\n", gpoutfile);
        !          1415:                HPGL2_in_pe = 0;
        !          1416:                fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          1417:                break;
        !          1418:            case 6:             /* solid circle 1 */
        !          1419:                HPGL2_move(x, y);
        !          1420:                fputs(";\n", gpoutfile);
        !          1421:                HPGL2_in_pe = 0;
        !          1422:                fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          1423:                break;
        !          1424:            case 7:             /* hollow triangle 1 */
        !          1425:                HPGL2_move(x, y + (3 * vtic / 4));
        !          1426:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          1427:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          1428:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          1429:                HPGL2_move(x, y);
        !          1430:                HPGL2_vector(x, y);
        !          1431:                break;
        !          1432:            case 8:             /* solid triangle 1 */
        !          1433:                HPGL2_move(x, y + (3 * vtic / 4));
        !          1434:                fputs(";\n", gpoutfile);
        !          1435:                HPGL2_in_pe = 0;
        !          1436:                fprintf(gpoutfile, "PM0;\n");
        !          1437:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          1438:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          1439:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          1440:                fputs(";\n", gpoutfile);
        !          1441:                HPGL2_in_pe = 0;
        !          1442:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1443:                break;
        !          1444:            case 9:             /* hollow triangle 2 */
        !          1445:                HPGL2_move(x, y - (3 * vtic / 4));
        !          1446:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          1447:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          1448:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          1449:                HPGL2_move(x, y);
        !          1450:                HPGL2_vector(x, y);
        !          1451:                break;
        !          1452:            case 10:            /* solid triangle 2 */
        !          1453:                HPGL2_move(x, y - (3 * vtic / 4));
        !          1454:                fputs(";\n", gpoutfile);
        !          1455:                HPGL2_in_pe = 0;
        !          1456:                fprintf(gpoutfile, "PM0;\n");
        !          1457:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          1458:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          1459:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          1460:                fputs(";\n", gpoutfile);
        !          1461:                HPGL2_in_pe = 0;
        !          1462:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1463:                break;
        !          1464:            case 11:            /* hollow diamond 1 */
        !          1465:                HPGL2_move(x - (3 * htic / 4), y);
        !          1466:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          1467:                HPGL2_vector(x + (3 * htic / 4), y);
        !          1468:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          1469:                HPGL2_vector(x - (3 * htic / 4), y);
        !          1470:                HPGL2_move(x, y);
        !          1471:                HPGL2_vector(x, y);
        !          1472:                break;
        !          1473:            case 12:            /* solid diamond 1 */
        !          1474:                HPGL2_move(x - (3 * htic / 4), y);
        !          1475:                fputs(";\n", gpoutfile);
        !          1476:                HPGL2_in_pe = 0;
        !          1477:                fprintf(gpoutfile, "PM0;\n");
        !          1478:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          1479:                HPGL2_vector(x + (3 * htic / 4), y);
        !          1480:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          1481:                HPGL2_vector(x - (3 * htic / 4), y);
        !          1482:                fputs(";\n", gpoutfile);
        !          1483:                HPGL2_in_pe = 0;
        !          1484:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1485:                break;
        !          1486:            case 13:            /* hollow pentagon 1 */
        !          1487:                HPGL2_move(x, y + (3 * vtic / 4));
        !          1488:                HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          1489:                HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          1490:                HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          1491:                HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          1492:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          1493:                HPGL2_move(x, y);
        !          1494:                HPGL2_vector(x, y);
        !          1495:                break;
        !          1496:            case 14:            /* solid pentagon */
        !          1497:                HPGL2_move(x, y + (3 * vtic / 4));
        !          1498:                fputs(";\n", gpoutfile);
        !          1499:                HPGL2_in_pe = 0;
        !          1500:                fprintf(gpoutfile, "PM0;\n");
        !          1501:                HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          1502:                HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          1503:                HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          1504:                HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          1505:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          1506:                fputs(";\n", gpoutfile);
        !          1507:                HPGL2_in_pe = 0;
        !          1508:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1509:                break;
        !          1510:            case 15:            /* hollow circle 2 */
        !          1511:                HPGL2_move(x, y + vtic);
        !          1512:                HPGL2_vector(x, y);
        !          1513:                fputs(";\n", gpoutfile);
        !          1514:                HPGL2_in_pe = 0;
        !          1515:                fprintf(gpoutfile, "CI%d;\n", htic);
        !          1516:                break;
        !          1517:            case 16:            /* semisolid circle 1 */
        !          1518:                HPGL2_move(x, y);
        !          1519:                fputs(";\n", gpoutfile);
        !          1520:                HPGL2_in_pe = 0;
        !          1521:                fprintf(gpoutfile, "WG%d,0,90;EP;EW%d,90,270;\n", htic, htic);
        !          1522:                break;
        !          1523:            case 17:            /* semisolid circle 2 */
        !          1524:                HPGL2_move(x, y);
        !          1525:                fputs(";\n", gpoutfile);
        !          1526:                HPGL2_in_pe = 0;
        !          1527:                fprintf(gpoutfile, "WG%d,90,90;EP;EW%d,180,270;\n", htic, htic);
        !          1528:                break;
        !          1529:            case 18:            /* semisolid circle 3 */
        !          1530:                HPGL2_move(x, y);
        !          1531:                fputs(";\n", gpoutfile);
        !          1532:                HPGL2_in_pe = 0;
        !          1533:                fprintf(gpoutfile, "WG%d,0,180;EP;EW%d,180,180;\n", htic, htic);
        !          1534:                break;
        !          1535:            case 19:            /* semisolid circle 4 */
        !          1536:                HPGL2_move(x, y);
        !          1537:                fputs(";\n", gpoutfile);
        !          1538:                HPGL2_in_pe = 0;
        !          1539:                fprintf(gpoutfile, "WG%d,180,90;EP;EW%d,270,270;\n", htic, htic);
        !          1540:                break;
        !          1541:            case 20:            /* semisolid circle 5 */
        !          1542:                HPGL2_move(x, y);
        !          1543:                fputs(";\n", gpoutfile);
        !          1544:                HPGL2_in_pe = 0;
        !          1545:                fprintf(gpoutfile, "WG%d,0,90;EP;EW%d,90,90;WG%d,180,90;EP;EW%d,270,90;\n", htic, htic, htic, htic);
        !          1546:                break;
        !          1547:            case 21:            /* semisolid circle 6 */
        !          1548:                HPGL2_move(x, y);
        !          1549:                fputs(";\n", gpoutfile);
        !          1550:                HPGL2_in_pe = 0;
        !          1551:                fprintf(gpoutfile, "WG%d,90,180;EP;EW%d,270,180;\n", htic, htic);
        !          1552:                break;
        !          1553:            case 22:            /* semisolid circle 7 */
        !          1554:                HPGL2_move(x, y);
        !          1555:                fputs(";\n", gpoutfile);
        !          1556:                HPGL2_in_pe = 0;
        !          1557:                fprintf(gpoutfile, "WG%d,0,270;EP;EW%d,270,90;\n", htic, htic);
        !          1558:                break;
        !          1559:            case 23:            /* semisolid circle 8 */
        !          1560:                HPGL2_move(x, y);
        !          1561:                fputs(";\n", gpoutfile);
        !          1562:                HPGL2_in_pe = 0;
        !          1563:                fprintf(gpoutfile, "WG%d,270,90;EP;EW%d,0,270;\n", htic, htic);
        !          1564:                break;
        !          1565:            case 24:            /* semisolid circle 9 */
        !          1566:                HPGL2_move(x, y);
        !          1567:                fputs(";\n", gpoutfile);
        !          1568:                HPGL2_in_pe = 0;
        !          1569:                fprintf(gpoutfile, "WG%d,270,180;EP;EW%d,90,180;\n", htic, htic);
        !          1570:                break;
        !          1571:            case 25:            /* semisolid circle 10 */
        !          1572:                HPGL2_move(x, y);
        !          1573:                fputs(";\n", gpoutfile);
        !          1574:                HPGL2_in_pe = 0;
        !          1575:                fprintf(gpoutfile, "WG%d,90,90;EP;EW%d,180,90;WG%d,270,90;EP;EW%d,0,90;\n", htic, htic, htic, htic);
        !          1576:                break;
        !          1577:            case 26:            /* semisolid circle 11 */
        !          1578:                HPGL2_move(x, y);
        !          1579:                fputs(";\n", gpoutfile);
        !          1580:                HPGL2_in_pe = 0;
        !          1581:                fprintf(gpoutfile, "WG%d,270,270;EP;EW%d,180,90;\n", htic, htic);
        !          1582:                break;
        !          1583:            case 27:            /* semisolid circle 12 */
        !          1584:                HPGL2_move(x, y);
        !          1585:                fputs(";\n", gpoutfile);
        !          1586:                HPGL2_in_pe = 0;
        !          1587:                fprintf(gpoutfile, "WG%d,180,180;EP;EW%d,0,180;\n", htic, htic);
        !          1588:                break;
        !          1589:            case 28:            /* semisolid circle 13 */
        !          1590:                HPGL2_move(x, y);
        !          1591:                fputs(";\n", gpoutfile);
        !          1592:                HPGL2_in_pe = 0;
        !          1593:                fprintf(gpoutfile, "WG%d,180,270;EP;EW%d,90,90;\n", htic, htic);
        !          1594:                break;
        !          1595:            case 29:            /* semisolid circle 14 */
        !          1596:                HPGL2_move(x, y);
        !          1597:                fputs(";\n", gpoutfile);
        !          1598:                HPGL2_in_pe = 0;
        !          1599:                fprintf(gpoutfile, "WG%d,90,270;EP;EW%d,0,90;\n", htic, htic);
        !          1600:                break;
        !          1601:            case 30:            /* solid circle 2 */
        !          1602:                HPGL2_move(x, y);
        !          1603:                fputs(";\n", gpoutfile);
        !          1604:                HPGL2_in_pe = 0;
        !          1605:                fprintf(gpoutfile, "WG%d,0,360;EP;\n", htic);
        !          1606:                break;
        !          1607:            case 31:            /* hollow square 2 */
        !          1608:                HPGL2_move(x - htic, y - vtic);
        !          1609:                HPGL2_vector(x + htic, y - vtic);
        !          1610:                HPGL2_vector(x + htic, y + vtic);
        !          1611:                HPGL2_vector(x - htic, y + vtic);
        !          1612:                HPGL2_vector(x - htic, y - vtic);
        !          1613:                HPGL2_move(x, y + vtic);
        !          1614:                HPGL2_vector(x, y);
        !          1615:                break;
        !          1616:            case 32:            /* semisolid square 1 */
        !          1617:                HPGL2_move(x, y + vtic);
        !          1618:                HPGL2_vector(x - htic, y + vtic);
        !          1619:                HPGL2_vector(x - htic, y - vtic);
        !          1620:                HPGL2_vector(x + htic, y - vtic);
        !          1621:                HPGL2_vector(x + htic, y);
        !          1622:                HPGL2_move(x, y);
        !          1623:                fputs(";\n", gpoutfile);
        !          1624:                HPGL2_in_pe = 0;
        !          1625:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1626:                break;
        !          1627:            case 33:            /* semisolid square 2 */
        !          1628:                HPGL2_move(x - htic, y);
        !          1629:                HPGL2_vector(x - htic, y - vtic);
        !          1630:                HPGL2_vector(x + htic, y - vtic);
        !          1631:                HPGL2_vector(x + htic, y + vtic);
        !          1632:                HPGL2_vector(x, y + vtic);
        !          1633:                HPGL2_move(x - htic, y);
        !          1634:                fputs(";\n", gpoutfile);
        !          1635:                HPGL2_in_pe = 0;
        !          1636:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic);
        !          1637:                break;
        !          1638:            case 34:            /* semisolid square 3 */
        !          1639:                HPGL2_move(x - htic, y);
        !          1640:                HPGL2_vector(x - htic, y - vtic);
        !          1641:                HPGL2_vector(x + htic, y - vtic);
        !          1642:                HPGL2_vector(x + htic, y);
        !          1643:                HPGL2_move(x - htic, y);
        !          1644:                fputs(";\n", gpoutfile);
        !          1645:                HPGL2_in_pe = 0;
        !          1646:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1647:                break;
        !          1648:            case 35:            /* semisolid square 4 */
        !          1649:                HPGL2_move(x, y - vtic);
        !          1650:                HPGL2_vector(x + htic, y - vtic);
        !          1651:                HPGL2_vector(x + htic, y + vtic);
        !          1652:                HPGL2_vector(x - htic, y + vtic);
        !          1653:                HPGL2_vector(x - htic, y);
        !          1654:                HPGL2_move(x - htic, y - vtic);
        !          1655:                fputs(";\n", gpoutfile);
        !          1656:                HPGL2_in_pe = 0;
        !          1657:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y);
        !          1658:                break;
        !          1659:            case 36:            /* semisolid square 5 */
        !          1660:                HPGL2_move(x, y - vtic);
        !          1661:                HPGL2_vector(x + htic, y - vtic);
        !          1662:                HPGL2_vector(x + htic, y);
        !          1663:                HPGL2_move(x, y + vtic);
        !          1664:                HPGL2_vector(x - htic, y + vtic);
        !          1665:                HPGL2_vector(x - htic, y);
        !          1666:                HPGL2_move(x - htic, y - vtic);
        !          1667:                fputs(";\n", gpoutfile);
        !          1668:                HPGL2_in_pe = 0;
        !          1669:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y);
        !          1670:                HPGL2_move(x, y);
        !          1671:                fputs(";\n", gpoutfile);
        !          1672:                HPGL2_in_pe = 0;
        !          1673:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1674:                break;
        !          1675:            case 37:            /* semisolid square 6 */
        !          1676:                HPGL2_move(x, y - vtic);
        !          1677:                HPGL2_vector(x + htic, y - vtic);
        !          1678:                HPGL2_vector(x + htic, y + vtic);
        !          1679:                HPGL2_vector(x, y + vtic);
        !          1680:                HPGL2_move(x - htic, y - vtic);
        !          1681:                fputs(";\n", gpoutfile);
        !          1682:                HPGL2_in_pe = 0;
        !          1683:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic);
        !          1684:                break;
        !          1685:            case 38:            /* semisolid square 7 */
        !          1686:                HPGL2_move(x, y - vtic);
        !          1687:                HPGL2_vector(x + htic, y - vtic);
        !          1688:                HPGL2_vector(x + htic, y);
        !          1689:                HPGL2_move(x - htic, y - vtic);
        !          1690:                fputs(";\n", gpoutfile);
        !          1691:                HPGL2_in_pe = 0;
        !          1692:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic);
        !          1693:                HPGL2_move(x, y);
        !          1694:                fputs(";\n", gpoutfile);
        !          1695:                HPGL2_in_pe = 0;
        !          1696:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1697:                break;
        !          1698:            case 39:            /* semisolid square 8 */
        !          1699:                HPGL2_move(x + htic, y);
        !          1700:                HPGL2_vector(x + htic, y + vtic);
        !          1701:                HPGL2_vector(x - htic, y + vtic);
        !          1702:                HPGL2_vector(x - htic, y - vtic);
        !          1703:                HPGL2_vector(x, y - vtic);
        !          1704:                fputs(";\n", gpoutfile);
        !          1705:                HPGL2_in_pe = 0;
        !          1706:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y);
        !          1707:                break;
        !          1708:            case 40:            /* semisolid square 9 */
        !          1709:                HPGL2_move(x, y + vtic);
        !          1710:                HPGL2_vector(x - htic, y + vtic);
        !          1711:                HPGL2_vector(x - htic, y - vtic);
        !          1712:                HPGL2_vector(x, y - vtic);
        !          1713:                fputs(";\n", gpoutfile);
        !          1714:                HPGL2_in_pe = 0;
        !          1715:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1716:                break;
        !          1717:            case 41:            /* semisolid square 10 */
        !          1718:                HPGL2_move(x - htic, y);
        !          1719:                HPGL2_vector(x - htic, y - vtic);
        !          1720:                HPGL2_vector(x, y - vtic);
        !          1721:                HPGL2_move(x + htic, y);
        !          1722:                HPGL2_vector(x + htic, y + vtic);
        !          1723:                HPGL2_vector(x, y + vtic);
        !          1724:                HPGL2_move(x - htic, y);
        !          1725:                fputs(";\n", gpoutfile);
        !          1726:                HPGL2_in_pe = 0;
        !          1727:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic);
        !          1728:                HPGL2_move(x, y - vtic);
        !          1729:                fputs(";\n", gpoutfile);
        !          1730:                HPGL2_in_pe = 0;
        !          1731:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y);
        !          1732:                break;
        !          1733:            case 42:            /* semisolid square 11 */
        !          1734:                HPGL2_move(x - htic, y);
        !          1735:                HPGL2_vector(x - htic, y - vtic);
        !          1736:                HPGL2_vector(x, y - vtic);
        !          1737:                fputs(";\n", gpoutfile);
        !          1738:                HPGL2_in_pe = 0;
        !          1739:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1740:                HPGL2_move(x - htic, y);
        !          1741:                fputs(";\n", gpoutfile);
        !          1742:                HPGL2_in_pe = 0;
        !          1743:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic);
        !          1744:                break;
        !          1745:            case 43:            /* semisolid square 12 */
        !          1746:                HPGL2_move(x + htic, y);
        !          1747:                HPGL2_vector(x + htic, y + vtic);
        !          1748:                HPGL2_vector(x - htic, y + vtic);
        !          1749:                HPGL2_vector(x - htic, y);
        !          1750:                HPGL2_move(x - htic, y - vtic);
        !          1751:                fputs(";\n", gpoutfile);
        !          1752:                HPGL2_in_pe = 0;
        !          1753:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y);
        !          1754:                break;
        !          1755:            case 44:            /* semisolid square 13 */
        !          1756:                HPGL2_move(x, y + vtic);
        !          1757:                HPGL2_vector(x - htic, y + vtic);
        !          1758:                HPGL2_vector(x - htic, y);
        !          1759:                HPGL2_move(x - htic, y - vtic);
        !          1760:                fputs(";\n", gpoutfile);
        !          1761:                HPGL2_in_pe = 0;
        !          1762:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y);
        !          1763:                HPGL2_move(x, y);
        !          1764:                fputs(";\n", gpoutfile);
        !          1765:                HPGL2_in_pe = 0;
        !          1766:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1767:                break;
        !          1768:            case 45:            /* semisolid square 14 */
        !          1769:                HPGL2_move(x + htic, y);
        !          1770:                HPGL2_vector(x + htic, y + vtic);
        !          1771:                HPGL2_vector(x, y + vtic);
        !          1772:                HPGL2_move(x - htic, y - vtic);
        !          1773:                fputs(";\n", gpoutfile);
        !          1774:                HPGL2_in_pe = 0;
        !          1775:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y);
        !          1776:                HPGL2_move(x - htic, y);
        !          1777:                fputs(";\n", gpoutfile);
        !          1778:                HPGL2_in_pe = 0;
        !          1779:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x, y + vtic);
        !          1780:                break;
        !          1781:            case 46:            /* solid square 2 */
        !          1782:                HPGL2_move(x - htic, y - vtic);
        !          1783:                fputs(";\n", gpoutfile);
        !          1784:                HPGL2_in_pe = 0;
        !          1785:                fprintf(gpoutfile, "RA%d,%d;EP;\n", x + htic, y + vtic);
        !          1786:                break;
        !          1787:            case 47:            /* hollow diamond 2 */
        !          1788:                HPGL2_move(x - htic, y);
        !          1789:                HPGL2_vector(x, y - vtic);
        !          1790:                HPGL2_vector(x + htic, y);
        !          1791:                HPGL2_vector(x, y + vtic);
        !          1792:                HPGL2_vector(x - htic, y);
        !          1793:                HPGL2_move(x - (htic / 2), y + (vtic / 2));
        !          1794:                HPGL2_vector(x, y);
        !          1795:                break;
        !          1796:            case 48:            /* semisolid diamond 1 */
        !          1797:                HPGL2_move(x - (htic / 2), y + (vtic / 2));
        !          1798:                HPGL2_vector(x - htic, y);
        !          1799:                HPGL2_vector(x, y - vtic);
        !          1800:                HPGL2_vector(x + htic, y);
        !          1801:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1802:                fputs(";\n", gpoutfile);
        !          1803:                HPGL2_in_pe = 0;
        !          1804:                fprintf(gpoutfile, "PM0;\n");
        !          1805:                HPGL2_vector(x, y + vtic);
        !          1806:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1807:                HPGL2_vector(x, y);
        !          1808:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1809:                fputs(";\n", gpoutfile);
        !          1810:                HPGL2_in_pe = 0;
        !          1811:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1812:                break;
        !          1813:            case 49:            /* semisolid diamond 2 */
        !          1814:                HPGL2_move(x - (htic / 2), y - (vtic / 2));
        !          1815:                HPGL2_vector(x, y - vtic);
        !          1816:                HPGL2_vector(x + htic, y);
        !          1817:                HPGL2_vector(x, y + vtic);
        !          1818:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1819:                fputs(";\n", gpoutfile);
        !          1820:                HPGL2_in_pe = 0;
        !          1821:                fprintf(gpoutfile, "PM0;\n");
        !          1822:                HPGL2_vector(x - htic, y);
        !          1823:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1824:                HPGL2_vector(x, y);
        !          1825:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1826:                fputs(";\n", gpoutfile);
        !          1827:                HPGL2_in_pe = 0;
        !          1828:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1829:                break;
        !          1830:            case 50:            /* semisolid diamond 3 */
        !          1831:                HPGL2_move(x - (htic / 2), y - (vtic / 2));
        !          1832:                HPGL2_vector(x, y - vtic);
        !          1833:                HPGL2_vector(x + htic, y);
        !          1834:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1835:                fputs(";\n", gpoutfile);
        !          1836:                HPGL2_in_pe = 0;
        !          1837:                fprintf(gpoutfile, "PM0;\n");
        !          1838:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1839:                HPGL2_vector(x - htic, y);
        !          1840:                HPGL2_vector(x, y + vtic);
        !          1841:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1842:                fputs(";\n", gpoutfile);
        !          1843:                HPGL2_in_pe = 0;
        !          1844:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1845:                break;
        !          1846:            case 51:            /* semisolid diamond 4 */
        !          1847:                HPGL2_move(x + (htic / 2), y - (vtic / 2));
        !          1848:                HPGL2_vector(x + htic, y);
        !          1849:                HPGL2_vector(x, y + vtic);
        !          1850:                HPGL2_vector(x - htic, y);
        !          1851:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1852:                fputs(";\n", gpoutfile);
        !          1853:                HPGL2_in_pe = 0;
        !          1854:                fprintf(gpoutfile, "PM0;\n");
        !          1855:                HPGL2_vector(x, y);
        !          1856:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1857:                HPGL2_vector(x, y - vtic);
        !          1858:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1859:                fputs(";\n", gpoutfile);
        !          1860:                HPGL2_in_pe = 0;
        !          1861:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1862:                break;
        !          1863:            case 52:            /* semisolid diamond 5 */
        !          1864:                HPGL2_move(x - (htic / 2), y + (vtic / 2));
        !          1865:                HPGL2_vector(x - htic, y);
        !          1866:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1867:                fputs(";\n", gpoutfile);
        !          1868:                HPGL2_in_pe = 0;
        !          1869:                fprintf(gpoutfile, "PM0;\n");
        !          1870:                HPGL2_vector(x, y);
        !          1871:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1872:                HPGL2_vector(x, y - vtic);
        !          1873:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1874:                fputs(";\n", gpoutfile);
        !          1875:                HPGL2_in_pe = 0;
        !          1876:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1877:                HPGL2_move(x + (htic / 2), y - (vtic / 2));
        !          1878:                HPGL2_vector(x + htic, y);
        !          1879:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1880:                fputs(";\n", gpoutfile);
        !          1881:                HPGL2_in_pe = 0;
        !          1882:                fprintf(gpoutfile, "PM0;\n");
        !          1883:                HPGL2_vector(x, y + vtic);
        !          1884:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1885:                HPGL2_vector(x, y);
        !          1886:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1887:                fputs(";\n", gpoutfile);
        !          1888:                HPGL2_in_pe = 0;
        !          1889:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1890:                break;
        !          1891:            case 53:            /* semisolid diamond 6 */
        !          1892:                HPGL2_move(x + (htic / 2), y - (vtic / 2));
        !          1893:                HPGL2_vector(x + htic, y);
        !          1894:                HPGL2_vector(x, y + vtic);
        !          1895:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1896:                fputs(";\n", gpoutfile);
        !          1897:                HPGL2_in_pe = 0;
        !          1898:                fprintf(gpoutfile, "PM0;\n");
        !          1899:                HPGL2_vector(x - htic, y);
        !          1900:                HPGL2_vector(x, y - vtic);
        !          1901:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1902:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1903:                fputs(";\n", gpoutfile);
        !          1904:                HPGL2_in_pe = 0;
        !          1905:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1906:                break;
        !          1907:            case 54:            /* semisolid diamond 7 */
        !          1908:                HPGL2_move(x + (htic / 2), y - (vtic / 2));
        !          1909:                HPGL2_vector(x + htic, y);
        !          1910:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1911:                fputs(";\n", gpoutfile);
        !          1912:                HPGL2_in_pe = 0;
        !          1913:                fprintf(gpoutfile, "PM0;\n");
        !          1914:                HPGL2_vector(x, y + vtic);
        !          1915:                HPGL2_vector(x - htic, y);
        !          1916:                HPGL2_vector(x, y - vtic);
        !          1917:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1918:                HPGL2_vector(x, y);
        !          1919:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1920:                fputs(";\n", gpoutfile);
        !          1921:                HPGL2_in_pe = 0;
        !          1922:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1923:                break;
        !          1924:            case 55:            /* semisolid diamond 8 */
        !          1925:                HPGL2_move(x + (htic / 2), y + (vtic / 2));
        !          1926:                HPGL2_vector(x, y + vtic);
        !          1927:                HPGL2_vector(x - htic, y);
        !          1928:                HPGL2_vector(x, y - vtic);
        !          1929:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1930:                fputs(";\n", gpoutfile);
        !          1931:                HPGL2_in_pe = 0;
        !          1932:                fprintf(gpoutfile, "PM0;\n");
        !          1933:                HPGL2_vector(x, y);
        !          1934:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1935:                HPGL2_vector(x + htic, y);
        !          1936:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1937:                fputs(";\n", gpoutfile);
        !          1938:                HPGL2_in_pe = 0;
        !          1939:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1940:                break;
        !          1941:            case 56:            /* semisolid diamond 9 */
        !          1942:                HPGL2_move(x - (htic / 2), y + (vtic / 2));
        !          1943:                HPGL2_vector(x - htic, y);
        !          1944:                HPGL2_vector(x, y - vtic);
        !          1945:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1946:                fputs(";\n", gpoutfile);
        !          1947:                HPGL2_in_pe = 0;
        !          1948:                fprintf(gpoutfile, "PM0;\n");
        !          1949:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1950:                HPGL2_vector(x, y + vtic);
        !          1951:                HPGL2_vector(x + htic, y);
        !          1952:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1953:                fputs(";\n", gpoutfile);
        !          1954:                HPGL2_in_pe = 0;
        !          1955:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1956:                break;
        !          1957:            case 57:            /* semisolid diamond 10 */
        !          1958:                HPGL2_move(x + (htic / 2), y + (vtic / 2));
        !          1959:                HPGL2_vector(x, y + vtic);
        !          1960:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1961:                fputs(";\n", gpoutfile);
        !          1962:                HPGL2_in_pe = 0;
        !          1963:                fprintf(gpoutfile, "PM0;\n");
        !          1964:                HPGL2_vector(x, y);
        !          1965:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1966:                HPGL2_vector(x - htic, y);
        !          1967:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          1968:                fputs(";\n", gpoutfile);
        !          1969:                HPGL2_in_pe = 0;
        !          1970:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1971:                HPGL2_move(x - (htic / 2), y - (vtic / 2));
        !          1972:                HPGL2_vector(x, y - vtic);
        !          1973:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1974:                fputs(";\n", gpoutfile);
        !          1975:                HPGL2_in_pe = 0;
        !          1976:                fprintf(gpoutfile, "PM0;\n");
        !          1977:                HPGL2_vector(x, y);
        !          1978:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          1979:                HPGL2_vector(x + htic, y);
        !          1980:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1981:                fputs(";\n", gpoutfile);
        !          1982:                HPGL2_in_pe = 0;
        !          1983:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          1984:                break;
        !          1985:            case 58:            /* semisolid diamond 11 */
        !          1986:                HPGL2_move(x - (htic / 2), y - (vtic / 2));
        !          1987:                HPGL2_vector(x, y - vtic);
        !          1988:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1989:                fputs(";\n", gpoutfile);
        !          1990:                HPGL2_in_pe = 0;
        !          1991:                fprintf(gpoutfile, "PM0;\n");
        !          1992:                HPGL2_vector(x, y);
        !          1993:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          1994:                HPGL2_vector(x - htic, y);
        !          1995:                HPGL2_vector(x, y + vtic);
        !          1996:                HPGL2_vector(x + htic, y);
        !          1997:                HPGL2_vector(x + (htic / 2), y - (vtic / 2));
        !          1998:                fputs(";\n", gpoutfile);
        !          1999:                HPGL2_in_pe = 0;
        !          2000:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          2001:                break;
        !          2002:            case 59:            /* semisolid diamond 12 */
        !          2003:                HPGL2_move(x + (htic / 2), y + (vtic / 2));
        !          2004:                HPGL2_vector(x, y + vtic);
        !          2005:                HPGL2_vector(x - htic, y);
        !          2006:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          2007:                fputs(";\n", gpoutfile);
        !          2008:                HPGL2_in_pe = 0;
        !          2009:                fprintf(gpoutfile, "PM0;\n");
        !          2010:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          2011:                HPGL2_vector(x + htic, y);
        !          2012:                HPGL2_vector(x, y - vtic);
        !          2013:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          2014:                fputs(";\n", gpoutfile);
        !          2015:                HPGL2_in_pe = 0;
        !          2016:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          2017:                break;
        !          2018:            case 60:            /* semisolid diamond 13 */
        !          2019:                HPGL2_move(x - (htic / 2), y + (vtic / 2));
        !          2020:                HPGL2_vector(x - htic, y);
        !          2021:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          2022:                fputs(";\n", gpoutfile);
        !          2023:                HPGL2_in_pe = 0;
        !          2024:                fprintf(gpoutfile, "PM0;\n");
        !          2025:                HPGL2_vector(x, y - vtic);
        !          2026:                HPGL2_vector(x + htic, y);
        !          2027:                HPGL2_vector(x, y + vtic);
        !          2028:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          2029:                HPGL2_vector(x, y);
        !          2030:                HPGL2_vector(x - (htic / 2), y - (vtic / 2));
        !          2031:                fputs(";\n", gpoutfile);
        !          2032:                HPGL2_in_pe = 0;
        !          2033:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          2034:                break;
        !          2035:            case 61:            /* semisolid diamond 14 */
        !          2036:                HPGL2_move(x + (htic / 2), y + (vtic / 2));
        !          2037:                HPGL2_vector(x, y + vtic);
        !          2038:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          2039:                fputs(";\n", gpoutfile);
        !          2040:                HPGL2_in_pe = 0;
        !          2041:                fprintf(gpoutfile, "PM0;\n");
        !          2042:                HPGL2_vector(x - htic, y);
        !          2043:                HPGL2_vector(x, y - vtic);
        !          2044:                HPGL2_vector(x + htic, y);
        !          2045:                HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          2046:                HPGL2_vector(x, y);
        !          2047:                HPGL2_vector(x - (htic / 2), y + (vtic / 2));
        !          2048:                fputs(";\n", gpoutfile);
        !          2049:                HPGL2_in_pe = 0;
        !          2050:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          2051:                break;
        !          2052:            case 62:            /* solid diamond 2 */
        !          2053:                HPGL2_move(x - htic, y);
        !          2054:                fputs(";\n", gpoutfile);
        !          2055:                HPGL2_in_pe = 0;
        !          2056:                fprintf(gpoutfile, "PM0;\n");
        !          2057:                HPGL2_vector(x, y - vtic);
        !          2058:                HPGL2_vector(x + htic, y);
        !          2059:                HPGL2_vector(x, y + vtic);
        !          2060:                HPGL2_vector(x - htic, y);
        !          2061:                fputs(";\n", gpoutfile);
        !          2062:                HPGL2_in_pe = 0;
        !          2063:                fprintf(gpoutfile, "PM2;FP;EP;\n");
        !          2064:                break;
        !          2065:            case 63:            /* hollow square 3 */
        !          2066:                HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          2067:                HPGL2_vector(x + (3 * htic / 4), y - (3 * vtic / 4));
        !          2068:                HPGL2_vector(x + (3 * htic / 4), y + (3 * vtic / 4));
        !          2069:                HPGL2_vector(x - (3 * htic / 4), y + (3 * vtic / 4));
        !          2070:                HPGL2_vector(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          2071:                break;
        !          2072:            case 64:            /* hollow circle 3 */
        !          2073:                HPGL2_move(x, y);
        !          2074:                fputs(";\n", gpoutfile);
        !          2075:                HPGL2_in_pe = 0;
        !          2076:                fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2077:                break;
        !          2078:            case 65:            /* hollow triangle 3 */
        !          2079:                HPGL2_move(x, y + (3 * vtic / 4));
        !          2080:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          2081:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          2082:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          2083:                break;
        !          2084:            case 66:            /* hollow triangle 4 */
        !          2085:                HPGL2_move(x, y - (3 * vtic / 4));
        !          2086:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          2087:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          2088:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          2089:                break;
        !          2090:            case 67:            /* hollow diamond 3 */
        !          2091:                HPGL2_move(x - (3 * htic / 4), y);
        !          2092:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          2093:                HPGL2_vector(x + (3 * htic / 4), y);
        !          2094:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          2095:                HPGL2_vector(x - (3 * htic / 4), y);
        !          2096:                break;
        !          2097:            case 68:            /* hollow pentagon 2 */
        !          2098:                HPGL2_move(x, y + (3 * vtic / 4));
        !          2099:                HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          2100:                HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          2101:                HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          2102:                HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          2103:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          2104:                break;
        !          2105:            case 69:            /* opaque square */
        !          2106:                HPGL2_move(x - htic, y - vtic);
        !          2107:                fputs(";\n", gpoutfile);
        !          2108:                HPGL2_in_pe = 0;
        !          2109:                fprintf(gpoutfile, "FT10,30;RA%d,%d;EP;FT;\n", x + (3 * htic / 4), y + (3 * vtic / 4));
        !          2110:                break;
        !          2111:            case 70:            /* opaque circle */
        !          2112:                HPGL2_move(x, y);
        !          2113:                fputs(";\n", gpoutfile);
        !          2114:                HPGL2_in_pe = 0;
        !          2115:                fprintf(gpoutfile, "FT10,30;WG%.2f,0,360;EP;FT;\n", ((double) 3 * (htic) / 4));
        !          2116:                break;
        !          2117:            case 71:            /* opaque triangle 1 */
        !          2118:                HPGL2_move(x, y + (3 * vtic / 4));
        !          2119:                fputs(";\n", gpoutfile);
        !          2120:                HPGL2_in_pe = 0;
        !          2121:                fprintf(gpoutfile, "PM0;\n");
        !          2122:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          2123:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y - (3 * vtic / 8));
        !          2124:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          2125:                fputs(";\n", gpoutfile);
        !          2126:                HPGL2_in_pe = 0;
        !          2127:                fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n");
        !          2128:                break;
        !          2129:            case 72:            /* opaque triangle 2 */
        !          2130:                HPGL2_move(x, y - (3 * vtic / 4));
        !          2131:                fputs(";\n", gpoutfile);
        !          2132:                HPGL2_in_pe = 0;
        !          2133:                fprintf(gpoutfile, "PM0;\n");
        !          2134:                HPGL2_vector(x - (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          2135:                HPGL2_vector(x + (3 * sqrt(3) * htic / 8), y + (3 * vtic / 8));
        !          2136:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          2137:                fputs(";\n", gpoutfile);
        !          2138:                HPGL2_in_pe = 0;
        !          2139:                fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n");
        !          2140:                break;
        !          2141:            case 73:            /* opaque diamond */
        !          2142:                HPGL2_move(x - (3 * htic / 4), y);
        !          2143:                fputs(";\n", gpoutfile);
        !          2144:                HPGL2_in_pe = 0;
        !          2145:                fprintf(gpoutfile, "PM0;\n");
        !          2146:                HPGL2_vector(x, y - (3 * vtic / 4));
        !          2147:                HPGL2_vector(x + (3 * htic / 4), y);
        !          2148:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          2149:                HPGL2_vector(x - (3 * htic / 4), y);
        !          2150:                fputs(";\n", gpoutfile);
        !          2151:                HPGL2_in_pe = 0;
        !          2152:                fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n");
        !          2153:                break;
        !          2154:            case 74:            /* opaque pentagon */
        !          2155:                HPGL2_move(x, y + (3 * vtic / 4));
        !          2156:                fputs(";\n", gpoutfile);
        !          2157:                HPGL2_in_pe = 0;
        !          2158:                fprintf(gpoutfile, "PM0;\n");
        !          2159:                HPGL2_vector(x - (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          2160:                HPGL2_vector(x - (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          2161:                HPGL2_vector(x + (sin(.2 * acos(-1)) * 3 * htic / 4), y - (cos(.2 * acos(-1)) * 3 * vtic / 4));
        !          2162:                HPGL2_vector(x + (cos(.1 * acos(-1)) * 3 * htic / 4), y + (sin(.1 * acos(-1)) * 3 * vtic / 4));
        !          2163:                HPGL2_vector(x, y + (3 * vtic / 4));
        !          2164:                fputs(";\n", gpoutfile);
        !          2165:                HPGL2_in_pe = 0;
        !          2166:                fprintf(gpoutfile, "PM2;FT10,30;FP;EP;FT;\n");
        !          2167:                break;
        !          2168:            }
        !          2169:        }
        !          2170:     } else {                   /* default style points */
        !          2171:        if (number < 0) {
        !          2172:            HPGL2_neg_point(x, y, number);
        !          2173:        } else {
        !          2174:            htic = (int) (HPGL2_psize * PCL_HTIC / 2);
        !          2175:            vtic = (int) (HPGL2_psize * PCL_VTIC / 2);
        !          2176:            number %= HPGL2_NUM_NOPSPOINTS;
        !          2177:            switch (number) {
        !          2178:            case 0:             /* diamond */
        !          2179:                HPGL2_move(x - htic, y);
        !          2180:                HPGL2_vector(x, y - vtic);
        !          2181:                HPGL2_vector(x + htic, y);
        !          2182:                HPGL2_vector(x, y + vtic);
        !          2183:                HPGL2_vector(x - htic, y);
        !          2184:                HPGL2_move(x, y);
        !          2185:                HPGL2_vector(x, y);
        !          2186:                break;
        !          2187:            case 1:             /* plus */
        !          2188:                HPGL2_move(x - htic, y);
        !          2189:                HPGL2_vector(x - htic, y);
        !          2190:                HPGL2_vector(x + htic, y);
        !          2191:                HPGL2_move(x, y - vtic);
        !          2192:                HPGL2_vector(x, y - vtic);
        !          2193:                HPGL2_vector(x, y + vtic);
        !          2194:                break;
        !          2195:            case 2:             /* box */
        !          2196:                HPGL2_move(x - htic, y - vtic);
        !          2197:                HPGL2_vector(x - htic, y - vtic);
        !          2198:                HPGL2_vector(x + htic, y - vtic);
        !          2199:                HPGL2_vector(x + htic, y + vtic);
        !          2200:                HPGL2_vector(x - htic, y + vtic);
        !          2201:                HPGL2_vector(x - htic, y - vtic);
        !          2202:                HPGL2_move(x, y);
        !          2203:                HPGL2_vector(x, y);
        !          2204:                break;
        !          2205:            case 3:             /* X */
        !          2206:                HPGL2_move(x - htic, y - vtic);
        !          2207:                HPGL2_vector(x - htic, y - vtic);
        !          2208:                HPGL2_vector(x + htic, y + vtic);
        !          2209:                HPGL2_move(x - htic, y + vtic);
        !          2210:                HPGL2_vector(x - htic, y + vtic);
        !          2211:                HPGL2_vector(x + htic, y - vtic);
        !          2212:                break;
        !          2213:            case 4:             /* triangle */
        !          2214:                HPGL2_move(x, y + (4 * vtic / 3));
        !          2215:                HPGL2_vector(x - (4 * htic / 3), y - (2 * vtic / 3));
        !          2216:                HPGL2_vector(x + (4 * htic / 3), y - (2 * vtic / 3));
        !          2217:                HPGL2_vector(x, y + (4 * vtic / 3));
        !          2218:                HPGL2_move(x, y);
        !          2219:                HPGL2_vector(x, y);
        !          2220:                break;
        !          2221:            case 5:             /* star */
        !          2222:                HPGL2_move(x - htic, y);
        !          2223:                HPGL2_vector(x - htic, y);
        !          2224:                HPGL2_vector(x + htic, y);
        !          2225:                HPGL2_move(x, y - vtic);
        !          2226:                HPGL2_vector(x, y - vtic);
        !          2227:                HPGL2_vector(x, y + vtic);
        !          2228:                HPGL2_move(x - htic, y - vtic);
        !          2229:                HPGL2_vector(x - htic, y - vtic);
        !          2230:                HPGL2_vector(x + htic, y + vtic);
        !          2231:                HPGL2_move(x - htic, y + vtic);
        !          2232:                HPGL2_vector(x - htic, y + vtic);
        !          2233:                HPGL2_vector(x + htic, y - vtic);
        !          2234:                break;
        !          2235:            }
        !          2236:        }
        !          2237:     }
        !          2238: }
        !          2239:
        !          2240: /*
        !          2241:  * This is for special purpose negative point types. If they are not needed,
        !          2242:  * they should be safely ignorable, but the special pointypes can be omitted
        !          2243:  * if necessary, leaving only the dot (which is -1).
        !          2244:  */
        !          2245:
        !          2246: TERM_PUBLIC void
        !          2247: HPGL2_neg_point(x, y, number)
        !          2248: unsigned int x, y;
        !          2249: int number;
        !          2250: {
        !          2251:     int htic, vtic;
        !          2252:     htic = (int) (HPGL2_psize * PCL_HTIC / 2);
        !          2253:     vtic = (int) (HPGL2_psize * PCL_VTIC / 2);
        !          2254:     switch (number) {
        !          2255:     case -20:                  /* well 18 */
        !          2256:        HPGL2_move(x - htic, y - vtic);
        !          2257:        HPGL2_vector(x + htic, y + vtic);
        !          2258:        HPGL2_move(x, y);
        !          2259:        fputs(";\n", gpoutfile);
        !          2260:        HPGL2_in_pe = 0;
        !          2261:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2262:        break;
        !          2263:     case -19:                  /* well 17 */
        !          2264:        HPGL2_move(x, y - vtic);
        !          2265:        HPGL2_vector(x, y - (vtic / 2));
        !          2266:        HPGL2_move(x, y + (vtic / 2));
        !          2267:        HPGL2_vector(x, y + vtic);
        !          2268:        HPGL2_move(x, y - vtic);
        !          2269:        HPGL2_vector(x - (htic / 4), y - (3 * vtic / 4));
        !          2270:        HPGL2_move(x, y - vtic);
        !          2271:        HPGL2_vector(x + (htic / 4), y - (3 * vtic / 4));
        !          2272:        HPGL2_move(x, y);
        !          2273:        fputs(";\n", gpoutfile);
        !          2274:        HPGL2_in_pe = 0;
        !          2275:        fprintf(gpoutfile, "CI%.2f;\n", ((double) (htic) / 2));
        !          2276:        break;
        !          2277:     case -18:                  /* well 16 */
        !          2278:        HPGL2_move(x - htic, y);
        !          2279:        HPGL2_vector(x + htic, y);
        !          2280:        HPGL2_move(x, y - vtic);
        !          2281:        HPGL2_vector(x, y + vtic);
        !          2282:        HPGL2_move(x, y);
        !          2283:        fputs(";\n", gpoutfile);
        !          2284:        HPGL2_in_pe = 0;
        !          2285:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2286:        break;
        !          2287:     case -17:                  /* well 15 */
        !          2288:        HPGL2_move(x - htic, y - vtic);
        !          2289:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2290:        HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2291:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2292:        HPGL2_move(x + htic, y + vtic);
        !          2293:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2294:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2295:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2296:        HPGL2_move(x - htic, y);
        !          2297:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2298:        HPGL2_move(x + (3 * htic / 4), y);
        !          2299:        HPGL2_vector(x + htic, y);
        !          2300:        HPGL2_move(x, y - vtic);
        !          2301:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2302:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2303:        HPGL2_vector(x, y + vtic);
        !          2304:        HPGL2_move(x, y);
        !          2305:        fputs(";\n", gpoutfile);
        !          2306:        HPGL2_in_pe = 0;
        !          2307:        fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4));
        !          2308:        fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4));
        !          2309:        break;
        !          2310:     case -16:                  /* well 14 */
        !          2311:        HPGL2_move(x - htic, y - vtic);
        !          2312:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2313:        HPGL2_move(x + htic, y + vtic);
        !          2314:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2315:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2316:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2317:        HPGL2_move(x - htic, y);
        !          2318:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2319:        HPGL2_move(x + (3 * htic / 4), y);
        !          2320:        HPGL2_vector(x + htic, y);
        !          2321:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2322:        HPGL2_vector(x, y + vtic);
        !          2323:        HPGL2_move(x, y);
        !          2324:        fputs(";\n", gpoutfile);
        !          2325:        HPGL2_in_pe = 0;
        !          2326:        fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          2327:        break;
        !          2328:     case -15:                  /* well 13 */
        !          2329:        HPGL2_move(x - htic, y - vtic);
        !          2330:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2331:        HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2332:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2333:        HPGL2_move(x + htic, y + vtic);
        !          2334:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2335:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2336:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2337:        HPGL2_move(x - htic, y);
        !          2338:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2339:        HPGL2_move(x + (3 * htic / 4), y);
        !          2340:        HPGL2_vector(x + htic, y);
        !          2341:        HPGL2_move(x, y - vtic);
        !          2342:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2343:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2344:        HPGL2_vector(x, y + vtic);
        !          2345:        HPGL2_move(x, y);
        !          2346:        fputs(";\n", gpoutfile);
        !          2347:        HPGL2_in_pe = 0;
        !          2348:        fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          2349:        break;
        !          2350:     case -14:                  /* well 12 */
        !          2351:        HPGL2_move(x - htic, y - vtic);
        !          2352:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2353:        HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2354:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2355:        HPGL2_move(x + htic, y + vtic);
        !          2356:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2357:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2358:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2359:        HPGL2_move(x - htic, y);
        !          2360:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2361:        HPGL2_move(x + (3 * htic / 4), y);
        !          2362:        HPGL2_vector(x + htic, y);
        !          2363:        HPGL2_move(x, y - vtic);
        !          2364:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2365:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2366:        HPGL2_vector(x, y + vtic);
        !          2367:        HPGL2_move(x, y);
        !          2368:        fputs(";\n", gpoutfile);
        !          2369:        HPGL2_in_pe = 0;
        !          2370:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2371:        break;
        !          2372:     case -13:                  /* well 11 */
        !          2373:        HPGL2_move(x - htic, y - vtic);
        !          2374:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2375:        HPGL2_move(x + htic, y + vtic);
        !          2376:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2377:        HPGL2_move(x, y);
        !          2378:        fputs(";\n", gpoutfile);
        !          2379:        HPGL2_in_pe = 0;
        !          2380:        fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          2381:        break;
        !          2382:     case -12:                  /* well 10 */
        !          2383:        HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2384:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2385:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2386:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2387:        HPGL2_move(x - htic, y);
        !          2388:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2389:        HPGL2_move(x + (3 * htic / 4), y);
        !          2390:        HPGL2_vector(x + htic, y);
        !          2391:        HPGL2_move(x, y - vtic);
        !          2392:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2393:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2394:        HPGL2_vector(x, y + vtic);
        !          2395:        HPGL2_move(x, y);
        !          2396:        fputs(";\n", gpoutfile);
        !          2397:        HPGL2_in_pe = 0;
        !          2398:        fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4));
        !          2399:        fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4));
        !          2400:        break;
        !          2401:     case -11:                  /* well 9 */
        !          2402:        HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2403:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2404:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2405:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2406:        HPGL2_move(x - htic, y);
        !          2407:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2408:        HPGL2_move(x + (3 * htic / 4), y);
        !          2409:        HPGL2_vector(x + htic, y);
        !          2410:        HPGL2_move(x, y - vtic);
        !          2411:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2412:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2413:        HPGL2_vector(x, y + vtic);
        !          2414:        HPGL2_move(x, y);
        !          2415:        fputs(";\n", gpoutfile);
        !          2416:        HPGL2_in_pe = 0;
        !          2417:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2418:        break;
        !          2419:     case -10:                  /* well 8 */
        !          2420:        HPGL2_move(x - htic, y);
        !          2421:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2422:        HPGL2_move(x + (3 * htic / 4), y);
        !          2423:        HPGL2_vector(x + htic, y);
        !          2424:        HPGL2_move(x, y - vtic);
        !          2425:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2426:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2427:        HPGL2_vector(x, y + vtic);
        !          2428:        HPGL2_move(x, y);
        !          2429:        fputs(";\n", gpoutfile);
        !          2430:        HPGL2_in_pe = 0;
        !          2431:        fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4));
        !          2432:        fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4));
        !          2433:        break;
        !          2434:     case -9:                   /* well 7 */
        !          2435:        HPGL2_move(x - (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2436:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2437:        HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2438:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2439:        HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2440:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2441:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2442:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2443:        HPGL2_move(x - htic, y);
        !          2444:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2445:        HPGL2_move(x + (3 * htic / 4), y);
        !          2446:        HPGL2_vector(x + htic, y);
        !          2447:        HPGL2_move(x, y - vtic);
        !          2448:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2449:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2450:        HPGL2_vector(x, y + vtic);
        !          2451:        HPGL2_move(x, y);
        !          2452:        fputs(";\n", gpoutfile);
        !          2453:        HPGL2_in_pe = 0;
        !          2454:        fprintf(gpoutfile, "EW%.2f,0,180;\n", ((double) 3 * (htic) / 4));
        !          2455:        fprintf(gpoutfile, "WG%.2f,180,180;EP;\n", ((double) 3 * (htic) / 4));
        !          2456:        break;
        !          2457:     case -8:                   /* well 6 */
        !          2458:        HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2459:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2460:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2461:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2462:        HPGL2_move(x - htic, y);
        !          2463:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2464:        HPGL2_move(x + (3 * htic / 4), y);
        !          2465:        HPGL2_vector(x + htic, y);
        !          2466:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2467:        HPGL2_vector(x, y + vtic);
        !          2468:        HPGL2_move(x, y);
        !          2469:        fputs(";\n", gpoutfile);
        !          2470:        HPGL2_in_pe = 0;
        !          2471:        fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          2472:        break;
        !          2473:     case -7:                   /* well 5 */
        !          2474:        HPGL2_move(x - (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2475:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2476:        HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2477:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2478:        HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2479:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2480:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2481:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2482:        HPGL2_move(x - htic, y);
        !          2483:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2484:        HPGL2_move(x + (3 * htic / 4), y);
        !          2485:        HPGL2_vector(x + htic, y);
        !          2486:        HPGL2_move(x, y - vtic);
        !          2487:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2488:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2489:        HPGL2_vector(x, y + vtic);
        !          2490:        HPGL2_move(x, y);
        !          2491:        fputs(";\n", gpoutfile);
        !          2492:        HPGL2_in_pe = 0;
        !          2493:        fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          2494:        break;
        !          2495:     case -6:                   /* well 4 */
        !          2496:        HPGL2_move(x - (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2497:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2498:        HPGL2_move(x + (sqrt(2) * htic / 2), y - (sqrt(2) * vtic / 2));
        !          2499:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y - (3 * sqrt(2) * vtic / 8));
        !          2500:        HPGL2_move(x + (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2501:        HPGL2_vector(x + (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2502:        HPGL2_move(x - (sqrt(2) * htic / 2), y + (sqrt(2) * vtic / 2));
        !          2503:        HPGL2_vector(x - (3 * sqrt(2) * htic / 8), y + (3 * sqrt(2) * vtic / 8));
        !          2504:        HPGL2_move(x - htic, y);
        !          2505:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2506:        HPGL2_move(x + (3 * htic / 4), y);
        !          2507:        HPGL2_vector(x + htic, y);
        !          2508:        HPGL2_move(x, y - vtic);
        !          2509:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2510:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2511:        HPGL2_vector(x, y + vtic);
        !          2512:        HPGL2_move(x, y);
        !          2513:        fputs(";\n", gpoutfile);
        !          2514:        HPGL2_in_pe = 0;
        !          2515:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2516:        break;
        !          2517:     case -5:                   /* well 3 */
        !          2518:        HPGL2_move(x, y);
        !          2519:        fputs(";\n", gpoutfile);
        !          2520:        HPGL2_in_pe = 0;
        !          2521:        fprintf(gpoutfile, "WG%.2f,0,360;EP;\n", ((double) 3 * (htic) / 4));
        !          2522:        break;
        !          2523:     case -4:                   /* well 2 */
        !          2524:        HPGL2_move(x - htic, y);
        !          2525:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2526:        HPGL2_move(x + (3 * htic / 4), y);
        !          2527:        HPGL2_vector(x + htic, y);
        !          2528:        HPGL2_move(x, y - vtic);
        !          2529:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2530:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2531:        HPGL2_vector(x, y + vtic);
        !          2532:        HPGL2_move(x, y);
        !          2533:        fputs(";\n", gpoutfile);
        !          2534:        HPGL2_in_pe = 0;
        !          2535:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2536:        break;
        !          2537:     case -3:                   /* well 1 */
        !          2538:        HPGL2_move(x, y);
        !          2539:        fputs(";\n", gpoutfile);
        !          2540:        HPGL2_in_pe = 0;
        !          2541:        fprintf(gpoutfile, "CI%.2f;\n", ((double) 3 * (htic) / 4));
        !          2542:        break;
        !          2543:     case -2:                   /* v box */
        !          2544:        HPGL2_move(x - htic, y);
        !          2545:        HPGL2_vector(x - (3 * htic / 4), y);
        !          2546:        HPGL2_move(x + (3 * htic / 4), y);
        !          2547:        HPGL2_vector(x + htic, y);
        !          2548:        HPGL2_move(x, y - vtic);
        !          2549:        HPGL2_vector(x, y - (3 * vtic / 4));
        !          2550:        HPGL2_move(x, y + (3 * vtic / 4));
        !          2551:        HPGL2_vector(x, y + vtic);
        !          2552:        HPGL2_move(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          2553:        HPGL2_vector(x + (3 * htic / 4), y - (3 * vtic / 4));
        !          2554:        HPGL2_vector(x + (3 * htic / 4), y + (3 * vtic / 4));
        !          2555:        HPGL2_vector(x - (3 * htic / 4), y + (3 * vtic / 4));
        !          2556:        HPGL2_vector(x - (3 * htic / 4), y - (3 * vtic / 4));
        !          2557:        HPGL2_move(x - (htic / 2), y + (vtic / 2));
        !          2558:        HPGL2_vector(x, y - (vtic / 2));
        !          2559:        HPGL2_vector(x + (htic / 2), y + (vtic / 2));
        !          2560:        break;
        !          2561:     default:                   /* dot */
        !          2562:        HPGL2_move(x, y);
        !          2563:        HPGL2_vector(x, y);
        !          2564:        break;
        !          2565:        return;
        !          2566:     }
        !          2567: }
        !          2568:
        !          2569: TERM_PUBLIC void
        !          2570: HPGL2_pointsize(size)
        !          2571: double size;
        !          2572: {
        !          2573:     HPGL2_psize = (size >= 0 ? size : 1);
        !          2574: }
        !          2575:
1.1       maekawa  2576: #endif /* TERM_BODY */
                   2577:
                   2578: #ifdef TERM_TABLE
                   2579: TERM_TABLE_START(hpgl_driver)
                   2580:     "hpgl", "HP7475 and relatives [number of pens] [eject]",
                   2581:     HPGL_XMAX, HPGL_YMAX, HPGL_VCHAR, HPGL_HCHAR,
                   2582:     HPGL_VTIC, HPGL_HTIC, HPGL_options, HPGL_init, HPGL_reset,
                   2583:     HPGL_text, null_scale, HPGL_graphics, HPGL_move, HPGL_vector,
                   2584:     HPGL_linetype, HPGL_put_text, HPGL_text_angle,
                   2585:     null_justify_text, do_point, do_arrow, set_font_null
                   2586: TERM_TABLE_END(hpgl_driver)
                   2587: #undef LAST_TERM
                   2588: #define LAST_TERM hpgl_driver
                   2589:     TERM_TABLE_START(pcl5_driver)
1.1.1.3 ! ohara    2590:     "pcl5", "HP Designjet 750C, HP Laserjet III/IV, etc. (many options)",
1.1       maekawa  2591:     PCL_XMAX, PCL_YMAX, HPGL2_VCHAR, HPGL2_HCHAR,
                   2592:     PCL_VTIC, PCL_HTIC, PCL_options, PCL_init, PCL_reset,
                   2593:     PCL_text, null_scale, PCL_graphics, HPGL2_move, HPGL2_vector,
                   2594:     HPGL2_linetype, HPGL2_put_text, HPGL2_text_angle,
1.1.1.3 ! ohara    2595:     HPGL2_justify_text, HPGL2_point, do_arrow, HPGL2_set_font,
        !          2596:     HPGL2_pointsize
1.1       maekawa  2597: TERM_TABLE_END(pcl5_driver)
                   2598: #undef LAST_TERM
                   2599: #define LAST_TERM pcl5_driver
                   2600: #endif /* TERM_TABLE */
                   2601: #endif /* TERM_PROTO_ONLY */
                   2602: #ifdef TERM_HELP
                   2603: START_HELP(hpgl)
                   2604: "1 hpgl",
                   2605: "?commands set terminal hpgl",
                   2606: "?set terminal hpgl",
                   2607: "?set term hpgl",
                   2608: "?terminal hpgl",
                   2609: "?term hpgl",
                   2610: "?hpgl",
                   2611: "?commands set terminal pcl5",
                   2612: "?set terminal pcl5",
                   2613: "?set term pcl5",
                   2614: "?terminal pcl5",
                   2615: "?term pcl5",
                   2616: "?pcl5",
                   2617: " The `hpgl` driver produces HPGL output for devices like the HP7475A plotter.",
1.1.1.3 ! ohara    2618: " There are two options which can be set: the number of pens and `eject`,",
        !          2619: " which tells the plotter to eject a page when done.  The default is to use 6",
        !          2620: " pens and not to eject the page when done.",
1.1       maekawa  2621: "",
                   2622: " The international character sets ISO-8859-1 and CP850 are recognized via",
                   2623: " `set encoding iso_8859_1` or `set encoding cp850` (see `set encoding` for",
                   2624: " details).",
                   2625: "",
                   2626: " Syntax:",
                   2627: "       set terminal hpgl {<number_of_pens>} {eject}",
                   2628: "",
                   2629: " The selection",
                   2630: "",
                   2631: "       set terminal hpgl 8 eject",
                   2632: "",
                   2633: " is equivalent to the previous `hp7550` terminal, and the selection",
                   2634: "",
                   2635: "       set terminal hpgl 4",
                   2636: "",
                   2637: " is equivalent to the previous `hp7580b` terminal.",
                   2638: "",
1.1.1.3 ! ohara    2639: " The `pcl5` driver supports plotters such as the Hewlett-Packard Designjet",
        !          2640: " 750C, the Hewlett-Packard Laserjet III, and the Hewlett-Packard Laserjet IV.",
        !          2641: " It actually uses HPGL-2, but there is a name conflict among the terminal",
        !          2642: " devices.  It has several options which must be specified in the order",
        !          2643: " indicated below:",
1.1       maekawa  2644: "",
                   2645: " Syntax:",
1.1.1.3 ! ohara    2646: "       set terminal pcl5 {mode <mode>} {<plotsize>}",
        !          2647: "           {{color {<number_of_pens>}} | monochrome} {solid | dashed}",
        !          2648: "           {font <font>} {size <fontsize>} {pspoints | nopspoints}",
        !          2649: "",
        !          2650: " <mode> is `landscape` or `portrait`. <plotsize> is the physical",
        !          2651: " plotting size of the plot, which is one of the following: `letter` for",
        !          2652: " standard (8 1/2\" X 11\") displays, `legal` for (8 1/2\" X 14\") displays,",
        !          2653: " `noextended` for (36\" X 48\") displays (a letter size ratio) or,",
        !          2654: " `extended` for (36\" X 55\") displays (almost a legal size ratio).",
        !          2655: " `color` is for multi-pen (i.e. color) plots, and <number_of_pens> is",
        !          2656: " the number of pens (i.e. colors) used in color plots. `monochrome` is for",
        !          2657: " one (e.g. black) pen plots. `solid` draws all lines as solid lines, or",
        !          2658: " 'dashed' will draw lines with different dashed and dotted line patterns.",
        !          2659: " <font> is `stick`, `univers`, `cg_times`, `zapf_dingbats`, `antique_olive`,",
        !          2660: " `arial`, `courier`, `garamond_antigua`, `letter_gothic`, `cg_omega`,",
        !          2661: " `albertus`, `times_new_roman`, `clarendon`, `coronet`, `marigold`,",
        !          2662: " `truetype_symbols`, or `wingdings`. <fontsize> is the font size in points.",
        !          2663: " The point type selection can be the standard default set by specifying",
        !          2664: " nopspoints, or the same set of point types found in the postscript terminal",
        !          2665: " by specifying pspoints.",
        !          2666: "",
        !          2667: " Note that built-in support of some of these options is printer device",
        !          2668: " dependendent. For instance, all the fonts are supposedly supported by the HP",
        !          2669: " Laserjet IV, but only a few (e.g. univers, stick) may be supported by the HP",
        !          2670: " Laserjet III and the Designjet 750C. Also, color obviously won't work on the",
        !          2671: " the laserjets since they are monochrome devices.",
1.1       maekawa  2672: "",
1.1.1.3 ! ohara    2673: " Defaults: landscape, noextended, color (6 pens), solid, univers, 12 point,",
        !          2674: "           and nopspoints.",
1.1       maekawa  2675: "",
                   2676: " With `pcl5` international characters are handled by the printer; you just put",
                   2677: " the appropriate 8-bit character codes into the text strings.  You don't need",
                   2678: " to bother with `set encoding`.",
                   2679: "",
                   2680: " HPGL graphics can be imported by many software packages."
                   2681: END_HELP(hpgl)
                   2682: #endif /* TERM_HELP */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>