w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

chkdvifont.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include "msvcdir.h"
#include <io.h>
#include <string.h>
#include <config.h>
#include "dd.h"
#include "common.h"
Include dependency graph for chkdvifont.c:

Go to the source code of this file.

Classes

struct  EUFM
 
struct  CHKFONT
 
struct  NEWPOINT
 
struct  FONT_ATR
 
struct  VFFONT_ATR
 
struct  FINFO
 
struct  FARDIR
 

Macros

#define WIN32   1
 
#define MSVC   1
 
#define ID   2
 
#define ID_PTEX   3
 
#define END_DVI   223
 
#define MAX_NAME   16
 
#define MAX_FONT   1024
 
#define BUF_SIZE   1024
 
#define HALF_POINT   (1L<<8)
 
#define NEW_FONT   1
 
#define NEW_POINT   2
 
#define NEW_EUFM   4
 
#define BAD_EUFM   8
 
#define OLD_FONT   16
 
#define OLD_EUFM   32
 
#define DVI_FILE   0
 
#define TFM_FILE   1
 
#define PXL_FILE   2
 
#define PK_FILE   3
 
#define VF_FILE   4
 
#define VF_FILE_MAP   5
 
#define read_byte(x)   (uchar)getc(x)
 
#define PK_PRE   247
 
#define PK_ID   89
 
#define GF_ID   131
 
#define VF_ID   202
 
#define PKD_ID   ('p'+'k'+'d')
 
#define PK_POST   245
 
#define GF_POST   223
 
#define VFW_ID   ((PK_PRE<<8)+VF_ID)
 
#define GFW_ID   ((PK_PRE<<8)+GF_ID)
 
#define PKW_ID   ((PK_PRE<<8)+PK_ID)
 
#define PKDW_ID   ((PK_PRE<<8)+PKD_ID)
 
#define JXL4_0_ID   (0x0001)
 
#define JXL4_1_ID   (0x8B25)
 

Functions

void usage (void)
 
char * name_link (char *, char *)
 
void read_post (struct DVIFILE_INFO_REC *)
 
void get_font_list (struct DVIFILE_INFO_REC *)
 
void font_define (int, FILE *)
 
void vf_define (int, FILE *)
 
int read_uint (FILE *)
 
long read_mit (FILE *)
 
long read_long (FILE *)
 
char * read_str (FILE *, int)
 
long read_n (FILE *, int)
 
long signed_read_n (FILE *, int)
 
void check_font (void)
 
void show_dvi_data (struct DVIFILE_INFO_REC *)
 
void get_list (char *)
 
void type (char *)
 
void tfm_define (FILE *)
 
void pxl_define (FILE *)
 
int chk_font_file (FILE *)
 
int check_mag (int)
 
long to_long (unsigned char *)
 
int strcmpl (const char *s, const char *t)
 
int main (int argc, char **argv)
 

Variables

char buf [1024]
 
char filename [_MAX_PATH]
 
struct EUFM eufm []
 
struct CHKFONT chkfont [1024]
 
char * oldfont []
 
struct NEWPOINT newpoint []
 
char * newfont []
 
int mag []
 
char * font_ext []
 
struct DVIFILE_INFO_REC dvi_info
 
struct FONT_ATR font
 
struct VFFONT_ATR vffont
 
int f_v = -1
 
int f_vv = 0
 
int f_d
 
int f_t
 
int n_data
 
unsigned int f_type
 
long pmag
 
long hppp
 
long vppp
 
unsigned char gth_buf [sizeof(struct FINFO)]
 
long f_end
 
int f_cont
 

Macro Definition Documentation

◆ BAD_EUFM

#define BAD_EUFM   8

Definition at line 88 of file chkdvifont.c.

◆ BUF_SIZE

#define BUF_SIZE   1024

Definition at line 81 of file chkdvifont.c.

◆ DVI_FILE

#define DVI_FILE   0

Definition at line 92 of file chkdvifont.c.

◆ END_DVI

#define END_DVI   223

Definition at line 78 of file chkdvifont.c.

◆ GF_ID

#define GF_ID   131

Definition at line 1011 of file chkdvifont.c.

◆ GF_POST

#define GF_POST   223

Definition at line 1015 of file chkdvifont.c.

◆ GFW_ID

#define GFW_ID   ((PK_PRE<<8)+GF_ID)

