/* _______________________________________________________________________ * * RDPARM/PTRAJ: APR 2000 * _______________________________________________________________________ * * $Header: /thr/gamow/cvsroot/amber7/src/ptraj/utility.h,v 1.3 2000/05/10 21:52:02 cheatham Exp $ * * Revision: $Revision: 1.3 $ * Date: $Date: 2000/05/10 21:52:02 $ * Last checked in by $Author: cheatham $ * * This source is now archived under CVS at Scripps in the amber7 tree. * * NOTE: this is a beta, pre-release version, is under constant development, * probably contains some bugs and is under constant revision; therefore * take care. Please report bugs (and fixes!) to cheatham@chpc.utah.edu or * cheatham@cgl.ucsf.edu * * Do not distribute this code without explicit permission. * Do not incorporate into other codes without explicit permission. * * Current contact information: * * Thomas Cheatham, III * 2000 East, 30 South, Skaggs Hall 201 * Department of Medicinal Chemistry * University of Utah * Salt Lake City, UT 84112-5820 * cheatham@chpc.utah.edu * (801) 587-9653 * FAX: (801) 585-5366 * * Other contributors: * * David Case (Scripps) * Michael Crowley (Scripps) * Jed Pitera (UCSF) * Vickie Tsui (Scripps) * _______________________________________________________________________ */ typedef struct _stackType { void *entry; struct _stackType *next; } stackType; # ifdef __STDC__ typedef void (*fxnPrintStackEntry)(void *); # else typedef void (*fxnPrintStackEntry)(); # endif #ifndef UTILITY_MODULE extern void warning(); extern void error(); # ifdef __STDC__ extern void * safe_malloc(int); extern void * safe_realloc(void *, int, int); extern void safe_free(void *); extern int allocate(void **, int, int, int); extern int scanString( FILE *, char *, int, char *); extern int scanInt( FILE *, int *, int, char *); extern int scanDouble( FILE *, double *, int, char *); extern void shiftArray( void *, void *, int ); extern int stringContains(char *, char *); extern int stringMatch(char *, char *); extern char * toLowerCase( char * ); extern void pushBottomStack( stackType **, void * ); extern void pushStack( stackType **, void * ); extern void *popStack( stackType ** ); extern void clearStack( stackType ** ); extern void printStack( stackType **, fxnPrintStackEntry, char * ); # else extern void * safe_malloc(); extern void * safe_realloc(); extern void safe_free(); extern int allocate(); extern int scanString(); extern int scanInt(); extern int scanDouble(); extern void shiftArray(); extern int stringContains(); extern int stringMatch(); extern char * toLowerCase(); extern void pushBottomStack(); extern void pushStack(); extern void *popStack(); extern void clearStack(); extern void printStack(); # endif #endif #define iabs(a) ( a > 0 ? a : -a ) #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef skipWhitespace #define skipWhitespace( xxx ) \ while( ((xxx[0] == '\n') || isspace(xxx[0])) && strlen(xxx) ) xxx++; #endif