Back to index

tetex-bin  3.0
Classes | Defines | Enumerations | Functions | Variables
dvi2xx.h File Reference
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <ctype.h>
#include <fcntl.h>
#include "config.h"
#include "commands.h"
#include <sys/time.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  KeyWord
struct  KeyDesc
struct  char_entry
struct  font_entry
struct  pixel_list
union  KeyWord.v
struct  char_entry.where
union  char_entry.where.address

Defines

#define DVIFORMAT   2
#define FIRSTFNTCHAR   0
#define MAXOPEN_OS   12 /* limit on number of open font files */
#define MAXOPEN   MAXOPEN_OS
#define NFNTCHARS   LASTFNTCHAR+1
#define STACK_SIZE   100 /* DVI-stack size */
#define NONEXISTANT   -1 /* offset for PXL files not found */
#define NO_FILE   ((FILE *)-1)
#define NEW(A)   ((A *) malloc(sizeof(A)))
#define EQ(a, b)   (strcmp(a,b)==0)
#define MM_TO_PXL(x)   (int)(((x)*RESOLUTION*10)/254)
#define PT_TO_PXL(x)   (int)((long4)((x)*RESOLUTION*100l)/7224)
#define PT_TO_DVI(x)   (long4)((x)*65536l)
#define BINOPEN(f)   BOPENCMD(f,READ_BINARY)
#define SMALL_SIZE   (unsigned char) 0
#define LARGE_SIZE   (unsigned char) 1
#define HUGE_SIZE   (unsigned char) 2
#define HUGE_CHAR_PATTERN   32767l
#define BYTES_PER_PIXEL_LINE   500 /* max number of bytes per pixel line */
#define PK_POST   245
#define PK_PRE   247
#define PK_ID   89
#define PIXROUND(x, c)   (((x)+c)/c)
#define PUTWORD(w)   EMITC( ((unsigned char)(w>>8) & 0xff)), EMITC((unsigned char)(w & 0xff))
#define EMIT   fprintf /* output a formatted string */
#define EMTO   outfp
#define EMIT1(a)   fprintf(outfp,a)
#define EMIT2(a, b)   fprintf(outfp,a,b)
#define EMIT3(a, b, c)   fprintf(outfp,a,b,c)
#define EMIT4(a, b, c, d)   fprintf(outfp,a,b,c,d)
#define EMITB(len, b)   write_multi(b,1,len,outfp)
#define EMITWORD(w)   PUTWORD((w)) /* output a 2 byte word of data */
#define MoveOver(b)   h += (long4) b
#define MoveDown(a)   v += (long4) a
#define qfprintf   if (!G_quiet) fprintf
#define qprintf   if (!G_quiet) printf
#define LARGER(a, b)   (((a)>(b)) ? (a) : (b))
#define VisChar(c)   (unsigned char)(c)
#define GetBytes(fp, buf, n)   read_multi(buf,1,n,fp) /* used to be a function */
#define DVIPROTO(x)   ()
#define DVIELI()   ()
#define DEBUG_PRINT(str)
#define DEBUG_PRINT1(str, e1)

Enumerations

enum  ValTyp {
  None, String, Integer, None,
  String, Integer, Number, Dimension
}

Functions

long access ()
FILEPTR BOPENCMD ()
void exit ()
int fclose ()
int fprintf ()
int fseek ()
int printf ()
int sscanf ()
int strcmp ()
char * strcpy ()
void free ()
void setbuf ()
double ActualFactor DVIPROTO ((long4))
void AllDone DVIPROTO ((bool))
void CloseFiles DVIPROTO ((void))
void CopyFile DVIPROTO ((char *))
void DecodeArgs DVIPROTO ((int, char *[]))
long4 DoConv DVIPROTO ((long4, long4, int))
void DoSpecial DVIPROTO ((char *, int))
void EmitChar DVIPROTO ((long4, struct char_entry *))
void FindPostAmblePtr DVIPROTO ((long *))
char *GetKeyStr DVIPROTO ((char *, KeyWord *))
bool GetKeyVal DVIPROTO ((KeyWord *, KeyDesc[], int, int *))
bool IsSame DVIPROTO ((char *, char *))
void LoadAChar DVIPROTO ((long4, register struct char_entry *))
long4 NoSignExtend DVIPROTO ((FILEPTR, int))
long4 PixRound DVIPROTO ((long4, long4))
void PkRaster DVIPROTO ((struct char_entry *, int))
void RasterLine DVIPROTO ((struct char_entry *, unsigned int, unsigned int, unsigned char *))
void RasterChar DVIPROTO ((struct char_entry *))
void SetChar DVIPROTO ((long4, short, int, bool, bool))
void SetFntNum DVIPROTO ((long4, bool))
void SetString DVIPROTO ((short, int))
bool tfm_read_info DVIPROTO ((char *, tfm_info_type *))
unsigned char skip_specials DVIPROTO ((long4 *))
char b_read DVIPROTO ((FILEPTR))