Definition at line 1018 of file chkdvifont.c.

◆ HALF_POINT

#define HALF_POINT   (1L<<8)

Definition at line 83 of file chkdvifont.c.

◆ ID

#define ID   2

Definition at line 76 of file chkdvifont.c.

◆ ID_PTEX

#define ID_PTEX   3

Definition at line 77 of file chkdvifont.c.

◆ JXL4_0_ID

#define JXL4_0_ID   (0x0001)

Definition at line 1021 of file chkdvifont.c.

◆ JXL4_1_ID

#define JXL4_1_ID   (0x8B25)

Definition at line 1022 of file chkdvifont.c.

◆ MAX_FONT

#define MAX_FONT   1024

Definition at line 80 of file chkdvifont.c.

◆ MAX_NAME

#define MAX_NAME   16

Definition at line 79 of file chkdvifont.c.

◆ MSVC

#define MSVC   1

Definition at line 51 of file chkdvifont.c.

◆ NEW_EUFM

#define NEW_EUFM   4

Definition at line 87 of file chkdvifont.c.

◆ NEW_FONT

#define NEW_FONT   1

Definition at line 85 of file chkdvifont.c.

◆ NEW_POINT

#define NEW_POINT   2

Definition at line 86 of file chkdvifont.c.

◆ OLD_EUFM

#define OLD_EUFM   32

Definition at line 90 of file chkdvifont.c.

◆ OLD_FONT

#define OLD_FONT   16

Definition at line 89 of file chkdvifont.c.

◆ PK_FILE

#define PK_FILE   3

Definition at line 95 of file chkdvifont.c.

◆ PK_ID

#define PK_ID   89

Definition at line 1010 of file chkdvifont.c.

◆ PK_POST

#define PK_POST   245

Definition at line 1014 of file chkdvifont.c.

◆ PK_PRE

#define PK_PRE   247

Definition at line 1009 of file chkdvifont.c.

◆ PKD_ID

#define PKD_ID   ('p'+'k'+'d')

Definition at line 1013 of file chkdvifont.c.

◆ PKDW_ID

#define PKDW_ID   ((PK_PRE<<8)+PKD_ID)

Definition at line 1020 of file chkdvifont.c.

◆ PKW_ID

#define PKW_ID   ((PK_PRE<<8)+PK_ID)

Definition at line 1019 of file chkdvifont.c.

◆ PXL_FILE

#define PXL_FILE   2

Definition at line 94 of file chkdvifont.c.

◆ read_byte

#define read_byte (   x)    (uchar)getc(x)

Definition at line 200 of file chkdvifont.c.

◆ TFM_FILE

#define TFM_FILE   1

Definition at line 93 of file chkdvifont.c.

◆ VF_FILE

#define VF_FILE   4

Definition at line 96 of file chkdvifont.c.

◆ VF_FILE_MAP

#define VF_FILE_MAP   5

Definition at line 97 of file chkdvifont.c.

◆ VF_ID

#define VF_ID   202

Definition at line 1012 of file chkdvifont.c.

◆ VFW_ID

#define VFW_ID   ((PK_PRE<<8)+VF_ID)

Definition at line 1017 of file chkdvifont.c.

◆ WIN32

#define WIN32   1

Definition at line 50 of file chkdvifont.c.

Function Documentation

◆ check_font()

◆ check_mag()

int check_mag ( int  scale)

Definition at line 530 of file chkdvifont.c.

References i, mag, and scale.

Referenced by check_font().

◆ chk_font_file()

int chk_font_file ( FILE fp)

◆ font_define()

void font_define ( int  code,
FILE dvifile 
)

Definition at line 1145 of file chkdvifont.c.

References dvifile, EOF, exit(), FNT_DEF_1, fprintf, i, len, read_byte, read_long(), read_n(), and read_str().

Referenced by get_font_list().

◆ get_font_list()

void get_font_list ( struct DVIFILE_INFO_REC dvi)

Definition at line 757 of file chkdvifont.c.

References check_font(), code, count, dvi, exit(), FNT_DEF_1, font_define(), fprintf, fseek, getc, NOP, POST_POST, and SEEK_SET.

Referenced by main().

◆ get_list()

void get_list ( char *  fname)

Definition at line 1279 of file chkdvifont.c.

