/[mailutils]/mailutils/readmsg/readmsg.c
ViewVC logotype

Diff of /mailutils/readmsg/readmsg.c

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

revision 1.8 by gray, Tue Aug 27 10:50:15 2002 UTC revision 1.9 by polak, Mon Dec 23 22:01:35 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  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
# Line 29  static void print_body __P ((message_t)) Line 29  static void print_body __P ((message_t))
29  static int  string_starts_with __P ((const char * s1, const char *s2));  static int  string_starts_with __P ((const char * s1, const char *s2));
30    
31  const char *argp_program_version = "readmsg (" PACKAGE_STRING ")";  const char *argp_program_version = "readmsg (" PACKAGE_STRING ")";
32  static char doc[] = "GNU readmsg -- print messages";  static char doc[] = N_("GNU readmsg -- print messages");
33  static error_t readmsg_parse_opt  __P((int key, char *arg,  static error_t readmsg_parse_opt  __P((int key, char *arg,
34                                         struct argp_state *astate));                                         struct argp_state *astate));
35    
36  static struct argp_option options[] =  static struct argp_option options[] =
37  {  {
38    { "debug", 'd', 0, 0, "Display debugging information", 1 },    { "debug", 'd', 0, 0, N_("Display debugging information"), 1 },
39    { "header", 'h', 0, 0, "Display entire header", 1 },    { "header", 'h', 0, 0, N_("Display entire header"), 1 },
40    { "weedlist", 'w', "LIST", 0, "List of header names separated by whitespace or commas", 1 },    { "weedlist", 'w', "LIST", 0,
41    { "folder", 'f', "FOLDER", 0, "Folder to use", 1 },      N_("List of header names separated by whitespace or commas"), 1 },
42    { "no-header", 'n', 0, 0, "Exclude all headers", 1 },    { "folder", 'f', "FOLDER", 0, N_("Folder to use"), 1 },
43    { "form-feeds", 'p', 0, 0, "Output formfeeds between messages", 1 },    { "no-header", 'n', 0, 0, N_("Exclude all headers"), 1 },
44      { "form-feeds", 'p', 0, 0, N_("Output formfeeds between messages"), 1 },
45    { "show-all-match", 'a', NULL, 0,    { "show-all-match", 'a', NULL, 0,
46      "Print all messages matching pattern, not just the first", 1 },      N_("Print all messages matching pattern, not just the first"), 1 },
47    {0, 0, 0, 0}    {0, 0, 0, 0}
48  };  };
49    
# Line 224  main (int argc, char **argv) Line 225  main (int argc, char **argv)
225    int index;    int index;
226    mailbox_t mbox = NULL;    mailbox_t mbox = NULL;
227    
228      /* Native Language Support */
229      mu_init_nls ();
230    
231    mu_argp_parse (&argp, &argc, &argv, 0, readmsg_argp_capa, &index, NULL);    mu_argp_parse (&argp, &argc, &argv, 0, readmsg_argp_capa, &index, NULL);
232    
233    /* Registration.  */    /* Registration.  */
# Line 239  main (int argc, char **argv) Line 243  main (int argc, char **argv)
243    status = mailbox_create_default (&mbox, mailbox_name);    status = mailbox_create_default (&mbox, mailbox_name);
244    if (status != 0)    if (status != 0)
245      {      {
246        fprintf (stderr, "could not create - %s\n", mu_errstring(status));        fprintf (stderr, _("could not create - %s\n"), mu_errstring(status));
247        exit (2);        exit (2);
248      }      }
249    
# Line 257  main (int argc, char **argv) Line 261  main (int argc, char **argv)
261        url_t url = NULL;        url_t url = NULL;
262    
263        mailbox_get_url (mbox, &url);        mailbox_get_url (mbox, &url);
264        fprintf (stderr, "can't open mailbox %s: %s\n",        fprintf (stderr, _("can't open mailbox %s: %s\n"),
265                 url_to_string (url),                 url_to_string (url),
266                 mu_errstring(status));                 mu_errstring(status));
267        exit (2);        exit (2);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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