Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ParseArgv.h

00001 /*
00002  * ParseArgv.h --
00003  *
00004  *      Declarations for Tk-related things that are visible
00005  *      outside of the Tk module itself.
00006  *
00007  * Copyright 1989-1992 Regents of the University of California.
00008  * Permission to use, copy, modify, and distribute this
00009  * software and its documentation for any purpose and without
00010  * fee is hereby granted, provided that the above copyright
00011  * notice appear in all copies.  The University of California
00012  * makes no representations about the suitability of this
00013  * software for any purpose.  It is provided "as is" without
00014  * express or implied warranty.
00015  *
00016  * This file has been modified to be used only for argv parsing without
00017  * reference to tk, tcl or X11. Base on tk.h from tk2.3
00018  * $Header: /home/cgm/u3/stever/lib/cvs/research/intersection/src/bicobj/ParseArgv.h,v 1.1 2001/05/31 16:36:09 stever Exp $ SPRITE (Berkeley)
00019  */
00020 
00021 /*
00022  * Definitions that allow this header file to be used either with or
00023  * without ANSI C features like function prototypes.
00024  */
00025 
00026 #undef _ANSI_ARGS_
00027 #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus)
00028 #   define _ANSI_ARGS_(x)       x
00029 #else
00030 #   define _ANSI_ARGS_(x)       ()
00031 #endif
00032 
00033 /*
00034  * Structure used to specify how to handle argv options.
00035  */
00036 
00037 typedef struct {
00038     char *key;          /* The key string that flags the option in the
00039                          * argv array. */
00040     int type;           /* Indicates option type;  see below. */
00041     char *src;          /* Value to be used in setting dst;  usage
00042                          * depends on type. */
00043     char *dst;          /* Address of value to be modified;  usage
00044                          * depends on type. */
00045     char *help;         /* Documentation message describing this option. */
00046 } ArgvInfo;
00047 
00048 /*
00049  * Legal values for the type field of a ArgvInfo: see the user
00050  * documentation for details.
00051  */
00052 
00053 #define ARGV_CONSTANT           15
00054 #define ARGV_INT                        16
00055 #define ARGV_STRING                     17
00056 #define ARGV_REST                       19
00057 #define ARGV_FLOAT                      20
00058 #define ARGV_FUNC                       21
00059 #define ARGV_GENFUNC                    22
00060 #define ARGV_HELP                       23
00061 #define ARGV_END                        27
00062 
00063 /*
00064  * Flag bits for passing to ParseArgv:
00065  */
00066 
00067 #define ARGV_NO_DEFAULTS                0x1
00068 #define ARGV_NO_LEFTOVERS               0x2
00069 #define ARGV_NO_ABBREV          0x4
00070 #define ARGV_DONT_SKIP_FIRST_ARG        0x8
00071 #define ARGV_NO_PRINT 0x16
00072 
00073 
00074 /*
00075  *--------------------------------------------------------------
00076  *
00077  * Exported procedures and variables.
00078  *
00079  *--------------------------------------------------------------
00080  */
00081 
00082 #if defined(__cplusplus)
00083 extern "C" {
00084 #endif
00085 
00086 extern int ParseArgv _ANSI_ARGS_((int *argcPtr, char **argv,
00087                                   ArgvInfo *argTable, int flags));
00088 
00089 #if defined(__cplusplus)
00090 }
00091 #endif

Generated on Fri Oct 26 23:38:10 2001 for bicobj-intersection by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001