References buf, BUF_SIZE, chkfont, exit(), FARDIR::f_name, fgets, FILE, fname, fopen, fp, fprintf, MAX_FONT, n_data, NULL, and sscanf().

Referenced by main().

◆ main()

◆ name_link()

char * name_link ( char *  base,
char *  ext 
)

Definition at line 690 of file chkdvifont.c.

References base, base_len(), ext, malloc, name, strcpy(), and strlen().

Referenced by main().

◆ pxl_define()

◆ read_long()

long read_long ( FILE fp)

Definition at line 1202 of file chkdvifont.c.

References d, fp, getc, and uchar.

Referenced by chk_font_file(), font_define(), pxl_define(), read_post(), tfm_define(), and vf_define().

◆ read_mit()

long read_mit ( FILE fp)

Definition at line 1190 of file chkdvifont.c.

References d, fp, getc, and uchar.

◆ read_n()

long read_n ( FILE fp,
int  n 
)

Definition at line 1238 of file chkdvifont.c.

References d, fp, getc, n, and uchar.

Referenced by font_define(), pxl_define(), tfm_define(), and vf_define().

◆ read_post()

void read_post ( struct DVIFILE_INFO_REC dvi)

◆ read_str()

char * read_str ( FILE fp,
int  len 
)

Definition at line 1225 of file chkdvifont.c.

References fp, getc, len, malloc, NULL, and pt.

Referenced by font_define(), show_dvi_data(), and vf_define().

◆ read_uint()

int read_uint ( FILE fp)

Definition at line 1181 of file chkdvifont.c.

References d, fp, getc, and uchar.

Referenced by chk_font_file(), pxl_define(), read_post(), and tfm_define().

◆ show_dvi_data()

void show_dvi_data ( struct DVIFILE_INFO_REC dvi)

Definition at line 498 of file chkdvifont.c.

References dvi_data::den, dvi, fseek, HALF_POINT, len, dvi_data::mag, dvi_data::num, printf(), read_byte, read_str(), SEEK_SET, uchar, cordic::x, and y.

Referenced by main().

◆ signed_read_n()

long signed_read_n ( FILE fp,
int  n 
)

Definition at line 1255 of file chkdvifont.c.

References d, fp, getc, n, and uchar.

◆ strcmpl()

int strcmpl ( const char *  s,
const char *  t 
)

Definition at line 259 of file chkdvifont.c.

References i, s, strlen(), and toupper().

Referenced by main().

◆ tfm_define()

void tfm_define ( FILE fp)

Definition at line 773 of file chkdvifont.c.

References bc, ch, check_font(), ec, exit(), f_v, f_vv, fclose, filename, fontdir, fp, i, lf, lh, nco, ncw, nd, ne, nh, ni, nk, nkf, nkg, nki, nkm, nkp, nkr, nl, np, npc, nt, nw, nwf, nwg, nwi, nwm, nwp, nwr, printf(), read_byte, read_long(), read_n(), read_uint(), s, size, strlen(), t, u, and cordic::x.

Referenced by main().

◆ to_long()

long to_long ( unsigned char *  pt)

Definition at line 1215 of file chkdvifont.c.

References d, and pt.

Referenced by chk_font_file().

◆ type()

void type ( char *  s)

Definition at line 1273 of file chkdvifont.c.

References f_v, printf(), and s.

Referenced by check_font(), and pxl_define().

◆ usage()

void usage ( void  uerr)

Definition at line 1311 of file chkdvifont.c.

References BUG_ADDRESS, endif, exit(), fprintf, getc, show(), TL_VERSION, and VERSION.

Referenced by main().

◆ vf_define()

void vf_define ( int  code,
FILE vffile 
)

Variable Documentation

◆ buf

char buf[1024]

Definition at line 99 of file chkdvifont.c.

Referenced by get_list().

◆ chkfont

struct CHKFONT chkfont[1024]

Definition at line 100 of file chkdvifont.c.

Referenced by check_font(), and get_list().

◆ dvi_info

struct DVIFILE_INFO_REC dvi_info

Definition at line 223 of file chkdvifont.c.

Referenced by main().

◆ eufm

