Added command line response files

git-svn-id: svn://svn.cc65.org/cc65/trunk@616 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-03-09 21:59:23 +00:00
parent 18b9977039
commit 697abf3ed7
12 changed files with 238 additions and 69 deletions

View File

@@ -75,11 +75,21 @@ void xfree (const void* Block)
char* xstrdup (const char* S)
/* Duplicate a string on the heap. The function checks for out of memory */
{
/* Get the length of the string */
unsigned Len = strlen (S) + 1;
/* Allow dup'ing of NULL strings */
if (S) {
/* Allocate memory and return a copy */
return memcpy (xmalloc (Len), S, Len);
/* Get the length of the string */
unsigned Len = strlen (S) + 1;
/* Allocate memory and return a copy */
return memcpy (xmalloc (Len), S, Len);
} else {
/* Return a NULL pointer */
return 0;
}
}