/[mailutils]/mailutils/mh/mh_getopt.c
ViewVC logotype

Diff of /mailutils/mh/mh_getopt.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by gray, Mon Apr 15 11:23:53 2002 UTC revision 1.6 by gray, Wed Sep 18 17:39:20 2002 UTC
# Line 31  char *mh_optarg; Line 31  char *mh_optarg;
31  char *mh_optptr;  char *mh_optptr;
32    
33  int  int
34  mh_getopt (int argc, char **argv, struct mh_option *mh_opt)  mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc)
35  {  {
36    struct mh_option *p;    struct mh_option *p;
37    int optlen;    int optlen;
# Line 86  mh_getopt (int argc, char **argv, struct Line 86  mh_getopt (int argc, char **argv, struct
86      }      }
87    else if (!strcmp (mh_optptr+1, "help"))    else if (!strcmp (mh_optptr+1, "help"))
88      {      {
89        mh_help (mh_opt);        mh_help (mh_opt, doc);
90        exit (1);        exit (1);
91      }      }
92    return '?';    return '?';
93  }  }
94    
95  void  void
96  mh_help (struct mh_option *mh_opt)  mh_help (struct mh_option *mh_opt, const char *doc)
97  {  {
98    struct mh_option *p;    struct mh_option *p;
99    
100    printf ("Compatibility syntax:\n");    printf ("Compatibility syntax:\n");
101    printf ("%s [+folder] [msgs] [switches]\n", program_invocation_short_name);    printf ("%s [switches] %s\n", program_invocation_short_name, doc);
102    printf ("  switches are:\n");    printf ("  switches are:\n");
103        
104    for (p = mh_opt; p->opt; p++)    for (p = mh_opt; p->opt; p++)
# Line 120  mh_help (struct mh_option *mh_opt) Line 120  mh_help (struct mh_option *mh_opt)
120        printf ("\n");        printf ("\n");
121      }      }
122    printf ("  -help\n");    printf ("  -help\n");
123      printf ("\nPlease use GNU long options instead. Run %s --help for more info on these.\n", program_invocation_short_name);
124  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26