struct EUFM eufm[]
Initial value:
=
{
5, 0x0891FD38L, 0x246A686BL,
5, 0x0891FD38L, 0xB8C9AFD4L,
6, 0x2F8EDF02L, 0x9793B1E1L,
6, 0x2F8EDF02L, 0x65167BC4L,
7, 0x37CDA321L, 0x05184980L,
7, 0x37CDA321L, 0x58ED2602L,
8, 0x37CCA321L, 0x2564B2F5L,
8, 0x37CCA321L, 0x5C978225L,
9, 0x3F977CF3L, 0x1F6C4283L,
9, 0x3F977CF3L, 0xF833F3AFL,
10, 0xBF989013L, 0x8F256EB2L,
0, 0L, 0L
}
@ L
Definition: ubidiimp.h:45

Definition at line 100 of file chkdvifont.c.

Referenced by check_font().

◆ f_cont

int f_cont

Definition at line 257 of file chkdvifont.c.

Referenced by chk_font_file().

◆ f_d

int f_d

Definition at line 231 of file chkdvifont.c.

Referenced by check_font(), gdImageScaleBicubicFixed(), and main().

◆ f_end

long f_end

Definition at line 256 of file chkdvifont.c.

Referenced by chk_font_file(), and pxl_define().

◆ f_t

int f_t

Definition at line 232 of file chkdvifont.c.

Referenced by check_font(), main(), and pxl_define().

◆ f_type

unsigned int f_type

Definition at line 234 of file chkdvifont.c.

Referenced by check_font(), and main().

◆ f_v

int f_v = -1

Definition at line 229 of file chkdvifont.c.

Referenced by check_font(), chk_font_file(), main(), pxl_define(), tfm_define(), and type().

◆ f_vv

int f_vv = 0

Definition at line 230 of file chkdvifont.c.

Referenced by main(), and tfm_define().

◆ filename

char filename[_MAX_PATH]

Definition at line 100 of file chkdvifont.c.

Referenced by chk_font_file(), main(), and tfm_define().

◆ font

struct FONT_ATR font

Definition at line 223 of file chkdvifont.c.

◆ font_ext

char* font_ext[]
Initial value:
= {
"gf", "pk", "pxl", "far", "gth", NULL
}
#define NULL
Definition: ftobjs.h:61

Definition at line 196 of file chkdvifont.c.

Referenced by main().

◆ gth_buf

unsigned char gth_buf[sizeof(struct FINFO)]

Definition at line 255 of file chkdvifont.c.

Referenced by chk_font_file().

◆ hppp

long hppp

Definition at line 236 of file chkdvifont.c.

Referenced by check_font(), InitPK(), pxl_define(), read_GF_index(), and ReadFontDef().

◆ mag

int mag[]
Initial value:
=
{1095, 1200, 1315, 1440, 1577, 1728, 1893, 2074, 2272, 2488,
2726, 2986, 3271, 3583, 3925, 4300, 4710, 5160, 32000}

Definition at line 192 of file chkdvifont.c.

Referenced by check_mag().

◆ n_data

int n_data

Definition at line 233 of file chkdvifont.c.

Referenced by check_font(), and get_list().

◆ newfont

char* newfont[]
Initial value:
=
{"euex", "eufb", "eurb", "eurm", "eusb", "eusm",
"msam", "msbm",
"wncyb", "wncyi", "wncyr", "wncysc", "wncyss",
""
}

Definition at line 170 of file chkdvifont.c.

Referenced by check_font(), copyfont(), and FontManager::registerFont().

◆ newpoint

struct NEWPOINT newpoint[]
Initial value:
=
{
"cmbsy", 5, 9,
"cmcsc", 8, 9,
"cmex", 7, 9,
"cmmib", 5, 9,
"", 0, 0
}

Definition at line 144 of file chkdvifont.c.

Referenced by check_font(), and drvLATEX2E::updatebbox().

◆ oldfont

char* oldfont[]
Initial value:
=
{"msxm", "msym", "amcsc", "mcyr", "mcyb", ""}

Definition at line 144 of file chkdvifont.c.

Referenced by check_font().

◆ pmag

long pmag

Definition at line 235 of file chkdvifont.c.

Referenced by check_font(), and pxl_define().

◆ vffont

struct VFFONT_ATR vffont

Definition at line 223 of file chkdvifont.c.

Referenced by check_font(), and vf_define().

◆ vppp

long vppp

Definition at line 237 of file chkdvifont.c.

Referenced by check_font(), InitPK(), pxl_define(), read_GF_index(), and ReadFontDef().