|
|
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 s
Length: 3216 (0xc90)
Types: TextFile
Names: »sysdefs.h,v«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
└─⟦34cc4e2f7⟧ »./UNRELEASED/xgdb3.2.tar.Z«
└─⟦80fac5d7c⟧
└─⟦this⟧ »./RCS/sysdefs.h,v«
head 1.1;
access ;
symbols ;
locks hubbard:1.1; strict;
comment @ * @;
1.1
date 89.07.05.15.36.52; author hubbard; state Exp;
branches ;
next ;
desc
@Initial checkin, Beta version 0.1.
@
1.1
log
@Initial revision
@
text
@/* $Header$ */
/*
*
* Copyright 1988, 1989
* PCS Computer Systeme, GmbH
* Munich, West Germany
*
* All rights reserved.
*
* This is unsupported software and is subject to change without notice.
* PCS makes no representations about the suitability of this software
* for any purpose. It is supplied "as is" without express or implied
* warranty.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of PCS Computer Systeme not be used in
* advertising or publicity pertaining to distribution of the software
* without specific, written prior permission.
*
*/
/*
* Author: Jordan K. Hubbard
* For: PCS Computer Systems
* When: June 5th, 1989.
*
* $Log$
*
*/
#ifndef SYSDEF_H_INCLUDE
#define SYSDEF_H_INCLUDE
#include <stdio.h>
/*
* Defines that are of general utility.
*/
/* Defines */
#if defined(USG) || defined(SYSV)
#define bcopy(s,d,n) memcpy((d),(s),(n))
#define bcmp(s1,s2,n) memcmp((s1),(s2),(n))
#define bzero(s,n) memset((s),0,(n))
#endif
/* Does your unix support select()? */
#define HAVE_SELECT
/*
* If we couldn't find it anywhere, fake it.
*/
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
/*
* Usually hard to find. Take a wild guess.
*/
#ifndef NFILES
#define NFILES 64
#endif
/*
* Support a minimum of debugging information.
*/
#define SAVERTNAME
/* width of a byte in bits */
#define BYTEWIDTH 8
/* Typedefs */
typedef void (*VoidFuncP)(); /* Function returning void */
typedef char *(*StrFuncP)(); /* Function returning String */
/*
* Generic pointer type, Should be void * if your compiler
* supports it. Ours doesn't.
*/
typedef char *GenericPtr;
/* Type that's at least 4 bytes long */
typedef long Quad;
/*
* Stash away strings for future use. STASH and STASHN assume that
* if string s1 is non-NULL, its previous contents were also malloc'd
* (in which case they're free'd). STASHF makes no assumptions about
* the string's previous contents.
*/
#define CPYN(s1, s2, n) strncpy((s1), (s2), (n)); ((s1)[(n)]) = '\0'
#define STASH(s1,s2) { if ((s1)) XtFree((s1)); if (!(s2)) (s1) = NULL; \
else {(s1) = XtMalloc(strlen((s2)) + 1); \
strcpy((s1), (s2));} \
}
#define STASHN(s1,s2,n) { if ((s1)) XtFree((s1)); if (!(s2)) (s1) = NULL; \
else {(s1) = XtMalloc((n) + 1); \
CPYN((s1), (s2), (n));} \
}
#define STASHF(s1,s2) { if (!(s2)) (s1) = NULL; \
else {(s1) = XtMalloc(strlen((s2)) + 1); \
strcpy((s1), (s2));} \
}
#define NEW(ptr, type) { (ptr) = (type *)XtMalloc(sizeof(type)); \
bzero((ptr), sizeof(type)); \
}
#define NULLP(p) ((p) == NULL)
#endif /* SYSDEF_H_INCLUDE */
@