|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T u
Length: 2360 (0x938)
Types: TextFile
Names: »unixstat.h«
└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
└─⟦this⟧ »cph85dist/stat/doc/unixstat.h«
└─⟦this⟧ »cph85dist/stat/src/unixstat.h«
#ifndef UNIX_STAT_H
#define UNIX_STAT_H
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#ifndef MSDOS /* version control */
#define PGM(name,purpose,ver,date) \
char *Argv0 = "name";\
static char sccshid[] = "@(#) unixstat.h 5.1 (unix|stat) 3/2/85";\
static char sccspid[] = "@(#) name.c ver (unix|stat) date";
#define FUN(name,purpose,ver,date) \
extern char *Argv0;\
static char sccsfid[] = "@(#) name.c ver (unix|stat) date";
#define ARGV0 Argv0 = argv[0] /* used in initialization */
#else
#ifndef SMALL_MEM
#define SMALL_MEM 1
#endif
#define PGM(name,purpose,ver,date) char *Argv0 = "name";
#define FUN(name,purpose,ver,date) extern char *Argv0;
#define ARGV0 /* Lattice C compiler doesn't know about argv[0] */
#endif
#define FZERO 8e-10 /* values smaller than this are considered 0.0 */
#define fzero(x) (fabs (x) < FZERO)
char *strcat (), *strcpy (), *malloc ();
#define strdup(s) strcpy(malloc((unsigned)strlen(s)+1),s)
#define print(x,f) printf ("%10s = %f\n", "x", x)
#define WARNING(msg) fprintf (stderr, "\007%s: msg.\n", Argv0);
#define USAGE(synopsis) {\
fprintf (stderr, "\007Usage: %s synopsis\n", Argv0);\
exit (1);\
}
#define ERRMSG3(msg, arg1, arg2, arg3)\
{\
fprintf (stderr, "\007%s: msg.\n", Argv0, arg1, arg2, arg3);\
exit (1);\
}
#define ERRMSG2(msg, arg1, arg2) ERRMSG3 (msg, arg1, arg2, 0)
#define ERRMSG1(msg, arg1) ERRMSG3 (msg, arg1, 0, 0)
#define ERRMSG0(msg) ERRMSG3 (msg, 0, 0, 0)
#define ERRDATA ERRMSG0 (Not enough (or no) input data)
#define ERRMANY(stuff,n) ERRMSG1 (Too many stuff; at most %d allowed, n)
#define ERROPEN(file) ERRMSG1 (Cannot open '%s', file)
#define ERRSPACE(whatever) ERRMSG0 (No storage space left for whatever)
#define ERRNUM(string,type) ERRMSG1 ('%s' (type) is not a number, string)
#define ERROPT(arg) {if (arg < argc) ERRMSG1(%d operand(s) ignored on command line, argc-arg)}
#define ERRVAL(fmt,var,str) ERRMSG1 (%fmt is an illegal value for the str, var)
#define ERRRAGGED ERRMSG0 (Ragged input file)
#define INTEGER(string) (number (string) == 1)
#ifdef MSDOS /* MSDOS dependent definitions */
#ifdef putchar
#undef putchar
#endif
#define putchar(c) fputc (c, stdout)
#define index(s,c) strchr(s,c)
#define VOID /* Lattice C desn't understand (void) */
#else
#define VOID (void)
#endif
#endif