Utilities in C for RAD
The following are the RAD utilities in the C language:
-
void *rad_zalloc(size_t size);
-
Returns a pointer to a zero-allocated block of size bytes.
-
char *rad_strndup(char *string, size_t length);
-
Creates and returns a duplicate of string that is of size
length
bytes. -
int rad_strccmp(const char * zstring, const char * cstring, size_t length);
-
Compares two strings, up to a maximum size of
length
bytes. -
int rad_openf(const char *format, int oflag, mode_tmode, ...);
-
Opens a file with access mode
oflag
, and modemode
, whose path is specified by calling sprintf onformat
. -
FILE *rad_fopenf(const char *format, const char *mode, ...);
-
Opens a file with
mode
, whose path is specified by calling sprintf onformat
.