Back to index

tetex-bin  3.0
Functions
protos.h File Reference

Go to the source code of this file.

Functions

arith c long FPmult (long u, long v)
long FPdiv (long dividend, long divisor)
long FPstarslash (long a, long b, long c)
basename c int main (int argc, char **argv)
basics c void fatal (char *fmt,...)
void msg (char *fmt,...)
bstring c int memset (void *s, int c, int length)
curves c int BezierTerminationTest (long xa, long ya, long xb, long yb, long xc, long yc, long xd, long yd)
static struct segmentStepBezierRecurse (struct bezierinfo *I, long xA, long yA, long xB, long yB, long xC, long yC, long xD, long yD)
struct segmentt1_StepBezier (struct region *R, long xA, long yA, long xB, long yB, long xC, long yC, long xD, long yD)
int emx_system (char *cmd)
encoding static c char * value_after (char *s, char *t)
int decimal (char *s)
char nextsymbol (void)
char * nextpsname (void)
void getenc (char **fontname, char **encname, char **ev, int *width)
void addcc (char *name, int charcode)
int getcc (char *name)
char * string (char *s)
void remove_string (void)
filenames static c char * charptr (char *name, char c)
int equal (char *s, char *t)
char * extension (char *str)
char * newname (char *name, char *ext)
char * ps2pk_basename (char *str, char *suffix)
int ps_resource (char *name)
int matching (char *font, int size)
fontfcn c int SearchDictName (struct ps_dict *dictP, struct ps_obj *keyP)
int initFont (void)
void resetFont (char *env)
int readFont (char *env)
unsigned char * fontfcnB (unsigned char *S, unsigned char *code, int *lenP, int *mode)
int fontfcnA (char *env, int *mode)
void QueryFontLib (char *env, char *infoName, unsigned char *infoValue, int *rcodeP)
hints c void t1_InitHints (void)
void t1_CloseHints (struct fractpoint *hintP)
static void ComputeHint (struct hintsegment *hP, long currX, long currY, struct fractpoint *hintP)
void t1_ProcessHint (struct hintsegment *hP, long currX, long currY, struct fractpoint *hintP)
static short SearchXofY (struct edgelist *edge, short y)
static int ImpliedHorizontalLine (struct edgelist *e1, struct edgelist *e2, int y)
static void FixSubPaths (struct region *R)
static void DumpSubPaths (struct edgelist *anchor)
static struct edgelistbefore (struct edgelist *e)
static void writeXofY (struct edgelist *e, int y, int x)
static void CollapseWhiteRun (struct edgelist *anchor, short yblack, struct edgelist *left, struct edgelist *right, short ywhite)
void t1_ApplyContinuity (struct region *R)
lines c void t1_StepLine (struct region *R, long x1, long y1, long x2, long y2)
void t1_Bresenham (short *edgeP, long x1, long y1, long x2, long y2)
int fontsize (double x)
double stepsize (double x)
objects c struct xobjectt1_Allocate (int size, struct xobject *template, int extra)
void t1_Free (struct xobject *obj)
struct xobjectt1_Permanent (struct xobject *obj)
struct xobjectxiTemporary (struct xobject *obj)
struct xobjectt1_Dup (struct xobject *obj)
struct xobjectt1_Copy (struct xobject *obj)
struct xobjectt1_Destroy (struct xobject *obj)
struct xobjectt1_Unique (struct xobject *obj)
void t1_Pragmatics (char *username, int value)
void t1_Consume (int n,...)
struct xobjectt1_TypeErr (char *name, struct xobject *obj, int expect, struct xobject *ret)
static char * TypeFmt (int type)
static int ObjectPostMortem (struct xobject *obj)
struct xobjectt1_ArgErr (char *str, struct xobject *obj, struct xobject *ret)
void t1_abort (char *str)
char * t1_ErrorMsg (void)
void t1_InitImager (void)
void t1_TermImager (void)
void reportusage (void)
paths c struct segmentt1_CopyPath (struct segment *p0)
void t1_KillPath (struct segment *p)
struct segmentt1_Loc (struct XYspace *S, double x, double y)
struct segmentt1_ILoc (struct XYspace *S, int x, int y)
struct segmentt1_SubLoc (struct segment *p1, struct segment *p2)
struct segmentt1_PathSegment (int type, long x, long y)
struct segmentt1_Line (struct segment *P)
struct beziersegmentt1_Bezier (struct segment *B, struct segment *C, struct segment *D)
struct hintsegmentt1_Hint (struct XYspace *S, double ref, double width, char orientation, char hinttype, char adjusttype, char direction, int label)
struct segmentt1_Join (struct segment *p1, struct segment *p2)
struct segmentt1_JoinSegment (struct segment *before, int type, long x, long y, struct segment *after)
struct segmentt1_ClosePath (struct segment *p0, int lastonly)
struct segmentt1_Reverse (struct segment *p)
static struct segmentReverseSubPath (struct segment *p)
static struct segmentDropSubPath (struct segment *p0)
static struct segmentSplitPath (struct segment *anchor, struct segment *before)
struct segmentt1_ReverseSubPaths (struct segment *p)
static int UnClose (struct segment *p0)
struct segmentt1_PathXform (struct segment *p0, struct XYspace *S)
void t1_PathDelta (struct segment *p, struct fractpoint *pt)
struct segmentt1_BoundingBox (short h, short w)
void t1_QueryLoc (struct segment *P, struct XYspace *S, double *xP, double *yP)
void t1_QueryPath (struct segment *path, int *typeP, struct segment **Bp, struct segment **Cp, struct segment **Dp, double *fP)
void t1_QueryBounds (struct segment *p0, struct XYspace *S, double *xminP, double *yminP, double *xmaxP, double *ymaxP)
struct segmentt1_BoxPath (struct XYspace *S, int h, int w)
struct segmentt1_DropSegment (struct segment *path)
struct segmentt1_HeadSegment (struct segment *path)
void t1_DumpPath (struct segment *p)
unsigned char lsbf (unsigned char u)
void dots (unsigned char u, int n)
int atoo (char *oct)
pkin static c short pkbyte (void)
static long pkquad (void)
static long pktrio (void)
static long pklong (void)
static short pkopen (char *name)
static short getnyb (void)
static short getbit (void)
static unsigned short pkpackednum (void)
static unsigned short rest (void)
static unsigned short handlehuge (unsigned short i, unsigned short k)
static void error (char *s)
pkout c void pk_open (char *pkname)
void pk_close (void)
static void pk_nybble (int x)
static void pk1 (int x)
static void pk2 (int x)
static void pk3 (int x)
static void pk4 (int x)
void pk_preamble (char *comment, float pointsize, int checksum, unsigned int h_res, unsigned int v_res)
int optimal_size (int W, int H, int cnt, int *count, int *dyn_f)
static void pk_runlengths (int W, int H, int(*next_pixel)(void))
static void pk_number (int x)
static void pk_bitmap (int width, int cnt, int *runlength)
void pk_char (int char_code, int tfm_width, int h_escapement, unsigned int width, unsigned int height, int h_offset, int v_offset, int(*next_pixel)(void))
static void pkstring (char *fmt,...)
int INT (float x)
char * magnification (int dpi, int BDPI)
void pk_postamble (void)
void ps2pk_postamble (char *fontname, char *encname, int base_res, int h_res, int v_res, float pointsize, char *args)
int next_pixel (void)
ps2pk c psargs c psearch c
regions c void 
t1_KillRegion (struct region *area)
struct regiont1_CopyRegion (struct region *area)
static struct edgelistNewEdge (short xmin, short xmax, short ymin, short ymax, short *xvalues, int isdown)
struct regiont1_Interior (struct segment *p, int fillrule)
static int Unwind (struct edgelist *area)
void t1_ChangeDirection (int type, struct region *R, long x, long y, long dy)
static void newfilledge (struct region *R, long xmin, long xmax, long ymin, long ymax, int isdown)
struct edgelistt1_SortSwath (struct edgelist *anchor, struct edgelist *edge, struct edgelist *(*swathfcn)(void))
static struct edgelistsplitedge (struct edgelist *list, short y)
static void vertjoin (struct edgelist *top, struct edgelist *bottom)
struct edgelistswathxsort (struct edgelist *before0, struct edgelist *edge)
struct edgelistt1_SwathUnion (struct edgelist *before0, struct edgelist *edge)
struct edgelistswathrightmost (struct edgelist *before, struct edgelist *edge)
static int touches (int h, short *left, short *right)
static int crosses (int h, short *left, short *right)
static void cedgemin (int, pel *, pel)
static void cedgemax (int, pel *, pel)
static void edgemin (int, pel *, pel *)
static void edgemax (int, pel *, pel *)
static void discard (struct edgelist *left, struct edgelist *right)
void t1_MoveEdges (struct region *R, long dx, long dy)
void t1_UnJumble (struct region *region)
static int OptimizeRegion (struct region *R)
void t1_MoreWorkArea (struct region *R, long x1, long y1, long x2, long y2)
struct regiont1_BoxClip (struct region *R, short xmin, short ymin, short xmax, short ymax)
struct segmentt1_RegionBounds (struct region *R)
void t1_DumpArea (struct region *area)
void t1_DumpEdges (struct edgelist *edges)
static int edgecheck (struct edgelist *edge, int oldmin, int oldmax)
scanfont c int Init_BuiltInEncoding (void)
static int getNextValue (int valueType)
static int getInt (void)
static int getEncoding (struct ps_obj *arrayP)
static int getArray (struct ps_obj *arrayP)
static int getName (char *nameP)
static int getNbytes (int N)
static int getLiteralName (struct ps_obj *nameObjP)
static int BuildSubrs (struct ps_font *FontP)
static int BuildCharStrings (struct ps_font *FontP)
static int BuildFontInfo (struct ps_font *fontP)
static int BuildPrivate (struct ps_font *fontP)
static int GetType1Blues (struct ps_font *fontP)
struct ps_objGetType1CharString (struct ps_font *fontP, unsigned char code)
static int FindDictValue (struct ps_dict *dictP)
int scan_font (struct ps_font *FontP)
spaces c struct XYspacet1_CopySpace (struct XYspace *S)
static void ConsiderContext (struct xobject *obj, double(*M)[2])
void FXYConvert (struct fractpoint *pt, struct XYspace *S, double x, double y)
void IXYConvert (struct fractpoint *pt, struct XYspace *S, long x, long y)
void ForceFloat (struct fractpoint *pt, struct XYspace *S, long x, long y)
long FXYboth (double cx, double cy, double x, double y)
long FXonly (double cx, double cy, double x, double y)
long FYonly (double cx, double cy, double x, double y)
long IXYboth (long cx, long cy, long x, long y)
long IXonly (long cx, long cy, long x, long y)
long IYonly (long cx, long cy, long x, long y)
long FPXYboth (long cx, long cy, long x, long y)
long FPXonly (long cx, long cy, long x, long y)
long FPYonly (long cx, long cy, long x, long y)
static void FillOutFcns (struct XYspace *S)
static void FindFfcn (double cx, double cy, long(**fcnP)(void))
static void FindIfcn (double cx, double cy, long *icxP, long *icyP, long(**fcnP)(void))
void t1_UnConvert (struct XYspace *S, struct fractpoint *pt, double *xp, double *yp)
struct xobjectt1_Xform (struct xobject *obj, double(*M)[2])
struct xobjectt1_Transform (struct xobject *obj, double cxx, double cyx, double cxy, double cyy)
struct xobjectt1_Scale (struct xobject *obj, double sx, double sy)
void t1_PseudoSpace (struct XYspace *S, double(*M)[2])
void t1_MMultiply (double(*A)[2], double(*B)[2], double(*C)[2])
void t1_MInvert (double(*M)[2], double(*Mprime)[2])
void t1_InitSpaces (void)
void t1_QuerySpace (struct XYspace *S, double *cxxP, double *cyxP, double *cxyP, double *cyyP)
void t1_FormatFP (char *str, long fpel)
void t1_DumpSpace (struct XYspace *S)
strexpr c struct valmake_int (int i)
struct valmake_str (char *s)
void free_value (struct val *vp)
int is_integer (struct val *vp, int *r)
int to_integer (struct val *vp)
void to_string (struct val *vp)
void nexttoken (void)
struct valeval6 (void)
struct valeval4 (void)
struct valeval3 (void)
int strexpr (int *result, char *expression)
t1funcs c int Type1OpenScalable (char **ev, struct _Font **ppFont, int flags, struct _FontEntry *entry, char *fileName, struct _FontScalable *vals, unsigned long format, unsigned long fmask, double efactor, double slant)
static int Type1GetGlyphs (struct _Font *pFont, unsigned long count, unsigned char *chars, int charEncoding, unsigned long *glyphCount, struct _CharInfo **glyphs)
void Type1CloseFont (struct _Font *pFont)
static void fill (char *dest, int h, int w, struct region *area, int byte, int bit, int wordsize)
static void fillrun (char *p, short x0, short x1, int bit)
int Type1RegisterFontFileFunctions (void)
t1info static c void FillHeader (struct _FontInfo *pInfo, struct _FontScalable *Vals)
static void ComputeBounds (struct _FontInfo *pInfo, struct _CharInfo *pChars, struct _FontScalable *Vals)
static void ComputeProps (struct _FontInfo *pInfo, struct _FontScalable *Vals, char *Filename)
static void ComputeStdProps (struct _FontInfo *pInfo, struct _FontScalable *Vals, char *Filename, char *Fontname)
int Type1GetInfoScalable (struct _FontPathElement *fpe, struct _FontInfo *pInfo, struct _FontEntry *entry, struct _FontName *fontName, char *fileName, struct _FontScalable *Vals)
void T1FillFontInfo (struct _Font *pFont, struct _FontScalable *Vals, char *Filename, char *Fontname)
void T1InitStdProps (void)
t1io c struct F_FILET1Open (char *fn, char *mode)
int T1Getc (struct F_FILE *f)
int T1Ungetc (int c, struct F_FILE *f)
int T1Read (char *buffP, int size, int n, struct F_FILE *f)
int T1Close (struct F_FILE *f)
struct F_FILET1eexec (struct F_FILE *f)
static int T1Decrypt (unsigned char *p, int len)
static int T1Fill (struct F_FILE *f)
t1snap c unsigned __int64 __stdcall Int64ShllMod32 (unsigned __int64 Value, unsigned long ShiftCount)
__int64 __stdcall Int64ShraMod32 (__int64 Value, unsigned long ShiftCount)
unsigned __int64 __stdcall Int64ShrlMod32 (unsigned __int64 Value, unsigned long ShiftCount)
voidGetFiberData (void)
voidGetCurrentFiber (void)
struct segmentt1_Phantom (struct xobject *obj)
struct xobjectt1_Snap (struct segment *p)
t1stub c int xiStub (void)
void t1_DumpText (struct segment *foo)
void Display (struct _CharInfo *glyph)
int T1FillVals (struct _FontScalable *vals)
int CheckFSFormat (int format, int fmask, int *bit, int *byte, int *scan, int *glyph, int *image)
char * MakeAtom (char *p)
int GetClientResolutions (int *resP)
char * Xalloc (int size)
void Xfree (void)
int FontDefaultFormat (void)
int FontFileRegisterRenderer (void)
int GenericGetBitmaps (void)
int GenericGetExtents (void)
int FontParseXLFDName (void)
int FontComputeInfoAccelerators (void)
texfiles c unsigned long num (struct _iobuf *fp, int size)
int snum (struct _iobuf *fp, int size)
token static c double P10 (long exponent)
static int next_char (int ch)
static int add_char (int ch)
static int skip_space (int ch)
static int skip_comment (int ch)
static int add_sign (int ch)
static int add_1st_digits (int ch)
static int add_digits (int ch)
static int add_1st_decpt (int ch)
static int add_decpt (int ch)
static int add_fraction (int ch)
static int add_e_sign (int ch)
static int add_exponent (int ch)
static int add_radix (int ch)
static int add_r_digits (int ch)
static int RADIX_NUMBER (int ch)
static int INTEGER (int ch)
static int REAL (int ch)
static int HEX_STRING (int ch)
static void save_digraph (int ch)
static int STRING (int ch)
static int AAH_NAME (int ch)
static int NAME (int ch)
static int LITERAL_NAME (int ch)
static int IMMED_NAME (int ch)
static int OOPS_NAME (int ch)
static int RIGHT_ANGLE (int ch)
static int RIGHT_PAREN (int ch)
static int LEFT_BRACE (int ch)
static int RIGHT_BRACE (int ch)
static int LEFT_BRACKET (int ch)
static int RIGHT_BRACKET (int ch)
static int BREAK_SIGNAL (int ch)
static int NO_TOKEN (int ch)
void scan_token (struct ps_obj *inputP)
type1 static c int ComputeAlignmentZones (void)
static int InitStems (void)
static int FinitStems (void)
static void ComputeStem (int stemno)
static struct segmentApplyhint (struct segment *p, int stemnumber, int half)
static struct segmentApplyrevhint (struct segment *p, int stemnumber, int half)
static struct segmentFindStems (double x, double y, double dx, double dy)
static void ClearStack (void)
static void Push (double Num)
static void ClearCallStack (void)
static void PushCall (struct ps_obj *CurrStrP, int CurrIndex, unsigned short CurrKey)
static void PopCall (struct ps_obj **CurrStrPP, int *CurrIndexP, unsigned short *CurrKeyP)
static void ClearPSFakeStack (void)
static void PSFakePush (double Num)
static double PSFakePop (void)
static struct segmentCenterStem (double edge1, double edge2)
static unsigned char Decrypt (unsigned char cipher)
static int DoRead (int *CodeP)
static void StartDecrypt (void)
static void Decode (int Code)
static void DoCommand (int Code)
static void Type1Escape (int Code)
static void HStem (double y, double dy)
static void VStem (double x, double dx)
static void RLineTo (double dx, double dy)
static void RRCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
static void DoClosePath (void)
static void CallSubr (int subrno)
static void Return (void)
static void EndChar (void)
static void RMoveTo (double dx, double dy)
static void DotSection (void)
static void Seac (double asb, double adx, double ady, unsigned char bchar, unsigned char achar)
static void Sbw (double sbx, double sby, double wx, double wy)
static double Div (double num1, double num2)
static void FlxProc (double c1x2, double c1y2, double c3x0, double c3y0, double c3x1, double c3y1, double c3x2, double c3y2, double c4x0, double c4y0, double c4x1, double c4y1, double c4x2, double c4y2, double epY, double epX, int idmin)
static void FlxProc1 (void)
static void FlxProc2 (void)
static void HintReplace (void)
static void CallOtherSubr (int othersubrno)
static void SetCurrentPoint (double x, double y)
struct xobjectType1Char (char *env, struct XYspace *S, struct ps_obj *charstrP, struct ps_obj *subrsP, struct ps_obj *osubrsP, struct blues_struct *bluesP, int *modeP)
util c int vm_init (void)
char * vm_alloc (unsigned int bytes)
void objFormatInteger (struct ps_obj *objP, int value)
void objFormatReal (struct ps_obj *objP, double value)
void objFormatBoolean (struct ps_obj *objP, int value)
void objFormatEncoding (struct ps_obj *objP, int length, struct ps_obj *valueP)
void objFormatArray (struct ps_obj *objP, int length, struct ps_obj *valueP)
void objFormatString (struct ps_obj *objP, int length, char *valueP)
void objFormatName (struct ps_obj *objP, int length, char *valueP)
void objFormatFile (struct ps_obj *objP, struct _iobuf *valueP)

