Back to index

tetex-bin  3.0
Go to the documentation of this file.
00001 arith.c 
00002 /* void DLmult(struct *product,unsigned long u,unsigned long v); */
00003 /* void DLdiv(struct *quotient,unsigned long divisor); */
00004 /* void DLadd(struct *u,struct *v); */
00005 /* void DLsub(struct *u,struct *v); */
00006 extern long FPmult(long u,long v);
00007 extern long FPdiv(long dividend,long divisor);
00008 extern long FPstarslash(long a,long b,long c);
00009 basename.c 
00010 extern int main(int argc,char **argv );
00011 basics.c 
00012 extern void fatal(char *fmt,...);
00013 extern void msg(char *fmt,...);
00014 bstring.c 
00015 extern int memset(void *s,int c,int length);
00016 curves.c 
00017 extern int BezierTerminationTest(long xa,long ya,long xb,long yb,long xc,long yc,long xd,long yd);
00018 static struct segment *StepBezierRecurse(struct bezierinfo *I,long xA,long yA,long xB,long yB,long xC,long yC,long xD,long yD);
00019 extern struct segment *t1_StepBezier(struct region *R,long xA,long yA,long xB,long yB,long xC,long yC,long xD,long yD);
00020 emxrun.c 
00021 extern int main(int argc,char **argv );
00022 extern int emx_system(char *cmd);
00023 encoding.c 
00024 static char *value_after(char *s,char *t);
00025 extern int decimal(char *s);
00026 extern char nextsymbol(void);
00027 extern char *nextpsname(void);
00028 extern void getenc(char **fontname ,char **encname ,char **ev ,int *width);
00029 extern void addcc(char *name,int charcode);
00030 extern int getcc(char *name);
00031 extern char *string(char *s);
00032 extern void remove_string(void);
00033 filenames.c 
00034 static char *charptr(char *name,char c);
00035 extern int equal(char *s,char *t);
00036 extern char *extension(char *str);
00037 extern char *newname(char *name,char *ext);
00038 extern char *ps2pk_basename(char *str,char *suffix);
00039 extern int ps_resource(char *name);
00040 flisearch.c 
00041 extern int main(int argc,char **argv );
00042 extern int matching(char *font,int size);
00043 fontfcn.c 
00044 extern int SearchDictName(struct ps_dict *dictP,struct ps_obj *keyP);
00045 extern int initFont(void);
00046 extern void resetFont(char *env);
00047 extern int readFont(char *env);
00048 extern unsigned char *fontfcnB(unsigned char *S,unsigned char *code,int *lenP,int *mode);
00049 extern int fontfcnA(char *env,int *mode);
00050 extern void QueryFontLib(char *env,char *infoName,unsigned char *infoValue,int *rcodeP);
00051 hints.c 
00052 extern void t1_InitHints(void);
00053 extern void t1_CloseHints(struct fractpoint *hintP);
00054 static void ComputeHint(struct hintsegment *hP,long currX,long currY,struct fractpoint *hintP);
00055 extern void t1_ProcessHint(struct hintsegment *hP,long currX,long currY,struct fractpoint *hintP);
00056 static short SearchXofY(struct edgelist *edge,short y);
00057 static int ImpliedHorizontalLine(struct edgelist *e1,struct edgelist *e2,int y);
00058 static void FixSubPaths(struct region *R);
00059 static void DumpSubPaths(struct edgelist *anchor);
00060 static struct edgelist *before(struct edgelist *e);
00061 static void writeXofY(struct edgelist *e,int y,int x);
00062 static void CollapseWhiteRun(struct edgelist *anchor,short yblack,struct edgelist *left,struct edgelist *right,short ywhite);
00063 extern void t1_ApplyContinuity(struct region *R);
00064 lines.c 
00065 extern void t1_StepLine(struct region *R,long x1,long y1,long x2,long y2);
00066 extern void t1_Bresenham(short *edgeP,long x1,long y1,long x2,long y2);
00067 lspsres.c 
00068 mag.c 
00069 extern int main(int argc,char **argv );
00070 extern int fontsize(double x);
00071 extern double stepsize(double x);
00072 objects.c 
00073 extern struct xobject *t1_Allocate(int size,struct xobject *template,int extra);
00074 extern void t1_Free(struct xobject *obj);
00075 extern struct xobject *t1_Permanent(struct xobject *obj);
00076 extern struct xobject *xiTemporary(struct xobject *obj);
00077 extern struct xobject *t1_Dup(struct xobject *obj);
00078 extern struct xobject *t1_Copy(struct xobject *obj);
00079 extern struct xobject *t1_Destroy(struct xobject *obj);
00080 extern struct xobject *t1_Unique(struct xobject *obj);
00081 extern void t1_Pragmatics(char *username,int value);
00082 extern void t1_Consume(int n,...);
00083 extern struct xobject *t1_TypeErr(char *name,struct xobject *obj,int expect,struct xobject *ret);
00084 static char *TypeFmt(int type);
00085 static int ObjectPostMortem(struct xobject *obj);
00086 extern struct xobject *t1_ArgErr(char *str,struct xobject *obj,struct xobject *ret);
00087 extern void t1_abort(char *str);
00088 extern char *t1_ErrorMsg(void);
00089 extern void t1_InitImager(void);
00090 extern void t1_TermImager(void);
00091 extern void reportusage(void);
00092 paths.c 
00093 extern struct segment *t1_CopyPath(struct segment *p0);
00094 extern void t1_KillPath(struct segment *p);
00095 extern struct segment *t1_Loc(struct XYspace *S,double x,double y);
00096 extern struct segment *t1_ILoc(struct XYspace *S,int x,int y);
00097 extern struct segment *t1_SubLoc(struct segment *p1,struct segment *p2);
00098 extern struct segment *t1_PathSegment(int type,long x,long y);
00099 extern struct segment *t1_Line(struct segment *P);
00100 extern struct beziersegment *t1_Bezier(struct segment *B,struct segment *C,struct segment *D);
00101 extern struct hintsegment *t1_Hint(struct XYspace *S,double ref,double width,char orientation,char hinttype,char adjusttype,char direction,int label);
00102 extern struct segment *t1_Join(struct segment *p1,struct segment *p2);
00103 extern struct segment *t1_JoinSegment(struct segment *before,int type,long x,long y,struct segment *after);
00104 extern struct segment *t1_ClosePath(struct segment *p0,int lastonly);
00105 extern struct segment *t1_Reverse(struct segment *p);
00106 static struct segment *ReverseSubPath(struct segment *p);
00107 static struct segment *DropSubPath(struct segment *p0);
00108 static struct segment *SplitPath(struct segment *anchor,struct segment *before);
00109 extern struct segment *t1_ReverseSubPaths(struct segment *p);
00110 static int UnClose(struct segment *p0);
00111 extern struct segment *t1_PathXform(struct segment *p0,struct XYspace *S);
00112 extern void t1_PathDelta(struct segment *p,struct fractpoint *pt);
00113 extern struct segment *t1_BoundingBox(short h,short w);
00114 extern void t1_QueryLoc(struct segment *P,struct XYspace *S,double *xP,double *yP);
00115 extern void t1_QueryPath(struct segment *path,int *typeP,struct segment **Bp ,struct segment **Cp ,struct segment **Dp ,double *fP);
00116 extern void t1_QueryBounds(struct segment *p0,struct XYspace *S,double *xminP,double *yminP,double *xmaxP,double *ymaxP);
00117 extern struct segment *t1_BoxPath(struct XYspace *S,int h,int w);
00118 extern struct segment *t1_DropSegment(struct segment *path);
00119 extern struct segment *t1_HeadSegment(struct segment *path);
00120 extern void t1_DumpPath(struct segment *p);
00121 pfb2pfa.c 
00122 extern int main(int argc,char **argv );
00123 pk2bm.c 
00124 extern int main(int argc,char **argv );
00125 extern unsigned char lsbf(unsigned char u);
00126 extern void dots(unsigned char u,int n);
00127 extern int atoo(char *oct);
00128 pkin.c 
00129 static short pkbyte(void);
00130 static long pkquad(void);
00131 static long pktrio(void);
00132 static long pklong(void);
00133 static short pkopen(char *name);
00134 static short getnyb(void);
00135 static short getbit(void);
00136 static unsigned short pkpackednum(void);
00137 static unsigned short rest(void);
00138 static unsigned short handlehuge(unsigned short i,unsigned short k);
00139 /* void unpack(struct *cd); */
00140 /* int readchar(char *name,short c,struct *cd); */
00141 static void error(char *s);
00142 pkout.c 
00143 extern void pk_open(char *pkname);
00144 extern void pk_close(void);
00145 static void pk_nybble(int x);
00146 static void pk1(int x);
00147 static void pk2(int x);
00148 static void pk3(int x);
00149 static void pk4(int x);
00150 extern void pk_preamble(char *comment,float pointsize,int checksum,unsigned int h_res,unsigned int v_res);
00151 extern int optimal_size(int W,int H,int cnt,int *count,int *dyn_f);
00152 static void pk_runlengths(int W,int H,int (*next_pixel)(void));
00153 static void pk_number(int x);
00154 static void pk_bitmap(int width,int cnt,int *runlength);
00155 extern 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));
00156 static void pkstring(char *fmt,...);
00157 extern int INT(float x);
00158 extern char *magnification(int dpi,int BDPI);
00159 extern void pk_postamble(void);
00160 extern void ps2pk_postamble(char *fontname,char *encname,int base_res,int h_res,int v_res,float pointsize,char *args);
00161 pktest.c 
00162 extern int main(int argc,char **argv );
00163 extern int next_pixel(void);
00164 ps2pk.c 
00165 psargs.c 
00166 psearch.c 
00167 regions.c 
00168 extern void t1_KillRegion(struct region *area);
00169 extern struct region *t1_CopyRegion(struct region *area);
00170 static struct edgelist *NewEdge(short xmin,short xmax,short ymin,short ymax,short *xvalues,int isdown);
00171 extern struct region *t1_Interior(struct segment *p,int fillrule);
00172 static int Unwind(struct edgelist *area);
00173 extern void t1_ChangeDirection(int type,struct region *R,long x,long y,long dy);
00174 static void newfilledge(struct region *R,long xmin,long xmax,long ymin,long ymax,int isdown);
00175 extern struct edgelist *t1_SortSwath(struct edgelist *anchor,struct edgelist *edge,struct edgelist *(*swathfcn)(void));
00176 static struct edgelist *splitedge(struct edgelist *list,short y);
00177 static void vertjoin(struct edgelist *top,struct edgelist *bottom);
00178 extern struct edgelist *swathxsort(struct edgelist *before0,struct edgelist *edge);
00179 extern struct edgelist *t1_SwathUnion(struct edgelist *before0,struct edgelist *edge);
00180 extern struct edgelist *swathrightmost(struct edgelist *before,struct edgelist *edge);
00181 static int touches(int h,short *left,short *right);
00182 static int crosses(int h,short *left,short *right);
00183 static void cedgemin(int, pel *, pel);
00184 static void cedgemax(int, pel *, pel);
00185 static void edgemin(int, pel *, pel *);
00186 static void edgemax(int, pel *, pel *);
00187 static void discard(struct edgelist *left,struct edgelist *right);
00188 extern void t1_MoveEdges(struct region *R,long dx,long dy);
00189 extern void t1_UnJumble(struct region *region);
00190 static int OptimizeRegion(struct region *R);
00191 extern void t1_MoreWorkArea(struct region *R,long x1,long y1,long x2,long y2);
00192 extern struct region *t1_BoxClip(struct region *R,short xmin,short ymin,short xmax,short ymax);
00193 extern struct segment *t1_RegionBounds(struct region *R);
00194 extern void t1_DumpArea(struct region *area);
00195 extern void t1_DumpEdges(struct edgelist *edges);
00196 static int edgecheck(struct edgelist *edge,int oldmin,int oldmax);
00197 scanfont.c 
00198 /* struct ps_obj *MakeEncodingArrayP(struct *encodingTable); */
00199 extern int Init_BuiltInEncoding(void);
00200 static int getNextValue(int valueType);
00201 static int getInt(void);
00202 static int getEncoding(struct ps_obj *arrayP);
00203 static int getArray(struct ps_obj *arrayP);
00204 static int getName(char *nameP);
00205 static int getNbytes(int N);
00206 static int getLiteralName(struct ps_obj *nameObjP);
00207 static int BuildSubrs(struct ps_font *FontP);
00208 static int BuildCharStrings(struct ps_font *FontP);
00209 static int BuildFontInfo(struct ps_font *fontP);
00210 static int BuildPrivate(struct ps_font *fontP);
00211 static int GetType1Blues(struct ps_font *fontP);
00212 extern struct ps_obj *GetType1CharString(struct ps_font *fontP,unsigned char code);
00213 static int FindDictValue(struct ps_dict *dictP);
00214 extern int scan_font(struct ps_font *FontP);
00215 sexpr.c 
00216 extern int main(int argc,char **argv );
00217 spaces.c 
00218 extern struct XYspace *t1_CopySpace(struct XYspace *S);
00219 static void ConsiderContext(struct xobject *obj,double (*M)[2]);
00220 extern void FXYConvert(struct fractpoint *pt,struct XYspace *S,double x,double y);
00221 extern void IXYConvert(struct fractpoint *pt,struct XYspace *S,long x,long y);
00222 extern void ForceFloat(struct fractpoint *pt,struct XYspace *S,long x,long y);
00223 extern long FXYboth(double cx,double cy,double x,double y);
00224 extern long FXonly(double cx,double cy,double x,double y);
00225 extern long FYonly(double cx,double cy,double x,double y);
00226 extern long IXYboth(long cx,long cy,long x,long y);
00227 extern long IXonly(long cx,long cy,long x,long y);
00228 extern long IYonly(long cx,long cy,long x,long y);
00229 extern long FPXYboth(long cx,long cy,long x,long y);
00230 extern long FPXonly(long cx,long cy,long x,long y);
00231 extern long FPYonly(long cx,long cy,long x,long y);
00232 static void FillOutFcns(struct XYspace *S);
00233 static void FindFfcn(double cx,double cy,long (**fcnP )(void));
00234 static void FindIfcn(double cx,double cy,long *icxP,long *icyP,long (**fcnP )(void));
00235 extern void t1_UnConvert(struct XYspace *S,struct fractpoint *pt,double *xp,double *yp);
00236 extern struct xobject *t1_Xform(struct xobject *obj,double (*M)[2]);
00237 extern struct xobject *t1_Transform(struct xobject *obj,double cxx,double cyx,double cxy,double cyy);
00238 extern struct xobject *t1_Scale(struct xobject *obj,double sx,double sy);
00239 extern void t1_PseudoSpace(struct XYspace *S,double (*M)[2]);
00240 extern void t1_MMultiply(double (*A)[2],double (*B)[2],double (*C)[2]);
00241 extern void t1_MInvert(double (*M)[2],double (*Mprime)[2]);
00242 extern void t1_InitSpaces(void);
00243 extern void t1_QuerySpace(struct XYspace *S,double *cxxP,double *cyxP,double *cxyP,double *cyyP);
00244 extern void t1_FormatFP(char *str,long fpel);
00245 extern void t1_DumpSpace(struct XYspace *S);
00246 strexpr.c 
00247 extern struct val *make_int(int i);
00248 extern struct val *make_str(char *s);
00249 extern void free_value(struct val *vp);
00250 extern int is_integer(struct val *vp,int *r);
00251 extern int to_integer(struct val *vp);
00252 extern void to_string(struct val *vp);
00253 extern void nexttoken(void);
00254 extern struct val *eval6(void);
00255 extern struct val *eval4(void);
00256 extern struct val *eval3(void);
00257 extern int strexpr(int *result,char *expression);
00258 t1funcs.c 
00259 extern 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);
00260 static int Type1GetGlyphs(struct _Font *pFont,unsigned long count,unsigned char *chars,int charEncoding,unsigned long *glyphCount,struct _CharInfo **glyphs );
00261 /* int Type1GetMetrics(struct _Font *pFont,unsigned long count,unsigned char *chars,int charEncoding,unsigned long *glyphCount,struct **glyphs ); */
00262 extern void Type1CloseFont(struct _Font *pFont);
00263 static void fill(char *dest,int h,int w,struct region *area,int byte,int bit,int wordsize);
00264 static void fillrun(char *p,short x0,short x1,int bit);
00265 extern int Type1RegisterFontFileFunctions(void);
00266 t1info.c 
00267 static void FillHeader(struct _FontInfo *pInfo,struct _FontScalable *Vals);
00268 /* void adjust_min_max(struct *minc,struct *maxc,struct *tmp); */
00269 static void ComputeBounds(struct _FontInfo *pInfo,struct _CharInfo *pChars,struct _FontScalable *Vals);
00270 static void ComputeProps(struct _FontInfo *pInfo,struct _FontScalable *Vals,char *Filename);
00271 static void ComputeStdProps(struct _FontInfo *pInfo,struct _FontScalable *Vals,char *Filename,char *Fontname);
00272 extern int Type1GetInfoScalable(struct _FontPathElement *fpe,struct _FontInfo *pInfo,struct _FontEntry *entry,struct _FontName *fontName,char *fileName,struct _FontScalable *Vals);
00273 extern void T1FillFontInfo(struct _Font *pFont,struct _FontScalable *Vals,char *Filename,char *Fontname);
00274 extern void T1InitStdProps(void);
00275 t1io.c 
00276 extern struct F_FILE *T1Open(char *fn,char *mode);
00277 extern int T1Getc(struct F_FILE *f);
00278 extern int T1Ungetc(int c,struct F_FILE *f);
00279 extern int T1Read(char *buffP,int size,int n,struct F_FILE *f);
00280 extern int T1Close(struct F_FILE *f);
00281 extern struct F_FILE *T1eexec(struct F_FILE *f);
00282 static int T1Decrypt(unsigned char *p,int len);
00283 static int T1Fill(struct F_FILE *f);
00284 t1snap.c 
00285 extern unsigned __int64 __stdcall Int64ShllMod32(unsigned __int64 Value,unsigned long ShiftCount);
00286 extern __int64 __stdcall Int64ShraMod32(__int64 Value,unsigned long ShiftCount);
00287 extern unsigned __int64 __stdcall Int64ShrlMod32(unsigned __int64 Value,unsigned long ShiftCount);
00288 extern void *GetFiberData(void );
00289 extern void *GetCurrentFiber(void );
00290 extern struct segment *t1_Phantom(struct xobject *obj);
00291 extern struct xobject *t1_Snap(struct segment *p);
00292 t1stub.c 
00293 extern int xiStub(void);
00294 extern void t1_DumpText(struct segment *foo);
00295 t1test.c 
00296 extern int main(int argc,char **argv );
00297 extern void Display(struct _CharInfo *glyph);
00298 extern int T1FillVals(struct _FontScalable *vals);
00299 extern int CheckFSFormat(int format,int fmask,int *bit,int *byte,int *scan,int *glyph,int *image);
00300 extern char *MakeAtom(char *p);
00301 extern int GetClientResolutions(int *resP);
00302 extern char *Xalloc(int size);
00303 extern void Xfree(void);
00304 extern int FontDefaultFormat(void);
00305 extern int FontFileRegisterRenderer(void);
00306 extern int GenericGetBitmaps(void);
00307 extern int GenericGetExtents(void);
00308 extern int FontParseXLFDName(void);
00309 extern int FontComputeInfoAccelerators(void);
00310 texfiles.c 
00311 extern unsigned long num(struct _iobuf *fp,int size);
00312 extern int snum(struct _iobuf *fp,int size);
00313 token.c 
00314 static double P10(long exponent);
00315 static int next_char(int ch);
00316 static int add_char(int ch);
00317 static int skip_space(int ch);
00318 static int skip_comment(int ch);
00319 static int add_sign(int ch);
00320 static int add_1st_digits(int ch);
00321 static int add_digits(int ch);
00322 static int add_1st_decpt(int ch);
00323 static int add_decpt(int ch);
00324 static int add_fraction(int ch);
00325 static int add_e_sign(int ch);
00326 static int add_exponent(int ch);
00327 static int add_radix(int ch);
00328 static int add_r_digits(int ch);
00329 static int RADIX_NUMBER(int ch);
00330 static int INTEGER(int ch);
00331 static int REAL(int ch);
00332 static int HEX_STRING(int ch);
00333 static void save_digraph(int ch);
00334 static int STRING(int ch);
00335 static int AAH_NAME(int ch);
00336 static int NAME(int ch);
00337 static int LITERAL_NAME(int ch);
00338 static int IMMED_NAME(int ch);
00339 static int OOPS_NAME(int ch);
00340 static int RIGHT_ANGLE(int ch);
00341 static int RIGHT_PAREN(int ch);
00342 static int LEFT_BRACE(int ch);
00343 static int RIGHT_BRACE(int ch);
00344 static int LEFT_BRACKET(int ch);
00345 static int RIGHT_BRACKET(int ch);
00346 static int BREAK_SIGNAL(int ch);
00347 static int NO_TOKEN(int ch);
00348 extern void scan_token(struct ps_obj *inputP);
00349 type1.c 
00350 static int ComputeAlignmentZones(void);
00351 static int InitStems(void);
00352 static int FinitStems(void);
00353 static void ComputeStem(int stemno);
00354 static struct segment *Applyhint(struct segment *p,int stemnumber,int half);
00355 static struct segment *Applyrevhint(struct segment *p,int stemnumber,int half);
00356 static struct segment *FindStems(double x,double y,double dx,double dy);
00357 static void ClearStack(void);
00358 static void Push(double Num);
00359 static void ClearCallStack(void);
00360 static void PushCall(struct ps_obj *CurrStrP,int CurrIndex,unsigned short CurrKey);
00361 static void PopCall(struct ps_obj **CurrStrPP ,int *CurrIndexP,unsigned short *CurrKeyP);
00362 static void ClearPSFakeStack(void);
00363 static void PSFakePush(double Num);
00364 static double PSFakePop(void);
00365 static struct segment *CenterStem(double edge1,double edge2);
00366 static unsigned char Decrypt(unsigned char cipher);
00367 static int DoRead(int *CodeP);
00368 static void StartDecrypt(void);
00369 static void Decode(int Code);
00370 static void DoCommand(int Code);
00371 static void Type1Escape(int Code);
00372 static void HStem(double y,double dy);
00373 static void VStem(double x,double dx);
00374 static void RLineTo(double dx,double dy);
00375 static void RRCurveTo(double dx1,double dy1,double dx2,double dy2,double dx3,double dy3);
00376 static void DoClosePath(void);
00377 static void CallSubr(int subrno);
00378 static void Return(void);
00379 static void EndChar(void);
00380 static void RMoveTo(double dx,double dy);
00381 static void DotSection(void);
00382 static void Seac(double asb,double adx,double ady,unsigned char bchar,unsigned char achar);
00383 static void Sbw(double sbx,double sby,double wx,double wy);
00384 static double Div(double num1,double num2);
00385 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);
00386 static void FlxProc1(void);
00387 static void FlxProc2(void);
00388 static void HintReplace(void);
00389 static void CallOtherSubr(int othersubrno);
00390 static void SetCurrentPoint(double x,double y);
00391 extern 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);
00392 util.c 
00393 extern int vm_init(void);
00394 extern char *vm_alloc(unsigned int bytes);
00395 extern void objFormatInteger(struct ps_obj *objP,int value);
00396 extern void objFormatReal(struct ps_obj *objP,double value);
00397 extern void objFormatBoolean(struct ps_obj *objP,int value);
00398 extern void objFormatEncoding(struct ps_obj *objP,int length,struct ps_obj *valueP);
00399 extern void objFormatArray(struct ps_obj *objP,int length,struct ps_obj *valueP);
00400 extern void objFormatString(struct ps_obj *objP,int length,char *valueP);
00401 extern void objFormatName(struct ps_obj *objP,int length,char *valueP);
00402 extern void objFormatFile(struct ps_obj *objP,struct _iobuf *valueP);