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)  

dvispc.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <io.h>
#include <fcntl.h>
#include <config.h>
#include "common.h"
Include dependency graph for dvispc.c:

Go to the source code of this file.

Classes

struct  DIMENSION_REC
 
struct  DVIFILE_INFO_REC
 
struct  KEY_LIST
 

Macros

#define SHIFT_JIS   1
 
#define uchar   unsigned char
 
#define uint   unsigned int
 
#define Long   int
 
#define PATH_SEP   '\\'
 
#define PATH_SEPU   '/'
 
#define READ_TEXT   "rt"
 
#define READ_BINARY   "rb"
 
#define WRITE_BINARY   "wb"
 
#define WRITE_TEXT   "wt"
 
#define StrCmp   stricmp
 
#define PIXEL   int
 
#define SIZE_PARA   int
 
#define PAGE_INDEX   int
 
#define SCALED_PT   int
 
#define DIMENSION   struct DIMENSION_REC
 
#define MAX_INCL   2048 /* maximal number of embedded files */
 
#define MAX_PATH   0x200 /* maximal length of path name */
 
#define ID   2
 
#define IDP   3
 
#define END_DVI   223
 
#define SET_CHAR_0   0
 
#define SET1   128
 
#define SET_RULE   132
 
#define PUT1   133
 
#define PUT_RULE   137
 
#define NOP   138
 
#define BOP   139
 
#define EOP   140
 
#define PUSH   141
 
#define POP   142
 
#define RIGHT1   143
 
#define W0   147
 
#define W1   148
 
#define X0   152
 
#define X1   153
 
#define DOWN1   157
 
#define Y0   161
 
#define Y1   162
 
#define Z0   166
 
#define Z1   167
 
#define FNT_NUM_0   171
 
#define FNT1   235
 
#define XXX1   239
 
#define FNT_DEF_1   243
 
#define PRE   247
 
#define POST   248
 
#define POST_POST   249
 
#define OPCODE   250
 
#define EOFNC   255 /* end of func */
 
#define DVIFILE_INFO   struct DVIFILE_INFO_REC
 
#define MAX_LEN   128
 
#define MAX_COLOR   512
 
#define COLOR_BUF_SIZE   MAX_COLOR*32
 
#define MAX_ANNOT   8
 
#define ANNOT_BUF_SIZE   MAX_ANNOT*512
 
#define COMMON_SIZE   0x4000
 
#define MAX_FONT   256
 
#define DTL_STRING   1 /* 0 \' \\ */
 
#define DTL_CHAR   2 /* 1 (...) */
 
#define DTL_CHAR2   4 /* 2 character code by dig/hex */
 
#define DTL_CMD   8 /* 3 compact command name */
 
#define DTL_FNTDEF   0x10 /* 4 checksum is in octal */
 
#define DTL_FNTNAME   0x20 /* 5 dir/name */
 
#define DTL_ILL   0x40 /* 6 opcode/illegal */
 
#define DTL_PAGE   0x80 /* 7 */
 
#define DTL_OCT   0x100 /* 8 */
 
#define DTL_EXACT   0x200 /* 9 -> DVI according to string */
 
#define DTL_FNTDFN   0x400 /* 1 check used font definition */
 
#define DTL_VARIETY   0x800 /* 2 ignore variety */
 
#define DTL_FORM   0x8000 /* the first line: variety */
 
#define DVIFILE_INFO   struct DVIFILE_INFO_REC
 
#define isjis(c)   (((c)>=0x21 && (c)<=0x7e))
 
#define is_hex(c)   ((c>='0'&&c<='9')||(c>='a'&&c<='f')||(c>='A'&&c<='F'))
 
#define is_oct(c)   (c>='0'&&c<='7')
 
#define hex_to_dig(c)   ((c>='0'&&c<='9')?(c-'0'):(toupper(c)-('A'-10)))
 
#define MSG(x)   (f_debug?(x):"")
 
#define read_byte(x)   getc(x)
 
#define write_byte(x, y)   putc(x,y)
 
#define read_short(x)   signed_read_n(x,2)
 
#define MAX_STR   0x60
 

Enumerations

enum  {
  EXE2MODIFY , EXE2CHECK , EXE2SPECIAL , EXE2TEXT ,
  EXE2DVI
}
 

Functions

unsigned int work (FILE *)
 
unsigned int s_work (FILE *)
 
int strsubcmp (char *s, char *t)
 
int strsubcmp_n (char *s, char *t)
 
void sp_color (char *sp)
 
void sp_pdf_bcolor (char *sp)
 
void sp_pdf_ecolor (char *sp)
 
void sp_pdf_bann (char *sp)
 
void sp_pdf_eann (char *sp)
 
void read_post (struct DVIFILE_INFO_REC *dvi)
 
unsigned int interpret (FILE *)
 
void make_page_index (struct DVIFILE_INFO_REC *dvi, struct DIMENSION_REC *dim)
 
void translate (struct DVIFILE_INFO_REC *dvi, struct DIMENSION_REC *dim)
 
void transpre (FILE *)
 
void transpost (FILE *)
 
