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
|
/*
* Main include file for tangle etc. in C
*
* Tim Morgan 2/11/88
*/
#include <stdio.h>
#include "site.h"
/*
* Global routines implemented as macros, plus some type coercion stuff.
*/
#define odd(x) ((x) % 2)
#define putbyte(x,f) putc(((x)&255), f)
#define round(x) zround((double)(x))
#define incr(x) ++x
#define decr(x) --x
#define trunc(x) ( (integer) (x) )
#define readln(f) while (!feof(f) && getc(f) != '\n')
#define read(f, b) b = getc(f)
#define input3ints(a,b,c) zinput_3ints(&a, &b, &c)
#define zfseek(f,n,w) (void) fseek(f, (long) n, (int) w)
#define eof(f) feof(f)
#define abs(x) ((x>=0)?(x):(-(x)))
#define fabs(x) ((x>=0.0)?(x):(-(x)))
#define Fputs(stream, s) (void) fputs(s, stream)
#define rewrite(f,n) f = openf(n+1, "w")
#define reset(f,n) f = openf(n+1, "r")
#define flush(f) (void) fflush(f)
#define true 1
#define false 0
#define chr(x) (x)
#define ord(x) (x)
#define vgetc(f) (void) getc(f)
#define uexit(x) exit(x)
FILE *openf();
/*
* Global Types
*/
typedef FILE *text, *file_ptr;
typedef char *ccharpointer;
/*
* Global Data and Datastructures
*/
extern integer argc;
extern integer zround();
extern integer inputint();
|