home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume31 / cmdline / part01 / README < prev   
Text File  |  1992-07-27  |  6KB  |  157 lines

  1.  
  2.  WHAT IS THIS?
  3.  =============
  4.  This is CmdLine, a C++ library for parsing command arguments and assigning
  5.  the corresponding values to program variables. Also included is cmdparse,
  6.  a program to provide an interface to CmdLine for shell-scripts. See the 
  7.  file named "Overview" for a more thorough introduction!
  8.  
  9.  
  10.  AUTHOR
  11.  ======
  12.  Brad Appleton                     Harris Corp., Computer Systems Division
  13.    Senior Software Engineer        2101 West Cypress Creek Road,  M/S 161 
  14.      brad@ssd.csd.harris.com       Fort Lauderdale, FL  33309-1892  USA
  15.        ...!uunet!travis!brad              Phone: (305) 973-5190
  16.  
  17.  
  18.  COPY/REUSE POLICY
  19.  =================
  20.  Permission is hereby granted to freely copy and redistribute this
  21.  software, provided that the author is clearly credited in all copies
  22.  and derivations. Neither the names of the authors nor that of their
  23.  employers may be used to endorse or promote products derived from this
  24.  software without specific written permission.
  25.  
  26.  
  27.  DISCLAIMER
  28.  ==========
  29.  This software is provided ``As Is'' and without any express or implied
  30.  warranties.  Neither the authors nor any of their employers (including
  31.  any of their subsidiaries and subdivisions) are responsible for maintaining
  32.  or supporting this software or for any consequences resulting from the
  33.  use of this software, no matter how awful, even if they arise from flaws
  34.  in the software.
  35.  
  36.  
  37.  CONTENTS
  38.  ========
  39.  See the file "MANIFEST" in the distribution for a complete list and
  40.  description of all the files included in this release.
  41.  
  42.  
  43.  REQUIREMENTS
  44.  ============
  45.  This software should compile on most Unix platforms with a C++ compiler
  46.  with little or no difficulty.
  47.  
  48.  You will need to tweak the Makefiles a tad in order to make them work
  49.  for your C++ compiler.
  50.  
  51.  CmdLine makes extensive use of the "new" operator but makes no attempt
  52.  to see if allocation failed!  CmdLine assumes that any such desired
  53.  error-checking will be taken care of by the programmer by #including
  54.  the header file <new.h> and using the set_new_handler() function.
  55.  
  56.  COMPILATION OPTIONS
  57.  ===================
  58.  The following names may be `#define'd when building CmdLine.
  59.  
  60.  unix            Needed for unix systems
  61.  vms             Needed for vms systems
  62.  msdos           Needed for MS-DOS systems.
  63.  os2             Needed for OS/2 Systems.
  64.  
  65.  unix_style      (This is the default) Use this to have CmdLine parse
  66.                  command-lines using traditional Unix command-line syntax.
  67.  
  68.  vms_style       (Not yet supported) Use this to have CmdLine parse
  69.                  command-lines using traditional VAX/VMS DCL syntax.
  70.  
  71.  USE_PLUS        Makes CmdLine use "+" instead of "--" as the keyword prefix
  72.                  when -Dunix_style is used.
  73.  
  74.  DEBUG_CMDLINE   Enables use of the "dump" member functions in the CmdLine
  75.                  library.
  76.  
  77.  TEMPLATES       #define this if your C++ compiler supports templates.
  78.  
  79.  GNU_READLINE    Use this if you want CmdLine to use the readline library
  80.                  (from the FSF) when prompting the user for arguments.
  81.                  You will probably also need to link with this library.
  82.  
  83.  
  84.  PORTING
  85.  =======
  86.  You may need to tweak the makefiles a bit in order to get CmdLine to build
  87.  properly.  First look at "Config.mk" and change the make-variables to what-
  88.  ever is appropriate for your operating system and compilation environment.
  89.  If you are on an operating system other than Unix, you will also need to
  90.  change all of the "include" statements in the Makefiles to use the proper
  91.  pathname syntax.  If you change the definitions of $(LIBDIR) and $(INCDIR)
  92.  in Config.mk then you should also modify the file doc/macros.man to indicate
  93.  the new locations for where these files are installed.
  94.  
  95.  You should be aware of the following when porting CmdLine to other platforms.
  96.  
  97.  1) CmdLine assumes that at least one of __STDC__ or __ANSI_CPP__ will be
  98.     #defined if your C++ compiler uses an ANSI-C preprocessor.
  99.  
  100.  2) CmdLine uses <stdarg.h> (not <varargs.h>) to handle functions that may
  101.     take a variable number of arguments.
  102.  
  103.  3) Not all systems have the strtod() function used in src/lib/cmdargs.c,
  104.     If your system DOES have strtod but it is NOT in <stdlib.h> then you
  105.     will need to add a prototype for it in src/lib/cmdargs.c.  It is possible
  106.     (but less likely) that you may have similar problems with strtol().
  107.  
  108.  4) CmdLine uses the AT&T C++ iostream library.  Beyond that, all the
  109.     #include files it uses are assumed to have the contents specified by
  110.     the ANSI-C standard and are assumed to have #ifdef __cplusplus statements
  111.     for when they are being included by C++ files.  CmdLine assumes the
  112.     existence of the following system header files:
  113.  
  114.          <stdarg.h>
  115.          <stdlib.h>
  116.          <string.h>
  117.          <ctype.h>
  118.          <iostream.h>
  119.          <fstream.h>
  120.          <strstream.h>
  121.          <malloc.h>    <--- only used on Unix systems
  122.  
  123.  
  124.  BUGS
  125.  ====
  126.  Please send all bug reports to Brad Appleton <brad@ssd.csd.harris.com>.
  127.  Dont forget to mention which version of CmdLine you have and which
  128.  operating system and C++ compiler you are using.
  129.  
  130.  
  131.  ACKNOWLEDGEMENTS
  132.  ================
  133.  CmdLine is a C++ rewrite of ParseArgs.  The author of this software would
  134.  like to thank Eric Allman and Peter da Silva for their great ideas.
  135.  
  136.  
  137.  FURTHER INFORMATION
  138.  ===================
  139.  For an introduction -- look at the file "Overview" in the distribution!
  140.  
  141.  The documentation is in Unix manpage format (troff with the -man macros)
  142.  and may be found in the "doc" directory but you should be able to find
  143.  out quite a bit by reading the comments in the source files (especially
  144.  in <cmdline.h> and <cmdargs.h>) and by looking at the sample test-program(s).
  145.  
  146.  
  147.  HISTORY
  148.  =======
  149.  Look at the file src/lib/patchlevel.c to see what version of CmdLine you
  150.  have.  Any changes made to the CmdLine product should be documented here:
  151.  
  152.  
  153.  07/21/92        Brad Appleton        <brad@ssd.csd.harris.com>
  154.  -----------------------------------------------------------------------------
  155.  First release.
  156.  
  157.