home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / textutil / tex / p_drivers / !TeX / TeXSource / beebe / h / gblprocs < prev    next >
Encoding:
Text File  |  1992-01-13  |  11.6 KB  |  589 lines

  1. /* -*-C-*- gblprocs.h */
  2. /*-->gblprocs*/
  3. /**********************************************************************/
  4. /****************************** gblprocs ******************************/
  5. /**********************************************************************/
  6.  
  7. /**********************************************************************/
  8. /*************************  Global Procedures  ************************/
  9. /**********************************************************************/
  10.  
  11. #if    ANSI_PROTOTYPES
  12. void    abortrun(int);
  13. float    actfact(UNSIGN32);
  14. void    alldone(void);
  15.  
  16. #if    ANSI_LIBRARY
  17. #ifdef __STDC__
  18. #include <stdlib.h>
  19. #else
  20. double    atof(const char *);
  21. int    atoi(const char *);
  22. #endif
  23. #else
  24. double    atof(char *);
  25. int    atoi(char *);
  26. #endif /* ANSI_LIBRARY */
  27.  
  28. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT)
  29. void    bopact();
  30. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT) */
  31.  
  32. #ifdef __STDC__
  33. int chargf(BYTE c, void (*outfcn)());
  34. int charpk(BYTE c, void (*outfcn)());
  35. int charpxl(BYTE c, void (*outfcn)());
  36. #else
  37. int    chargf(BYTE,void(*)());
  38. int    charpk(BYTE,void(*)());
  39. int    charpxl(BYTE,void(*)());
  40. #endif
  41.  
  42. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  43. #else
  44. void    clrbmap(void);
  45. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  46.  
  47. void    clrrow(void);
  48.  
  49. #if    POSTSCRIPT
  50. void    cppsfile(void);
  51. #endif /* POSTSCRIPT */
  52.  
  53. #if    ANSI_LIBRARY
  54. #ifdef __STDC__
  55. #include <time.h>
  56. #else
  57. char*   ctime(const time_t *);
  58. #endif
  59. #else
  60. char*    ctime(long *);
  61. #endif /* ANSI_LIBRARY */
  62.  
  63. char*    cuserid(char *);
  64. void    dbgopen(FILE*, char*, char*);
  65. void    devinit(int, char *[]);
  66. void    devterm(void);
  67.  
  68. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  69. #else
  70. #ifdef __STDC__
  71. void    dispchar(BYTE c);
  72. #else
  73. void    dispchar(BYTE);
  74. #endif
  75. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  76.  
  77. void    dvifile(int, char *[], char *);
  78. void    dviinit(char *);
  79. void    dviterm(void);
  80.  
  81. #if    POSTSCRIPT
  82. void    emitchar(register BYTE c);
  83. #endif /* POSTSCRIPT */
  84.  
  85. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT)
  86. void    eopact();
  87. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT) */
  88.  
  89. void    EXIT(int);
  90. void    fatal(char *);
  91. void    fillrect(COORDINATE, COORDINATE, COORDINATE, COORDINATE);
  92. void    findpost(void);
  93. #ifdef __STDC__
  94. COORDINATE fixpos(register COORDINATE cc, register INT32 c, register float cnvfac);
  95. #else
  96. COORDINATE    fixpos(COORDINATE, INT32, float);
  97. #endif
  98. void    fontfile(char *[MAXFORMATS],char *,char *,int);
  99. BOOLEAN    fontsub(char *,int *,char *,int);
  100.  
  101. #if    ANSI_LIBRARY
  102. #ifdef __STDC__
  103. #include <stdlib.h>
  104. #else
  105. void    free(void *);
  106. #endif
  107. #else
  108. void    free(char *);
  109. #endif /* ANSI_LIBRARY */
  110.  
  111. int    FSEEK(FILE *,long,int);
  112. void    getbmap(void);
  113. #ifdef __STDC__
  114. void getbytes(register FILE *fp, register char *cp, register BYTE n);
  115. #else
  116. void    getbytes(FILE *, char *, BYTE);
  117. #endif
  118.  
  119. #if    ANSI_LIBRARY
  120. char*    GETENV(const char *);
  121. #else
  122. char*    GETENV(char *);
  123. #endif /* ANSI_LIBRARY */
  124.  
  125. void    getfntdf(void);
  126.  
  127. #if    OS_VAXVMS
  128. char*    getjpi(int);
  129. #endif
  130.  
  131. char*    getlogin(void);
  132. void    getpgtab(long);
  133. void    initglob(void);
  134. float    inch(char *);
  135.  
  136. #if    BBNBITGRAPH
  137. void    initterm();
  138. #endif /* BBNBITGRAPH */
  139.  
  140. #if    (CANON_A2 | HPJETPLUS)
  141. #ifdef __STDC__
  142. void loadbmap(register BYTE c);
  143. #else
  144. void    loadbmap(BYTE);
  145. #endif
  146. #endif /* (CANON_A2 | HPJETPLUS) */
  147.  
  148. #ifdef __STDC__
  149. void    loadchar(register BYTE c);
  150. #else
  151. void    loadchar(BYTE);
  152. #endif
  153.  
  154. #if    BBNBITGRAPH
  155. void    loadrast(FILE *, COORDINATE, COORDINATE);
  156. #endif /* BBNBITGRAPH */
  157.  
  158. int    main(int ,char *[]);
  159.  
  160. #if    ANSI_LIBRARY
  161. #ifdef __STDC__
  162. #include <stdlib.h>
  163. #else
  164. void*    malloc(size_t);
  165. #endif
  166. #else
  167. char*    malloc(unsigned);
  168. #endif /* ANSI_LIBRARY */
  169.  
  170. #if    (APPLEIMAGEWRITER | OKIDATA2410)
  171. char    makechar(UNSIGN32 *[],UNSIGN32);
  172. #endif /* (APPLEIMAGEWRITER | OKIDATA2410) */
  173.  
  174. #if    HPJETPLUS
  175. void    makefont(void);
  176. #endif
  177.  
  178. void    movedown(INT32);
  179. void    moveover(INT32);
  180. #ifdef __STDC__ /* testing ... */
  181. void    moveto(COORDINATE x, COORDINATE y);
  182. #else
  183. void    moveto(COORDINATE, COORDINATE);
  184. #endif
  185.  
  186. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  187. void    newfont(void);
  188. #endif
  189.  
  190. #ifdef __STDC__
  191. UNSIGN32
  192. nosignex(register FILE *fp, register BYTE n);
  193. #else
  194. UNSIGN32    nosignex(FILE *,BYTE);
  195. #endif
  196. void    openfont(char *);
  197. void    option(char *);
  198.  
  199. #if    HPLASERJET
  200. void    outline(UNSIGN32 *);
  201. #else
  202. void    outline(char *);
  203. #endif /* HPLASERJET */
  204.  
  205. #if    EPSON
  206. #if    HIRES
  207. void    outpaperfeed(INT16);
  208. #endif /* HIRES */
  209. #endif /* EPSON */
  210.  
  211. #if    HPJETPLUS
  212. #ifdef __STDC__
  213. void outraster(BYTE c, UNSIGN16 yoff);
  214. #else
  215. void    outraster(BYTE,UNSIGN16);
  216. #endif
  217. #endif /* HPJETPLUS */
  218.  
  219. #ifdef __STDC__
  220. void outrow(BYTE c, UNSIGN16 yoff);
  221. #else
  222. void    outrow(BYTE,UNSIGN16);
  223. #endif
  224.  
  225. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  226. #else
  227. void    prtbmap(void);
  228. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  229.  
  230. void    prtpage(long);
  231.  
  232. #if    POSTSCRIPT
  233. char*    putfontname(struct font_entry *);
  234. void    putname(FILE *,struct font_entry *);
  235. #endif /* POSTSCRIPT */
  236.  
  237. #if    BBNBITGRAPH
  238. void    putout(INT16);
  239. #endif /* BBNBITGRAPH */
  240.  
  241. void    readfont(INT32);
  242. int    readgf(void);
  243. int    readpk(void);
  244. void    readpost(void);
  245. int    readpxl(void);
  246. void    reldfont(struct font_entry *);
  247.  
  248. #if    BBNBITGRAPH
  249. void    rsetterm();
  250. #endif /* BBNBITGRAPH */
  251.  
  252. #ifdef __STDC__
  253. COORDINATE rulepxl(register UNSIGN32 number, register float cnvfac);
  254. void setchar(register BYTE c, register BOOLEAN update_h);
  255. #else
  256. COORDINATE    rulepxl(UNSIGN32,float);
  257. void    setchar(BYTE,BOOLEAN);
  258. #endif
  259.  
  260. #if    HPJETPLUS
  261. void    setfont(void);
  262. #endif
  263.  
  264. #if    (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  265. #ifdef __STDC__
  266. void setstr(register BYTE c);
  267. #else
  268. void    setstr(BYTE);
  269. #endif
  270. #endif /* (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  271.  
  272. void    setfntnm(INT32);
  273. #ifdef __STDC__
  274. void setrule(register UNSIGN32 height, register UNSIGN32 width, register BOOLEAN update_h);
  275. INT32 signex(register FILE *fp, register BYTE n);
  276. #else
  277. void    setrule(UNSIGN32, UNSIGN32, BOOLEAN);
  278. INT32    signex(FILE *,BYTE);
  279. #endif
  280. void    skipfont(INT32);
  281. void    skgfspec(void);
  282. void    skpkspec(void);
  283. void    special(char *);
  284.  
  285. #if    ANSI_LIBRARY
  286. #ifdef __STDC__
  287. #include <string.h>
  288. #else
  289. char*    strcat(char *,const char *);
  290. char*    strchr(const char *,int);
  291. char*    strcpy(char *,const char *);
  292. size_t    strlen(const char *);
  293. int    strncmp(const char *,const char *,size_t);
  294. char*    strncpy(char *,const char *,size_t);
  295. char*    strrchr(const char *,int);
  296. #endif /* __STDC__ */
  297. #else /* NOT ANSI_LIBRARY conformant */
  298. #ifdef __STDC__
  299. #include <string.h>
  300. #else
  301. char*    strcat(char *,char *);
  302. char*    strchr(char *,char);
  303. char*    strcpy(char *,char *);
  304. int    strlen(char *);
  305. int    strncmp(char *,char *,int);
  306. char*    strncpy(char *,char *,int);
  307. char*    strrchr(char *,char);
  308. #endif
  309. #endif /* ANSI_LIBRARY */
  310.  
  311. int    strcm2(char *,char *);
  312. int    strid2(char[],char[]);
  313.  
  314. char*    tctos(void);
  315.  
  316. #if    POSTSCRIPT
  317. #ifdef __STDC__
  318. void textchr(register char c);
  319. #else
  320. void    textchr(char);
  321. #endif
  322. void    textflush();
  323. void    textnum(long);
  324. void    textstr(char *);
  325. #endif /* POSTSCRIPT */
  326.  
  327. #if    ANSI_LIBRARY
  328. #ifdef __STDC__
  329. #include <time.h>
  330. #else
  331. time_t    time(time_t *);
  332. #endif
  333. #else
  334. long    time(long *);
  335. #endif /* ANSI_LIBRARY */
  336.  
  337. #if    BBNBITGRAPH
  338. void    unloadfonts();
  339. #endif
  340.  
  341. void    usage(FILE *);
  342.  
  343. #if    VIRTUAL_FONTS
  344. void    virtfree(FILE *);
  345. #endif
  346.  
  347. void    warning(char *);
  348.  
  349. #if    FASTZERO
  350. void    zerom(UNSIGN32 *,UNSIGN32);
  351. #endif /* FASTZERO */
  352.  
  353. #else /* NOT ANSI_PROTOTYPES */
  354. double    atof();
  355. int    atoi();
  356.  
  357. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT)
  358. void    bopact();
  359. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | IMPRESS | POSTSCRIPT) */
  360.  
  361. char*    cuserid();
  362. char*    ctime();
  363. void    EXIT();
  364. void    free();
  365. int    FSEEK();
  366. long    FTELL();
  367. char*    GETENV();
  368.  
  369. #if    OS_VAXVMS
  370. char*    getjpi();
  371. #endif
  372.  
  373. char*    getlogin();
  374. char*    malloc();
  375.  
  376. #if    (IBM_PC_WIZARD | KCC_20 | OS_VAXVMS | OS_RISCOS)
  377. /* stdio.h declares sprintf(); */
  378. #else
  379. char*    sprintf();        /* Berkeley 4.1 BSD style */
  380. #endif /* (IBM_PC_WIZARD | KCC_20 | OS_VAXVMS) */
  381.  
  382. #ifdef __STDC__
  383. #include <string.h>
  384. #else
  385. char*    strcpy();
  386. char*    strcat();
  387. char*    strchr();        /* private version of this 4.2BSD function */
  388. char*    strrchr();        /* private version of this 4.2BSD function */
  389. int    strcmp();
  390. int    strncmp();
  391. char*    strncpy();
  392. #endif
  393. int    strcm2();        /* local addition (used by inch()) */
  394. int    strid2();        /* local addition (used by initglob()) */
  395.  
  396. long    time();
  397.  
  398. /***********************************************************************
  399. Note: Global procedures  are declared here  in alphabetical order,  with
  400. those which do not  return values typed "void".   Their bodies occur  in
  401. alphabetical order following the main()  procedure, usually in the  form
  402. of "#include" statements.   The names  are kept  unique in  the first  6
  403. characters for portability.
  404. ***********************************************************************/
  405.  
  406. void    abortrun();
  407. float    actfact();
  408. void    alldone();
  409. FILE*    FOPEN();
  410.  
  411. int    chargf();
  412. int    charpk();
  413. int    charpxl();
  414. void    clrrow();
  415.  
  416. #if    POSTSCRIPT
  417. void    cppsfile();
  418. #endif /* POSTSCRIPT */
  419.  
  420. void    dbgopen();
  421. void    devinit();
  422. void    devterm();
  423.  
  424. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  425. #else /* NOT (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  426. void    clrbmap();
  427. void    dispchar();
  428. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  429.  
  430. void    dvifile();
  431. void    dviinit();
  432. void    dviterm();
  433.  
  434. #if    POSTSCRIPT
  435. void    emitchar();
  436. #endif /* POSTSCRIPT */
  437.  
  438. #if    (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT)
  439. void    eopact();
  440. #endif /* (BBNBITGRAPH | CANON_A2 | HPJETPLUS | POSTSCRIPT) */
  441.  
  442. void    fatal();
  443. void    fillrect();
  444. void    findpost();
  445. void    fontfile();
  446. BOOLEAN    fontsub();
  447. COORDINATE    fixpos();
  448. void    getbmap();
  449. void    getbytes();
  450. void    getfntdf();
  451. void    getpgtab();
  452.  
  453. #if    BBNBITGRAPH
  454. void    gotint();
  455. #endif /* BBNBITGRAPH */
  456.  
  457. float    inch();
  458. void    initglob();
  459.  
  460. #if    BBNBITGRAPH
  461. void    initterm();
  462. #endif /* BBNBITGRAPH */
  463.  
  464. #if    (CANON_A2 | HPJETPLUS)
  465. void    loadbmap();
  466. #endif /* (CANON_A2 | HPJETPLUS) */
  467.  
  468. void    loadchar();
  469.  
  470. #if    BBNBITGRAPH
  471. void    loadrast();
  472. #endif /* BBNBITGRAPH */
  473.  
  474. int    main();
  475.  
  476. #if    APPLEIMAGEWRITER
  477. char    makechar();
  478. #endif /* APPLEIMAGEWRITER */
  479.  
  480. #if    OKIDATA2410
  481. char    makechar();
  482. #endif /* OKIDATA2410 */
  483.  
  484. #if    HPJETPLUS
  485. void    makefont();
  486. #endif
  487.  
  488. void    movedown();
  489. void    moveover();
  490. void    moveto();
  491.  
  492. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  493. void    newfont();
  494. #endif
  495.  
  496. UNSIGN32    nosignex();
  497.  
  498. #if    BBNBITGRAPH
  499. #else /* NOT BBNBITGRAPH */
  500. void    outline();
  501. #endif /* BBNBITGRAPH */
  502.  
  503. #if    EPSON
  504. #if    HIRES
  505. void    outpaperfeed();
  506. #endif /* HIRES */
  507. #endif /* EPSON */
  508.  
  509. #if    HPJETPLUS
  510. void    outraster();
  511. #endif /* HPJETPLUS */
  512.  
  513. void    outrow();
  514. void    openfont();
  515. void    option();
  516.  
  517. #if    (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  518. #else /* NOT (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  519. void    prtbmap();
  520. #endif /* (BBNBITGRAPH | HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  521.  
  522. void    prtpage();
  523.  
  524. #if    POSTSCRIPT
  525. char*    putfontname();
  526. void    putname();
  527. #endif /* POSTSCRIPT */
  528.  
  529. #if    BBNBITGRAPH
  530. void    putout();
  531. #endif /* BBNBITGRAPH */
  532.  
  533. void    readfont();
  534. int    readgf();
  535. int    readpk();
  536. void    readpost();
  537. int    readpxl();
  538. void    reldfont();
  539.  
  540. #if    BBNBITGRAPH
  541. void    rsetterm();
  542. #endif /* BBNBITGRAPH */
  543.  
  544. COORDINATE    rulepxl();
  545. void    setchar();
  546. void    setfntnm();
  547.  
  548. #if    HPJETPLUS
  549. void    setfont();
  550. #endif
  551.  
  552. void    setrule();
  553.  
  554. #if    (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2)
  555. void    setstr();
  556. #endif /* (HPJETPLUS | POSTSCRIPT | IMPRESS | CANON_A2) */
  557.  
  558. INT32    signex();
  559. void    skipfont();
  560. void    skgfspec();
  561. void    skpkspec();
  562. void    special();
  563. char*    tctos();
  564.  
  565. #if    POSTSCRIPT
  566. void    textchr();
  567. void    textflush();
  568. void    textnum();
  569. void    textstr();
  570. #endif /* POSTSCRIPT */
  571.  
  572. #if    BBNBITGRAPH
  573. void    unloadfonts();
  574. #endif
  575.  
  576. void    usage();
  577.  
  578. #if    VIRTUAL_FONTS
  579. void    virtfree();
  580. #endif
  581.  
  582. void    warning();
  583.  
  584. #if    FASTZERO
  585. void    zerom();
  586. #endif /* FASTZERO */
  587.  
  588. #endif /* ANSI_PROTOTYPES */
  589.