mkstr (const char *format, ... )
{
MY_VA_LOCAL_DECL;
- int size = 100;
+ size_t size = 100;
char *buffer =
#ifdef ABOOK_SRC
(char *) abook_malloc (size);
char*
strconcat (const char *str, ...)
{
- int l;
+ unsigned long l;
MY_VA_LOCAL_DECL;
char *s, *concat;
#else
malloc(l);
#endif
+ if(concat == NULL)
+ return NULL;
strcpy (concat, str);
MY_VA_START(str);
my_getcwd()
{
char *dir = NULL;
- int size = 100;
+ size_t size = 100;
if( (dir = (char *)malloc(size)) == NULL)
return NULL;
+
+ *dir = 0;
while( getcwd(dir, size) == NULL && errno == ERANGE )
if( (dir = (char *)realloc(dir, size *=2)) == NULL)