home *** CD-ROM | disk | FTP | other *** search
- *** README.OLD Thu Aug 19 16:31:18 1993
- --- README Thu Aug 19 16:01:35 1993
- ***************
- *** 187,189 ****
- --- 187,193 ----
- - Added the ability to allow (at run-time) the use of "+" as the long-option
- prefix (this could be done only at compile-time until now).
-
- + 08/19/93 Brad Appleton <brad@ssd.csd.harris.com>
- + -----------------------------------------------------------------------------
- + - Fixed a problem that some machines/compilers had with the contructor
- + ignoring the first CmdArg.
- *** src/lib/cmdline.c.OLD Thu Aug 19 16:31:41 1993
- --- src/lib/cmdline.c Thu Aug 19 15:58:06 1993
- ***************
- *** 130,135 ****
- --- 130,137 ----
- filebasename(const char * filename)
- {
-
- + if (filename == NULL) return filename ;
- +
- #if (defined(vms) || defined(msdos) || defined(os2))
- const char * start, * p1, * p2 ;
- char * str, * ext;
- ***************
- *** 199,205 ****
- }
-
- // Constructor with a name and CmdArgs
- ! CmdLine::CmdLine(const char * cmdname, CmdArg * ...)
- : cmd_parse_state(cmd_START_STATE),
- cmd_state(cmd_START_STATE),
- cmd_flags(DEFAULT_CMDFLAGS),
- --- 201,207 ----
- }
-
- // Constructor with a name and CmdArgs
- ! CmdLine::CmdLine(const char * cmdname, CmdArg * cmdarg1 ...)
- : cmd_parse_state(cmd_START_STATE),
- cmd_state(cmd_START_STATE),
- cmd_flags(DEFAULT_CMDFLAGS),
- ***************
- *** 219,226 ****
- CmdArgList * arg_list = iter();
-
- va_list ap;
- ! va_start(ap, cmdname);
- ! for (CmdArg * cmdarg = va_CmdArgP(ap) ; cmdarg ; cmdarg = va_CmdArgP(ap)) {
- arg_list->add(cmdarg);
- }
- va_end(ap);
- --- 221,228 ----
- CmdArgList * arg_list = iter();
-
- va_list ap;
- ! va_start(ap, cmdarg1);
- ! for (CmdArg * cmdarg = cmdarg1 ; cmdarg ; cmdarg = va_CmdArgP(ap)) {
- arg_list->add(cmdarg);
- }
- va_end(ap);
- ***************
- *** 228,234 ****
-
-
- // Constructor with CmdArgs
- ! CmdLine::CmdLine(CmdArg * cmdarg, CmdArg * ...)
- : cmd_parse_state(cmd_START_STATE),
- cmd_state(cmd_START_STATE),
- cmd_flags(DEFAULT_CMDFLAGS),
- --- 230,236 ----
-
-
- // Constructor with CmdArgs
- ! CmdLine::CmdLine(CmdArg * cmdarg1 ...)
- : cmd_parse_state(cmd_START_STATE),
- cmd_state(cmd_START_STATE),
- cmd_flags(DEFAULT_CMDFLAGS),
- ***************
- *** 241,257 ****
- cmd_err(NULL),
- cmd_quit_handler(NULL)
- {
- ! if (cmdarg == NULL) return;
- ::init_args(cmd_args);
-
- CmdArgListListIter iter(cmd_args);
- CmdArgList * arg_list = iter();
-
- - arg_list->add(cmdarg);
- -
- va_list ap;
- ! va_start(ap, cmdarg);
- ! for (cmdarg = va_CmdArgP(ap) ; cmdarg ; cmdarg = va_CmdArgP(ap)) {
- arg_list->add(cmdarg);
- }
- va_end(ap);
- --- 243,257 ----
- cmd_err(NULL),
- cmd_quit_handler(NULL)
- {
- ! if (cmdarg1 == NULL) return;
- ::init_args(cmd_args);
-
- CmdArgListListIter iter(cmd_args);
- CmdArgList * arg_list = iter();
-
- va_list ap;
- ! va_start(ap, cmdarg1);
- ! for (CmdArg * cmdarg = cmdarg1 ; cmdarg ; cmdarg = va_CmdArgP(ap)) {
- arg_list->add(cmdarg);
- }
- va_end(ap);
- ***************
- *** 273,282 ****
- void
- CmdLine::name(const char * progname)
- {
- #if (defined(vms) || defined(msdos) || defined(os2))
- delete [] cmd_name;
- #endif
- ! cmd_name = ::filebasename(progname);
- }
-
-
- --- 273,284 ----
- void
- CmdLine::name(const char * progname)
- {
- + static const char unknown_progname[] = "<unknown-program>" ;
- +
- #if (defined(vms) || defined(msdos) || defined(os2))
- delete [] cmd_name;
- #endif
- ! cmd_name = ::filebasename((progname) ? progname : unknown_progname);
- }
-
-
- ***************
- *** 347,352 ****
- CmdArg *
- CmdLineCmdArgIter::operator()(void)
- {
- ! return (iter) ? (*iter)() : NULL ;
- }
-
- --- 349,354 ----
- CmdArg *
- CmdLineCmdArgIter::operator()(void)
- {
- ! return (iter) ? iter->operator()() : NULL ;
- }
-
- *** src/lib/cmdline.h.OLD Thu Aug 19 16:31:44 1993
- --- src/lib/cmdline.h Wed Aug 18 09:22:11 1993
- ***************
- *** 506,514 ****
- //
- CmdLine(const char * name =0);
-
- ! CmdLine(const char * name, CmdArg * ...); // last arg should be NULL
-
- ! CmdLine(CmdArg * cmdarg, CmdArg * ...); // last arg should be NULL
-
- virtual ~CmdLine(void);
-
- --- 506,514 ----
- //
- CmdLine(const char * name =0);
-
- ! CmdLine(const char * name, CmdArg * cmdarg1 ...); // last arg should be NULL
-
- ! CmdLine(CmdArg * cmdarg1 ...); // last arg should be NULL
-
- virtual ~CmdLine(void);
-
- *** src/lib/fifolist.h.OLD Thu Aug 19 16:31:49 1993
- --- src/lib/fifolist.h Mon Apr 19 11:15:48 1993
- ***************
- *** 57,68 ****
- GenericFifoListNode * head;
- GenericFifoListNode * tail;
-
- - public:
- GenericFifoList(void)
- : head(0), tail(0), num_items(0), del_items(0), mod(0) {}
-
- - virtual ~GenericFifoList(void);
- -
- // Remove the first item from the list
- void *
- remove(void);
- --- 57,65 ----
- ***************
- *** 71,76 ****
- --- 68,76 ----
- void
- add(void * item);
-
- + public:
- + virtual ~GenericFifoList(void);
- +
- // Was the list modified since the last time we checked?
- int
- modified(void) { return (mod) ? (mod = 0, 1) : 0 ; }
- ***************
- *** 101,107 ****
- private:
- GenericFifoList::GenericFifoListNode * current;
-
- ! public:
- GenericFifoListIter(GenericFifoList & fifo_list)
- : current(fifo_list.head) {}
-
- --- 101,107 ----
- private:
- GenericFifoList::GenericFifoListNode * current;
-
- ! protected:
- GenericFifoListIter(GenericFifoList & fifo_list)
- : current(fifo_list.head) {}
-
- ***************
- *** 108,120 ****
- GenericFifoListIter(GenericFifoList * fifo_list)
- : current(fifo_list->head) {}
-
- - virtual ~GenericFifoListIter(void);
- -
- // Return the current item in the list and advance to the next item.
- // returns NULL if at end-of-list
- //
- void *
- operator()(void);
- } ;
-
-
- --- 108,122 ----
- GenericFifoListIter(GenericFifoList * fifo_list)
- : current(fifo_list->head) {}
-
- // Return the current item in the list and advance to the next item.
- // returns NULL if at end-of-list
- //
- void *
- operator()(void);
- +
- + public:
- + virtual ~GenericFifoListIter(void);
- +
- } ;
-
-
- ***************
- *** 125,131 ****
- unsigned index;
- GenericFifoList::GenericFifoListNode * current;
-
- ! public:
- GenericFifoListArray(GenericFifoList & fifo_list)
- : list(fifo_list), index(0), current(fifo_list.head) {}
-
- --- 127,133 ----
- unsigned index;
- GenericFifoList::GenericFifoListNode * current;
-
- ! protected:
- GenericFifoListArray(GenericFifoList & fifo_list)
- : list(fifo_list), index(0), current(fifo_list.head) {}
-
- ***************
- *** 132,139 ****
- GenericFifoListArray(GenericFifoList * fifo_list)
- : list(*fifo_list), index(0), current(fifo_list->head) {}
-
- - virtual ~GenericFifoListArray(void);
- -
- // How many items are in the array?
- unsigned count(void) const { return list.count(); }
-
- --- 134,139 ----
- ***************
- *** 147,152 ****
- --- 147,156 ----
- //
- void *
- operator[](unsigned ndx);
- +
- + public:
- + virtual ~GenericFifoListArray(void);
- +
- } ;
-
- #ifdef TEMPLATES
- ***************
- *** 187,198 ****
-
- Type &
- operator[](unsigned ndx)
- ! { return *((Type *) GenericFifoListArray::operator[](ndx)) }
- } ;
-
- #define DECLARE_FIFO_LIST(Name,Type) \
- typedef FifoList<Type> Name; \
- ! typedef FifoListIter<Type> name2(Name,Iter) \
- typedef FifoListArray<Type> name2(Name,Array)
-
- #else /* dont have templates -- have to fake it */
- --- 191,202 ----
-
- Type &
- operator[](unsigned ndx)
- ! { return *((Type *) GenericFifoListArray::operator[](ndx)); }
- } ;
-
- #define DECLARE_FIFO_LIST(Name,Type) \
- typedef FifoList<Type> Name; \
- ! typedef FifoListIter<Type> name2(Name,Iter); \
- typedef FifoListArray<Type> name2(Name,Array)
-
- #else /* dont have templates -- have to fake it */
- *** src/lib/patchlevel.c.OLD Thu Aug 19 16:31:52 1993
- --- src/lib/patchlevel.c Wed Jul 14 10:55:42 1993
- ***************
- *** 24,36 ****
- // file that makes up this version of the project.
- //
- static const char ident[] =
- ! "@(#)SMS task: cmdline-1.01" ;
-
-
- // Release and patchlevel information
- #define CMDLINE_RELEASE 1
- ! #define CMDLINE_PATCHLEVEL 1
- ! #define CMDLINE_IDENT "@(#)CmdLine 1.01"
-
- unsigned
- CmdLine::release(void) { return CMDLINE_RELEASE; }
- --- 24,36 ----
- // file that makes up this version of the project.
- //
- static const char ident[] =
- ! "@(#)SMS task: cmdline-1.02" ;
-
-
- // Release and patchlevel information
- #define CMDLINE_RELEASE 1
- ! #define CMDLINE_PATCHLEVEL 2
- ! #define CMDLINE_IDENT "@(#)CmdLine 1.02"
-
- unsigned
- CmdLine::release(void) { return CMDLINE_RELEASE; }
-