|
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: 2486 (0x9b6) Types: TextFile Names: »util.h«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/h/quipu/util.h«
/* util.h - various useful utility definitions */ /* * $Header: /f/osi/h/quipu/RCS/util.h,v 7.0 89/11/23 21:56:45 mrose Rel $ * * * $Log: util.h,v $ * Revision 7.0 89/11/23 21:56:45 mrose * Release 6.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" #ifndef _GENERAL_ #include "general.h" #endif #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) ) #endif #ifndef MAXINT #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 MAXFILENAMELEN 15 /* size of largest fine name allowed */ # define MAXFORK 10 /* no. of times to try a fork() */ #ifndef NULLCP #define NULLCP ((char *)0) #define NULLVP ((char **) 0) extern char * malloc (); extern char * smalloc (); #endif #endif