DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T t

⟦574978519⟧ TextFile

    Length: 2441 (0x989)
    Types: TextFile
    Names: »texware.h«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« 
        └─⟦036c765ac⟧ 
            └─⟦this⟧ »TeX3.0/texware/texware.h« 

TextFile

/*
 * Main include file for TeXware in C.
 *
 * Tim Morgan  2/11/88
 */

#include <stdio.h>
#include "site.h"

/*
 * Global routines implemented as macros, plus some type coercion stuff.
 */

#define	toint(x)	((integer) (x))
#define	odd(x)		((x) % 2)
#define	putbyte(x,f)	putc((char) ((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)	{register c; while ((c=getc(f)) != '\n' && c != EOF);}
#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)		test_eof(f)
#define	abs(x)		((x>=0)?(x):(-(x)))
#define	fabs(x)		((x>=0.0)?(x):(-(x)))
#define	Fputs(stream, s)	(void) fputs(s, stream)
#ifdef	OUT_BIN
#define	rewrite(f,n)	f = openf(n+1, "wb")
#define	reset(f,n)	((f)?fclose(f),(f=openf(n+1, "rb")):(f=openf(n+1,"rb")))
#else
#define rewrite(f,n)	f = openf(n+1, "w")
#define	reset(f,n)	((f)?fclose(f),(f=openf(n+1, "r")):(f=openf(n+1,"r")))
#endif
#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)

/*
 * Global types.
 */
typedef FILE	*text, *file_ptr;
typedef char	*ccharpointer;

/*
 * Global data and data structures.
 */

extern integer argc;
extern integer zround();
extern integer inputint();


/*
 * One global routine: test_eof
 * Return true if we're at the end of the file, else false.
 */
#ifdef ANSI /*prototype the function*/
int test_eof(FILE *);
#endif /*ANSI*/
test_eof(file)
FILE *file;
{
    int ch;

    if (feof(file))
	return(true);
    if ((ch = getc(file)) == EOF)
	return(true);
    (void) ungetc(ch,file); /* yuck */
    return(false);
}

#ifdef ANSI /* prototypes for all the functions.  */
extern  void lineread(FILE *);
extern  void linewrite(FILE *,long);
extern  int testeof(FILE *);
extern  void argv(integer,char *);
extern  void main(int,char * *);
extern  int eoln(FILE *);
extern  FILE *openf(char *,char *);
extern  void setpaths(void);
extern  int testaccess(int,int);
extern  void packrealnameoffile(char * *);
extern  char *char_index(char *,char);
extern  void printreal(double,int,int);
extern  long zround(double);
extern  long inputint(FILE *);
extern  void zinput_3ints(long *,long *,long *);
extern  void main_body(void);
extern  void exit(int);
#else
FILE *openf();
void main_body();
#endif