~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to main.c

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2009-06-17 17:17:28 UTC
  • mfrom: (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20090617171728-61dkl7w5fgn7ybdq
Tags: upstream-1.5.20
Import upstream version 1.5.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
Copyright (C) 1999-2009 Brendan Cully <brendan@kublai.com>\n\
79
79
Copyright (C) 1999-2002 Tommi Komulainen <Tommi.Komulainen@iki.fi>\n\
80
80
Copyright (C) 2000-2002 Edmund Grimley Evans <edmundo@rano.org>\n\
81
 
Copyright (C) 2006-2008 Rocco Rutte <pdmef@gmx.net>\n\
 
81
Copyright (C) 2006-2009 Rocco Rutte <pdmef@gmx.net>\n\
82
82
\n\
83
83
Many others not mentioned here contributed code, fixes,\n\
84
84
and suggestions.\n");
631
631
 
632
632
      case 'd':
633
633
#ifdef DEBUG
634
 
        debuglevel = atoi (optarg);
 
634
        if (mutt_atoi (optarg, &debuglevel) < 0 || debuglevel <= 0)
 
635
        {
 
636
          fprintf (stderr, _("Error: value '%s' is invalid for -d.\n"), optarg);
 
637
          return 1;
 
638
        }
635
639
        printf (_("Debugging at level %d.\n"), debuglevel);
636
640
#else
637
641
        printf _("DEBUG was not defined during compilation.  Ignored.\n");
741
745
  /* Initialize crypto backends.  */
742
746
  crypt_init ();
743
747
 
 
748
  if (newMagic)
 
749
    mx_set_magic (newMagic);
 
750
 
744
751
  if (queries)
745
752
  {
746
753
    for (; optind < argc; optind++)
773
780
    return rv;
774
781
  }
775
782
 
776
 
  if (newMagic)
777
 
    mx_set_magic (newMagic);
778
 
 
779
783
  if (!option (OPTNOCURSES))
780
784
  {
781
785
    SETCOLOR (MT_COLOR_NORMAL);
909
913
          if (!option (OPTNOCURSES))
910
914
            mutt_endwin (NULL);
911
915
          perror (tempfile);
912
 
          fclose (fin);
 
916
          safe_fclose (&fin);
913
917
          FREE (&tempfile);
914
918
          exit (1);
915
919
        }
917
921
          mutt_copy_stream (fin, fout);
918
922
        else if (bodytext)
919
923
          fputs (bodytext, fout);
920
 
        fclose (fout);
 
924
        safe_fclose (&fout);
921
925
        if (fin && fin != stdin)
922
 
          fclose (fin);
 
926
          safe_fclose (&fin);
923
927
      }
924
928
    }
925
929