home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Tex / Dvi / dvi2ttys.lzh / DVI2TTY.H < prev    next >
C/C++ Source or Header  |  1991-02-01  |  4KB  |  84 lines

  1. #define Copyright "dvi2tty.c  Copyright (C) 1984, 1985, 1986 Svante Lindahl.\n\
  2. Copyright (C) 1988 M.J.E. Mol 1989, 1990"
  3.  
  4. #include <stdio.h>
  5. #include <string.h>
  6. #if __STDC__
  7. #include <stdlib.h>
  8. #else
  9. #include <malloc.h>
  10. #endif
  11.  
  12. #define nil         NULL
  13.  
  14. /*
  15.  * ERROR CODES , don't start with 0
  16.  */
  17.  
  18. #define illop    1              /* illegal op-code                   */
  19. #define stkof    2              /* stack over-flow                   */
  20. #define stkuf    3              /* stack under-flow                  */
  21. #define stkrq    4              /* stack requirement                 */
  22. #define lnerq    5              /* line allocation                   */
  23. #define badid    6              /* id is not right                   */
  24. #define bdsgn    7              /* signature is wrong                */
  25. #define fwsgn    8              /* too few signatures                */
  26. #define nopre    9              /* no pre-amble where expected       */
  27. #define nobop   10              /* no bop-command where expected     */
  28. #define nopp    11              /* no postpost where expected        */
  29. #define bdpre   12              /* unexpected preamble occured       */
  30. #define bdbop   13              /* unexpected bop-command occured    */
  31. #define bdpst   14              /* unexpected post-command occured   */
  32. #define bdpp    15              /* unexpected postpost               */
  33. #define nopst   16              /* no post-amble where expected      */
  34. #define illch   17              /* character code out of range       */
  35. #define filop   18              /* cannot access file                */
  36. #define filcr   19              /* cannot creat file                 */
  37.  
  38. /*---------------------------------------------------------------------------*/
  39.  
  40. typedef char bool;
  41.  
  42. typedef struct prlistptr {      /* list of pages selected for output         */
  43.     int       pag;                      /* number of pages                   */
  44.     bool      all;                      /* pages in interval selected        */
  45.     struct prlistptr *prv;              /* previous item in list             */
  46.     struct prlistptr *nxt;              /* next item in list                 */
  47. } printlisttype;
  48.  
  49. /*---------------------------------------------------------------------------*/
  50.  
  51. extern bool   outputtofile;            /* output to file or stdout(dvi2tty.c)*/
  52. extern bool   pageswitchon;            /* user-set pages to print(dvistuff.c)*/
  53. extern bool   sequenceon;              /* not TeX pagenrs (dvistuff.c)       */
  54. extern bool   scascii;                 /* Scand. nat. chars (dvistuff.c)     */
  55. extern bool   noffd;                   /* output ^L or formfeed (dvistuff.c) */
  56.  
  57. extern printlisttype *currentpage;     /* current page to print (dvi2tty.c)  */
  58. extern printlisttype *firstpage;       /* first page selected (dvi2tty.c)    */
  59. extern printlisttype *lastpage;        /* last page selected (dvi2tty.c)     */
  60.  
  61. extern int            ttywidth;        /* screen width (dvi2tty.c)           */
  62. extern int            espace;          /* extra screen width (dvi2tty.c)     */
  63. extern long           foo;             /* temporary 'register' (dvi2tty.c)   */
  64. extern int            opcode;          /* dvi opcode (dvistuff.c)            */
  65.  
  66. extern FILE *DVIfile;                  /* dvi file (dvi2tty.c)               */
  67. extern FILE *output;                   /* output file (dvi2tty.c)            */
  68.  
  69. /*---------------------------------------------------------------------------*/
  70.  
  71. #if __STDC__
  72. /* dvi2tty.c */
  73. void errorexit(int errorcode);
  74.  
  75. /* dvistuff.c */
  76. void dvimain(void);
  77. #else
  78. /* dvi2tty.c */
  79. void errorexit();
  80.  
  81. /* dvistuff.c */
  82. void dvimain();
  83. #endif
  84.