void trans2dvi (void)
 
void replace (char *, char *)
 
int read_n (FILE *fp, int n)
 
int signed_read_n (FILE *fp, int n)
 
void Exit (int code)
 
void error (char *msg)
 
void write_long (int x, FILE *fp)
 
int read_long (FILE *fp)
 
void write_word (int x, FILE *fp)
 
int read_word (FILE *fp)
 
void usage (int ex)
 
int main (int argc, char **argv)
 
void write_sp (FILE *fp, char *sp)
 
void write_sp_nodebug (FILE *fp, char *sp)
 
void flush_str (void)
 
void jis2sjis (int *h, int *l)
 
void out_string (FILE *in, FILE *out, int len)
 
void key_swap (int i, int j)
 
void sort_key (void)
 
int find_key (char *s0)
 
void write_n (int num, int byte)
 
unsigned char * get_next (unsigned char *pt)
 
unsigned int a2i (unsigned char *s)
 
int StrLen (unsigned char *pt)
 

Variables

struct DIMENSION_REC dvi_dim
 
int f_dtl = 0
 
int f_mode = EXE2MODIFY
 
int f_debug = 0
 
int f_overwrite = 0
 
int f_backup = 0
 
int f_sjis = 1
 
int f_pos = 0
 
int f_book = 0
 
int f_ptex = 0
 
int f_prescan = 0
 
int f_last = 0
 
int max_stack
 
char * out_pages ="T-L"
 
int total_book_page
 
char background [128]
 
char background_prev [128]
 
int f_background = 0
 
char pdf_bgcolor [128]
 
char pdf_bgcolor_prev [128]
 
int f_pdf_bgcolor = 0
 
char tpic_pn [128]
 
char tpic_pn_prev [128]
 
int f_pn = 0
 
int color_depth
 
int color_depth_max
 
int color_under
 
char * color_pt [512]
 
int pdf_color_depth
 
int pdf_color_depth_max
 
int pdf_color_under
 
char * pdf_color_pt [512]
 
int pdf_annot_depth
 
int pdf_annot_depth_max
 
int pdf_annot_under
 
char * pdf_annot_pt [8]
 
int f_needs_corr
 
char color_buf [512 *32]
 
char annot_buf [8 *512]
 
char tmp_buf [0x4000]
 
FILEfp_in
 
FILEfp_out
 
struct DVIFILE_INFO_REC dvi_info
 
char infile [0x200]
 
char outfile [0x200]
 
char font_use [256]
 
const int AdID = (('A'<<24)+('d'<<16)+('O'<<8)+ 140 )
 
static unsigned char cmd128_mode []
 
static unsigned char cmd235_mode []
 
int num_add
 
int top_add
 
static char * SETCHAR = "setchar"
 
static char * cmd128_name []
 
static char * cmd235_name []
 
static char * c128_name []
 
static char * c235_name []
 
char str_buf [0x60]
 
int len = 0
 
struct KEY_LIST key []
 
int sub_number
 

Macro Definition Documentation

◆ ANNOT_BUF_SIZE

#define ANNOT_BUF_SIZE   MAX_ANNOT*512

Definition at line 206 of file dvispc.c.

◆ BOP

#define BOP   139

Definition at line 176 of file dvispc.c.

◆ COLOR_BUF_SIZE

#define COLOR_BUF_SIZE   MAX_COLOR*32

Definition at line 204 of file dvispc.c.

◆ COMMON_SIZE

#define COMMON_SIZE   0x4000

Definition at line 207 of file dvispc.c.

◆ DIMENSION

#define DIMENSION   struct DIMENSION_REC

Definition at line 127 of file dvispc.c.

◆ DOWN1

#define DOWN1   157

Definition at line 185 of file dvispc.c.

◆ DTL_CHAR

#define DTL_CHAR   2 /* 1 (...) */

Definition at line 211 of file dvispc.c.

◆ DTL_CHAR2

#define DTL_CHAR2   4 /* 2 character code by dig/hex */

Definition at line 212 of file dvispc.c.

◆ DTL_CMD

#define DTL_CMD   8 /* 3 compact command name */

Definition at line 213 of file dvispc.c.

◆ DTL_EXACT

#define DTL_EXACT   0x200 /* 9 -> DVI according to string */

Definition at line 219 of file dvispc.c.

◆ DTL_FNTDEF

#define DTL_FNTDEF   0x10 /* 4 checksum is in octal */

Definition at line 214 of file dvispc.c.

◆ DTL_FNTDFN

#define DTL_FNTDFN   0x400 /* 1 check used font definition */

Definition at line 220 of file dvispc.c.

◆ DTL_FNTNAME

#define DTL_FNTNAME   0x20 /* 5 dir/name */

Definition at line 215 of file dvispc.c.

◆ DTL_FORM

#define DTL_FORM   0x8000 /* the first line: variety */

Definition at line 222 of file dvispc.c.

◆ DTL_ILL

#define DTL_ILL   0x40 /* 6 opcode/illegal */

Definition at line 216 of file dvispc.c.

◆ DTL_OCT

