Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Previous: Argp Children, Up: Argp Parsers


25.3.8 Customizing Argp Help Output

The help_filter field in a struct argp is a pointer to a function that filters the text of help messages before displaying them. They have a function signature like:

     char *help-filter (int key, const char *text, void *input)

Where key is either a key from an option, in which case text is that option's help text. See Argp Option Vectors. Alternately, one of the special keys with names beginning with `ARGP_KEY_HELP_' might be used, describing which other help text text will contain. See Argp Help Filter Keys.

The function should return either text if it remains as-is, or a replacement string allocated using malloc. This will be either be freed by argp or zero, which prints nothing. The value of text is supplied after any translation has been done, so if any of the replacement text needs translation, it will be done by the filter function. input is either the input supplied to argp_parse or it is zero, if argp_help was called directly by the user.


 
 
  Published under the terms of the GNU General Public License Design by Interspire