On Wed, Aug 1, 2012 at 3:38 PM, David Korn <d...@research.att.com> wrote: > cc: ast-developers@research.att.com > Subject: Re: Re: DocBook/XML manpage to _ast_getopts strings... / was: Re: > Re: AST busybox ... / was: Re: [ast-developers] Patch for seamless grep.c > integration into libcmd > -------- > >> Well... first I need to know whether you like the general idea. Please >> choose... :-) >> >> [ ] like the idea >> [ ] don't like the idea >> [ ] need more time to think >> [ ] no idea >> [ ] more coffee >> [ ] Elvis Presley is alive <giggle> on mars !! >> [x] option of choice not listed >> >> > > I don't think that it is doable. Going from optget() format to > docbook will work, but not the other way. > > For example, for stty, the list of options are not in the > optget ussage string. The optget usage string generates these > from a table that is used by a function that is given to optget(). > > Here is what the table looks like. The last field is used by > optget and appears in the documentation. The rest is used > by the code that implements stty. > > static const Tty_t Ttable[] = > { > { "ispeed", NUM, C_SPEED,0, CBAUD, 0, C("\an\a is the input baud > rate") }, > { "ospeed", NUM, C_SPEED,0, CBAUD, 0, C("\an\a is the output baud > rate") }, > .... > }
Erm... for such special cases there is "xinclude" (this is more or less a feature of XML and not DocBook). In that case the base documentation is in DocBook and the (per-platform/custom) options are obtained by running the specific getopts option (AFAIK there is a way to get the help string for only a specific (set of) option(s)) to get the sub-getopts string which is then converted to a DocBook/XML fragment which the build merges into the DocBook manpage for stty (erm... in that case Glenn's idea of adding native DocBook/XML output to AST getopts makes sense). ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-developers mailing list ast-developers@research.att.com https://mailman.research.att.com/mailman/listinfo/ast-developers