#define DTL_OCT   0x100 /* 8 */

Definition at line 218 of file dvispc.c.

◆ DTL_PAGE

#define DTL_PAGE   0x80 /* 7 */

Definition at line 217 of file dvispc.c.

◆ DTL_STRING

#define DTL_STRING   1 /* 0 \' \\ */

Definition at line 210 of file dvispc.c.

◆ DTL_VARIETY

#define DTL_VARIETY   0x800 /* 2 ignore variety */

Definition at line 221 of file dvispc.c.

◆ DVIFILE_INFO [1/2]

#define DVIFILE_INFO   struct DVIFILE_INFO_REC

Definition at line 293 of file dvispc.c.

◆ DVIFILE_INFO [2/2]

#define DVIFILE_INFO   struct DVIFILE_INFO_REC

Definition at line 293 of file dvispc.c.

◆ END_DVI

#define END_DVI   223

Definition at line 168 of file dvispc.c.

◆ EOFNC

#define EOFNC   255 /* end of func */

Definition at line 198 of file dvispc.c.

◆ EOP

#define EOP   140

Definition at line 177 of file dvispc.c.

◆ FNT1

#define FNT1   235

Definition at line 191 of file dvispc.c.

◆ FNT_DEF_1

#define FNT_DEF_1   243

Definition at line 193 of file dvispc.c.

◆ FNT_NUM_0

#define FNT_NUM_0   171

Definition at line 190 of file dvispc.c.

◆ hex_to_dig

#define hex_to_dig (   c)    ((c>='0'&&c<='9')?(c-'0'):(toupper(c)-('A'-10)))

Definition at line 322 of file dvispc.c.

◆ ID

#define ID   2

Definition at line 166 of file dvispc.c.

◆ IDP

#define IDP   3

Definition at line 167 of file dvispc.c.

◆ is_hex

#define is_hex (   c)    ((c>='0'&&c<='9')||(c>='a'&&c<='f')||(c>='A'&&c<='F'))

Definition at line 319 of file dvispc.c.

◆ is_oct

#define is_oct (   c)    (c>='0'&&c<='7')

Definition at line 320 of file dvispc.c.

◆ isjis

#define isjis (   c)    (((c)>=0x21 && (c)<=0x7e))

Definition at line 317 of file dvispc.c.

◆ Long

#define Long   int

Definition at line 103 of file dvispc.c.

◆ MAX_ANNOT

#define MAX_ANNOT   8

Definition at line 205 of file dvispc.c.

◆ MAX_COLOR

#define MAX_COLOR   512

Definition at line 203 of file dvispc.c.

◆ MAX_FONT

#define MAX_FONT   256

Definition at line 208 of file dvispc.c.

◆ MAX_INCL

#define MAX_INCL   2048 /* maximal number of embedded files */

Definition at line 161 of file dvispc.c.

◆ MAX_LEN

#define MAX_LEN   128

Definition at line 202 of file dvispc.c.

◆ MAX_PATH

#define MAX_PATH   0x200 /* maximal length of path name */

Definition at line 163 of file dvispc.c.

◆ MAX_STR

#define MAX_STR   0x60

Definition at line 1763 of file dvispc.c.

◆ MSG

#define MSG (   x)    (f_debug?(x):"")

Definition at line 323 of file dvispc.c.

◆ NOP

#define NOP   138

Definition at line 175 of file dvispc.c.

◆ OPCODE

#define OPCODE   250

Definition at line 197 of file dvispc.c.

◆ PAGE_INDEX

Definition at line 124 of file dvispc.c.

◆ PATH_SEP

#define PATH_SEP   '\\'

Definition at line 113 of file dvispc.c.

◆ PATH_SEPU

#define PATH_SEPU   '/'

Definition at line 114 of file dvispc.c.

◆ PIXEL

#define PIXEL   int

Definition at line 122 of file dvispc.c.

◆ POP

#define POP   142

Definition at line 179 of file dvispc.c.

◆ POST

#define POST   248

Definition at line 195 of file dvispc.c.

◆ POST_POST

#define POST_POST   249

Definition at line 196 of file dvispc.c.

◆ PRE

#define PRE   247

Definition at line 194 of file dvispc.c.

◆ PUSH

#define PUSH   141

Definition at line 178 of file dvispc.c.

◆ PUT1

#define PUT1   133

Definition at line 173 of file dvispc.c.

◆ PUT_RULE

#define PUT_RULE   137

Definition at line 174 of file dvispc.c.

◆ READ_BINARY

#define READ_BINARY   "rb"

Definition at line 116 of file dvispc.c.

◆ read_byte

#define read_byte (   x)    getc(x)

Definition at line 324 of file dvispc.c.

◆ read_short

#define read_short (   x)    signed_read_n(x,2)

Definition at line 326 of file dvispc.c.

◆ READ_TEXT

#define READ_TEXT   "rt"

Definition at line 115 of file dvispc.c.

◆ RIGHT1

#define RIGHT1   143

Definition at line 180 of file dvispc.c.

◆ SCALED_PT

#define SCALED_PT   int

