/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:util.h 12.0$ */
/* $ACIS:util.h 12.0$ */
/* $Source: /ibm/acis/usr/src/nfs/etc/yp/revnetgroup/RCS/util.h,v $ */

#if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
static char *rcsidutil = "$Header:util.h 12.0$";
#endif

#include <sys/nfs_defines.h>

/* @(#)util.h	1.2 86/11/21 NFSSRC */
/*  @(#)util.h 1.1 86/09/25 (C) 1985 Sun Microsystems, Inc. */


#define EOS '\0'

#ifndef NULL 
#	define NULL ((char *) 0)
#endif


#define MALLOC(object_type) ((object_type *) malloc(sizeof(object_type)))

#define FREE(ptr)	free((char *) ptr) 

#define ALLOCA(object_type) ((object_type *) alloca(sizeof(object_type)))

#define STRCPY(dst,src) \
	(dst = malloc((unsigned)strlen(src)+1), (void) strcpy(dst,src))

#define STRNCPY(dst,src,num) \
	(dst = malloc((unsigned)(num) + 1),\
	(void)strncpy(dst,src,num),(dst)[num] = EOS) 

extern char *malloc();
extern char *alloca();

char *getline();
void fatal();


