home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / COMPILER / GREP / HELP.C < prev    next >
Text File  |  1993-02-28  |  3KB  |  59 lines

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /* MODULE NAME: HELP.C                                                     */
  4. /*                                                                         */
  5. /* COPYRIGHT:                                                              */
  6. /* ----------                                                              */
  7. /* Copyright (C) International Business Machines Corp., 1991,1992,1993.    */
  8. /*                                                                         */
  9. /* DISCLAIMER OF WARRANTIES:                                               */
  10. /* -------------------------                                               */
  11. /* The following [enclosed] code is sample code created by IBM             */
  12. /* Corporation.  This sample code is not part of any standard IBM product  */
  13. /* and is provided to you solely for the purpose of assisting you in the   */
  14. /* development of your applications.  The code is provided "AS IS",        */
  15. /* without warranty of any kind.  IBM shall not be liable for any damages  */
  16. /* arising out of your use of the sample code, even if they have been      */
  17. /* advised of the possibility of such damages.                             */
  18. /*                                                                         */
  19. /* STATUS: VERSION 1, RELEASE 0, MODIFICATION 0                            */
  20. /*                                                                         */
  21. /***************************************************************************/
  22.  
  23. #include "grep.h"
  24. #include <stdio.h>
  25.  
  26. void grepHelp(int helpType)
  27.      {
  28.      if (helpType == LINE_HELP)
  29.         {
  30.         printf("Usage:\n");
  31.         printf("grep [-flags] \"pattern\" [d:][\\path]node[.ext] [[d:][\\path]node[.ext]]...\n");
  32.         printf("Use -h for more help.\n");
  33.         }
  34.      else if (helpType == FULL_HELP)
  35.         {
  36.         printf("grep [/flags] \"pattern\" [d:][\\path]node[.ext] [[d:][\\path]node[.ext]]...\n");
  37.         printf(" a  the search pattern is Absolute (i.e.,'.*...' have no special meaning)\n");
  38.         printf(" c  show the count of occurrences found\n");
  39.         printf(" l  will enable line number information\n");
  40.         printf(" n  display the file name with matches only\n");
  41.         printf(" p  pause when screen is full\n");
  42.         printf(" q  Do not display the logo\n");
  43.         printf(" s  subdirectory search\n");
  44.         printf(" v  display the lines that do not have the given pattern\n");
  45.         printf(" y  case sensitive\n");
  46.         printf(" z  other help information\n");
  47.         }
  48.      else if (helpType == CMDS_HELP)
  49.         {
  50.         printf("The pattern is specified in a form\n");
  51.         printf("of regular expression notation where\n");
  52.         printf("1. A character not given special meaning matches itself\n");
  53.         printf("2. A ? matches any character.\n");
  54.         printf("3. A * matches any number of characters.\n");
  55.         }
  56.      return;
  57.      }
  58.  
  59.