/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/

/*
 * misc.h  - miscellaneous macros
 *
 */

#ifndef __MISC
#define __MISC

#ifndef TRUE
#define TRUE  (0==0)
#endif

#ifndef FALSE
#define FALSE (0==1)
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/*
 * Prototypes
 */

void nomem ( );
void init  ( );

/*
 * Macros
 */

/* malloc'ing */

#define NewThings(what,how_many) \
((what *) (malloc((unsigned)((how_many)*sizeof(what)))))

#define CREATE_SP(target,type,length)\
   if((target = NewThings(type,length)) == NULL) nomem();
#define FreeThings(things) \
free((char *)(things))

/* for hashing */

#define LongAndOdd(c) ((long)(((int)(c))*16+1))


#endif