Definition at line 125 of file dvispc.c.

◆ SET1

#define SET1   128

Definition at line 171 of file dvispc.c.

◆ SET_CHAR_0

#define SET_CHAR_0   0

Definition at line 170 of file dvispc.c.

◆ SET_RULE

#define SET_RULE   132

Definition at line 172 of file dvispc.c.

◆ SHIFT_JIS

#define SHIFT_JIS   1

Definition at line 20 of file dvispc.c.

◆ SIZE_PARA

#define SIZE_PARA   int

Definition at line 123 of file dvispc.c.

◆ StrCmp

#define StrCmp   stricmp

Definition at line 119 of file dvispc.c.

◆ uchar

#define uchar   unsigned char

Definition at line 101 of file dvispc.c.

◆ uint

#define uint   unsigned int

Definition at line 102 of file dvispc.c.

◆ W0

#define W0   147

Definition at line 181 of file dvispc.c.

◆ W1

#define W1   148

Definition at line 182 of file dvispc.c.

◆ WRITE_BINARY

#define WRITE_BINARY   "wb"

Definition at line 117 of file dvispc.c.

◆ write_byte

#define write_byte (   x,
  y 
)    putc(x,y)

Definition at line 325 of file dvispc.c.

◆ WRITE_TEXT

#define WRITE_TEXT   "wt"

Definition at line 118 of file dvispc.c.

◆ X0

#define X0   152

Definition at line 183 of file dvispc.c.

◆ X1

#define X1   153

Definition at line 184 of file dvispc.c.

◆ XXX1

#define XXX1   239

Definition at line 192 of file dvispc.c.

◆ Y0

#define Y0   161

Definition at line 186 of file dvispc.c.

◆ Y1

#define Y1   162

Definition at line 187 of file dvispc.c.

◆ Z0

#define Z0   166

Definition at line 188 of file dvispc.c.

◆ Z1

#define Z1   167

Definition at line 189 of file dvispc.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
EXE2MODIFY 
EXE2CHECK 
EXE2SPECIAL 
EXE2TEXT 
EXE2DVI 

Definition at line 225 of file dvispc.c.

Function Documentation

◆ a2i()

unsigned int a2i ( unsigned char *  s)

Definition at line 2208 of file dvispc.c.

References atoi(), hex_to_dig, is_hex, is_oct, isdigit, num, and s.

Referenced by trans2dvi().

◆ error()

void error ( char *  msg)

Definition at line 386 of file dvispc.c.

References Exit(), and fprintf.

Referenced by interpret(), main(), read_post(), sp_color(), sp_pdf_bann(), and sp_pdf_bcolor().

◆ Exit()

void Exit ( int  code)

Definition at line 374 of file dvispc.c.

References exit(), fclose, fp_out, outfile, fc-lang::stdout, and unlink.

