/* 
 * sr-util.h,v 1.1 1994/01/28 17:05:50 franktor Exp
 *
 * util.h
 *
 * Various utility functions
 *
*/

#ifndef SR_UTIL_H
#define SR_UTIL_H

#include <sr-api.h>

char *	smalloc ( unsigned int size );

char *	safe_strdup ( const char * );
int	safe_strlen ( const char * );
char *	safe_strcpy ( char *, const char * );

/* Functions to handle record compositions */
RecordComposition *new_RecordComposition ( Boolean isGeneric, char *genericComposition );
void add_RecCompElem ( RecordComposition *recComp, char *dbName, char *recCompId );
int recCompSize ( RecordComposition *recComp );
Boolean get_RecCompElem ( RecordComposition *recComp, int index, char **dbName, char **recCompId );
char *get_RecCompForDb ( RecordComposition *recComp, char *dbName );

#endif /* SR_UTIL_H */