Function Documentation

static int AAH_NAME ( int  ch) [static]
static int add_1st_decpt ( int  ch) [static]
static int add_1st_digits ( int  ch) [static]
static int add_char ( int  ch) [static]
static int add_decpt ( int  ch) [static]
static int add_digits ( int  ch) [static]
static int add_e_sign ( int  ch) [static]
static int add_exponent ( int  ch) [static]
static int add_fraction ( int  ch) [static]
static int add_r_digits ( int  ch) [static]
static int add_radix ( int  ch) [static]
static int add_sign ( int  ch) [static]
void addcc ( char *  name,
int  charcode 
)

Definition at line 259 of file encoding.c.

{  short r, p, q;

   q = root;
   while (q != -1) {
      p = q; r = strcmp(name, node[p].name);
      if (r == 0) {
        if (node[p].cc[1] == -1) {
           node[p].cc[1] = charcode;
           return;
        }
        else 
           fatal("%s: more than two codes for %s (%d,%d,%d)\n", 
              encfile, name, node[p].cc[0], node[p].cc[1], charcode);
      }
      else if (r < 0) q=node[p].left;
      else q=node[p].right;
   }
   if (freenode == 256) 
      fatal("%s: too many PostScript names\n", encfile);
      /* not found hence insert */
   node[freenode].name = name;
   node[freenode].cc[0] = charcode;
   node[freenode].cc[1] = -1;
   node[freenode].left = node[freenode].right = -1;
   if (root == -1)
      root = freenode;
   else {
      if (r < 0) node[p].left=freenode;
      else node[p].right=freenode;
   }
   freenode++;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static struct segment* Applyhint ( struct segment p,
int  stemnumber,
int  half 
) [static, read]
static struct segment* Applyrevhint ( struct segment p,
int  stemnumber,
int  half 
) [static, read]
int atoo ( char *  oct)

Definition at line 202 of file pk2bm.c.

{  int octal = 0;
   while (*oct != '\0') octal = 8*octal + (*oct++) - '0';
   return octal & 0xff;
}

Here is the caller graph for this function:

static struct edgelist* before ( struct edgelist e) [static, read]
curves c int BezierTerminationTest ( long  xa,
long  ya,
long  xb,
long  yb,
long  xc,
long  yc,
long  xd,
long  yd 
)
static int BREAK_SIGNAL ( int  ch) [static]
static int BuildCharStrings ( struct ps_font FontP) [static]
static int BuildFontInfo ( struct ps_font fontP) [static]
static int BuildPrivate ( struct ps_font fontP) [static]
static int BuildSubrs ( struct ps_font FontP) [static]
static void CallOtherSubr ( int  othersubrno) [static]
static void CallSubr ( int  subrno) [static]
static void cedgemax ( int  ,
pel ,
pel   
) [static]
static void cedgemin ( int  ,
pel ,
pel   
) [static]
static struct segment* CenterStem ( double  edge1,
double  edge2 
) [static, read]
filenames static c char* charptr ( char *  name,
char  c 
) [static]
int CheckFSFormat ( int  format,
int  fmask,
int bit,
int byte,
int scan,
int glyph,
int image 
)

Definition at line 659 of file ps2pk.c.

{
       *bit = *byte = 1;
       *glyph = *scan = *image = 1;
       return Successful;
 
}

Here is the caller graph for this function:

static void ClearCallStack ( void  ) [static]
static void ClearPSFakeStack ( void  ) [static]
static void ClearStack ( void  ) [static]
static void CollapseWhiteRun ( struct edgelist anchor,
short  yblack,
struct edgelist left,
struct edgelist right,
short  ywhite 
) [static]
type1 static c int ComputeAlignmentZones ( void  ) [static]
static void ComputeBounds ( struct _FontInfo pInfo,
struct _CharInfo pChars,
struct _FontScalable Vals 
) [static]
static void ComputeHint ( struct hintsegment hP,
long  currX,
long  currY,
struct fractpoint hintP 
) [static]
static void ComputeProps ( struct _FontInfo pInfo,
struct _FontScalable Vals,
char *  Filename 
) [static]
static void ComputeStdProps ( struct _FontInfo pInfo,
struct _FontScalable Vals,
char *  Filename,
char *  Fontname 
) [static]
static void ComputeStem ( int  stemno) [static]
static void ConsiderContext ( struct xobject obj,
double(*)  M[2] 
) [static]
static int crosses ( int  h,
short left,
short right 
) [static]
int decimal ( char *  s)

Definition at line 53 of file encoding.c.

{  int sign = 1, d = 0;

   while (isspace(*s)) s++;
   if (*s == '-') { sign = -1; s++; }
   while (isdigit(*s)) { d = d * 10 + (*s - '0'); s++; }
   return sign*d;
}

Here is the caller graph for this function:

static void Decode ( int  Code) [static]
static unsigned char Decrypt ( unsigned char  cipher) [static]
static void discard ( struct edgelist left,
struct edgelist right 
) [static]
void Display ( struct _CharInfo glyph)

Definition at line 419 of file t1test.c.

{
       int h,w;
       unsigned char *p;
       int data;
       int i;
 
       p = (unsigned char *) glyph->bits;
 
       printf("Metrics: left=%d, right=%d, w=%d, above=%d, below=%d\n",
               glyph->metrics.leftSideBearing,
               glyph->metrics.rightSideBearing,
               glyph->metrics.characterWidth,
               glyph->metrics.ascent,
               glyph->metrics.descent);
 
       for (h=glyph->metrics.ascent + glyph->metrics.descent; --h >= 0;) {
               w = glyph->metrics.rightSideBearing - glyph->metrics.leftSideBearing;
               while (w > 0) {
                       data = *p++;
                       for (i=0; i<8; i++) {
                               if (--w < 0)
                                       break;
                               if (data & 0x80)
                                       printf("X");
                               else
                                       printf(".");
                               data <<= 1;
                       }
               }
               printf("\n");
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static double Div ( double  num1,
double  num2 
) [static]
static void DoClosePath ( void  ) [static]
static void DoCommand ( int  Code) [static]
static int DoRead ( int CodeP) [static]
void dots ( unsigned char  u,
int  n 
)

Definition at line 190 of file pk2bm.c.

{  unsigned int bit;

   bit=1<<7;
   for ( ;n>0 ;n--) {
      if (u & bit) putchar('*');
      else putchar('.');
      bit>>=1;
   }
}

Here is the caller graph for this function:

static void DotSection ( void  ) [static]
static struct segment* DropSubPath ( struct segment p0) [static, read]
static void DumpSubPaths ( struct edgelist anchor) [static]
static int edgecheck ( struct edgelist edge,
int  oldmin,
int  oldmax 
) [static]
static void edgemax ( int  ,
pel ,
pel  
) [static]
static void edgemin ( int  ,
pel ,
pel  
) [static]
int emx_system ( char *  cmd)
static void EndChar ( void  ) [static]
int equal ( char *  s,
char *  t 
)

Definition at line 30 of file filenames.c.

{
#  ifndef UNIX
   while (tolower(*s) == tolower(*t)) {
      if (*s == '\0') break;
      s++; t++;
   }
#  else
   while (*s == *t) {
      if (*s == '\0' || *t == '\0')  break;
      s++; t++;
   }
#  endif
   if (*s == '\0' && *t == '\0') return 1;
   else return 0;
}
static void error ( char *  s) [static]
struct val* eval3 ( void  ) [read]

Definition at line 245 of file strexpr.c.

{
       struct val     *l, *r;
       enum token    op;

       l = eval4();
       while ((op = token) == ADD || op == SUB) {
              nexttoken();
              r = eval4();

              if (!to_integer(l) || !to_integer(r)) {
                     fatal("non-numeric argument\n");
              }

              if (op == ADD) {
                     l->u.i += r->u.i;
              } else {
                     l->u.i -= r->u.i;
              }

              free_value(r);
       }

       return l;
}

Here is the call graph for this function:

Here is the caller graph for this function:

struct val* eval4 ( void  ) [read]

Definition at line 210 of file strexpr.c.

{
       struct val     *l, *r;
       enum token    op;

       l = eval6();
       while ((op = token) == MUL || op == DIV || op == MOD) {
              nexttoken();
              r = eval6();

              if (!to_integer(l) || !to_integer(r)) {
                     fatal("non-numeric argument\n");
              }

              if (op == MUL) {
                     l->u.i *= r->u.i;
              } else {
                     if (r->u.i == 0) {
                            fatal("division by zero\n");
                     }
                     if (op == DIV) {
                            l->u.i /= r->u.i;
                     } else {
                            l->u.i %= r->u.i;
                     }
              }

              free_value(r);
       }

       return l;
}

Here is the call graph for this function:

Here is the caller graph for this function:

struct val* eval6 ( void  ) [read]

Definition at line 187 of file strexpr.c.

{
       struct val *eval3(void);
       struct val     *v;

       if (token == OPERAND) {
              nexttoken();
              return tokval;

       } else if (token == LP) {
              nexttoken();
              v = eval3();

              if (token != RP)
                 fatal("missing parenthesis in expression\n");
              nexttoken();
              return v;
       } else fatal("expression error\n");
       /* NOTREACHED */
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* extension ( char *  str)

Definition at line 50 of file filenames.c.

                           {
   char *p, *base;
   for (p = base = str; *p; ++p)
     /*      if (*p++ == DIRSEP) base = p; */
     if (IS_DIR_SEP(*p)) base = p + 1;
   for (p = base ; *p; p++)
      if (*p == '.') break;
   return p;
}
basics c void fatal ( char *  fmt,
  ... 
)

Definition at line 17 of file basics.c.

{  va_list args;

   va_start(args, fmt);
   vfprintf(stderr, fmt, args);
   va_end(args);
   exit(1);
}

Here is the call graph for this function:

static void fill ( char *  dest,
int  h,
int  w,
struct region area,
int  byte,
int  bit,
int  wordsize 
) [static]

Definition at line 1307 of file t1set.c.

{
  register struct edgelist *edge;  /* for looping through edges         */
  register char *p;     /* current scan line in 'dest'                  */
  register int y;       /* for looping through scans                    */
  register int wbytes = w / 8;  /* number of bytes in width             */
  register pel *leftP,*rightP;  /* pointers to X values, left and right */
  int xmin = area->xmin;  /* upper left X                               */
  int ymin = area->ymin;  /* upper left Y                               */
  
  for (edge = area->anchor; VALIDEDGE(edge); edge = edge->link->link) {
    
    p = dest + (edge->ymin - ymin) * wbytes;
    leftP = edge->xvalues;
    rightP = edge->link->xvalues;
    
    for (y = edge->ymin; y < edge->ymax; y++) {
      fillrun(p, *leftP++ - xmin , *rightP++ - xmin, bit);
      p += wbytes;
    }
  }
  /* 
    Now, as an afterthought, we'll go reorganize if odd byte order requires
    it:
    */
  /* We do not reorganize since t1lib internally always uses LSBFirst */
  /*
  if ( 0 && wordsize != 8) {
    register int i; 
    printf("Reorganizing data ..\n");
    
    switch (wordsize) { 
    case 16: 
      { 
       register unsigned short data,*p; 
       p = (unsigned short *) dest; 
       for (i = h * w /16; --i >= 0;) { 
         data = *p; 
         *p++ = (data << 8) + (data >> 8); 
       } 
       break; 
      } 
    case 64: 
    case 32: 
      { 
       register ULONG data,*p; 
       p = (ULONG *) dest; 
       for (i = h * w / 32; --i >= 0;) { 
         data = *p; 
         *p++ = (data << 24) + (data >> 24) 
           + (0xFF00 & (data >> 8)) 
           + (0xFF0000 & (data << 8)); 
       } 
       if (wordsize == 64) { 
         p = (ULONG *) dest; 
         for (i = h * w / 64; --i >= 0;) { 
           data = *p++; 
           p[-1] = p[0]; 
           *p++ = data; 
         } 
       }
       break; 
      } 
    default: 
      abort("xiFill: unknown format"); 
    } 
  }
  */
}

Here is the call graph for this function:

Here is the caller graph for this function:

t1info static c void FillHeader ( struct _FontInfo pInfo,
struct _FontScalable Vals 
) [static]
static void FillOutFcns ( struct XYspace S) [static]
static void fillrun ( char *  p,
short  x0,
short  x1,
int  bit 
) [static]
static int FindDictValue ( struct ps_dict dictP) [static]
static void FindFfcn ( double  cx,
double  cy,
long(**)(void fcnP 
) [static]
static void FindIfcn ( double  cx,
double  cy,
long *  icxP,
long *  icyP,
long(**)(void fcnP 
) [static]
static struct segment* FindStems ( double  x,
double  y,
double  dx,
double  dy 
) [static, read]
static int FinitStems ( void  ) [static]
static void FixSubPaths ( struct region R) [static]
static void FlxProc ( double  c1x2,
double  c1y2,
double  c3x0,
double  c3y0,
double  c3x1,
double  c3y1,
double  c3x2,
double  c3y2,
double  c4x0,
double  c4y0,
double  c4x1,
double  c4y1,
double  c4x2,
double  c4y2,
double  epY,
double  epX,
int  idmin 
) [static]
static void FlxProc1 ( void  ) [static]
static void FlxProc2 ( void  ) [static]

Definition at line 709 of file ps2pk.c.

{ ; }

Here is the caller graph for this function:

Definition at line 701 of file ps2pk.c.

{ ; }

Here is the caller graph for this function:

int fontfcnA ( char *  env,
int mode 
)

Definition at line 193 of file fontfcn.c.

{
  int rc;
 
  /* Has the FontP initialized?  If not, then   */
  /* Initialize  */
  if (FontP == NULL) {
    InitImager();
    if (!(initFont())) {
      /* we are really out of memory */
      *mode = SCAN_OUT_OF_MEMORY;
      return(FALSE);
    }
  }
 
  /* if the env is null, then use font already loaded */
 
  /* if the not same font name */
  if ( (env) && (strcmp(env,CurFontName) != 0 ) ) {
    /* restore the virtual memory and eliminate old font, read new one */
    rc = readFont(env);
    if (rc != 0 ) {
      strcpy(CurFontName, "");    /* no font loaded */
      *mode = rc;
      return(FALSE);
    }
  }
  return(TRUE);
 
}

Here is the call graph for this function:

unsigned char* fontfcnB ( unsigned char *  S,
unsigned char *  code,
int lenP,
int mode 
)

Definition at line 703 of file ps2pk.c.

{ ; }

Here is the caller graph for this function:

Definition at line 708 of file ps2pk.c.

{ ; }
int fontsize ( double  x)

Definition at line 133 of file mag.c.

{
   return(DPI*pow(1.2, x) + 0.5);
}

Here is the caller graph for this function:

void ForceFloat ( struct fractpoint pt,
struct XYspace S,
long  x,
long  y 
)
long FPdiv ( long  dividend,
long  divisor 
)
arith c long FPmult ( long  u,
long  v 
)
long FPstarslash ( long  a,
long  b,
long  c 
)
long FPXonly ( long  cx,
long  cy,
long  x,
long  y 
)
long FPXYboth ( long  cx,
long  cy,
long  x,
long  y 
)
long FPYonly ( long  cx,
long  cy,
long  x,
long  y 
)
void free_value ( struct val vp)

Definition at line 78 of file strexpr.c.

{
       if (vp->type == string)
              free(vp->u.s);
       free(vp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

long FXonly ( double  cx,
double  cy,
double  x,
double  y 
)

Definition at line 428 of file spaces.c.

{
       register DOUBLE r;    /* temporary float                              */
 
       r = x * cx;
       return((fractpel) r);
}

Here is the caller graph for this function:

long FXYboth ( double  cx,
double  cy,
double  x,
double  y 
)

Definition at line 417 of file spaces.c.

{
       register DOUBLE r;    /* temporary float                              */
 
       r = x * cx + y * cy;
       return((fractpel) r);
}

Here is the caller graph for this function:

void FXYConvert ( struct fractpoint pt,
struct XYspace S,
double  x,
double  y 
)

Definition at line 369 of file spaces.c.

{
       pt->x = (*S->xconvert)(S->tofract.normal[0][0], S->tofract.normal[1][0], x, y);
       pt->y = (*S->yconvert)(S->tofract.normal[0][1], S->tofract.normal[1][1], x, y);
       return(0);
       
}

Here is the caller graph for this function:

long FYonly ( double  cx,
double  cy,
double  x,
double  y 
)

Definition at line 439 of file spaces.c.

{
       register DOUBLE r;    /* temporary float                              */
 
       r = y * cy;
       return((fractpel) r);
}

Here is the caller graph for this function:

Definition at line 705 of file ps2pk.c.

{ ; }

Definition at line 706 of file ps2pk.c.

{ ; }
static int getArray ( struct ps_obj arrayP) [static]
static short getbit ( void  ) [static]
int getcc ( char *  name)

Definition at line 293 of file encoding.c.

{  short r, p, q, cc;

   q = root;
   while (q != -1) {
      p = q; r = strcmp(name, node[p].name);
      if (r == 0) {
        cc = node[p].cc[0];
        node[p].cc[0] = node[p].cc[1];
        node[p].cc[1] = -1;
        return cc; 
      }
      else if (r < 0) q = node[p].left;
      else q = node[p].right;
   }
   return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 676 of file ps2pk.c.

{
       *resP = 0;
}

Here is the caller graph for this function:

void getenc ( char **  fontname,
char **  encname,
char **  ev,
int width 
)
static int getEncoding ( struct ps_obj arrayP) [static]
static int getInt ( void  ) [static]
static int getLiteralName ( struct ps_obj nameObjP) [static]
static int getName ( char *  nameP) [static]

Here is the caller graph for this function:

static int getNbytes ( int  N) [static]
static int getNextValue ( int  valueType) [static]
static short getnyb ( void  ) [static]

Definition at line 1902 of file dvi2xx.c.

{
  register unsigned char  temp;
  if ( bitweight == 0 ) {
    inputbyte = PKBYTE;
    bitweight = 16;
  }
  temp = inputbyte / bitweight;
  inputbyte -= temp * bitweight;
  bitweight /= 16;
  return ( temp );
}

Here is the caller graph for this function:

static int GetType1Blues ( struct ps_font fontP) [static]
struct ps_obj* GetType1CharString ( struct ps_font fontP,
unsigned char  code 
) [read]

Definition at line 1087 of file scanfont.c.

{
  int  N;           /* the 'Nth' entry in the CharStrings       */
  psobj *charnameP; /* points to psobj that is name of character*/
 
  psdict *CharStringsDictP; /* dictionary with char strings     */
  psobj  *theStringP;  /* the definition for the code */
  
  
  if (StdEncArrayP == NULL) {
    return(NULL);
  }
  /* use the code to index into the standard encoding vector  */
  charnameP = &(StdEncArrayP[code]);
  
  /* test if the encoding array points to a name */
  if (!(objPIsName(charnameP)) ) {
    return(NULL);
  }

  /* Now that we have the character name out of the standardencoding */
  /* get the character definition out of the current font */
  CharStringsDictP =  fontP->CharStringsP;
 
  /* search the chars string for this charname as key */
  N = SearchDictName(CharStringsDictP,charnameP);
  if (N<=0) {
    return(NULL);
  }

  /* OK, the nth item is the psobj that is the string for this char */
  theStringP = &(CharStringsDictP[N].value);
 
  return(theStringP);
}

Here is the call graph for this function:

static unsigned short handlehuge ( unsigned short  i,
unsigned short  k 
) [static]
static int HEX_STRING ( int  ch) [static]
static void HintReplace ( void  ) [static]
static void HStem ( double  y,
double  dy 
) [static]
static int IMMED_NAME ( int  ch) [static]
static int ImpliedHorizontalLine ( struct edgelist e1,
struct edgelist e2,
int  y 
) [static]
scanfont c int Init_BuiltInEncoding ( void  )

Definition at line 269 of file scanfont.c.

{
  StdEncArrayP = MakeEncodingArrayP(StdEnc);
  if (StdEncArrayP==NULL)
    return( FALSE);
  else
    return( TRUE);
}

Here is the call graph for this function:

int initFont ( void  )

Definition at line 155 of file fontfcn.c.

{
  if (!(vm_init())) return(FALSE);
  vm_base = vm_next_byte();
  strcpy(CurFontName, "");    /* iniitialize to none */
  FontP->vm_start = vm_next_byte();
  FontP->FontFileName.len = 0;
  FontP->FontFileName.data.valueP = CurFontName;
  return(TRUE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int InitStems ( void  ) [static]
int INT ( float  x)
t1snap c unsigned __int64 __stdcall Int64ShllMod32 ( unsigned __int64  Value,
unsigned long  ShiftCount 
)
__int64 __stdcall Int64ShraMod32 ( __int64  Value,
unsigned long  ShiftCount 
)
unsigned __int64 __stdcall Int64ShrlMod32 ( unsigned __int64  Value,
unsigned long  ShiftCount 
)
static int INTEGER ( int  ch) [static]
int is_integer ( struct val vp,
int r 
)

Definition at line 88 of file strexpr.c.

{
       char           *s;
       int             neg;
       int             i;

       if (vp->type == integer) {
              *r = vp->u.i;
              return 1;
       }

       /*
        * POSIX.2 defines an "integer" as an optional unary minus 
        * followed by digits.
        */
       s = vp->u.s;
       i = 0;

       neg = (*s == '-');
       if (neg)
              s++;

       while (*s) {
              if (!isdigit(*s))
                     return 0;

              i *= 10;
              i += *s - '0';

              s++;
       }

       if (neg)
              i *= -1;

       *r = i;
       return 1;
}

Here is the caller graph for this function:

long IXonly ( long  cx,
long  cy,
long  x,
long  y 
)
long IXYboth ( long  cx,
long  cy,
long  x,
long  y 
)
void IXYConvert ( struct fractpoint pt,
struct XYspace S,
long  x,
long  y 
)
long IYonly ( long  cx,
long  cy,
long  x,
long  y 
)
static int LEFT_BRACE ( int  ch) [static]
static int LEFT_BRACKET ( int  ch) [static]
static int LITERAL_NAME ( int  ch) [static]
unsigned char lsbf ( unsigned char  u)

Definition at line 174 of file pk2bm.c.

{
       int i; quarterword bit, result = 0;

       for (i=0; i<8; i++) {
          bit = u & 001;
          result = (result<<1) | bit;
          u = u >> 1;
       }
       return result;
}

Here is the caller graph for this function:

char* magnification ( int  dpi,
int  BDPI 
)

Definition at line 506 of file pkout.c.

                                        {
   double size, magstep;

   if (dpi == BDPI) {
      sprintf(mag_str, "magstep(0)");
      return mag_str;
   }
   size = BDPI; magstep = 0; 
   while (dpi < size) {
      size = size / 1.095445115;
      magstep -= 0.5;
      if (dpi == PSPKINT(size + 0.5)) {
         sprintf(mag_str, "magstep(%.1f)", magstep);
         return mag_str;
      }
      if (dpi > size) {
         sprintf(mag_str, "%d+%d/%d", PSPKINT(dpi/BDPI), dpi%BDPI, BDPI);
         return mag_str;
      }
   }
   while (dpi > size) {
      size = size * 1.095445115;
      magstep += 0.5;
      if (dpi == PSPKINT(size + 0.5)) {
         sprintf(mag_str, "magstep(%.1f)", magstep);
         return mag_str;
      }
      if (dpi < size) {
         sprintf(mag_str, "%d+%d/%d", PSPKINT(dpi/BDPI), dpi%BDPI, BDPI);
         return mag_str;
      }
   }
}

Here is the call graph for this function:

basename c int main ( int  argc,
char **  argv 
)

Definition at line 50 of file dvipng.c.

{
  bool parsestdin;
    
#ifdef TIMING
# ifdef HAVE_GETTIMEOFDAY
  gettimeofday(&Tp, NULL);
  timer = Tp.tv_sec + ((float)(Tp.tv_usec))/ 1000000.0;
# else
#  ifdef HAVE_FTIME
  ftime(&timebuffer);
  timer = timebuffer.time + (float)(timebuffer.millitm) / 1000.0;
#  endif
# endif
#endif
  /* setbuf(stderr, NULL); */

#ifdef HAVE_LIBKPATHSEA
  /* Use extra paths as used by dvips */
  kpse_set_program_name(argv[0],"dvips");
  /* If dvipng is not installed in the texmf tree, and _only_
   * SELFAUTO...  is used in texmf.cnf, kpathsea will not find a)
   * Virtual fonts b) ps2pk.map or psfonts.map c) PostScript fonts
   *
   * We adjust these things here
   */
# ifdef ENV_SELFAUTOLOC
  putenv(ENV_SELFAUTOLOC);
# endif
# ifdef ENV_SELFAUTODIR
  putenv(ENV_SELFAUTODIR);
# endif
# ifdef ENV_SELFAUTOPARENT
  putenv(ENV_SELFAUTOPARENT);
# endif
  kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile);
#endif

  initcolor();
  parsestdin = DecodeArgs(argc, argv);

#ifdef HAVE_LIBKPATHSEA
  if (user_mfmode)
    if (user_bdpi)
      kpse_init_prog("DVIPNG", user_bdpi, user_mfmode, "cmr10");
    else {
      Warning("--mfmode given without --bdpi.");
      /* this will give a lot of warnings but... */
      kpse_init_prog("DVIPNG", 300, user_mfmode, "cmr10");
    }
  else
    kpse_init_prog("DVIPNG", 300, "cx", "cmr10");
#endif

#ifdef HAVE_FT2_OR_LIBT1
  InitPSFontMap();
#endif

  DrawPages();

  if (parsestdin) {
    char    line[STRSIZE];

    printf("%s> ",dvi!=NULL?dvi->name:"");
    fgets(line,STRSIZE,stdin);
    while(!feof(stdin)) {
      DecodeString(line);
      if (dvi!=NULL) {
       if (DVIReOpen(dvi))
         flags &= ~PREVIEW_LATEX_TIGHTPAGE;
       DrawPages();
      }
      printf("%s> ",dvi!=NULL?dvi->name:"");
      fgets(line,STRSIZE,stdin);
    }
    printf("\n");
  }

#ifdef TIMING
# ifdef HAVE_GETTIMEOFDAY
  gettimeofday(&Tp, NULL);
  timer = (Tp.tv_sec + (float)(Tp.tv_usec)/1000000.0) - timer;
# else
#  ifdef HAVE_FTIME
  ftime(&timebuffer);
  timer = (timebuffer.time + (float)(timebuffer.millitm)/1000.0) - timer;
#  endif
# endif
  
  if (ndone > 0) 
    fprintf(stderr,
           "Time of complete run: %.2f s, %d page(s), %.4f s/page.\n",
           timer, ndone, timer / ndone);
  if (my_toc >= 0.0001) 
    fprintf(stderr,
           "Thereof in TIC/TOC region %.5f s.\n",my_toc);
#endif

  ClearFonts();
  DVIClose(dvi);
  ClearDvipsNam();
#ifdef HAVE_FT2_OR_LIBT1
  ClearPSFontMap();
  ClearEncoding();
#endif
#ifdef HAVE_FT2
  if (libfreetype!=NULL && FT_Done_FreeType(libfreetype)) 
    Fatal("an error occured during freetype destruction"); 
  libfreetype = NULL;
#endif  
#ifdef HAVE_LIBT1
  if (libt1!=NULL && T1_CloseLib())
    Fatal("an error occured during t1lib destruction"); 
  libt1 = NULL;
#endif  

  exit(exitcode);
}
strexpr c struct val* make_int ( int  i) [read]

Definition at line 38 of file strexpr.c.

{
       struct val     *vp;

       vp = (struct val *) malloc(sizeof(*vp));
       if (vp == NULL) fatal("expression error\n");
       vp->type = integer;
       vp->u.i = i;
       return vp;
}
struct val* make_str ( char *  s) [read]

Definition at line 51 of file strexpr.c.

{
       char operand[32]; int i;

       struct val     *vp;

       vp = (struct val *) malloc(sizeof(*vp));
       if (vp == NULL) fatal("expression error\n");

        pexpr = s; i = 0;
        while (1) {
          if (isspace(*pexpr) || *pexpr == '\0') break;
          if (strchr(OPERATORS, *pexpr) != NULL) break;
          if (i == 30) fatal("operand too large\n");
          operand[i++] = *pexpr++;
       }
       if (i == 0) fatal("invalid operand\n");
       operand[i] = '\0';
       vp->u.s = malloc(i+1);
       if (vp->u.s == NULL) fatal("Out of memory\n");
       strcpy(vp->u.s, operand);
       vp->type = string;
       return vp;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* MakeAtom ( char *  p)

Definition at line 498 of file t1test.c.

{
       return p;
}

Here is the caller graph for this function:

int matching ( char *  font,
int  size 
)

Definition at line 34 of file flisearch.c.

                                   {

   if ((strcmp(font, fontname) == 0) && (size == dpi ||
      (size >= dpi - margin && size <= dpi+margin))) 
      return 1;
   else
      return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bstring c int memset ( void s,
int  c,
int  length 
)

Definition at line 8 of file bstring.c.

{  char *p = s;
  
   while (length--) *(p++) = c;
}
void msg ( char *  fmt,
  ... 
)

Definition at line 27 of file basics.c.

{  va_list args;

   va_start(args, fmt);
   vfprintf(stderr, fmt, args);
   fflush(stderr);
   va_end(args);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int NAME ( int  ch) [static]
static struct edgelist* NewEdge ( short  xmin,
short  xmax,
short  ymin,
short  ymax,
short xvalues,
int  isdown 
) [static, read]
static void newfilledge ( struct region R,
long  xmin,
long  xmax,
long  ymin,
long  ymax,
int  isdown 
) [static]
char* newname ( char *  name,
char *  ext 
)

Definition at line 64 of file filenames.c.

{  
   char *e, *nn; int len1, len2;

   e = extension(name);
   if (equal(ext, e)) return name;
   len1 = strlen(name) - strlen(e);
   len2 = len1 + strlen(ext) + 1;
   nn = (char *) malloc(len2);
   if (nn == NULL) fatal("Out of memory\n");
   strncpy(nn, name, len1);
   strcpy(nn+len1, ext);
   return nn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int next_char ( int  ch) [static]

Definition at line 71 of file pktest.c.

{  int c;
   do { c = getchar();
      if (c==EOF) fatal("reading past end of file!\n");
      if (c == '*' || c == 'X') return BLACK;
      if (c == '.') return WHITE;
   } while (1);
}

Here is the caller graph for this function:

char* nextpsname ( void  )

Definition at line 90 of file encoding.c.

{  int i = 0;
   char the_nextname[MAXSTRLEN], *name;

   for (;;) {
      if (pline == NULL) {
         if (fgets(line, LINEBUF-1, enc) == NULL)
            fatal("unexpected EOF while reading %s\n", encfile);
         pline = line;
      }
      if (*pline == '%' || *pline == '\n' || *pline == '\0') 
      {  pline = NULL; 
         continue; 
      }
      if (isspace(*pline)) {
         pline++;
        continue;
      }
      if (!isalpha(*pline)) fatal("invalid name in %s\n", encfile);
      /* pt981009: added '_' Staszek Wawrykiewicz <staw@gust.org.pl> */
      while (isalnum(*pline) || *pline == '-' || *pline == '_') {
       if (i > MAXSTRLEN-2)
         fatal("name too long in %s (%s)\n", line, encfile);
       the_nextname[i++] = *pline++;
      }
      the_nextname[i] = '\0';
      name = malloc(i+1);
      if (name == NULL) fatal("Out of memory\n");
      strcpy(name, the_nextname);
      break;
   }
   /* pt981009: removed pline++ Staszek Wawrykiewicz <staw@gust.org.pl> */
   return name;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char nextsymbol ( void  )

Definition at line 72 of file encoding.c.

{
   for (;;) {
      if (pline == NULL) {
         if (fgets(line, LINEBUF-1, enc) == NULL)
            fatal("unexpected EOF while reading %s\n", encfile);
         pline = line;
      }
      if (*pline == '[' || *pline == ']' || *pline == '/') break;
      if (*pline == '%' || *pline == '\n' || *pline == '\0') 
      {  pline = NULL; 
         continue; 
      }
      pline++;
   }
   pline++; return *(pline-1);
}

Here is the caller graph for this function:

Definition at line 165 of file strexpr.c.

{
       char           *i;   /* index */

       while (isspace(*pexpr)) pexpr++;

       if (*pexpr == '\0') {
              token = EOI;
              return;
       }

       if ((i = strchr(OPERATORS, *pexpr)) != NULL) {
              pexpr++;
              token = i - OPERATORS;
              return;
       }
       tokval = make_str(pexpr);
       token = OPERAND;
       return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int NO_TOKEN ( int  ch) [static]
texfiles c unsigned long num ( struct _iobuf *  fp,
int  size 
)
static int ObjectPostMortem ( struct xobject obj) [static]
void objFormatArray ( struct ps_obj objP,
int  length,
struct ps_obj valueP 
)

Definition at line 159 of file util.c.

{
  if (objP != NULL) {
    objP->type        = OBJ_ARRAY;
    objP->len         = length;
    objP->data.arrayP = valueP;
  }
}
void objFormatBoolean ( struct ps_obj objP,
int  value 
)

Definition at line 135 of file util.c.

{
  if (objP != NULL) {
    objP->type         = OBJ_BOOLEAN;
    objP->len          = 0;
    objP->data.boolean = value;
  }
}
void objFormatEncoding ( struct ps_obj objP,
int  length,
struct ps_obj valueP 
)

Definition at line 147 of file util.c.

{
  if (objP != NULL) {
    objP->type        = OBJ_ENCODING;
    objP->len         = length;
    objP->data.arrayP = valueP;
  }
}
void objFormatFile ( struct ps_obj objP,
struct _iobuf *  valueP 
)
void objFormatInteger ( struct ps_obj objP,
int  value 
)

Definition at line 111 of file util.c.

{
  if (objP != NULL) {
    objP->type         = OBJ_INTEGER;
    objP->len          = 0;
    objP->data.integer = value;
  }
}
void objFormatName ( struct ps_obj objP,
int  length,
char *  valueP 
)

Definition at line 184 of file util.c.

{
  if (objP != NULL) {
    objP->type         = OBJ_NAME;
    objP->len          = length;
    objP->data.nameP   = valueP;
  }
}
void objFormatReal ( struct ps_obj objP,
double  value 
)
void objFormatString ( struct ps_obj objP,
int  length,
char *  valueP 
)

Definition at line 172 of file util.c.

{
  if (objP != NULL) {
    objP->type         = OBJ_STRING;
    objP->len          = length;
    objP->data.valueP  = valueP;
  }
}
static int OOPS_NAME ( int  ch) [static]
int optimal_size ( int  W,
int  H,
int  cnt,
int count,
int dyn_f 
)
static int OptimizeRegion ( struct region R) [static]
token static c double P10 ( long  exponent) [static]
static void pk1 ( int  x) [static]
static void pk2 ( int  x) [static]
static void pk3 ( int  x) [static]
static void pk4 ( int  x) [static]
static void pk_bitmap ( int  width,
int  cnt,
int runlength 
) [static]
void pk_char ( int  char_code,
int  tfm_width,
int  h_escapement,
unsigned int  width,
unsigned int  height,
int  h_offset,
int  v_offset,
int(*)(void next_pixel 
)

Definition at line 45 of file pkout.c.

{
   fclose(pkfile);
}

Here is the caller graph for this function:

static void pk_number ( int  x) [static]
static void pk_nybble ( int  x) [static]
pkout c void pk_open ( char *  pkname)

Definition at line 39 of file pkout.c.

{
   pkfile = fopen(pkname, WB);
   if (pkfile == NULL) fatal("Can not open %s\n", pkname);
}

Here is the caller graph for this function:

Definition at line 543 of file pkout.c.

{      
   pk1(PK_POST);
   while (pk_len % 4 != 0) pk1(PK_NOOP);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pk_preamble ( char *  comment,
float  pointsize,
int  checksum,
unsigned int  h_res,
unsigned int  v_res 
)

Definition at line 101 of file pkout.c.

{ 
   int i, len;

   /* compute MAX_COUNTS based upon pointsize, h_res and v_res */
   MAX_COUNTS = pointsize / DPI * h_res * (pointsize / DPI * v_res + 1);
   
   pk1(PK_PRE);
   pk1(PK_ID);
   len = strlen(comment);
   len = len>255? 255: len;
   pk1(len);
   for (i=0; i<len; i++) pk1(*comment++);

   pk4(pointsize * (1<<20) + 0.5);
   pk4(checksum);
   pk4(h_res / DPI * (1<<16)); pk4(v_res / DPI * (1<<16));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void pk_runlengths ( int  W,
int  H,
int(*)(void next_pixel 
) [static]
pkin static c short pkbyte ( void  ) [static]
static long pklong ( void  ) [static]
static short pkopen ( char *  name) [static]
static unsigned short pkpackednum ( void  ) [static]
static long pkquad ( void  ) [static]
static void pkstring ( char *  fmt,
  ... 
) [static]
static long pktrio ( void  ) [static]
static void PopCall ( struct ps_obj **  CurrStrPP,
int CurrIndexP,
unsigned short CurrKeyP 
) [static]
char* ps2pk_basename ( char *  str,
char *  suffix 
)
void ps2pk_postamble ( char *  fontname,
char *  encname,
int  base_res,
int  h_res,
int  v_res,
float  pointsize,
char *  args 
)

Definition at line 553 of file pkout.c.

{      
   int i;

   pkstring("ps2pk options: %s", args);
   pkstring("fontid=%s", fontname);
   if (encname) pkstring("codingscheme=%s", encname);
   pkstring("fontfacebyte"); 
   pk1(PK_NUMSPC);
   i = (pointsize < 127.0) ?
     ((254 - (int)((2 * pointsize)+0.5)) * (1 << 16)) : 0;
   pk4(i);
   pkstring("pixels_per_inch=%d", base_res);
   pkstring("mag=%s", magnification(h_res, base_res));
   if (v_res != h_res)
      pkstring("aspect ratio=%d / %d", 
         (int)((1.0 * v_res / h_res * base_res) + 0.5), base_res);

   pk1(PK_POST);
   while (pk_len % 4 != 0) pk1(PK_NOOP);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int ps_resource ( char *  name)

Definition at line 120 of file filenames.c.

                            {
   if (charptr(name, '.')) return 0 ;
#ifdef KPATHSEA
   if (kpse_absolute_p(name, true)) return 0;
#else
   if (charptr(name, DIRSEP)) return 0 ;
#endif
   return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static double PSFakePop ( void  ) [static]
static void PSFakePush ( double  Num) [static]
static void Push ( double  Num) [static]
static void PushCall ( struct ps_obj CurrStrP,
int  CurrIndex,
unsigned short  CurrKey 
) [static]
void QueryFontLib ( char *  env,
char *  infoName,
unsigned char *  infoValue,
int rcodeP 
)

Definition at line 542 of file fontfcn.c.

{

  int rc,N,i;
  psdict *dictP;
  psobj  nameObj;
  psobj  *valueP;
 
  /* Has the FontP initialized?  If not, then   */
  /* Initialize  */
  if (FontP == NULL) {
    InitImager();
    if (!(initFont())) {
      *rcodeP = 1;
      return;
    }
  }
  /* if the env is null, then use font already loaded */
  /* if the not same font name, reset and load next font */
  if ( (env) && (strcmp(env,CurFontName) != 0 ) ) {
    /* restore the virtual memory and eliminate old font */
    rc = readFont(env);
    if (rc != 0 ) {
      strcpy(CurFontName, "");    /* no font loaded */
      *rcodeP = 1;
      return;
    }
  }
  dictP = FontP->fontInfoP;
  objFormatName(&nameObj,strlen(infoName),infoName);
  N = SearchDictName(dictP,&nameObj);
  /* if found */
  if ( N > 0 ) {
    *rcodeP = 0;
    switch (dictP[N].value.type) {
       case OBJ_ARRAY:
         valueP = dictP[N].value.data.arrayP;
         if (strcmp(infoName,"FontMatrix") == 0) {
           /* 6 elments, return them as floats      */
           for (i=0;i<6;i++) {
             if (valueP->type == OBJ_INTEGER )
               ((float *)infoValue)[i] = valueP->data.integer;
             else
               ((float *)infoValue)[i] = valueP->data.real;
            valueP++;
           }
         }
         if (strcmp(infoName,"FontBBox") == 0) {
           /* 4 elments for Bounding Box.  all integers   */
           for (i=0;i<4;i++) {
             ((int *)infoValue)[i] = valueP->data.integer;
             valueP++;
           }
         break;
       case OBJ_INTEGER:
       case OBJ_BOOLEAN:
         *((int *)infoValue) = dictP[N].value.data.integer;
         break;
       case OBJ_REAL:
         *((float *)infoValue) = dictP[N].value.data.real;
         break;
       case OBJ_NAME:
       case OBJ_STRING:
         *((char **)infoValue) =  dictP[N].value.data.valueP;
         break;
       default:
         *rcodeP = 1;
         break;
     }
   }
  }
  else *rcodeP = 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int RADIX_NUMBER ( int  ch) [static]
int readFont ( char *  env)

Definition at line 196 of file fontfcn.c.

{
  int rcode;
  /* int memscale = 2; */ /* initially, try twice just like we used to ... */
 
  /* restore the virtual memory and eliminate old font */
  
  resetFont(env);
  /* This will load the font into the FontP */
 
  rcode = scan_font(FontP);
  return(rcode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int REAL ( int  ch) [static]

Definition at line 350 of file encoding.c.

Here is the caller graph for this function:

Definition at line 1205 of file objects.c.

{
       return;
}
void resetFont ( char *  env)

Definition at line 166 of file fontfcn.c.

{
 
  vm_next =  FontP->vm_start;
  vm_free = vm_size - ( vm_next - vm_base);
  FontP->Subrs.len = 0;
  FontP->Subrs.data.stringP = NULL;
  FontP->CharStringsP = NULL;
  FontP->Private = NULL;
  FontP->fontInfoP = NULL;
  FontP->BluesP = NULL;
  /* This will load the font into the FontP */
  strncpy(CurFontName,env, MAXPATHLEN);
  CurFontName[MAXPATHLEN-1] = '\0';
  FontP->FontFileName.len = strlen(CurFontName);
  FontP->FontFileName.data.nameP = CurFontName;
  T1io_reset();

  return(0);
  
}

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned short rest ( void  ) [static]
static void Return ( void  ) [static]
static struct segment* ReverseSubPath ( struct segment p) [static, read]
static int RIGHT_ANGLE ( int  ch) [static]
static int RIGHT_BRACE ( int  ch) [static]
static int RIGHT_BRACKET ( int  ch) [static]
static int RIGHT_PAREN ( int  ch) [static]
static void RLineTo ( double  dx,
double  dy 
) [static]
static void RMoveTo ( double  dx,
double  dy 
) [static]
static void RRCurveTo ( double  dx1,
double  dy1,
double  dx2,
double  dy2,
double  dx3,
double  dy3 
) [static]
static void save_digraph ( int  ch) [static]
static void Sbw ( double  sbx,
double  sby,
double  wx,
double  wy 
) [static]
int scan_font ( struct ps_font FontP)

Definition at line 1216 of file scanfont.c.

{
 
 
  char   filename[MAXPATHLEN];
  FILE   *fileP;
  char   *nameP;
  int    namelen;
 
    /* copy the filename and remove leading or trailing blanks */
    /* point to name and search for leading blanks */
    nameP= FontP->FontFileName.data.nameP;
    namelen  = FontP->FontFileName.len;
    while (nameP[0] == ' ') {
        nameP++;
        namelen--;
    }
    /* now remove any trailing blanks */
    while ((namelen>0) && ( nameP[namelen-1] == ' ')) {
      namelen--;
    }
    if ( namelen >= MAXPATHLEN ) {
      /* Hopefully, this will lead to a file open error */
      namelen = MAXPATHLEN - 1; /* - 1 added by SU */
    }
    strncpy(filename,nameP,namelen);
    filename[namelen] = '\0';
    /* file name is now constructed */
    inputFile.data.fileP = NULL;
    filterFile.data.fileP = NULL;
 
    inputP = &inputFile;
    if ((fileP = fopen(filename,"rb"))!=NULL) {
      objFormatFile(inputP,fileP);
    }
    else {
      return(SCAN_FILE_OPEN_ERROR);
    };
 
  WantFontInfo  = TRUE;
  InPrivateDict = FALSE;
  TwoSubrs      = FALSE;
  rc = BuildFontInfo(FontP);
#ifdef DEBUG_SCANFONT
  printf("BuildFontInfo(): retval=%d\n", rc);
#endif
  if (rc != 0) return(rc);
 
  /* Assume everything will be OK */
  rc       = 0;
 
  /* Loop until complete font is read  */
  do {
    /* Scan the next token */
    scan_token(inputP);

    /* ==> tokenLength, tokenTooLong, tokenType, and tokenValue are */
    /* now set */
 
    switch (tokenType) {
      case TOKEN_EOF:
      case TOKEN_NONE:
      case TOKEN_INVALID:
        /* in this case we are done */
        if (tokenTooLong) return(SCAN_OUT_OF_MEMORY);
        rc = SCAN_ERROR;
        break;
      case TOKEN_LITERAL_NAME:
            /* Look up the name */
            tokenStartP[tokenLength] = '\0';
           /* At this point we check for the font not being a
              Multiple Master Font. If it is, we return an error.
              (RMz, 01/29/1999) */
           if (strncmp(tokenStartP, "BlendAxisTypes", 14)==0){
             rc=SCAN_MMFONT;
             break;
           }
            if (InPrivateDict ) {
              if (0== strncmp(tokenStartP,"Subrs",5) ) {
                rc = BuildSubrs(FontP);
#ifdef DEBUG_SCANFONT
              printf("BuildSubrs(): retval=%d\n", rc);
#endif
                break;
              }
              if (0== strncmp(tokenStartP,"CharStrings",11) ) {
                rc = BuildCharStrings(FontP);
#ifdef DEBUG_SCANFONT
              printf("BuildCharstrings(): retval=%d\n", rc);
#endif
                if ( (rc == SCAN_OK) ||(rc == SCAN_END) ) {
                  fclose(inputP->data.fileP);
                  /* Build the Blues Structure */
                rc = GetType1Blues(FontP);
#ifdef DEBUG_SCANFONT
                printf("GetType1Blues(): retval=%d\n", rc);
#endif
                  /* whatever the return code, return it */
                  /* all the work is done. This is the normal exit.*/
                  return(rc);
                }
                break;
              }
              rc = FindDictValue(FontP->Private);
              /* we are not going to report errors */
              /* Sometimes the font file may test a value such as */
              /* testing to see if the font is alreadly loaded with */
              /* same UniqueID.  We would faile on /UniqueID get  */
              /* because we are expecting a int to follow UniqueID*/
              /* If the correct object type does not follow a Name*/
              /* then we will skip over it without reporting error*/
              rc = SCAN_OK;
              break;
            }   /* end of reading Private dictionary */
            else
              if (0== strncmp(tokenStartP,"Private",7) ) {
                InPrivateDict = TRUE;
                rc = BuildPrivate(FontP);
                break;
              }
              else
                if (WantFontInfo) {
                  rc = FindDictValue(FontP->fontInfoP);
                  /* we are not going to report errors */
                  rc = SCAN_OK;
                  break;
                }
        break;
      case TOKEN_NAME:
            if (0 == strncmp(tokenStartP,"eexec",5) ) {
             /* We check for the pfb-headers in I/O-module */ 
             filterFile.data.fileP = T1eexec(inputP->data.fileP);
             if (filterFile.data.fileP == NULL) {
              fclose(inputFile.data.fileP);
              /* SCAN_FILE_OPEN_ERROR replaced because at this point
                 a portion of the file has already been read successfully.
                 We hence have encountered a premature end of file
                 (2002-08-17, RMz). */
              return SCAN_FILE_EOF;
             }
             inputP = &filterFile;
             
             WantFontInfo = FALSE;
            }
        break;
    }
 
  }
  while (rc ==0);
  fclose(inputP->data.fileP);
  if (tokenTooLong) return(SCAN_OUT_OF_MEMORY);
  return(rc);
}

Here is the call graph for this function:

void scan_token ( struct ps_obj inputP)

Definition at line 1157 of file token.c.

{
  int ch;
  unsigned char *stateP = s0;
  unsigned char entry;
  int (*actionP)();
 
  /* Define input source */
  inputFileP = inputP->data.fileP;
  if (inputFileP == NULL)  {
    tokenType = TOKEN_EOF;
    return;
  }
 
  /* Ensure enough space for most cases
   * (so we don't have to keep checking)
   * The length needs to cover the maximum number
   * of save_unsafe_ch() calls that might be executed.
   * That number is 11 (a sign and 10 decimal digits, e.g.,
   * when scanning -2147483648), but use MAX_NAME_LEN
   * in case someone changes that without checking.
   */
  if (vm_free_bytes() < (MAX_NAME_LEN)) {
     if (!(vm_init())) {
        tokenLength = 0;
        tokenTooLong = TRUE;
        tokenType = TOKEN_NONE;
        tokenValue.integer = 0;
        return;
     }
  }
 
  tokenStartP = vm_next_byte();
 
  /* Reset token */
  tokenCharP = tokenStartP;
  tokenTooLong = FALSE;
 
  /* Scan one token */
  ch = next_ch();
  do {
    entry = stateP[ch];
    stateP = classActionTable[entry].nextStateP;
    actionP = classActionTable[entry].actionRoutineP;
    ch = (*actionP)(ch);
  } while(ch != DONE);
 
 
  /* Return results */
  tokenLength = tokenCharP - tokenStartP;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void Seac ( double  asb,
double  adx,
double  ady,
unsigned char  bchar,
unsigned char  achar 
) [static]
fontfcn c int SearchDictName ( struct ps_dict dictP,
struct ps_obj keyP 
)

Definition at line 132 of file fontfcn.c.

{
  int i,n;
 
 
  n =  dictP[0].key.len;
  for (i=1;i<=n;i++) {          /* scan the intire dictionary */
    if (
        (dictP[i].key.len  == keyP->len )
        &&
        (strncmp(dictP[i].key.data.valueP,
                 keyP->data.valueP,
                 keyP->len) == 0
        )
       ) return(i);
  }
  return(0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static short SearchXofY ( struct edgelist edge,
short  y 
) [static]
static void SetCurrentPoint ( double  x,
double  y 
) [static]
static int skip_comment ( int  ch) [static]

Definition at line 842 of file ctangle.c.

{
char c;
while(1){
if(loc> limit){
if(is_long_comment){
if(get_line())return(comment_continues= 1);
else{
err_print("! Input ended in mid-comment");

return(comment_continues= 0);
}
}
else return(comment_continues= 0);
}
c= *(loc++);
if(is_long_comment&&c=='*'&&*loc=='/'){
loc++;return(comment_continues= 0);
}
if(c=='@'){
if(ccode[(eight_bits)*loc]==new_section){
err_print("! Section name ended in mid-comment");loc--;

return(comment_continues= 0);
}
else loc++;
}
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int skip_space ( int  ch) [static]
int snum ( struct _iobuf *  fp,
int  size 
)
static struct edgelist* splitedge ( struct edgelist list,
short  y 
) [static, read]
static struct segment* SplitPath ( struct segment anchor,
struct segment before 
) [static, read]
static void StartDecrypt ( void  ) [static]
static struct segment* StepBezierRecurse ( struct bezierinfo I,
long  xA,
long  yA,
long  xB,
long  yB,
long  xC,
long  yC,
long  xD,
long  yD 
) [static, read]
double stepsize ( double  x)

Definition at line 138 of file mag.c.

{  double s;
   s=(log(x)-log(DPI))/log(1.2);
   if (s>=0) return floor(10*s+0.5)/10;
   return -floor(10*(-s)+0.5)/10;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int strexpr ( int result,
char *  expression 
)

Definition at line 276 of file strexpr.c.

                                           {
       struct val     *vp;

       pexpr = expression;

        nexttoken();
       vp = eval3();

       if (token != EOI) return 1;

       if (vp->type == integer || to_integer(vp)) {
              *result = vp->u.i;
              return 0;
       }

        return 1;
}

Here is the caller graph for this function:

char* string ( char *  s)
static int STRING ( int  ch) [static]
struct edgelist* swathrightmost ( struct edgelist before,
struct edgelist edge 
) [read]

Definition at line 1254 of file regions.c.

{
       register struct edgelist *after;
 
       after = before->link;
 
       while (after != NULL && TOP(after) == TOP(edge)) {
               before = after;
               after = after->link;
       }
 
       return(before);
 
}
struct edgelist* swathxsort ( struct edgelist before0,
struct edgelist edge 
) [read]

Definition at line 1021 of file regions.c.

{
       register struct edgelist *before;
       register struct edgelist *after;
       register pel y=0;
 
       before = before0;
       after = before->link;
 
       while (after != NULL && TOP(after) == TOP(edge)) {
 
               register pel *x1,*x2;
 
               y = TOP(edge);
               x1 = after->xvalues;
               x2 = edge->xvalues;
 
               while (y < BOTTOM(edge) && *x1 == *x2) {
                       x1++; x2++; y++;
               }
               if (y >= BOTTOM(edge)) {
                       edge->flag |= ISAMBIGUOUS(ON);
                       after->flag |= ISAMBIGUOUS(ON);
                       break;
               }
 
               if (*x1 >= *x2)
                       break;
 
               before = after;
               after = after->link;
       }
 
/*
At this point, 'edge' is between 'before' and 'after'.  If 'edge' didn't
cross either of those other edges, we would be done.  We check for
crossing.  If it does cross, we split the problem up by calling SortSwath
recursively with the part of the edge that is below the crossing point:
*/
{
       register int h0,h;    /* height of edge--number of scans              */
 
       h0 = h = BOTTOM(edge) - y;
       y -= TOP(edge);
 
       if (h0 <= 0) {
               IfTrace0((RegionDebug>0),"swathxsort: exactly equal edges\n");
               return(before);
       }
 
       if (TOP(before) == TOP(edge))
               h -= crosses(h, &before->xvalues[y], &edge->xvalues[y]);
       if (after != NULL && TOP(after) == TOP(edge))
               h -= crosses(h, &edge->xvalues[y], &after->xvalues[y]);
 
       if (h < h0) {
               SortSwath(before0->link,
                         splitedge(edge, TOP(edge) + y + h),
                         swathxsort);
 
       }
}
 
       return(before);
}

Here is the call graph for this function:

void t1_abort ( char *  str)

Definition at line 1082 of file objects.c.

{
       LineIOTrace = TRUE;
       IfTrace1(TRUE,"\nABORT: reason='%s'\n", str);
       TraceClose();
       test = 1/test;
       exit(99);
}

Here is the call graph for this function:

objects c struct xobject* t1_Allocate ( int  size,
struct xobject template,
int  extra 
) [read]

Definition at line 296 of file objects.c.

{
 
       register struct xobject *r;
 
       /*
       * round up 'size' and 'extra' to be an integer number of 'long's:
       */
       size = (size + sizeof(LONG) - 1) & -sizeof(LONG);
       extra = (extra + sizeof(LONG) - 1) & -sizeof(LONG);
       if (size + extra <= 0)
               abort("Non-positive allocate?", 15);
       r = (struct xobject *) malloc(size + extra);
 
       while (r == NULL) {
               if (!GimeSpace()) {
                       IfTrace1(TRUE, "malloc attempted %d bytes.\n",
                                           size + extra);
                       abort("We have REALLY run out of memory", 16);
               }
               r = (struct xobject *) malloc(size + extra);
       }
 
       /*
       * copy the template into the new memory:
       */
       if (template != NULL) {
       /* Added references count decrement if template is not permanent.
          This is for the case where Allocate is called by a Dupxxxx
          function, which was in turn called by Unique(). (PNM)        */
               if (!ISPERMANENT(template->flag))
                   --template->references;
               LONGCOPY(r, template, size);
               r->flag &= ~(ISPERMANENT(ON) | ISIMMORTAL(ON));
       /* added reference field 3-2-6-91 PNM */
               r->references = 1;
       }
       else {
               register char **p1;
 
               for (p1=(char **)r; size > 0; size -= sizeof(char *))
                       *p1++ = NULL;
       }
 
       if (MemoryDebug > 1) {
               register int *L;
               L = (int *) r;
               IfTrace4(TRUE, "Allocating at %p: %x %x %x\n",
                                           L, L[-1], L[0], L[1]);
       }
       return(r);
}

Here is the call graph for this function:

void t1_ApplyContinuity ( struct region R)
struct xobject* t1_ArgErr ( char *  str,
struct xobject obj,
struct xobject ret 
) [read]
struct beziersegment* t1_Bezier ( struct segment B,
struct segment C,
struct segment D 
) [read]
struct segment* t1_BoundingBox ( short  h,
short  w 
) [read]
struct region* t1_BoxClip ( struct region R,
short  xmin,
short  ymin,
short  xmax,
short  ymax 
) [read]
struct segment* t1_BoxPath ( struct XYspace S,
int  h,
int  w 
) [read]
void t1_Bresenham ( short edgeP,
long  x1,
long  y1,
long  x2,
long  y2 
)
void t1_ChangeDirection ( int  type,
struct region R,
long  x,
long  y,
long  dy 
)
void t1_CloseHints ( struct fractpoint hintP)
struct segment* t1_ClosePath ( struct segment p0,
int  lastonly 
) [read]

Definition at line 603 of file paths.c.

{
       register struct segment *p,*last=NULL,*start;  /* used in looping through path */
       register fractpel x,y;  /* current position in path                   */
       register fractpel firstx=0,firsty=0;  /* start position of sub path       */
       register struct segment *lastnonhint=NULL;  /* last non-hint segment in path */
 
       IfTrace1((MustTraceCalls),"ClosePath(%p)\n", p0);
       if (p0 != NULL && p0->type == TEXTTYPE)
               return(UniquePath(p0));
       if (p0->type == STROKEPATHTYPE)
               return((struct segment *)Unique(p0));
       /*
       * NOTE: a null closed path is different from a null open path
       * and is denoted by a closed (0,0) move segment.  We make
       * sure this path begins and ends with a MOVETYPE:
       */
       if (p0 == NULL || p0->type != MOVETYPE)
               p0 = JoinSegment(NULL, MOVETYPE, 0, 0, p0);
       TYPECHECK("ClosePath", p0, MOVETYPE, NULL, (0), struct segment *);
       if (p0->last->type != MOVETYPE)
               p0 = JoinSegment(p0, MOVETYPE, 0, 0, NULL);
 
       p0 = UniquePath(p0);
 
/*
We now begin a loop through the path,
incrementing current 'x' and 'y'.  We are searching
for MOVETYPE segments (breaks in the path) that are not already closed.
At each break, we insert a close segment.
*/
       for (p = p0, x = y = 0, start = NULL;
            p != NULL;
            x += p->dest.x, y += p->dest.y, last = p, p = p->link)
       {
 
               if (p->type == MOVETYPE) {
                       if (start != NULL && (lastonly?p->link==NULL:TRUE) &&
                             !(ISCLOSED(start->flag) && LASTCLOSED(last->flag))) {
                               register struct segment *r;  /* newly created */
 
                               start->flag |= ISCLOSED(ON);
                               r = PathSegment(LINETYPE, firstx - x,
                                                         firsty - y);
                               INSERT(last, r, p);
                               r->flag |= LASTCLOSED(ON);
                               /*< adjust 'last' if possible for a 0,0 close >*/
{
 
#define   CLOSEFUDGE    3    /* if we are this close, let's change last segment */
 
       if (r->dest.x != 0 || r->dest.y != 0) {
               if (r->dest.x <= CLOSEFUDGE && r->dest.x >= -CLOSEFUDGE
                    && r->dest.y <= CLOSEFUDGE && r->dest.y >= -CLOSEFUDGE) {
                       IfTrace2((PathDebug),
                               "ClosePath forced closed by (%d,%d)\n",
                                      r->dest.x, r->dest.y);
                       lastnonhint->dest.x += r->dest.x;
                       lastnonhint->dest.y += r->dest.y;
                       r->dest.x = r->dest.y = 0;
               }
       }
}
                               if (p->link != NULL) {
                                       p->dest.x += x - firstx;
                                       p->dest.y += y - firsty;
                                       x = firstx;
                                       y = firsty;
                               }
                       }
                       start = p;
                       firstx = x + p->dest.x;
                       firsty = y + p->dest.y;
               }
               else if (p->type != HINTTYPE)
                       lastnonhint = p;
       }
       return(p0);
}
void t1_Consume ( int  n,
  ... 
)
struct xobject* t1_Copy ( struct xobject obj) [read]

Definition at line 538 of file objects.c.

{
       if (obj == NULL)
               return(NULL);
 
       if (ISPATHTYPE(obj->type))
               obj = (struct xobject *) CopyPath(obj);
       else
               switch (obj->type) {
                   case SPACETYPE:
                       obj = (struct xobject *) CopySpace(obj); break;
                   case FONTTYPE:
                       obj = (struct xobject *) CopyFont(obj); break;
                   case REGIONTYPE:
                       obj = (struct xobject *) CopyRegion(obj); break;
                   case PICTURETYPE:
                       obj = (struct xobject *) CopyPicture(obj); break;
                   case LINESTYLETYPE:
                       obj = (struct xobject *) CopyLineStyle(obj); break;
                   case STROKEPATHTYPE:
                       obj = (struct xobject *) CopyStrokePath(obj); break;
                   case CLUTTYPE:
                       obj = (struct xobject *) CopyCLUT(obj); break;
                   default:
                       return(ArgErr("Copy: invalid object", obj, NULL));
               }
 
        return(obj);
}
paths c struct segment* t1_CopyPath ( struct segment p0) [read]
struct region* t1_CopyRegion ( struct region area) [read]
spaces c struct XYspace* t1_CopySpace ( struct XYspace S) [read]
struct xobject* t1_Destroy ( struct xobject obj) [read]
struct segment* t1_DropSegment ( struct segment path) [read]
void t1_DumpArea ( struct region area)
void t1_DumpEdges ( struct edgelist edges)
void t1_DumpPath ( struct segment p)
void t1_DumpSpace ( struct XYspace S)
void t1_DumpText ( struct segment foo)
struct xobject* t1_Dup ( struct xobject obj) [read]

Definition at line 493 of file objects.c.

{
       register char oldflag;   /* copy of original object's flag byte */
 
       IfTrace1((MustTraceCalls),"Dup(%p)\n", obj);
 
       if (obj == NULL)
               return(NULL);
       /* An immortal object must be Copy'ed, so that we get a mortal
          copy of it, since we try not to destroy immortal objects. */
       if (ISIMMORTAL(obj->flag))
           return(Copy(obj));
 
       /* if incrementing the reference count doesn't cause the count
          to wrap, simply return the object with the count bumped. Note
          that the RefRoll macro increments the count to perform the
          rollover check, so we must decrement the count. */
       if (RefRoll(obj))
           return(obj);
 
       /* that didn't work out, so put the count back and call Copy(). */
       --obj->references;
       oldflag = obj->flag;
       obj = Copy(obj);
       if (ISPERMANENT(oldflag))
               obj = Permanent(obj);
       return(obj);
}
char* t1_ErrorMsg ( void  )
void t1_FormatFP ( char *  str,
long  fpel 
)
void t1_Free ( struct xobject obj)
struct segment* t1_HeadSegment ( struct segment path) [read]
struct hintsegment* t1_Hint ( struct XYspace S,
double  ref,
double  width,
char  orientation,
char  hinttype,
char  adjusttype,
char  direction,
int  label 
) [read]
struct segment* t1_ILoc ( struct XYspace S,
int  x,
int  y 
) [read]
hints c void t1_InitHints ( void  )
struct region* t1_Interior ( struct segment p,
int  fillrule 
) [read]
struct segment* t1_Join ( struct segment p1,
struct segment p2 
) [read]
struct segment* t1_JoinSegment ( struct segment before,
int  type,
long  x,
long  y,
struct segment after 
) [read]
void t1_KillPath ( struct segment p)
ps2pk c psargs c psearch c regions c void t1_KillRegion ( struct region area)
struct segment* t1_Line ( struct segment P) [read]
struct segment* t1_Loc ( struct XYspace S,
double  x,
double  y 
) [read]

Definition at line 207 of file paths.c.

{
       register struct segment *r;
 
 
       IfTrace3((MustTraceCalls),"..Loc(S=%p, x=%f, y=%f)\n", S, x, y);
 
       r = (struct segment *)Allocate(sizeof(struct segment), &movetemplate, 0);
       TYPECHECK("Loc", S, SPACETYPE, r, (0), struct segment *);
 
       r->last = r;
       r->context = S->context;
       (*S->convert)(&r->dest, S, x, y);
       ConsumeSpace(S);
       return(r);
}
void t1_MInvert ( double(*)  M[2],
double(*)  Mprime[2] 
)
void t1_MMultiply ( double(*)  A[2],
double(*)  B[2],
double(*)  C[2] 
)
void t1_MoreWorkArea ( struct region R,
long  x1,
long  y1,
long  x2,
long  y2 
)
void t1_MoveEdges ( struct region R,
long  dx,
long  dy 
)
void t1_PathDelta ( struct segment p,
struct fractpoint pt 
)
struct segment* t1_PathSegment ( int  type,
long  x,
long  y 
) [read]
struct segment* t1_PathXform ( struct segment p0,
struct XYspace S 
) [read]
struct xobject* t1_Permanent ( struct xobject obj) [read]

Definition at line 404 of file objects.c.

{
       IfTrace1((MustTraceCalls),"Permanent(%p)\n", obj);
 
       if ( (obj != NULL) && ( !(ISPERMANENT(obj->flag)) ) )
       {
       /* there is a non-NULL, temporary object to be made permanent.
          If there are multiple references to this object, first get
          a new COPY().
          Note also that we have to decrement the reference count if
          we do a Copy() here, because we are consuming the temporary
          argument passed, and returning a unique, permanent one.
       */
           if ( obj->references > 1)
           {
               obj = Copy(obj);
           }
           /* now set the permanent flag, and increment the reference
              count, since a temporary object has now become permanent. */
           obj->references++;
           obj->flag |= ISPERMANENT(ON);
       }
       return(obj);
}
struct segment* t1_Phantom ( struct xobject obj) [read]

Definition at line 43 of file t1snap.c.

{
       struct fractpoint pt; /* handle size will built here                  */
 
       if (obj == NULL)
               pt.x = pt.y = 0;
       else
               PathDelta(obj, &pt);
 
       return(PathSegment(MOVETYPE, pt.x, pt.y));
}
void t1_Pragmatics ( char *  username,
int  value 
)
void t1_ProcessHint ( struct hintsegment hP,
long  currX,
long  currY,
struct fractpoint hintP 
)
void t1_PseudoSpace ( struct XYspace S,
double(*)  M[2] 
)
void t1_QueryBounds ( struct segment p0,
struct XYspace S,
double *  xminP,
double *  yminP,
double *  xmaxP,
double *  ymaxP 
)
void t1_QueryLoc ( struct segment P,
struct XYspace S,
double *  xP,
double *  yP 
)
void t1_QueryPath ( struct segment path,
int typeP,
struct segment **  Bp,
struct segment **  Cp,
struct segment **  Dp,
double *  fP 
)
void t1_QuerySpace ( struct XYspace S,
double *  cxxP,
double *  cyxP,
double *  cxyP,
double *  cyyP 
)
struct segment* t1_RegionBounds ( struct region R) [read]
struct segment* t1_Reverse ( struct segment p) [read]
struct segment* t1_ReverseSubPaths ( struct segment p) [read]
struct xobject* t1_Scale ( struct xobject obj,
double  sx,
double  sy 
) [read]

Definition at line 775 of file spaces.c.

{
       DOUBLE M[2][2];
       IfTrace3((MustTraceCalls),"Scale(%p, %f, %f)\n", obj, sx, sy);
       M[0][0] = sx;
       M[1][1] = sy;
       M[1][0] = M[0][1] = 0.0;
       ConsiderContext(obj, M);
       return(Xform(obj, M));
}

Here is the call graph for this function:

struct xobject* t1_Snap ( struct segment p) [read]

Definition at line 62 of file t1snap.c.

{
       struct fractpoint pt; /* for finding length of path                   */
 
       if (p == NULL)
               return(NULL);
       p = UniquePath(p);
 
       PathDelta(p, &pt);
       if (p->last->type == MOVETYPE) {
               p->last->dest.x -= pt.x;
               p->last->dest.y -= pt.y;
       }
       else
               p = JoinSegment(p, MOVETYPE, -pt.x, -pt.y, NULL);
       return((struct xobject *)p);
}
struct edgelist* t1_SortSwath ( struct edgelist anchor,
struct edgelist edge,
struct edgelist *(*)(void swathfcn 
) [read]
struct segment* t1_StepBezier ( struct region R,
long  xA,
long  yA,
long  xB,
long  yB,
long  xC,
long  yC,
long  xD,
long  yD 
) [read]
lines c void t1_StepLine ( struct region R,
long  x1,
long  y1,
long  x2,
long  y2 
)
struct segment* t1_SubLoc ( struct segment p1,
struct segment p2 
) [read]
struct edgelist* t1_SwathUnion ( struct edgelist before0,
struct edgelist edge 
) [read]
struct xobject* t1_Transform ( struct xobject obj,
double  cxx,
double  cyx,
double  cxy,
double  cyy 
) [read]

Definition at line 753 of file spaces.c.

{
       DOUBLE M[2][2];
 
       IfTrace1((MustTraceCalls),"Transform(%p,", obj);
       IfTrace4((MustTraceCalls)," %f %f %f %f)\n", cxx, cyx, cxy, cyy);
 
       M[0][0] = cxx;
       M[0][1] = cyx;
       M[1][0] = cxy;
       M[1][1] = cyy;
       ConsiderContext(obj, M);
       return(Xform(obj, M));
}

Here is the call graph for this function:

struct xobject* t1_TypeErr ( char *  name,
struct xobject obj,
int  expect,
struct xobject ret 
) [read]
void t1_UnConvert ( struct XYspace S,
struct fractpoint pt,
double *  xp,
double *  yp 
)
struct xobject* t1_Unique ( struct xobject obj) [read]

Definition at line 734 of file objects.c.

{
    /* if the original object is not already unique, make a unique
       copy...Note also that if the object was not permanent, we must
       consume the old handle! 3-26-91 PNM
       NOTE : consumption of the old handle moved to Allocate. 4-18-91 */
    if (!obj || obj->references == 1)
        return(obj);
 
    obj = Copy(obj);
    /* and make sure we return a temporary object ! */
    if (ISPERMANENT(obj->flag))
    {
        obj->flag &= ~ISPERMANENT(ON);
        obj->references--;
    }
    return(obj);
}
void t1_UnJumble ( struct region region)
struct xobject* t1_Xform ( struct xobject obj,
double(*)  M[2] 
) [read]
int T1Close ( struct F_FILE f)

Definition at line 388 of file t1io.c.

{
  if (f->b_base == NULL) return 0;  /* already closed */
  f->b_base = NULL;  /* no valid stream */
  return close(f->fd);
} /* end Close */
static int T1Decrypt ( unsigned char *  p,
int  len 
) [static]

Definition at line 468 of file t1io.c.

{
  int n;
  int H=0, L=0;
  unsigned char *inp = p;
  unsigned char *tblP;
 
#ifdef DEBUG_DECRYPTION
  printf("T1_Decrypt(): called with len=%d\n",len);
#endif
  if (asc) {
    if (haveextrach) {
      H = extrach;
      tblP = LowHexP;
    }
    else tblP = HighHexP;
    for (n=0; len>0; len--) {
      L = tblP[*inp++];
#ifdef DEBUG_DECRYPTION
      printf("L=0x%X, %d, inp=%c (%d)\n", L,L, *(inp-1), *(inp-1));
#endif
      if (L == HWHITE_SPACE) {
#ifdef DEBUG_DECRYPTION     
       printf("continue\n");
#endif
       continue;
      }
      if (L > LAST_HDIGIT) {
#ifdef DEBUG_DECRYPTION
       printf("L=0x%X, --> break\n", L);
#endif
       break;
      }
      
      if (tblP == HighHexP) { /* Got first hexit value */
        H = L;
        tblP = LowHexP;
      } else { /* Got second hexit value; compute value and store it */
        n++;
        tblP = HighHexP;
        H |= L;
        /* H is an int, 0 <= H <= 255, so all of this will work */
        *p++ = H ^ (r >> 8);
        r = (H + r) * c1 + c2;
      }
    }
    if (tblP != HighHexP) {  /* We had an odd number of hexits */
      extrach = H;
      haveextrach = 1;
    } else haveextrach = 0;
#ifdef DEBUG_DECRYPTION
    printf("T1_Decrypt(): Decrypted %d bytes\n",n);
#endif
    return n;
  } else {
    for (n = len; n>0; n--) {
      H = *inp++;
      *p++ = H ^ (r >> 8);
      r = (H + r) * c1 + c2;
    }
    return len;
  }
} /* end Decrypt */

Here is the call graph for this function:

struct F_FILE* T1eexec ( struct F_FILE f) [read]

Definition at line 398 of file t1io.c.

{
  int i;
  int H;
  
  unsigned char *p;
  int testchar;
  unsigned char randomP[8];
 
  r = 55665;  /* initial key */
  asc = 1;    /* indicate ASCII form */

#ifdef DEBUG_DECRYPTION
  printf("T1eexec(1): first 20 bytes=%.20s, b_cnt=%d\n", f->b_ptr, f->b_cnt);
#endif

  /* As the very first action we check the first byte against 0x0a.
     This mmight happen in context with the T1gets() function for
     pfa files that use DOSian linefeed style. If that character appears
     here, we absorb it (see also T1Gets()!). 
  */
  if ( ( testchar = T1Getc( f)) != 0x0a )
    T1Ungetc( testchar, f);
    
  /* Consume the 4 random bytes, determining if we are also to
     ASCIIDecodeHex as we process our input.  (See pages 63-64
     of the Adobe Type 1 Font Format book.)  */

  /* Skipping over initial white space chars has been removed since
     it could lead to unprocessable pfb-fonts if accindentally the
     first cipher text byte was of the class HWHITE_SPACE.
     Instead, we just read ahead, this should suffice for any
     Type 1 font program. (RMz, 08/02/1998) */

  /* If ASCII, the next 7 chars are guaranteed consecutive */
  randomP[0] = getc(f);  /* store first non white space char */
  fread(randomP+1, 1, 3, f);  /* read 3 more, for a total of 4 */
  /* store first four chars */
  for (i=0,p=randomP; i<4; i++) {  /* Check 4 valid ASCIIEncode chars */
    if (HighHexP[*p++] > LAST_HDIGIT) {  /* non-ASCII byte */
      asc = 0;
      break;
    }
  }
  if (asc) {  /* ASCII form, convert first eight bytes to binary */
    fread(randomP+4, 1, 4, f);  /* Need four more */
    for (i=0,p=randomP; i<4; i++) {  /* Convert */
      H = HighHexP[*p++];
      randomP[i] = H | LowHexP[*p++];
    }
  }
  
  /* Adjust our key */
  for (i=0,p=randomP; i<4; i++) {
    r = (*p++ + r) * c1 + c2;
  }

  /* Decrypt the remaining buffered bytes */
  f->b_cnt = T1Decrypt(f->b_ptr, f->b_cnt);
  Decrypt = 1;
  
#ifdef DEBUG_DECRYPTION
  printf("T1eexec(2): first 120 bytes=%.120s, b_cnt=%d\n", f->b_ptr, f->b_cnt);
#endif
  
  return (feof(f))?NULL:f;
} /* end eexec */

Here is the call graph for this function:

static int T1Fill ( struct F_FILE f) [static]

Definition at line 537 of file t1io.c.

{
  int rc,i;
  static unsigned char hdr_buf[6];

  if (starthex80){ /* we have a pfb-file -> be aware of pfb-blocks */
    if ( pfbblocklen-accu >= F_BUFSIZ){
      /* fill the buffer */
      rc = read(f->fd, f->b_base, F_BUFSIZ);
      bytecnt+=rc;
      accu +=rc;
    }
    else{
      if (pfbblocklen-accu>0){
       /* read the remaining of the pfb-block ... */
       rc = read(f->fd, f->b_base, pfbblocklen-accu);
       bytecnt +=rc;
       accu +=rc;
       /* ... and examine the next header */
       i=read(f->fd, hdr_buf, 6);
       bytecnt +=i;
       pfbblocklen=0;
       pfbblocklen += hdr_buf[2]&0xFF  ;
       pfbblocklen += (hdr_buf[3] & 0xFF)  <<8;
       pfbblocklen += (hdr_buf[4] & 0xFF)  <<16;
       pfbblocklen += (hdr_buf[5] & 0xFF)  <<24;
#ifdef DEBUG_PFB_BLOCKS     
       printf("t1io: New segment, length=%d, type=%d\n",
              pfbblocklen, hdr_buf[1]);
#endif 
       accu=0;
      }
      else{
       /* We are at the beginning of a new block ->
          examine header */
       i=read(f->fd, hdr_buf, 6);
       pfbblocklen=0;
       pfbblocklen += hdr_buf[2]&0xFF  ;
       pfbblocklen += (hdr_buf[3] & 0xFF)  <<8;
       pfbblocklen += (hdr_buf[4] & 0xFF)  <<16;
       pfbblocklen += (hdr_buf[5] & 0xFF)  <<24;
#ifdef DEBUG_PFB_BLOCKS     
       printf("t1io: New segment, length=%d, type=%d\n",
              pfbblocklen, hdr_buf[1]);
#endif
       accu=0;
       /* header read, now fill the buffer */
       if (pfbblocklen-accu >= F_BUFSIZ){
         rc = read(f->fd, f->b_base, F_BUFSIZ);
         accu +=rc;
       }
       else{
         /* we have the unusual case that the pfb-block size is
            shorter than F_BUFSIZ -> Read this block only */
         rc = read(f->fd, f->b_base, pfbblocklen);
         accu +=rc;
       }
      }
    }
  }
  else{
    /* We have a pfa-file -> read straight ahead and fill buffer */
    rc = read(f->fd, f->b_base, F_BUFSIZ);
  }
  
  /* propagate any error or eof to current file */
  if (rc <= 0) {
    if (rc == 0)    /* means EOF */
      f->flags |= FIOEOF;
    else {
      f->error = (short)-rc;
      f->flags |= FIOERROR;
      rc = 0;
    }
  }

  f->b_ptr = f->b_base;
#ifdef DEBUG_DECRYPTION
  printf("T1_Fill(): read %d bytes\n", rc);
#endif
  
  if (Decrypt){
    rc = T1Decrypt(f->b_base, rc);
#ifdef DEBUG_DECRYPTION
    printf("T1_Fill(): decrypted %d bytes\n", rc);
#endif
  }
  
  return rc;
} /* end Fill */

Here is the call graph for this function:

void T1FillFontInfo ( struct _Font pFont,
struct _FontScalable Vals,
char *  Filename,
char *  Fontname 
)
int T1FillVals ( struct _FontScalable vals)

Here is the caller graph for this function:

int T1Getc ( struct F_FILE f)

Definition at line 134 of file t1io.c.

{
  if (f->b_base == NULL) return EOF;  /* already closed */
 
  if (f->flags & UNGOTTENC) { /* there is an ungotten c */
    f->flags &= ~UNGOTTENC;
    return (int) f->ungotc;
  }
 
  if (f->b_cnt == 0)  /* Buffer needs to be (re)filled */
    f->b_cnt = T1Fill(f);
  if (f->b_cnt > 0) return (f->b_cnt--, (int) *(f->b_ptr++));
  else {
    f->flags |= FIOEOF;
    return EOF;
  }
} /* end Getc */

Definition at line 403 of file t1info.c.

{
    int         i;
    fontProp   *t;
 
    i = sizeof(fontNamePropTable) / sizeof(fontProp);
    for (t = fontNamePropTable; i; i--, t++)
        t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE);
    i = sizeof(extraProps) / sizeof(fontProp);
    for (t = extraProps; i; i--, t++)
        t->atom = MakeAtom(t->name, (unsigned) strlen(t->name), TRUE);
}

Here is the caller graph for this function:

t1io c struct F_FILE* T1Open ( char *  fn,
char *  mode 
) [read]

Definition at line 92 of file t1io.c.

{
  F_FILE *of = &TheFile;
  char c;
  
 
  Decrypt = 0;
  eexec_startOK=0;
  eexec_endOK=0;
 
#ifndef O_BINARY
#  define O_BINARY 0x0
#endif
 
  /* We know we are only reading */
  if ((of->fd=open(fn, O_RDONLY | O_BINARY)) < 0) return NULL;

  /* We check for pfa/pfb file */
  if (read( of->fd, &c, 1)!=1) {
    close( of->fd);
    return(NULL);
  }
  else
    if (c==(char)0x80){
      starthex80=1;
    }
  lseek( of->fd, 0, SEEK_SET);
  
  /* Initialize the buffer information of our file descriptor */
  of->b_base = TheBuffer;
  of->b_size = F_BUFSIZ;
  of->b_ptr = NULL;
  of->b_cnt = 0;
  of->flags = 0;
  of->error = 0;
  haveextrach = 0;
  return &TheFile;
} /* end Open */

Here is the call graph for this function:

int T1Read ( char *  buffP,
int  size,
int  n,
struct F_FILE f 
)

Definition at line 350 of file t1io.c.

{
  int bytelen, cnt, i;
  F_char *p = (F_char *)buffP;
  int  icnt;         /* Number of characters to read */
 
  if (f->b_base == NULL) return 0;  /* closed */
  icnt = (size!=1)?n*size:n;  /* Number of bytes we want */
 
  if (f->flags & UNGOTTENC) { /* there is an ungotten c */
    f->flags &= ~UNGOTTENC;
    *(p++) = f->ungotc;
    icnt--; bytelen = 1;
  }
  else bytelen = 0;
 
  while (icnt > 0) {
    /* First use any bytes we have buffered in the stream buffer */
    if ((cnt=f->b_cnt) > 0) {
      if (cnt > icnt) cnt = icnt;
      for (i=0; i<cnt; i++) *(p++) = *(f->b_ptr++);
      f->b_cnt -= cnt;
      icnt -= cnt;
      bytelen += cnt;
    }
 
    if ((icnt == 0) || (f->flags & FIOEOF)) break;
 
    f->b_cnt = T1Fill(f);
  }
  return ((size!=1)?bytelen/size:bytelen);
} /* end Read */

Here is the call graph for this function:

int T1Ungetc ( int  c,
struct F_FILE f 
)

Definition at line 337 of file t1io.c.

{
  if (c != EOF) {
    f->ungotc = c;
    f->flags |= UNGOTTENC;  /* set flag */
    f->flags &= ~FIOEOF;    /* reset EOF */
  }
  return c;
} /* end Ungetc */
int to_integer ( struct val vp)

Definition at line 130 of file strexpr.c.

{
       int             r;

       if (vp->type == integer)
              return 1;

       if (is_integer(vp, &r)) {
              free(vp->u.s);
              vp->u.i = r;
              vp->type = integer;
              return 1;
       }

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void to_string ( struct val vp)

Definition at line 150 of file strexpr.c.

{
       char           *tmp;

       if (vp->type == string)
              return;

       tmp = malloc(25);
       if (tmp == NULL) fatal("Out of memory\n");
       sprintf(tmp, "%d", vp->u.i);
       vp->type = string;
       vp->u.s = tmp;
}

Here is the call graph for this function:

static int touches ( int  h,
short left,
short right 
) [static]
struct xobject* Type1Char ( char *  env,
struct XYspace S,
struct ps_obj charstrP,
struct ps_obj subrsP,
struct ps_obj osubrsP,
struct blues_struct bluesP,
int modeP 
) [read]

Definition at line 1765 of file type1.c.

{
  int Code;
 
  path = NULL;
  errflag = FALSE;
 
  /* Make parameters available to all Type1 routines */
  Environment = env;
  CharSpace = S; /* used when creating path elements */
  CharStringP = charstrP;
  SubrsP = subrsP;
  OtherSubrsP = osubrsP;
  ModeP = modeP;
 
    blues = bluesP;
 
  /* compute the alignment zones */
  ComputeAlignmentZones();
 
  StartDecrypt();
 
  ClearStack();
  ClearPSFakeStack();
  ClearCallStack();
 
  InitStems();
 
  currx = curry = 0;
  escapementX = escapementY = 0;
  sidebearingX = sidebearingY = 0;
  accentoffsetX = accentoffsetY = 0;
  wsoffsetX = wsoffsetY = 0;           /* No shift to preserve whitspace. */
  wsset = 0;                           /* wsoffsetX,Y haven't been set yet. */
 
  for (;;) {
    if (!DoRead(&Code)) break;
    Decode(Code);
    if (errflag) break;
  }
 
  FinitStems();
 
 
  /* Clean up if an error has occurred */
  if (errflag) {
    if (path != NULL) {
      Destroy(path); /* Reclaim storage */
      path = NULL;   /* Indicate that character could not be built */
    }
  }
 
  return((struct xobject *) path);
}

Here is the call graph for this function:

void Type1CloseFont ( struct _Font pFont)

Here is the caller graph for this function:

static void Type1Escape ( int  Code) [static]
static int Type1GetGlyphs ( struct _Font pFont,
unsigned long  count,
unsigned char *  chars,
int  charEncoding,
unsigned long *  glyphCount,
struct _CharInfo **  glyphs 
) [static]

Here is the caller graph for this function:

int Type1GetInfoScalable ( struct _FontPathElement fpe,
struct _FontInfo pInfo,
struct _FontEntry entry,
struct _FontName fontName,
char *  fileName,
struct _FontScalable Vals 
)
t1funcs c int Type1OpenScalable ( char **  ev,
struct _Font **  ppFont,
int  flags,
struct _FontEntry entry,
char *  fileName,
struct _FontScalable vals,
unsigned long  format,
unsigned long  fmask,
double  efactor,
double  slant 
)

Here is the caller graph for this function:

Definition at line 553 of file t1funcs.c.

{
    int i;
 
    T1InitStdProps();
    for (i=0; i < sizeof(renderers) / sizeof(FontRendererRec); i++)
            FontFileRegisterRenderer(&renderers[i]);
}

Here is the caller graph for this function:

static char* TypeFmt ( int  type) [static]
static int UnClose ( struct segment p0) [static]
static int Unwind ( struct edgelist area) [static]
encoding static c char* value_after ( char *  s,
char *  t 
) [static]
static void vertjoin ( struct edgelist top,
struct edgelist bottom 
) [static]
char* vm_alloc ( unsigned int  bytes)

Definition at line 83 of file util.c.

{
  char *answer;
 
  /* Align returned bytes to 64-bit boundary */
  bytes = (bytes + 7) & ~7;
  
  
  /* take space from what is left otherwise allocate another CHUNK */
  if (bytes > vm_free){
    if (!vm_init()) return NULL;
  }
  else{
    answer = vm_next;
    vm_free -= bytes;
    vm_next += bytes;
    return answer;
  }

  /* Never reached, but compiler is happy: */
  return NULL;
  
}

Here is the call graph for this function:

Here is the caller graph for this function:

util c int vm_init ( void  )

Definition at line 58 of file util.c.

{
  /* Check whether it is the first piece of memory for the
     current font or not. If so, simulate lacking memory to
     indicate that the font should be tried to load with a
     vitual memory twice as large!
     */
  if (vm_init_count>0){
    vm_init_count++;
    return(FALSE);
  }
  vm_init_count++;
  
  vm_next = vm_base = (char *) calloc( vm_init_amount, sizeof(char));

  if (vm_base != NULL) {
    vm_free = vm_init_amount;
    vm_size = vm_init_amount;
    tokenMaxP = vm_next_byte() + vm_init_amount;
    return(TRUE);
  }
  else
    return(FALSE);
}
static void VStem ( double  x,
double  dx 
) [static]
static void writeXofY ( struct edgelist e,
int  y,
int  x 
) [static]
char* Xalloc ( int  size)

Definition at line 509 of file t1test.c.

{
       extern char *malloc();
       return(malloc(size));
}

Here is the caller graph for this function:

void Xfree ( void  )

Definition at line 516 of file t1test.c.

{
       free();
}
t1stub c int xiStub ( void  )

Definition at line 35 of file t1stub.c.

{
       printf("xiStub called\n");
       abort("xiStub called", 48);
       return(0);
       
}
struct xobject* xiTemporary ( struct xobject obj) [read]

Definition at line 448 of file objects.c.

{
       IfTrace1((MustTraceCalls),"Temporary(%p)\n", obj);
 
       if (obj != NULL) {
               /* if it's already temporary, there's nothing to do. */
               if ISPERMANENT(obj->flag)
               {
               /* if there are multiple references to this object, get a
                  Copy we can safely alter. Recall that the reference count
                  is incremented for permanent objects.
                  Recall further that Copy returns an object with the
                  same flag state and a reference count of 2 (for PERMANENT
                  objects).
                  Thus, regardless of whether or not we need to copy a
                  permanent object, we still decrement its reference
                  count and reset the flag.
               */
                   if (obj->references != 2 || ISIMMORTAL(obj->flag))
                   {
               /* not unique; consume handle, get a temporary Copy! */
                       obj = Copy(obj);
                   }
               /* else decrement the reference count (since it's going from
                  permanent to temporary) and clear the flag. */
                   else {
                       obj->references--;
                       obj->flag &= ~ISPERMANENT(ON);
                   }
               }
       }
       return(obj);
}