#include <assert.h>
-char *
-revstr(char *str)
-{
- char *s, *s2;
-
- assert(str != NULL);
-
- s = s2 = strdup(str);
-
- while( *str )
- str++;
-
- while( *s )
- *--str = *s++;
-
- free(s2);
- return str;
-}
-
-char *
-strupper(char *str)
-{
- char *tmp = str;
-
- assert(str != NULL);
-
- while( ( *str = toupper( *str ) ) )
- str++;
-
- return tmp;
-}
-
char *
strlower(char *str)
{
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);
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)