Referenced by _bdf_add_comment(), _bdf_add_property(), _bdf_list_ensure(), _bdf_list_split(), _bdf_parse_glyphs(), _bdf_parse_properties(), _bdf_parse_start(), _bdf_readstream(), _bdf_set_default_spacing(), af_axis_hints_new_edge(), af_axis_hints_new_segment(), af_face_globals_compute_style_coverage(), af_face_globals_get_metrics(), af_face_globals_new(), af_glyph_hints_reload(), af_latin_hints_apply(), af_latin_hints_compute_edges(), af_latin_hints_compute_segments(), af_latin_metrics_init(), af_latin_metrics_init_widths(), af_loader_embolden_glyph_in_slot(), af_loader_load_glyph(), bdf_cmap_char_next(), bdf_create_property(), BDF_Face_Init(), BDF_Glyph_Load(), bdf_load_font(), Cache_Done(), Cache_New(), cff_blend_build_vector(), cff_blend_doBlend(), cff_charset_compute_cids(), cff_charset_load(), cff_decoder_prepare(), cff_encoding_load(), cff_face_init(), cff_fd_select_get(), cff_font_load(), cff_get_glyph_name(), cff_index_access_element(), cff_index_get_name(), cff_index_get_pointers(), cff_index_init(), cff_index_load_offsets(), CFF_Load_FD_Select(), cff_load_private_dict(), cff_parse_blend(), cff_parse_integer(), cff_parse_maxstack(), cff_parse_real(), cff_parse_vsindex(), cff_parser_init(), cff_parser_run(), cff_size_init(), cff_subfont_load(), cff_vstore_load(), check_table_dir(), check_type1_format(), cid_face_init(), cid_face_open(), cid_hex_to_binary(), cid_load_glyph(), cid_load_keyword(), cid_parse_font_matrix(), cid_parser_new(), cid_read_subrs(), cid_slot_load_glyph(), classic_kern_validate(), compositeGlyph_size(), eps_to_pict(), error(), fnt_face_get_dll_font(), FNT_Face_Init(), fnt_font_load(), FNT_Load_Glyph(), FT_Add_Module(), ft_add_renderer(), FT_Attach_Stream(), ft_bitmap_glyph_init(), FT_ClassicKern_Validate(), FT_CMap_New(), FT_DEFINE_GLYPH(), FT_Done_Library(), FT_Face_Properties(), FT_Get_Gasp(), FT_Get_Glyph(), FT_Get_Postscript_Name(), FT_Glyph_Copy(), FT_Glyph_Stroke(), FT_Glyph_StrokeBorder(), FT_Glyph_To_Bitmap(), FT_GlyphLoader_CheckPoints(), FT_GlyphLoader_CheckSubGlyphs(), ft_glyphslot_init(), FT_Load_Glyph(), FT_Lookup_Renderer(), ft_lzwstate_io(), FT_New_GlyphSlot(), FT_New_Size(), ft_open_face_internal(), FT_OpenType_Validate(), FT_Outline_Decompose(), FT_Raccess_Get_DataOffsets(), ft_raster1_render(), ft_raster1_transform(), FT_Set_Renderer(), ft_smooth_raster_lcd(), ft_smooth_raster_lcdv(), ft_smooth_render(), ft_smooth_transform(), FT_Stream_EnterFrame(), FT_Stream_New(), FT_Stream_ReadFields(), FT_Stream_TryRead(), ft_stroke_border_get_counts(), ft_stroke_border_grow(), ft_stroker_add_reverse_left(), ft_stroker_cap(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), FT_Stroker_EndSubPath(), FT_Stroker_GetBorderCounts(), FT_Stroker_GetCounts(), FT_Stroker_LineTo(), ft_stroker_outside(), FT_Stroker_ParseOutline(), ft_stroker_process_corner(), ft_stroker_subpath_start(), FT_TrueTypeGX_Validate(), ftc_basic_family_load_glyph(), FTC_CMapCache_Lookup(), FTC_ImageCache_Lookup(), FTC_ImageCache_LookupScaler(), FTC_Manager_New(), FTC_Manager_RegisterCache(), FTC_MruList_New(), FTC_SBitCache_Lookup(), FTC_SBitCache_LookupScaler(), ftc_scaler_lookup_size(), FTC_SNode_New(), ftglue_face_goto_table(), ftglue_stream_frame_enter(), GetBaseline(), gxv_feat_registry_validate(), gxv_kern_coverage_validate(), gxv_kern_subtable_validate(), gxv_lcar_partial_validate(), gxv_load_table(), gxv_prop_validate(), gxv_sfntName_validate(), gxv_validate(), gxv_XEntryTable_validate(), hash_insert(), hash_rehash(), Horizontal_Sweep_Drop(), Load_Range_Codes(), load_truetype_glyph(), make_page_index(), otv_load_table(), otv_validate(), parse_blend_axis_types(), parse_blend_design_map(), parse_blend_design_positions(), parse_dict(), parse_fd_array(), parse_weight_vector(), PCF_Face_Init(), pcf_get_encodings(), pcf_get_metric(), PCF_Glyph_Load(), pcf_load_font(), pcf_read_TOC(), pfr_aux_name_load(), pfr_cmap_char_next(), pfr_cmap_init(), pfr_extra_item_load_bitmap_info(), pfr_extra_item_load_font_id(), pfr_extra_item_load_kerning_pairs(), pfr_extra_item_load_stem_snaps(), pfr_extra_items_parse(), pfr_face_get_kerning(), pfr_face_init(), pfr_get_advance(), pfr_glyph_curve_to(), pfr_glyph_line_to(), pfr_glyph_load_compound(), pfr_glyph_load_rec(), pfr_glyph_load_simple(), pfr_load_bitmap_metrics(), pfr_log_font_count(), pfr_log_font_load(), pfr_phy_font_load(), pfr_slot_load(), PS_Conv_ToFixed(), ps_dimension_add_counter(), ps_dimension_add_t1stem(), ps_dimension_set_mask_bits(), ps_hint_table_alloc(), ps_hints_apply(), ps_mask_set_bit(), ps_mask_table_alloc(), ps_mask_table_last(), ps_mask_table_merge(), ps_mask_table_merge_all(), ps_mask_table_set_bits(), ps_parser_load_field(), ps_parser_load_field_table(), ps_parser_to_bytes(), ps_table_new(), ps_tocoordarray(), ps_tofixedarray(), psh_glyph_init(), psh_hint_table_init(), read_post(), s_work(), sfnt_load_face(), sp_color(), sp_pdf_bann(), sp_pdf_bcolor(), t1_allocate_blend(), t1_cmap_custom_char_next(), t1_cmap_std_char_next(), T1_Face_Init(), T1_Get_MM_Var(), T1_Get_Private_Dict(), T1_Load_Glyph(), t1_load_keyword(), T1_New_Parser(), T1_Open_Face(), T1_Read_Metrics(), T1_Read_PFM(), T42_Face_Init(), t42_load_keyword(), T42_Open_Face(), t42_parse_dict(), t42_parse_sfnts(), t42_parser_init(), trans2dvi(), translate(), tt_face_get_name(), tt_face_goto_table(), tt_face_init(), tt_face_load_any(), tt_face_load_cmap(), tt_face_load_cvt(), tt_face_load_font_dir(), tt_face_load_fpgm(), tt_face_load_gasp(), tt_face_load_generic_header(), tt_face_load_hdmx(), tt_face_load_kern(), tt_face_load_loca(), tt_face_load_maxp(), tt_face_load_name(), tt_face_load_os2(), tt_face_load_pclt(), tt_face_load_prep(), TT_Get_SBit_Strike(), TT_Load_Glyph(), TT_Load_Glyph_Bitmap(), TT_Process_Simple_Glyph(), TTObjs_Init(), Vertical_Sweep_Drop(), woff2_open_font(), woff_open_font(), write_buf(), and write_sp().

