summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipsk/t1part.h
blob: b33bf4dfb63457c344d61437f567367fb6c11668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*t1part.h from t1part.c version 1.59 beta (c)1994, 1996
by Sergey Lesenko
lesenko@desert.ihep.su
 *
 *   It is distributed with no warranty of any kind.
 *   You may modify and use this program. It can be included
 *   in any distribution, commercial or otherwise, so long as
 *   copyright notice be preserved on all copies.
 */
#ifdef KPATHSEA
#include <kpathsea/c-ctype.h>
#else /* not KPATHSEA */
#include <assert.h>

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#endif /* not KPATHSEA */

#define DVIPS

/*
#define DOS
#define BORLANDC
*/

#ifdef DEBUG

extern int debug_flag;

#define D_VIEW_VECTOR    (1<<8)
#define D_CALL_SUBR      (1<<9)

#endif

#ifdef DVIPS
extern FILE *search();
#ifndef KPATHSEA
extern char *headerpath ;
#endif /* not KPATHSEA */
#define psfopen(A,B) search(headerpath,A,B)
#else
#define psfopen(A,B)  fopen(A,B)
#endif

#ifdef KPATHSEA
#define OPEN_READ_BINARY FOPEN_RBIN_MODE
#else
#if defined(DOS) || defined(WIN32)
#define OPEN_READ_BINARY "rb"
#else
#define OPEN_READ_BINARY "r"
#endif
#endif /* not KPATHSEA */

#ifdef DOS
typedef unsigned char  ub1;
typedef unsigned long  ub4;
#else
typedef unsigned char  ub1;
typedef unsigned long int   ub4;
#endif

#ifdef BORLANDC
typedef unsigned char typetemp;
#define _HUGE huge
#else
typedef unsigned char typetemp;
#define _HUGE
#endif

#ifdef BORLANDC
#include <alloc.h>
#define UniRealloc farrealloc
#define UniFree farfree
#else
#ifdef KPATHSEA
#define UniRealloc  xrealloc
#define UniFree free
#else
#define UniRealloc  realloc
#define UniFree free
#endif /* not KPATHSEA */
#endif

#include "protos.h"
#if 0
struct Char * AddChar ();
void AddStr();
void BinEDeCrypt ();
int  DeCodeStr();
int  DefTypeFont();
unsigned
char CDeCrypt();
void CorrectGrid();
int  CharEncoding ();
void CheckChoosing();
int  ChooseChar();
int  ChooseVect();
int  EndOfEncoding();
void ErrorOfScan ();
int FindCharW();
void FindEncoding ();
int  FindKeyWord ();
int  FontPart ();
void HexEDeCrypt ();
void *getmem ();
int  GetNum ();
int  GetToken ();
int  GetWord ();
int  GetZeroLine ();
unsigned
char *itoasp ();
void LastLook ();
ub4  little4 ();
void OutASCII ();
void OutHEX ();
void OutStr();
void NameOfProgram ();
int  PartialPFA ();
int  PartialPFB ();
void PrintChar ();
int  PassString ();
int  PassToken ();
void Reverse();
int  ScanBinary ();
void ScanChars ();
void ScanSubrs ();
void SubstNum ();
void ViewReturnCall();
struct Char * UnDefineChars ();
void UnDefineCharsW();
void UnDefineStr();
int WorkVect();
#endif

#define NUM_LABEL     1024
#define BASE_MEM     16384
#define ADD_MEM      16384

#define FLG_LOAD_BASE   (1)

extern unsigned char grid[];
extern unsigned char *line, *tmpline ;
extern int loadbase ;
extern struct Char *FirstCharB;