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 m

⟦19b3ff5f8⟧ TextFile

    Length: 1110 (0x456)
    Types: TextFile
    Names: »misc.h«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/X/Xconq/misc.h« 

TextFile

/* Copyright (c) 1987, 1988  Stanley T. Shebs, University of Utah. */
/* This program may be used, copied, modified, and redistributed freely */
/* for noncommercial purposes, so long as this notice remains intact. */

/* RCS $Header: misc.h,v 1.1 88/06/21 12:29:43 shebs Exp $ */

/* Random definitions useful for nearly any C program. */

typedef unsigned char unchar;
typedef unsigned short unshort;

#define bool int
#define TRUE (1)
#define FALSE (0)

#define abs(x) (((x) < 0) ? (0 - (x)) : (x))

#define min(x,y) (((x) < (y)) ? (x) : (y))

#define max(x,y) (((x) > (y)) ? (x) : (y))

#define between(lo,n,hi) ((lo) <= (n) && (n) <= (hi))

#define flip_coin() (random(257) % 2)

#define avg(a,b) (((a) + (b)) / 2)

#define iswhite(c) ((c) == ' ' || (c) == '\n' || (c) == '\t')

#define lowercase(c) (isupper(c) ? tolower(c) : (c))

#define uppercase(c) (islower(c) ? toupper(c) : (c))

/* Miscellaneous declarations. */

extern bool Debug, Build, Freeze;

extern char spbuf[], tmpbuf[], version[];
extern char *plural_form(), *copy_string(), *read_line();
#ifdef UNIX
extern char *getenv();
#endif UNIX