Package: libpopt
Version: 1.16-1

 

   The string returned by the poptPrintUsage() function may be confusing when a 
dual-named option (an option having both a short name and a long one) expects 
an argument.  In the popt man pages example, poptPrintUsage() outputs in part:

 

Usage: a.out [-chnrs?] [-b|--bps=BPS] [-c|--crnl] [-h|--hwflow]

 

   A casual reader could understand the second option as "either '-b' or 
'--bps=BPS'", and thus think the BPS argument applies only to the long option 
--bps.

 

   poptPrintUsage() should instead produce:

 

Usage: a.out [-chnrs?] [-b=BPS|--bps=BPS] [-c|--crnl] [-h|--hwflow]

 

or maybe:

 

Usage: a.out [-chnrs?] [(-b|--bps)=BPS] [-c|--crnl] [-h|--hwflow]

 

   There is unfortunately no relevant guidance in the IEEE Std 1003.1 (2004) 
Utility Conventions that would indicate the proper notation.  The grouping 
parentheses in the second alternative are borrowed from Extended Backus-Naur 
Form (EBNF), while the first alternative introduces no new syntax --but is 
potentially much more verbose.

 

Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D 
Canada - Valcartier (DRDC Valcartier)
Système de systèmes (SdS) / System of Systems (SoS)
Solutions informatiques et expérimentations (SIE) / Computing Solutions and 
Experimentations (CSE)
2459 Boul. Pie XI Nord
Québec, QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC:  <http://www.travelgis.com/map.asp?addr=918V%20QSDJ> 918V QSDJ
Gouvernement du Canada / Government of Canada
< <http://www.valcartier.drdc-rddc.gc.ca/> 
http://www.valcartier.drdc-rddc.gc.ca/>

Reply via email to