1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-13 08:25:28 +00:00

Removed dead code

git-svn-id: svn://svn.cc65.org/cc65/trunk@2593 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-10-31 20:36:31 +00:00
parent fbdbf4d07c
commit 929b9c174a

View File

@@ -77,20 +77,10 @@ typedef struct {
static void NewCmdLine (CmdLine* L) static void NewCmdLine (CmdLine* L)
/* Initialize a CmdLine struct */ /* Initialize a CmdLine struct */
{ {
unsigned I;
/* Initialize the struct */ /* Initialize the struct */
L->Size = 8; L->Size = 8;
L->Count = 0; L->Count = 0;
L->Vec = xmalloc (L->Size * sizeof (L->Vec[0])); L->Vec = xmalloc (L->Size * sizeof (L->Vec[0]));
/* Copy the arguments. We have to allocate them on free store, otherwise
* we would have to keep track which one is on free store and which not,
* which is a lot more overhead.
*/
for (I = 0; I < L->Count; ++I) {
L->Vec[I] = xstrdup (ArgVec[I]);
}
} }
@@ -112,7 +102,7 @@ static void AddArg (CmdLine* L, char* Arg)
L->Vec[L->Count++] = Arg; L->Vec[L->Count++] = Arg;
} }
static void ExpandFile (CmdLine* L, const char* Name) static void ExpandFile (CmdLine* L, const char* Name)
/* Add the contents of a file to the command line. Each line is a separate /* Add the contents of a file to the command line. Each line is a separate
@@ -133,7 +123,7 @@ static void ExpandFile (CmdLine* L, const char* Name)
/* Get a pointer to the buffer */ /* Get a pointer to the buffer */
const char* B = Buf; const char* B = Buf;
/* Skip trailing whitespace (this will also kill the newline that is /* Skip trailing whitespace (this will also kill the newline that is
* appended by fgets(). * appended by fgets().
*/ */
unsigned Len = strlen (Buf); unsigned Len = strlen (Buf);
@@ -202,21 +192,21 @@ void InitCmdLine (int* aArgCount, char** aArgVec[], const char* aProgName)
*/ */
for (I = 0; I < *aArgCount; ++I) { for (I = 0; I < *aArgCount; ++I) {
/* Get the next argument */ /* Get the next argument */
char* Arg = (*aArgVec)[I]; char* Arg = (*aArgVec)[I];
/* Is this a file argument? */ /* Is this a file argument? */
if (Arg && Arg[0] == '@') { if (Arg && Arg[0] == '@') {
/* Expand the file */ /* Expand the file */
ExpandFile (&L, Arg+1); ExpandFile (&L, Arg+1);
} else { } else {
/* No file, just add a copy */ /* No file, just add a copy */
AddArg (&L, Arg); AddArg (&L, Arg);
} }
} }
/* Store the new argument list in a safe place... */ /* Store the new argument list in a safe place... */