| 1 |
/*t1part.h from t1part.c version 1.59 beta (c)1994, 1996 |
| 2 |
by Sergey Lesenko |
| 3 |
[email protected] |
| 4 |
* |
| 5 |
* It is distributed with no warranty of any kind. |
| 6 |
* You may modify and use this program. It can be included |
| 7 |
* in any distribution, commercial or otherwise, so long as |
| 8 |
* copyright notice be preserved on all copies. |
| 9 |
*/ |
| 10 |
#ifdef KPATHSEA |
| 11 |
#include <kpathsea/c-ctype.h> |
| 12 |
#else /* not KPATHSEA */ |
| 13 |
#include <assert.h> |
| 14 |
|
| 15 |
#include <stdio.h> |
| 16 |
#include <ctype.h> |
| 17 |
#include <stdlib.h> |
| 18 |
#include <string.h> |
| 19 |
#endif /* not KPATHSEA */ |
| 20 |
|
| 21 |
#define DVIPS |
| 22 |
|
| 23 |
/* |
| 24 |
#define DOS |
| 25 |
#define BORLANDC |
| 26 |
*/ |
| 27 |
|
| 28 |
#ifdef DEBUG |
| 29 |
|
| 30 |
extern int debug_flag; |
| 31 |
|
| 32 |
#define D_VIEW_VECTOR (1<<8) |
| 33 |
#define D_CALL_SUBR (1<<9) |
| 34 |
|
| 35 |
#endif |
| 36 |
|
| 37 |
#ifdef DVIPS |
| 38 |
#ifndef KPATHSEA |
| 39 |
extern char *headerpath; |
| 40 |
#endif /* not KPATHSEA */ |
| 41 |
#define psfopen(A,B) search(headerpath,A,B) |
| 42 |
#else |
| 43 |
#define psfopen(A,B) fopen(A,B) |
| 44 |
#endif |
| 45 |
|
| 46 |
#ifdef KPATHSEA |
| 47 |
#define OPEN_READ_BINARY FOPEN_RBIN_MODE |
| 48 |
#else |
| 49 |
#if defined(DOS) || defined(WIN32) |
| 50 |
#define OPEN_READ_BINARY "rb" |
| 51 |
#else |
| 52 |
#define OPEN_READ_BINARY "r" |
| 53 |
#endif |
| 54 |
#endif /* not KPATHSEA */ |
| 55 |
|
| 56 |
#ifdef DOS |
| 57 |
typedef unsigned char ub1; |
| 58 |
typedef unsigned long ub4; |
| 59 |
#else |
| 60 |
typedef unsigned char ub1; |
| 61 |
typedef unsigned long int ub4; |
| 62 |
#endif |
| 63 |
|
| 64 |
#ifdef BORLANDC |
| 65 |
typedef unsigned char typetemp; |
| 66 |
#define BORLAND_HUGE huge |
| 67 |
#else |
| 68 |
typedef unsigned char typetemp; |
| 69 |
#define BORLAND_HUGE |
| 70 |
#endif |
| 71 |
|
| 72 |
#ifdef BORLANDC |
| 73 |
#include <alloc.h> |
| 74 |
#define UniRealloc farrealloc |
| 75 |
#define UniFree farfree |
| 76 |
#else |
| 77 |
#ifdef KPATHSEA |
| 78 |
#define UniRealloc xrealloc |
| 79 |
#define UniFree free |
| 80 |
#else |
| 81 |
#define UniRealloc realloc |
| 82 |
#define UniFree free |
| 83 |
#endif /* not KPATHSEA */ |
| 84 |
#endif |
| 85 |
|
| 86 |
#include "protos.h" |
| 87 |
|
| 88 |
#define NUM_LABEL 1024 |
| 89 |
#define BASE_MEM 16384 |
| 90 |
#define ADD_MEM 16384 |
| 91 |
|
| 92 |
#define FLG_LOAD_BASE (1) |
| 93 |
|
| 94 |
extern unsigned char grid[]; |
| 95 |
extern unsigned char *line, *tmpline; |
| 96 |
extern int loadbase; |
| 97 |
extern struct Char *FirstCharB; |