1 .\" groff -m man -Thtml <file>
2 .\" See groff_www(7), groff(7) and groff_man(7)
4 .\" save current font, switch to monospace font, output, switch back
12 .\" make text on the same line appear alternately in monospace and roman
15 . ds an-result \&\f[CW]\\$1\f[R]\"
17 . while (\\n[.$] >= 2) \{\
18 . as an-result \/\\$1\f[CW]\,\\$2\f[R]\"
21 . if \\n[.$] .as an-result \/\\$1\"
31 .TH lopsub 7 "DATE()" GIT_VERSION()
33 lopsub \- Long option parser for subcommands
38 is an open source library written in
40 which aims to ease the task of creating, documenting and parsing
41 the options of Unix command line utilities. It is suitable for
42 simple commands as well as complex command line utilities with many
43 subcommands where each subcommand has its own set of options. Options
44 and documentation are kept together in a single file which can be
47 code (to be included in the application), or to a manual page.
48 The library supports single-character short options and GNU-style
49 long options. The public API is well documented and stable.
51 To make use of the library, the programmer provides a so-called
53 which describes the options of the application in an intuitive
54 syntax. At build time the suite file is translated into
58 utility which also ships with the
60 package. The generated code defines an instance of an opaque
62 structure and exposes a reference to this structure which can be passed to
65 at run time, together with the usual argument vector. The
66 option parser is part of the
69 so applications need to link with
70 .MONO_ROMAN -llopsub .
71 In addition to the option parser, the library offers many more
72 features. For example, there is a function for merging two different
74 to generate an effective configuration. This is useful for applications
75 which can be configured through command line options and via a
78 The suite file can also be processed into roff format to create
79 a manual page. Conversion into html can easily be performed with
85 .MONO_ROMAN man2html .
88 does not rely on the system's
92 functions of the C library and is thus portable across different
93 flavors of Unix. It is known to work on
102 is licensed under the
106 utility is licensed under the
108 The examples and all code generated by the utilities, however, is
109 licensed under the public domain. You are free to do anything you
110 like with the generated code, including incorporating it into or
111 linking it with proprietary software.
114 Compile and run the minimal example included at the end of
115 .UR ./lopsub-suite.5.html
122 in the source tree and run the
126 .SH API documentation
128 .UR ./lopsub-api.html
130 Alternatively, examine
133 .MONO_ROMAN lopsub.h.m4 .
139 .UR git://git.tuebingen.mpg.de/lopsub.git
144 .UR http://git.tuebingen.mpg.de/lopsub.git
148 The author's homepage:
149 .UR http://people.tuebingen.mpg.de/maan/
154 .MT maan@tuebingen.mpg.de