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

Diff of /mailutils/mh/fmtcheck.c

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

revision 1.1 by gray, Wed Sep 25 14:25:06 2002 UTC revision 1.2 by polak, Thu Dec 26 20:51:06 2002 UTC
# Line 1  Line 1 
1  /* GNU mailutils - a suite of utilities for electronic mail  /* GNU Mailutils -- a suite of utilities for electronic mail
2     Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.     Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3    
4     This program is free software; you can redistribute it and/or modify     GNU Mailutils is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2, or (at your option)     the Free Software Foundation; either version 2, or (at your option)
7     any later version.     any later version.
8    
9     This program is distributed in the hope that it will be useful,     GNU Mailutils is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.     GNU General Public License for more details.
13    
14     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software     along with GNU Mailutils; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
17    
18  /* fmtcheck */  /* fmtcheck */
# Line 25  static char args_doc[] = ""; Line 25  static char args_doc[] = "";
25    
26  /* GNU options */  /* GNU options */
27  static struct argp_option options[] = {  static struct argp_option options[] = {
28    {"form",    'F', "FILE",   0, "Read format from given file"},    {"form",    'F', "FILE",   0, N_("Read format from given file")},
29    {"format",  't', "FORMAT", 0, "Use this format string"},    {"format",  't', "FORMAT", 0, N_("Use this format string")},
30    {"dump",    'd', NULL,     0, "Dump the listing of compiled format code"},    {"dump",    'd', NULL,     0, N_("Dump the listing of compiled format code")},
31    { "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },    { N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
32        
33    { 0 }    { 0 }
34  };  };
# Line 50  action_dump () Line 50  action_dump ()
50  {  {
51    if (!format_str)    if (!format_str)
52      {      {
53        mh_error ("format string not specified");        mh_error (_("format string not specified"));
54        return 1;        return 1;
55      }      }
56    mh_format_dump (&format);    mh_format_dump (&format);
# Line 85  opt_handler (int key, char *arg, void *u Line 85  opt_handler (int key, char *arg, void *u
85  int  int
86  main (int argc, char **argv)  main (int argc, char **argv)
87  {  {
88      /* Native Language Support */
89      mu_init_nls ();
90    
91    mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,    mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
92                   opt_handler, NULL, NULL);                   opt_handler, NULL, NULL);
93    
94    if (format_str && mh_format_parse (format_str, &format))    if (format_str && mh_format_parse (format_str, &format))
95      {      {
96        mh_error ("Bad format string");        mh_error (_("Bad format string"));
97        exit (1);        exit (1);
98      }      }
99    return (*action) ();    return (*action) ();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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