◆ find_key()

int find_key ( char *  s0)

Definition at line 2144 of file dvispc.c.

References atoi(), end, key, len, name, num, pt, s, s0, sub_number, t, and top.

Referenced by trans2dvi().

◆ flush_str()

◆ get_next()

unsigned char* get_next ( unsigned char *  pt)

◆ interpret()

◆ jis2sjis()

void jis2sjis ( int h,
int l 
)

Definition at line 1782 of file dvispc.c.

References h, and cutout::l.

◆ key_swap()

void key_swap ( int  i,
int  j 
)

Definition at line 2076 of file dvispc.c.

References i, j, key, and memcpy.

Referenced by sort_key().

◆ main()

◆ make_page_index()

void make_page_index ( struct DVIFILE_INFO_REC dvi,
struct DIMENSION_REC dim 
)

Definition at line 1155 of file dvispc.c.

References BOP, dvi, Exit(), fprintf, fseek, i, malloc, offset, read_byte, read_long(), SEEK_CUR, and SEEK_SET.

Referenced by main().

◆ out_string()

void out_string ( FILE in,
FILE out,
int  len 
)

Definition at line 1794 of file dvispc.c.

References ch, DTL_STRING, f_dtl, fprintf, getc, in, len, out, and putc.

Referenced by transpre().

◆ read_long()

int read_long ( FILE fp)

Definition at line 402 of file dvispc.c.

References fp, i, and read_byte.

Referenced by interpret(), make_page_index(), read_post(), translate(), transpost(), and transpre().

◆ read_n()

int read_n ( FILE fp,
int  n 
)

Definition at line 346 of file dvispc.c.

References d, fp, getc, and n.

Referenced by s_work(), and transpost().

◆ read_post()

void read_post ( struct DVIFILE_INFO_REC dvi)

◆ read_word()

int read_word ( FILE fp)

Definition at line 420 of file dvispc.c.

References fp, i, and read_byte.

Referenced by translate().

◆ replace()

◆ s_work()

◆ signed_read_n()

int signed_read_n ( FILE fp,
int  n 
)

Definition at line 360 of file dvispc.c.

References d, fp, getc, and n.

◆ sort_key()

void sort_key ( void  )

Definition at line 2085 of file dvispc.c.

References i, j, key, key_swap(), name, and strcmp().

Referenced by graphite2::Pass::readRules(), replace(), and search_quote().

◆ sp_color()

void sp_color ( char *  sp)

◆ sp_pdf_bann()

void sp_pdf_bann ( char *  sp)

◆ sp_pdf_bcolor()

void sp_pdf_bcolor ( char *  sp)

◆ sp_pdf_eann()

void sp_pdf_eann ( char *  sp)

Definition at line 1509 of file dvispc.c.

References f_prescan, fprintf, pdf_annot_depth, pdf_annot_under, and s.

◆ sp_pdf_ecolor()

void sp_pdf_ecolor ( char *  sp)

Definition at line 1468 of file dvispc.c.

References f_needs_corr, f_prescan, fprintf, pdf_color_depth, pdf_color_under, and s.

Referenced by s_work().

◆ StrLen()

int StrLen ( unsigned char *  pt)

Definition at line 2234 of file dvispc.c.

References DTL_STRING, f_dtl, is_hex, pt, and s.

Referenced by cmsMLUgetASCII(), cmsMLUgetWide(), and trans2dvi().

◆ strsubcmp()

int strsubcmp ( char *  s,
char *  t 
)

Definition at line 1286 of file dvispc.c.

References s.

Referenced by s_work().

◆ strsubcmp_n()

int strsubcmp_n ( char *  s,
char *  t 
)

Definition at line 1298 of file dvispc.c.

References s.

◆ trans2dvi()

◆ translate()

◆ transpost()

void transpost ( FILE dvi)

Definition at line 1833 of file dvispc.c.

References code, dvi, EOF, f_pos, fp_out, fprintf, ftell, getc, MSG, putc, read_long(), read_n(), and work().

Referenced by translate().

◆ transpre()

void transpre ( FILE dvi)

Definition at line 1813 of file dvispc.c.

References DTL_FORM, dvi, f_dtl, f_pos, fp_out, fprintf, fputs, fseek, getc, len, MSG, out_string(), putc, read_long(), and SEEK_SET.

Referenced by translate().

◆ usage()

void usage ( int  ex)

Definition at line 429 of file dvispc.c.

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

Referenced by main().

◆ work()

◆ write_long()

