|
|
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: 6174 (0x181e)
Types: TextFile
Names: »useful.h,v«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦bfebc70e2⟧ »EurOpenD3/mail/sendmail-5.65b+IDA-1.4.3.tar.Z«
└─⟦f9e35cd84⟧
└─⟦this⟧ »sendmail/src/RCS/useful.h,v«
head 4.6;
branch 4.6.0;
access;
symbols
UICSO:4.6.0
VANILLA:4.6;
locks; strict;
comment @ * @;
4.6
date 90.06.20.08.37.15; author paul; state Exp;
branches
4.6.0.1;
next ;
4.6.0.1
date 90.10.15.15.26.07; author paul; state Exp;
branches;
next 4.6.0.2;
4.6.0.2
date 90.11.07.13.56.14; author paul; state Exp;
branches;
next 4.6.0.3;
4.6.0.3
date 90.11.13.15.22.21; author paul; state Exp;
branches;
next 4.6.0.4;
4.6.0.4
date 91.03.06.18.43.06; author paul; state Exp;
branches;
next ;
desc
@@
4.6
log
@5.64 Berkeley release
@
text
@/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted provided
* that: (1) source distributions retain this entire copyright notice and
* comment, and (2) distributions including binaries display the following
* acknowledgement: ``This product includes software developed by the
* University of California, Berkeley and its contributors'' in the
* documentation or other materials provided with the distribution and in
* all advertising materials mentioning features or use of this software.
* Neither the name of the University nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @@(#)useful.h 4.6 (Berkeley) 6/1/90
*/
# include <sys/types.h>
/* support for bool type */
typedef char bool;
# define TRUE 1
# define FALSE 0
# ifndef NULL
# define NULL 0
# endif NULL
/* bit hacking */
# define bitset(bit, word) (((word) & (bit)) != 0)
/* some simple functions */
# ifndef max
# define max(a, b) ((a) > (b) ? (a) : (b))
# define min(a, b) ((a) < (b) ? (a) : (b))
# endif max
/* assertions */
# ifndef NASSERT
# define ASSERT(expr, msg, parm)\
if (!(expr))\
{\
fprintf(stderr, "assertion botch: %s:%d: ", __FILE__, __LINE__);\
fprintf(stderr, msg, parm);\
}
# else NASSERT
# define ASSERT(expr, msg, parm)
# endif NASSERT
/* sccs id's */
# ifndef lint
# define SCCSID(arg) static char SccsId[] = "arg";
# else lint
# define SCCSID(arg)
# endif lint
/* define the types of some common functions */
extern char *strcpy(), *strncpy();
extern char *strcat(), *strncat();
extern char *malloc();
extern char *index(), *rindex();
extern int errno;
extern time_t time();
extern char *ctime();
extern char *getenv();
@
4.6.0.1
log
@Bruce Lilly (bruce%balilly@@sonyd1.broadcast.sony.com) provided System 5
compatibility statements wrapped by #ifdef SYSTEM5.
@
text
@d30 2
a31 2
# define NULL 0
# endif /* NULL */
d38 3
a40 3
# define max(a, b) ((a) > (b) ? (a) : (b))
# define min(a, b) ((a) < (b) ? (a) : (b))
# endif /* max */
d44 1
a44 1
# define ASSERT(expr, msg, parm)\
d50 3
a52 3
# else /* !NASSERT */
# define ASSERT(expr, msg, parm)
# endif /* NASSERT */
d56 4
a59 4
# define SCCSID(arg) static char SccsId[] = "arg";
# else /* !lint */
# define SCCSID(arg)
# endif /* !lint */
d65 1
a69 39
# ifndef SYSTEM5
extern char *index(), *rindex();
# else /* SYSTEM5 */
# ifndef lint
# ifdef MAIN
# define IN_SCCS_ID
# endif /* MAIN */
# endif /* !lint */
# include <unistd.h>
# include <sys/types.h>
/*# include <pwd.h>*/
# include <string.h>
# include <fcntl.h>
# define index strchr
# define rindex strrchr
# define bcopy(h,a,l) memcpy(a,h,l)
# define bzero(s,n) memset(s,0,n)
# define bcmp memcmp
# define vfork fork
# ifndef NOFILE
# include <sys/param.h>
# endif /* NOFILE */
# define getdtablesize() NOFILE
# ifndef SIGCHLD
# define SIGCHLD SIGCLD
# endif /* !SIGCHLD */
/* # define gethostbyaddr Gethostbyaddr */
# define direct dirent
# include <dirent.h>
extern char *strchr(), *strrchr();
# include <grp.h>
# ifndef NGROUPS_MAX
# define initgroups(u,g) kill(0,0)
# endif /* !NGROUPS_MAX */
# ifndef MAX
# define MAX(a,b) ((a)>(b))?(a):(b)
# endif /* !MAX */
# endif /* !SYSTEM5 */
@
4.6.0.2
log
@Cleaned up useful.h SYSTEM5 stuff.
@
text
@d22 1
a22 5
#ifndef lint
# ifdef _DEFINE
static char useful_h_sccsid[] = "@@(#)useful.h 4.6 (Berkeley) 6/1/9";
# endif /* _DEFINE */
#endif /* !lint */
a23 2
#include <sys/types.h>
d26 2
a27 2
#define TRUE 1
#define FALSE 0
d29 3
a31 3
#ifndef NULL
# define NULL 0
#endif /* NULL */
d34 1
a34 1
#define bitset(bit, word) (((word) & (bit)) != 0)
d37 4
a40 4
#ifndef max
# define max(a, b) ((a) > (b) ? (a) : (b))
# define min(a, b) ((a) < (b) ? (a) : (b))
#endif /* !max */
d43 2
a44 2
#ifndef NASSERT
# define ASSERT(expr, msg, parm)\
d50 3
a52 3
#else /* !NASSERT */
# define ASSERT(expr, msg, parm)
#endif /* NASSERT */
d55 5
a59 5
#ifndef lint
# define SCCSID(arg) static char SccsId[] = "arg";
#else /* lint */
# define SCCSID(arg)
#endif /* !lint */
d70 1
a70 1
#ifndef SYSTEM5
d72 27
a98 21
#else /* SYSTEM5 */
# include <unistd.h>
# include <sys/types.h>
/*# include <pwd.h>*/
# include <string.h>
# include <fcntl.h>
# define index strchr
# define rindex strrchr
# define bcopy(h,a,l) memcpy(a,h,l)
# define bzero(s,n) memset(s,0,n)
# define bcmp memcmp
# define vfork fork
# ifndef NOFILE
# include <sys/param.h>
# endif /* NOFILE */
# define getdtablesize() NOFILE
# ifndef SIGCHLD
# define SIGCHLD SIGCLD
# endif /* !SIGCHLD */
# define direct dirent
# include <dirent.h>
d100 8
a107 8
# include <grp.h>
# ifndef NGROUPS_MAX
# define initgroups(u,g) kill(0,0)
# endif /* !NGROUPS_MAX */
# ifndef MAX
# define MAX(a,b) ((a)>(b))?(a):(b)
# endif /* !MAX */
#endif /* !SYSTEM5 */
@
4.6.0.3
log
@Changed #ifdef SYSTEM5 to SYSV to be consistent with current usage.
@
text
@d76 1
a76 1
#ifndef SYSV
d78 1
a78 1
#else /* SYSV */
d107 1
a107 1
#endif /* !SYSV */
@
4.6.0.4
log
@ANSIfied.
@
text
@d30 2
a31 2
/* support for bool type. going from char to int increased BSS by 16 bytes */
typedef int bool;
a67 5
#ifdef __STDC__
# include <string.h>
# include <unistd.h>
# include <stdlib.h>
#else /* !__STDC__ */
d71 1
a74 2
#endif /* __STDC__ */
extern int errno;
d79 4
@