w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) (04/25/89)
Thanks to Karl Keyte <ESC1332%ESOC.BITNET> for uploading the following file to Simtel20: pd1:<msdos.c>CLP_V10.ARC General purpose 'C' command line processor CLP, by Karl Keyte, is a shareware general purpose command line processor for the 'C' language which eliminates the need for repeated work in handling command line options and parameters in 'C' programs. It provides a means by which the general format of the command line may be defined in a Command Line Definition file (.CLD), and processed by a single interface call. Following that call, values and settings of parameters and switches may be queried by additional calls. CLP has been tested with Turbo-C (2.0) and Microsoft C (5.1). The '#include' file given conforms to ANSI standards, and should therefore be accepted by any ANSI compiler. The object module uses a standard 'C' parameter stack. A compiler is provided which takes the Command Line Definition file and generates a Command Line Library (.CLL) file which contains definitions for ALL utilities using the CLP interface. The .CLD file should be maintained by adding and deleting utilities from it as required. Running the compiler will generate the full Library file (.CLL) from the definitions. Four functions are available to the caller. 'clp_accept' initializes the CLP processor for a given program and command line. 'clp_get_spec' returns the specification code for a particular parameter or switch option. 'clp_get_value' returns the value associated with a parameter or switch option if present. When parameter and switch processing has been completed, the user may recover certain portions of system memory by calling the procedure 'clp_release'. --Keith Petersen Maintainer of Simtel20's CP/M, MSDOS, and MISC archives Internet: w8sdz@wsmr-simtel20.army.mil [26.2.0.74] Uucp: {ames,decwrl,harvard,rutgers,ucbvax,uunet}!wsmr-simtel20.army.mil!w8sdz