void write_long ( int  x,
FILE fp 
)

Definition at line 393 of file dvispc.c.

References fp, write_byte, and cordic::x.

Referenced by translate(), and write_sp().

◆ write_n()

void write_n ( int  num,
int  byte 
)

Definition at line 2184 of file dvispc.c.

References fp_out, num, and putc.

Referenced by trans2dvi().

◆ write_sp()

void write_sp ( FILE fp,
char *  sp 
)

Definition at line 808 of file dvispc.c.

References EXE2MODIFY, Exit(), f_debug, f_last, f_mode, fp, fp_out, fprintf, len, sp, strlen(), write_long(), and XXX1.

Referenced by translate(), and write_sp_nodebug().

◆ write_sp_nodebug()

void write_sp_nodebug ( FILE fp,
char *  sp 
)

Definition at line 828 of file dvispc.c.

References f_debug, fp, sp, and write_sp().

Referenced by translate().

◆ write_word()

void write_word ( int  x,
FILE fp 
)

Definition at line 413 of file dvispc.c.

References fp, write_byte, and cordic::x.

Referenced by translate().

Variable Documentation

◆ AdID

const int AdID = (('A'<<24)+('d'<<16)+('O'<<8)+ 140 )

Definition at line 312 of file dvispc.c.

Referenced by read_post().

◆ annot_buf

char annot_buf[ 8 *512]

Definition at line 287 of file dvispc.c.

Referenced by sp_pdf_bann().

◆ background

char background[128]

Definition at line 259 of file dvispc.c.

Referenced by s_work(), and translate().

◆ background_prev

char background_prev[128]

Definition at line 260 of file dvispc.c.

Referenced by translate().

◆ c128_name

char* c128_name[]
static

Definition at line 1687 of file dvispc.c.

◆ c235_name

char* c235_name[]
static
Initial value:
=
{
"f1",
"f2",
"f3",
"f4",
"special1",
"special2",
"special3",
"special4",
"fd1",
"fd2",
"fd3",
"fd4",
"pre",
"opcode",
"opcode",
"opcode",
"opcode",
"opcode",
"opcode",
"opcode",
"dir"
}

Definition at line 1734 of file dvispc.c.

◆ cmd128_mode

unsigned char cmd128_mode[]
static

Definition at line 1209 of file dvispc.c.

Referenced by s_work().

◆ cmd128_name

char* cmd128_name[]
static

Definition at line 1612 of file dvispc.c.

Referenced by replace().

◆ cmd235_mode

unsigned char cmd235_mode[]
static
Initial value:
=
{
0x41,
0x42,
0x43,
0x44,
0x51,
0x52,
0x53,
0x54,
0x21,
0x22,
0x23,
0x24,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10
}

Definition at line 1257 of file dvispc.c.

Referenced by s_work().

◆ cmd235_name

char* cmd235_name[]
static
Initial value:
=
{
"fnt1",
"fnt2",
"fnt3",
"fnt4",
"xxx1",
"xxx2",
"xxx3",
"xxx4",
"fntdef1",
"fntdef2",
"fntdef3",
"fntdef4",
"pre",
"illegal",
"illegal",
"illegal",
"illegal",
"illegal",
"illegal",
"illegal",
"dir"
}

Definition at line 1659 of file dvispc.c.

Referenced by replace().

◆ color_buf

char color_buf[ 512 *32]

Definition at line 286 of file dvispc.c.

Referenced by sp_color(), and sp_pdf_bcolor().

◆ color_depth

int color_depth

Definition at line 272 of file dvispc.c.

Referenced by sp_color(), and translate().

◆ color_depth_max

int color_depth_max

Definition at line 273 of file dvispc.c.

Referenced by sp_color(), and translate().

◆ color_pt

char* color_pt[512]

Definition at line 275 of file dvispc.c.

Referenced by sp_color(), and translate().

◆ color_under

int color_under

Definition at line 274 of file dvispc.c.

Referenced by sp_color(), and translate().

◆ dvi_dim

struct DIMENSION_REC dvi_dim

Referenced by main().

◆ dvi_info

struct DVIFILE_INFO_REC dvi_info

Referenced by main().

◆ f_background

int f_background = 0

Definition at line 261 of file dvispc.c.

Referenced by s_work(), and translate().

◆ f_backup

int f_backup = 0

Definition at line 237 of file dvispc.c.

Referenced by main(), and translate().

◆ f_book

int f_book = 0

Definition at line 249 of file dvispc.c.

Referenced by main(), and translate().

◆ f_debug

int f_debug = 0

Definition at line 235 of file dvispc.c.

Referenced by main(), trans2dvi(), translate(), write_sp(), and write_sp_nodebug().

◆ f_dtl

int f_dtl = 0

Definition at line 223 of file dvispc.c.

Referenced by flush_str(), main(), out_string(), StrLen(), trans2dvi(), translate(), and transpre().

◆ f_last

int f_last = 0

Definition at line 253 of file dvispc.c.

Referenced by translate(), and write_sp().

◆ f_mode

int f_mode = EXE2MODIFY

Definition at line 229 of file dvispc.c.

