Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

cmdlong.h

Go to the documentation of this file.
00001 #ifndef CMDLONG_H
00002 #define CMDLONG_H
00003 
00004 /* ==== HEADER cmdlong.h ==== */
00005 
00014 /* ANSI C, 4-Aug-1999. Andras Aszodi */
00015 
00016 /* ---- STANDARD HEADERS ---- */
00017 
00018 #include <stdlib.h>
00019 #include <stdio.h>
00020 
00021 /* ---- TYPEDEFS ---- */
00022 
00023 #ifdef __cplusplus
00024 namespace RazorBack {
00025 #endif
00026     
00031 typedef union
00032 {
00033     int Bool;
00034     char Char;
00035     long Long;
00036     double Dbl;
00037     char *Str;
00038 } Cmdlongvar_;
00039 
00040 /* ---- PROTOTYPES ---- */
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045     
00063 int cmdlong_addopts(const char *Descr);
00064 
00074 int cmdlong_getopts(int argc, char *argv[]);
00075 
00080 int bool_option(const char *Optname);
00081 
00087 int yesno_option(const char *Optname, int Defval);
00088 char char_option(const char *Optname, char Defval);
00089 long long_option(const char *Optname, long Defval);
00090 double dbl_option(const char *Optname, double Defval);
00091 const char *str_option(const char *Optname, const char *Defval);
00092 
00100 int check_option(const char *Optname, Cmdlongvar_ *Value);
00101 
00111 const char *help_string(const char *Optname);
00112 
00117 void remove_cmdlongs(void);
00118 
00119 #ifdef __cplusplus
00120 } }
00121 #endif
00122 
00123 /* ==== END OF HEADER cmdlong.h ==== */
00124 
00125 #endif  /* CMDLONG_H */

Generated at Wed Aug 21 09:33:39 2002 for The Razorback C Library: Miscellaneous Utilities by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001