Variables

bool ManualFeed = _FALSE
long4 FirstPage = -1000000
long4 LastPage = 1000000
long4 PrintPages = 1000000
bool FirstPageSpecified = _FALSE
bool LastPageSpecified = _FALSE
char * PXLpath = FONTAREA
char G_progname [STRSIZE]
char filename [STRSIZE]
char rootname [STRSIZE]
char * HeaderFileName = ""
char * EmitFileName = ""
bool Reverse = _FALSE
bool Landscape = _FALSE
bool ResetPrinter = _TRUE
bool DoublePage = _FALSE
bool PrintSecondPart = _TRUE
bool PrintFirstPart = _TRUE
bool PrintEmptyPages = _TRUE
short PageParity = 1
short G_errenc = 0
bool G_header = _FALSE
bool G_quiet = _FALSE
bool G_verbose = _FALSE
bool G_nowarn = _FALSE
short x_origin
short y_origin
short x_goffset
short y_goffset
unsigned short ncopies = 1
long4 hconv
long4 vconv
long4 den
long4 num
long4 h
long4 hh = 0
long4 v
long4 vv = 0
long4 mag
long usermag = 0
int ndone = 0
int nopen = 0
FILEPTR outfp = FPNULL
FILEPTR pxlfp
FILEPTR dvifp = FPNULL
struct font_entryprevfont = NULL
struct font_entryfontptr
struct font_entryhfontptr = NULL
struct font_entrypfontptr = NULL
long postambleptr
long ppagep
static int last_ry = UNKNOWN
static int last_rx = UNKNOWN
long4 StartPrintPages
int WouldPrint = 0
bool ZeroPage = _FALSE
bool EvenPage = _FALSE
long4 LastPtobePrinted = 0
int G_ncdl = 0
long allocated_storage = 0
long4 power [32]
long4 gpower [33]
unsigned char buffin [BUFFSIZE]
int binumber = 0
int biact = 0
long used_fontstorage = 0
double start_time

Class Documentation

struct KeyWord

Definition at line 355 of file dvi2xx.h.

Class Members
char * Key
union KeyWord v
char * Val
ValTyp vt
struct KeyDesc

Definition at line 364 of file dvi2xx.h.

Class Members
char * Entry
ValTyp Typ
ValTyp Type
struct char_entry

Definition at line 373 of file dvi2xx.h.

Class Members
unsigned char charsize
long4 cw
unsigned char * data
unsigned char flag_byte
pixels h
unsigned short height
uint32_t length
unsigned char * pkdata
dviunits tfmw
long4 tfmw
pixels w
struct char_entry where
unsigned short width
subpixels xOffset
short xOffset
subpixels yOffset
short yOffset
short yyOffset
struct pixel_list

Definition at line 424 of file dvi2xx.h.

Class Members
FILEPTR pixel_file_id
int use_count
union KeyWord.v

Definition at line 359 of file dvi2xx.h.

Class Members
int i
float n
struct char_entry.where

Definition at line 378 of file dvi2xx.h.

Class Members
where address
bool isloaded
union char_entry.where.address

Definition at line 380 of file dvi2xx.h.

Class Members
long4 fileOffset
long4 * pixptr

Define Documentation

#define BINOPEN (   f)    BOPENCMD(f,READ_BINARY)

Definition at line 110 of file dvi2xx.h.

#define BYTES_PER_PIXEL_LINE   500 /* max number of bytes per pixel line */

Definition at line 118 of file dvi2xx.h.

#define DEBUG_PRINT (   str)

Definition at line 686 of file dvi2xx.h.

#define DEBUG_PRINT1 (   str,
  e1 
)

Definition at line 687 of file dvi2xx.h.

void Warning DVIELI ( )    ()

Definition at line 458 of file dvi2xx.h.

#define DVIFORMAT   2

Definition at line 52 of file dvi2xx.h.

#define DVIPROTO (   x)    ()

Definition at line 457 of file dvi2xx.h.

#define EMIT   fprintf /* output a formatted string */

Definition at line 148 of file dvi2xx.h.

#define EMIT1 (   a)    fprintf(outfp,a)

Definition at line 150 of file dvi2xx.h.

#define EMIT2 (   a,
  b 
)    fprintf(outfp,a,b)

Definition at line 151 of file dvi2xx.h.

#define EMIT3 (   a,
  b,
  c 
)    fprintf(outfp,a,b,c)