Referenced by interpret(), main(), s_work(), translate(), and write_sp().

◆ f_needs_corr

int f_needs_corr

Definition at line 285 of file dvispc.c.

Referenced by sp_color(), sp_pdf_ecolor(), and translate().

◆ f_overwrite

int f_overwrite = 0

Definition at line 236 of file dvispc.c.

Referenced by main(), and translate().

◆ f_pdf_bgcolor

int f_pdf_bgcolor = 0

Definition at line 264 of file dvispc.c.

Referenced by s_work(), and translate().

◆ f_pn

int f_pn = 0

Definition at line 267 of file dvispc.c.

Referenced by s_work(), and translate().

◆ f_pos

int f_pos = 0

Definition at line 248 of file dvispc.c.

Referenced by interpret(), main(), trans2dvi(), transpost(), and transpre().

◆ f_prescan

int f_prescan = 0

◆ f_ptex

int f_ptex = 0

Definition at line 251 of file dvispc.c.

Referenced by read_post(), and s_work().

◆ f_sjis

int f_sjis = 1

Definition at line 245 of file dvispc.c.

Referenced by main().

◆ font_use

char font_use[256]

Definition at line 310 of file dvispc.c.

Referenced by trans2dvi().

◆ fp_in

FILE* fp_in

Definition at line 290 of file dvispc.c.

Referenced by main(), and trans2dvi().

◆ fp_out

FILE* fp_out

◆ infile

char infile[0x200]

Definition at line 308 of file dvispc.c.

Referenced by main(), and translate().

◆ key

struct KEY_LIST key[]

Definition at line 1858 of file dvispc.c.

Referenced by find_key(), key_swap(), replace(), sort_key(), and trans2dvi().

◆ len

int len = 0

Definition at line 1766 of file dvispc.c.

Referenced by find_key(), flush_str(), main(), out_string(), trans2dvi(), transpre(), and write_sp().

◆ max_stack

int max_stack

Definition at line 254 of file dvispc.c.

Referenced by trans2dvi().

◆ num_add

int num_add

Definition at line 1522 of file dvispc.c.

Referenced by read_post().

◆ out_pages

char* out_pages ="T-L"

Definition at line 255 of file dvispc.c.

Referenced by main(), and translate().

◆ outfile

char outfile[0x200]

Definition at line 309 of file dvispc.c.

Referenced by Exit(), main(), trans2dvi(), and translate().

◆ pdf_annot_depth

int pdf_annot_depth

Definition at line 280 of file dvispc.c.

Referenced by sp_pdf_bann(), and sp_pdf_eann().

◆ pdf_annot_depth_max

int pdf_annot_depth_max

Definition at line 281 of file dvispc.c.

Referenced by sp_pdf_bann(), and translate().

◆ pdf_annot_pt

char* pdf_annot_pt[8]

Definition at line 283 of file dvispc.c.

Referenced by sp_pdf_bann().

◆ pdf_annot_under

int pdf_annot_under

Definition at line 282 of file dvispc.c.

Referenced by sp_pdf_eann().

◆ pdf_bgcolor

char pdf_bgcolor[128]

Definition at line 262 of file dvispc.c.

Referenced by s_work(), and translate().

◆ pdf_bgcolor_prev

char pdf_bgcolor_prev[128]

Definition at line 263 of file dvispc.c.

Referenced by translate().

◆ pdf_color_depth

int pdf_color_depth

Definition at line 276 of file dvispc.c.

Referenced by sp_pdf_bcolor(), sp_pdf_ecolor(), and translate().

◆ pdf_color_depth_max

int pdf_color_depth_max

Definition at line 277 of file dvispc.c.

Referenced by sp_pdf_bcolor(), and translate().

◆ pdf_color_pt

char* pdf_color_pt[512]

Definition at line 279 of file dvispc.c.

Referenced by sp_pdf_bcolor(), and translate().

◆ pdf_color_under

int pdf_color_under

Definition at line 278 of file dvispc.c.

Referenced by sp_pdf_ecolor(), and translate().

◆ SETCHAR

char* SETCHAR = "setchar"
static

Definition at line 1610 of file dvispc.c.

Referenced by replace().

◆ str_buf

char str_buf[0x60]

Definition at line 1765 of file dvispc.c.

Referenced by flush_str().

◆ sub_number

int sub_number

Definition at line 2142 of file dvispc.c.

Referenced by find_key(), and trans2dvi().

◆ tmp_buf

char tmp_buf[0x4000]

Definition at line 289 of file dvispc.c.

Referenced by main(), s_work(), trans2dvi(), and translate().

◆ top_add

int top_add

Definition at line 1523 of file dvispc.c.

Referenced by read_post().

◆ total_book_page

int total_book_page

Definition at line 256 of file dvispc.c.

Referenced by translate().

◆ tpic_pn

char tpic_pn[128]

Definition at line 265 of file dvispc.c.

Referenced by s_work(), and translate().

◆ tpic_pn_prev

char tpic_pn_prev[128]

Definition at line 266 of file dvispc.c.

Referenced by translate().