home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari FTP
/
ATARI_FTP_0693.zip
/
ATARI_FTP_0693
/
Tex
/
Tex29
/
StTeXsrc.zoo
/
src
/
BIGGG_tex.h
< prev
next >
Wrap
C/C++ Source or Header
|
1988-06-04
|
6KB
|
307 lines
/*
This is tex.h in the CommonTeX source. It shows the size of the
buffers uses. The 'bigvirtex' version was built using the 'BIGGGG' #ifdefed
sizes below. These may be bigger than needed.
Call bigvirtex with:
bigvirtex '&bigplain' yourfile.texinfo
*/
/*
* Copyright 1986, 1987 Pat Joseph Monardo. All rights reserved.
* Copying of this file is granted according to the provisions
* specified in the file COPYING which must accompany this file.
*/
/*
* tex.h
*/
#include <stdio.h>
#include <signal.h>
#include <sys/time.h>
/*
* constants in the outer block
*/
#define NUL '\0'
#define EOLN '\n'
#define FALSE 0
#define TRUE 1
#define EMPTY 0
#define BUF_SIZE 5000
#define DVI_BUF_SIZE 1024
#define ERROR_LINE 78
#define FILE_NAME_SIZE 104
#define FONT_BASE 0
#define FONT_MAX 250 /* was 100 */
#define FONT_MEM_SIZE 65000 /* was 25000 */
#define HALF_BUF 512
#define HALF_ERROR_LINE 39
#define HASH_SIZE 5000 /* was 3000 */
#define HASH_PRIME 2551
#define HYPH_SIZE 307
#define MAX_IN_OPEN 15
#define MAX_PRINT_LINE 78
#define MAX_STRINGS 5400
#define NEST_SIZE 400 /* was 40 */
#define PARAM_SIZE 300 /* was 30 */
#define POOL_SIZE 75000 /* was 25000 */
#define SAVE_SIZE 2400 /* was 600 */
#define STACK_SIZE 800 /* was 200 */
#define STRING_VACANCIES 1000
#define TRIE_OP_HASH_SIZE 512
#define TRIE_SIZE 8000
#if !defined(BIGG) && !defined(BIG) && !defined(BIGGG) && !defined(BIGGGG)
#define NORMAL_BIG 1
#endif
#ifdef INIT
#if NORMAL_BIG
#define MEM_BOT 0
#define MEM_TOP 17000
#define TOK_BOT 0
#define TOK_TOP 27000
#define MEM_MIN MEM_BOT
#define MEM_MAX MEM_TOP
#define TOK_MIN TOK_BOT
#define TOK_MAX TOK_TOP
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 65535
#endif
#ifdef BIG
#define MEM_BOT 0
#define MEM_TOP 27000
#define TOK_BOT 0
#define TOK_TOP 37000
#define MEM_MIN MEM_BOT
#define MEM_MAX MEM_TOP
#define TOK_MIN TOK_BOT
#define TOK_MAX TOK_TOP
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 655350
#endif
#ifdef BIGG
#define MEM_BOT 0
#define MEM_TOP 37000
#define TOK_BOT 0
#define TOK_TOP 47000
#define MEM_MIN MEM_BOT
#define MEM_MAX MEM_TOP
#define TOK_MIN TOK_BOT
#define TOK_MAX TOK_TOP
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 6553500
#endif
#ifdef BIGGG
#define MEM_BOT 0
#define MEM_TOP 87000
#define TOK_BOT 0
#define TOK_TOP 47000
#define MEM_MIN MEM_BOT
#define MEM_MAX MEM_TOP
#define TOK_MIN TOK_BOT
#define TOK_MAX TOK_TOP
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 6553500
#endif
#ifdef BIGGGG
#define MEM_BOT 0
#define MEM_TOP 87000
#define TOK_BOT 0
#define TOK_TOP 47000
#define MEM_MIN MEM_BOT
#define MEM_MAX MEM_TOP
#define TOK_MIN TOK_BOT
#define TOK_MAX TOK_TOP
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 6553500
#endif
#else
#if NORMAL_BIG
#define MEM_BOT 0
#define MEM_TOP 17000
#define TOK_BOT 0
#define TOK_TOP 27000
#define MEM_MIN 0
#define MEM_MAX 32000
#define TOK_MIN 0
#define TOK_MAX 35000
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 65535
#endif
#ifdef BIG
#define MEM_BOT 0
#define MEM_TOP 27000
#define TOK_BOT 0
#define TOK_TOP 37000
#define MEM_MIN 0
#define MEM_MAX 64000
#define TOK_MIN 0
#define TOK_MAX 45000
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 655350
#endif
#ifdef BIGG
#define MEM_BOT 0
#define MEM_TOP 37000
#define TOK_BOT 0
#define TOK_TOP 47000
#define MEM_MIN 0
#define MEM_MAX 128000
#define TOK_MIN 0
#define TOK_MAX 65000
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 6553500
#endif
#ifdef BIGGG
#define MEM_BOT 0
#define MEM_TOP 87000
#define TOK_BOT 0
#define TOK_TOP 47000
#define MEM_MIN 0
#define MEM_MAX 178000
#define TOK_MIN 0
#define TOK_MAX 65000
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 6553500
#endif
#ifdef BIGGGG
#define MEM_BOT 0
#define MEM_TOP 87000
#define TOK_BOT 0
#define TOK_TOP 47000
#define MEM_MIN 0
#define MEM_MAX 250000
#define TOK_MIN 0
#define TOK_MAX 65000
#define MIN_QUARTERWORD 0
#define MAX_QUARTERWORD 255
#define MIN_HALFWORD 0
#define MAX_HALFWORD 6553500
#endif
#endif
/*
* types in the outer block
*/
#define global extern
#define ascii unsigned char
#define bool int
#define byte unsigned char
#define fnt int
#define gord unsigned char
#define gratio float
#define group int
#define ptr hword
#define sc i
#define scal long
#define str hword
#define val long
typedef FILE *word_file;
typedef FILE *alpha_file;
typedef FILE *byte_file;
#define qword unsigned char
#if NORMAL_BIG
#define hword unsigned short
#else
#define hword unsigned long
#endif
typedef union {
struct {
hword rh;
hword lh;
} hh1;
struct {
hword rh;
qword b0;
qword b1;
} hh2;
} twoh;
typedef struct {
qword b0;
qword b1;
qword b2;
qword b3;
} fourq;
typedef union {
long i;
gratio gr;
twoh hh;
fourq qqqq;
} mword;
/*
* variables in the outer block
*/
global char banner[];
global int ready_already;
/*
* functions in the outer block
*/
int final_cleanup();
int close_files_and_terminate();
int initialize();
bool decode_args();
int handle_int();
/*
* some common programming idioms
*/
#define incr(i) ++(i)
#define decr(i) --(i)
#define odd(i) ((i) & 1)
#define abs(i) ((i) >= 0 ? (i) : -(i))
#define round(x) (long) ((x) > 0.0 ? ((x) + 0.5) : ((x) - 0.5))
#define negate(x) (x) = -(x)
#define loop while (1)