URI:
       ttr2post.h - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       ttr2post.h (2421B)
       ---
            1 #define MAXSPECHARS         512
            2 #define MAXTOKENSIZE        128
            3 #define CHARLIB        "#9/troff/font/devutf/charlib"
            4 
            5 /* devname clashes with libc on *BSD */
            6 #define devname                troff_devname
            7 
            8 extern int debug;
            9 extern int fontsize;
           10 extern int fontpos;
           11 extern int resolution;        /* device resolution, goobies per inch */
           12 extern int minx;                /* minimum x motion */
           13 extern int miny;                /* minimum y motion */
           14 extern char devname[];
           15 extern int devres;
           16 extern int unitwidth;
           17 extern char *printdesclang;
           18 extern char *encoding;
           19 extern int fontmnt;
           20 extern char **fontmtab;
           21 
           22 extern int curtrofffontid;        /* index into trofftab of current troff font */
           23 extern int troffontcnt;
           24 
           25 extern BOOLEAN drawflag;
           26 
           27 struct specname {
           28         char *str;
           29         struct specname *next;
           30 };
           31 
           32 /* character entries for special characters (those pointed
           33  * to by multiple character names, e.g. \(mu for multiply.
           34  */
           35 struct charent {
           36         char postfontid;        /* index into pfnamtab */
           37         char postcharid;        /* e.g., 0x00 */
           38         short troffcharwidth;
           39         char *name;
           40         struct charent *next;
           41 };
           42 
           43 extern struct charent **build_char_list;
           44 extern int build_char_cnt;
           45 
           46 struct pfnament {
           47         char *str;
           48         int used;
           49 };
           50 
           51 /* these entries map troff character code ranges to
           52  * postscript font and character ranges.
           53  */
           54 struct psfent {
           55         int start;
           56         int end;
           57         int offset;
           58         int psftid;
           59 };
           60 
           61 struct troffont {
           62         char *trfontid;                /* the common troff font name e.g., `R' */
           63         BOOLEAN special;        /* flag says this is a special font. */
           64         int spacewidth;
           65         int psfmapsize;
           66         struct psfent *psfmap;
           67         struct charent *charent[NUMOFONTS][FONTSIZE];
           68 };
           69 
           70 extern struct troffont *troffontab;
           71 extern struct charent spechars[];
           72 
           73 /** prototypes **/
           74 void initialize(void);
           75 void mountfont(int, char*);
           76 int findtfn(char *, int);
           77 void runeout(Rune);
           78 void specialout(char *);
           79 long nametorune(char *);
           80 void conv(Biobuf *);
           81 void hgoto(int);
           82 void vgoto(int);
           83 void hmot(int);
           84 void vmot(int);
           85 void draw(Biobuf *);
           86 void devcntl(Biobuf *);
           87 void notavail(char *);
           88 void error(int, char *, ...);
           89 void loadfont(int, char *);
           90 void flushtext(void);
           91 void t_charht(int);
           92 void t_slant(int);
           93 void startstring(void);
           94 void endstring(void);
           95 BOOLEAN pageon(void);
           96 void setpsfont(int, int);
           97 void settrfont(void);
           98 int hash(char *, int);
           99 BOOLEAN readDESC(void);
          100 void finish(void);
          101 void ps_include(Biobuf *, Biobuf *, int, int,
          102         int, int, double, double, double, double,
          103         double, double, double);
          104 void picture(Biobuf *, char *);
          105 void beginpath(char*, int);
          106 void drawpath(char*, int);