putoptv.c.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. putoptv.c
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='PushButton.c.html' title=' PushButton.c '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='putpwd.c.html' title=' putpwd.c '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*====================================================================*
  22. *
  23. * void putoptv(char const *help[]);
  24. *
  25. * putoptv.h
  26. *
  27. * print program information on stdout; informtion is stored as an
  28. * ordered string vector; string indexes are defined in getopt.h;
  29. *
  30. * Motley Tools by Charles Maier &lt;cmaier@cmassoc.net&gt;;
  31. * Copyright (c) 2001-2006 by Charles Maier Associates;
  32. * Licensed under the Internet Software Consortium License;
  33. *
  34. *--------------------------------------------------------------------*/
  35. #ifndef PUTOPTV_SOURCE
  36. #define PUTOPTV_SOURCE
  37. #include &lt;stdio.h&gt;
  38. #include &lt;stdlib.h&gt;
  39. #include &quot;../tools/getoptv.h&quot;
  40. #include &quot;../tools/putoptv.h&quot;
  41. void putoptv (char const * optv [])
  42. {
  43. extern char const * program_name;
  44. size_t index;
  45. printf (&quot;\n&quot;);
  46. printf (&quot; program: %s\n\n&quot;, optv [PUTOPTV_I_PROGRAM]);
  47. printf (&quot; command: %s [options] %s\n\n&quot;, program_name, optv [PUTOPTV_I_COMMAND]);
  48. printf (&quot; options: [%s%c%c]\n\n&quot;, optv [PUTOPTV_I_OPTIONS], GETOPTV_C_VERSION, GETOPTV_C_SUMMARY);
  49. for (index = PUTOPTV_I_DETAILS; optv [index] != (char *) (0); index++)
  50. {
  51. printf (&quot; %c%s\n&quot;, GETOPTV_C_OPTION, optv [index]);
  52. }
  53. printf (&quot; %c%c\tversion information\n&quot;, GETOPTV_C_OPTION, GETOPTV_C_VERSION);
  54. printf (&quot; %c%c\thelp summary\n&quot;, GETOPTV_C_OPTION, GETOPTV_C_SUMMARY);
  55. printf (&quot;\n&quot;);
  56. return;
  57. }
  58. #endif
  59. </pre>
  60. <div class='footerlink'>
  61. [<a href='PushButton.c.html' title=' PushButton.c '>PREV</a>]
  62. [<a href='toolkit.html' title=' Index '>HOME</a>]
  63. [<a href='putpwd.c.html' title=' putpwd.c '>NEXT</a>]
  64. </div>
  65. </body>
  66. </html>