|
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: 2531 (0x9e3) Types: TextFile Names: »util.h«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/h/quipu/util.h«
/* util.h - various useful utility definitions */ /* * $Header: /f/osi/h/quipu/RCS/util.h,v 6.0 89/03/18 23:33:06 mrose Rel $ * * * $Log: util.h,v $ * Revision 6.0 89/03/18 23:33:06 mrose * Release 5.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ #ifndef _DIDUTIL_ #define _DIDUTIL_ #include <stdio.h> /* minus the ctype stuff */ #include <ctype.h> #include <setjmp.h> #include <sys/types.h> #include <errno.h> #include "logger.h" #include "quipu/config.h" /* declarations that should have been in the system files */ extern char *strcat (); extern char *strcpy (); extern char *strncpy (); extern char *strdup (); extern char *multcat (); extern char *multcpy (); extern char *index (); extern char *rindex (); extern char *gets (); extern long lseek (); /* some common logical values */ #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef YES #define YES 1 #endif #ifndef NO #define NO 0 #endif #ifndef OK #define OK 0 #endif #ifndef DONE #define DONE 1 #endif #ifndef NOTOK #define NOTOK -1 #endif #ifndef MAYBE #define MAYBE 1 #endif /* stdio extensions */ #define lowtoup(chr) (islower(chr)?toupper(chr):chr) #define uptolow(chr) (isupper(chr)?tolower(chr):chr) #ifndef MIN #define MIN(a,b) (( (b) < (a) ) ? (b) : (a) ) #endif #ifndef MAX #define MAX(a,b) (( (b) > (a) ) ? (b) : (a) ) #define MAXINT ~(1 << ((sizeof(int) * 8) -1)) #endif #define isstr(ptr) ((ptr) != 0 && *(ptr) != '\0') #define isnull(chr) ((chr) == '\0') #define isnumber(c) ((c) >= '0' && (c) <= '9') /* * provide a timeout facility */ extern jmp_buf _timeobuf; #define timeout(val) (setjmp(_timeobuf) ? 1 : (_timeout(val), 0)) /* * some common extensions */ #define LINESIZE 512 /* what we are prepared to consider a line length */ #define FILNSIZE 256 /* max filename length */ #define LOTS 1024 /* a max sort of thing */ # define MAXFORK 10 /* no. of times to try a fork() */ #ifndef NULLCP #define NULLCP ((char *)0) #define NULLVP ((char **) 0) /* QUIPU Specif mallocing */ #ifdef QUIPU_MALLOC extern char * qmalloc (); #define malloc(b) qmalloc (b) #define smalloc(b) qmalloc (b) #define free(b) qfree((char *) b) #else extern char * malloc (); extern char * smalloc (); #endif #endif #endif