From b9ce81c7e3da01500e1ee69bb5aaea2344b3b930 Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 14 Jun 2000 07:35:00 +0000 Subject: [PATCH] Fixed an error git-svn-id: svn://svn.cc65.org/cc65/trunk@65 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/cmdline.c | 6 ++++-- src/common/cmdline.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/cmdline.c b/src/common/cmdline.c index 057afaa67..3d4ac8cb1 100644 --- a/src/common/cmdline.c +++ b/src/common/cmdline.c @@ -57,14 +57,14 @@ static unsigned ArgCount = 0; -void InitCmdLine (char* aArgVec[], unsigned aArgCount) +void InitCmdLine (unsigned aArgCount, char* aArgVec[]) /* Initialize command line parsing. aArgVec is the argument array terminated by * a NULL pointer (as usual), ArgCount is the number of valid arguments in the * array. Both arguments are remembered in static storage. */ { - ArgVec = aArgVec; ArgCount = aArgCount; + ArgVec = aArgVec; } @@ -134,6 +134,8 @@ void LongOption (int* ArgNum, const LongOpt* OptTab, unsigned OptCount) } else { OptTab->Func (Opt, 0); } + /* Done */ + return; } /* Next table entry */ diff --git a/src/common/cmdline.h b/src/common/cmdline.h index c0c5a1af7..aadeb0626 100644 --- a/src/common/cmdline.h +++ b/src/common/cmdline.h @@ -47,7 +47,7 @@ /* Structure defining a long option */ typedef struct LongOpt LongOpt; struct LongOpt { - const char* Option; + const char* Option; unsigned ArgCount; void (*Func) (const char* Opt, const char* Arg); }; @@ -60,7 +60,7 @@ struct LongOpt { -void InitCmdLine (char* aArgVec[], unsigned aArgCount); +void InitCmdLine (unsigned aArgCount, char* aArgVec[]); /* Initialize command line parsing. aArgVec is the argument array terminated by * a NULL pointer (as usual), ArgCount is the number of valid arguments in the * array. Both arguments are remembered in static storage. -- 2.39.5