Definition at line 152 of file dvi2xx.h.

#define EMIT4 (   a,
  b,
  c,
  d 
)    fprintf(outfp,a,b,c,d)

Definition at line 153 of file dvi2xx.h.

#define EMITB (   len,
  b 
)    write_multi(b,1,len,outfp)

Definition at line 160 of file dvi2xx.h.

#define EMITWORD (   w)    PUTWORD((w)) /* output a 2 byte word of data */

Definition at line 167 of file dvi2xx.h.

#define EMTO   outfp

Definition at line 149 of file dvi2xx.h.

#define EQ (   a,
  b 
)    (strcmp(a,b)==0)

Definition at line 106 of file dvi2xx.h.

#define FIRSTFNTCHAR   0

Definition at line 56 of file dvi2xx.h.

#define GetBytes (   fp,
  buf,
  n 
)    read_multi(buf,1,n,fp) /* used to be a function */

Definition at line 284 of file dvi2xx.h.

#define HUGE_CHAR_PATTERN   32767l

Definition at line 117 of file dvi2xx.h.

#define HUGE_SIZE   (unsigned char) 2

Definition at line 116 of file dvi2xx.h.

#define LARGE_SIZE   (unsigned char) 1

Definition at line 115 of file dvi2xx.h.

#define LARGER (   a,
  b 
)    (((a)>(b)) ? (a) : (b))

Definition at line 173 of file dvi2xx.h.

#define MAXOPEN   MAXOPEN_OS

Definition at line 94 of file dvi2xx.h.

#define MAXOPEN_OS   12 /* limit on number of open font files */

Definition at line 85 of file dvi2xx.h.

#define MM_TO_PXL (   x)    (int)(((x)*RESOLUTION*10)/254)

Definition at line 107 of file dvi2xx.h.

#define MoveDown (   a)    v += (long4) a

Definition at line 170 of file dvi2xx.h.

#define MoveOver (   b)    h += (long4) b

Definition at line 169 of file dvi2xx.h.

#define NEW (   A)    ((A *) malloc(sizeof(A)))

Definition at line 105 of file dvi2xx.h.

#define NFNTCHARS   LASTFNTCHAR+1

Definition at line 97 of file dvi2xx.h.

#define NO_FILE   ((FILE *)-1)

Definition at line 103 of file dvi2xx.h.

#define NONEXISTANT   -1 /* offset for PXL files not found */

Definition at line 99 of file dvi2xx.h.

#define PIXROUND (   x,
  c 
)    (((x)+c)/c)

Definition at line 127 of file dvi2xx.h.

#define PK_ID   89

Definition at line 123 of file dvi2xx.h.

#define PK_POST   245

Definition at line 121 of file dvi2xx.h.

#define PK_PRE   247

Definition at line 122 of file dvi2xx.h.

#define PT_TO_DVI (   x)    (long4)((x)*65536l)

Definition at line 109 of file dvi2xx.h.

#define PT_TO_PXL (   x)    (int)((long4)((x)*RESOLUTION*100l)/7224)

Definition at line 108 of file dvi2xx.h.

#define PUTWORD (   w)    EMITC( ((unsigned char)(w>>8) & 0xff)), EMITC((unsigned char)(w & 0xff))

Definition at line 128 of file dvi2xx.h.

#define qfprintf   if (!G_quiet) fprintf

Definition at line 171 of file dvi2xx.h.

#define qprintf   if (!G_quiet) printf

Definition at line 172 of file dvi2xx.h.

#define SMALL_SIZE   (unsigned char) 0

Definition at line 114 of file dvi2xx.h.

#define STACK_SIZE   100 /* DVI-stack size */

Definition at line 98 of file dvi2xx.h.

#define VisChar (   c)    (unsigned char)(c)

Definition at line 281 of file dvi2xx.h.


Enumeration Type Documentation

enum ValTyp
Enumerator:
None 
String 
Integer 
None 
String 
Integer 
Number 
Dimension 

Definition at line 351 of file dvi2xx.h.

{ None, String, Integer /*, Number, Dimension*/ }

Function Documentation

long access ( )

Here is the caller graph for this function:

void CopyHPFile DVIPROTO ( (char *)  )
void DecodeArgs DVIPROTO ( (int, char *[])  )
void DoSpecial DVIPROTO ( (char *, int )
void EmitChar DVIPROTO ( (long4, struct char_entry *)  )
void FindPostAmblePtr DVIPROTO ( (long *)  )
char* GetKeyStr DVIPROTO ( (char *, KeyWord *)  )
bool IsSame DVIPROTO ( (char *, char *)  )
void LoadAChar DVIPROTO ( (long4, register struct char_entry *)  )
void PkRaster DVIPROTO ( (struct char_entry *, int )
void RasterLine DVIPROTO ( (struct char_entry *, unsigned int, unsigned int, unsigned char *)  )
void RasterChar DVIPROTO ( (struct char_entry *)  )
unsigned char skip_specials DVIPROTO ( (long4 *)  )
char b_read DVIPROTO ( (FILEPTR )
void exit ( )
int fclose ( )
int fprintf ( )
void free ( )
int fseek ( )

Here is the caller graph for this function:

int printf ( )
void setbuf ( )

Here is the caller graph for this function:

int sscanf ( )
int strcmp ( )
char* strcpy ( )

Variable Documentation

Definition at line 624 of file dvi2xx.h.

int biact = 0

Definition at line 630 of file dvi2xx.h.

Definition at line 629 of file dvi2xx.h.

unsigned char buffin[BUFFSIZE]

Definition at line 628 of file dvi2xx.h.

Definition at line 592 of file dvi2xx.h.

Definition at line 548 of file dvi2xx.h.

Definition at line 607 of file dvi2xx.h.

char* EmitFileName = ""

Definition at line 541 of file dvi2xx.h.

Definition at line 620 of file dvi2xx.h.

Definition at line 538 of file dvi2xx.h.

long4 FirstPage = -1000000

Definition at line 529 of file dvi2xx.h.

Definition at line 532 of file dvi2xx.h.

Definition at line 609 of file dvi2xx.h.

Definition at line 578 of file dvi2xx.h.

Definition at line 582 of file dvi2xx.h.

int G_ncdl = 0

Definition at line 622 of file dvi2xx.h.

Definition at line 585 of file dvi2xx.h.

Definition at line 537 of file dvi2xx.h.

Definition at line 583 of file dvi2xx.h.

Definition at line 584 of file dvi2xx.h.

Definition at line 626 of file dvi2xx.h.

Definition at line 594 of file dvi2xx.h.

Definition at line 591 of file dvi2xx.h.

char* HeaderFileName = ""

Definition at line 540 of file dvi2xx.h.

Definition at line 610 of file dvi2xx.h.

long4 hh = 0

Definition at line 595 of file dvi2xx.h.

Definition at line 546 of file dvi2xx.h.

int last_rx = UNKNOWN [static]

Definition at line 616 of file dvi2xx.h.

int last_ry = UNKNOWN [static]

Definition at line 615 of file dvi2xx.h.

long4 LastPage = 1000000

Definition at line 530 of file dvi2xx.h.

Definition at line 533 of file dvi2xx.h.

Definition at line 621 of file dvi2xx.h.

Definition at line 598 of file dvi2xx.h.

Definition at line 528 of file dvi2xx.h.

unsigned short ncopies = 1

Definition at line 590 of file dvi2xx.h.

int ndone = 0

Definition at line 600 of file dvi2xx.h.

int nopen = 0

Definition at line 601 of file dvi2xx.h.

Definition at line 593 of file dvi2xx.h.

Definition at line 605 of file dvi2xx.h.

Definition at line 552 of file dvi2xx.h.

Definition at line 611 of file dvi2xx.h.

Definition at line 613 of file dvi2xx.h.

long4 power[32]

Definition at line 625 of file dvi2xx.h.

long ppagep

Definition at line 614 of file dvi2xx.h.

Definition at line 608 of file dvi2xx.h.

Definition at line 551 of file dvi2xx.h.

Definition at line 550 of file dvi2xx.h.

long4 PrintPages = 1000000

Definition at line 531 of file dvi2xx.h.

Definition at line 549 of file dvi2xx.h.

Definition at line 606 of file dvi2xx.h.

char* PXLpath = FONTAREA

Definition at line 535 of file dvi2xx.h.

Definition at line 547 of file dvi2xx.h.

Definition at line 545 of file dvi2xx.h.

Definition at line 539 of file dvi2xx.h.

double start_time

Definition at line 733 of file dvi2xx.h.

Definition at line 617 of file dvi2xx.h.

long used_fontstorage = 0

Definition at line 702 of file dvi2xx.h.

long usermag = 0

Definition at line 599 of file dvi2xx.h.

Definition at line 596 of file dvi2xx.h.

Definition at line 591 of file dvi2xx.h.

long4 vv = 0

Definition at line 597 of file dvi2xx.h.

Definition at line 618 of file dvi2xx.h.

Definition at line 588 of file dvi2xx.h.

Definition at line 586 of file dvi2xx.h.

Definition at line 589 of file dvi2xx.h.

Definition at line 587 of file dvi2xx.h.

Definition at line 619 of file dvi2xx.h.