"Fossies" - the Fresh Open Source Software Archive 
Member "htmlrecode-1.3.1/argh/argh-c.inc" (21 Jul 2009, 1236 Bytes) of package /linux/www/old/htmlrecode-1.3.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) fasm source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #ifdef dirr3_argh_hh
2 #include "argh2.h"
3 #else
4 #include "argh.h"
5 #endif
6
7 static ParamHandler *Cph = NULL;
8 void argh_init(void)
9 {
10 Cph = new ParamHandler();
11 }
12 void argh_done(void)
13 {
14 delete Cph;
15 Cph = NULL;
16 }
17 void argh_add_long(const char *longname, int alias)
18 {
19 Cph->AddLong(longname, alias);
20 }
21 void argh_add_bool(int c)
22 {
23 Cph->AddBool(c);
24 }
25 void argh_add_int(int c, int min, int max)
26 {
27 Cph->AddInt(c, min, max);
28 }
29 void argh_add_float(int c, double min, double max)
30 {
31 Cph->AddFloat(c, min, max);
32 }
33 void argh_add_string(int c, unsigned minlen, unsigned maxlen)
34 {
35 Cph->AddString(c, minlen, maxlen);
36 }
37 void argh_add_desc(int c, const char *s, const char *optparam)
38 {
39 Cph->AddDesc(c, s, optparam?optparam:"");
40 }
41 void argh_start_parse(int argc, const char *const *argv)
42 {
43 Cph->StartParse(argc, argv);
44 }
45 int argh_get_bool(void)
46 {
47 return Cph->GetBool();
48 }
49 int argh_get_int(void)
50 {
51 return Cph->GetInt();
52 }
53 double argh_get_float(void)
54 {
55 return Cph->GetFloat();
56 }
57 const char *argh_get_string(void)
58 {
59 return Cph->GetString().c_str();
60 }
61 int argh_ok(void)
62 {
63 return Cph->ok();
64 }
65 int argh_get_param(void)
66 {
67 return Cph->GetParam();
68 }
69 void argh_list_options(void)
70 {
71 Cph->ListOptions();
72 }