OpenCBM
libmisc.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2007-2008, 2012 Spiro Trikaliotis
8  */
9 
18 #ifndef CBM_LIBMISC_H
19 #define CBM_LIBMISC_H
20 
21 #include <stddef.h>
22 
23 extern char * cbmlibmisc_stralloc(unsigned int Length);
24 
25 extern char * cbmlibmisc_strdup(const char * const OldString);
26 extern char * cbmlibmisc_strndup(const char * const OldString, size_t Length);
27 
28 extern void cbmlibmisc_strfree(const char * String);
29 extern char * cbmlibmisc_strcat(const char * first, const char * second);
30 
31 /* Windows only: */
32 extern char * cbmlibmisc_format_error_message(unsigned int ErrorNumber);
33 
34 
35 #endif /* #ifndef CBM_LIBMISC_H */
char * cbmlibmisc_strndup(const char *const OldString, size_t Length)
Duplicate a prefix of a given string.
Definition: libstring.c:136
void cbmlibmisc_strfree(const char *String)
Free a string.
Definition: libstring.c:172
char * cbmlibmisc_strcat(const char *first, const char *second)
Concatenate two strings.
Definition: libstring.c:202
char * cbmlibmisc_format_error_message(unsigned int ErrorNumber)
Format a returned error code into a string.
char * cbmlibmisc_strdup(const char *const OldString)
Duplicate a given string.
Definition: libstring.c:84
char * cbmlibmisc_stralloc(unsigned int Length)
allocate memory for a string of a given size
Definition: libstring.c:41