]> git.pld-linux.org Git - packages/enscript.git/blob - enscript-mail.patch
perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
[packages/enscript.git] / enscript-mail.patch
1 --- enscript-1.6.1/src/main.c.mail      Thu Jun 25 04:26:00 1998
2 +++ enscript-1.6.1/src/main.c   Tue Jun 26 01:05:49 2001
3 @@ -338,6 +338,8 @@
4   * Send mail notification to user after print job has been completed.
5   */
6  int mail = 0;
7 +char *mail_name;
8 +
9  
10  /*
11   * -M, --media
12 @@ -785,7 +787,7 @@
13    {"no-page-prefeed",          no_argument,            0, 'K'},
14    {"lineprinter",              no_argument,            0, 'l'},
15    {"lines-per-page",           required_argument,      0, 'L'},
16 -  {"mail",                     no_argument,            0, 'm'},
17 +  {"mail",                     optional_argument,      0, 'm'},
18    {"media",                    required_argument,      0, 'M'},
19    {"copies",                   required_argument,      0, 'n'},
20    {"newline",                  required_argument,      0, 'N'},
21 @@ -1637,7 +1639,11 @@
22        /* Format spooler options. */
23        spooler_options[0] = '\0';
24        if (mail)
25 -       strcat (spooler_options, "-m ");
26 +       {
27 +         strcat (spooler_options, "-m ");
28 +         strcat (spooler_options, mail_name);
29 +         strcat (spooler_options, " ");
30 +       }
31        if (no_job_header)
32         {
33           strcat (spooler_options, no_job_header_switch);
34 @@ -1797,7 +1803,7 @@
35        const char *cp;
36  
37        c = getopt_long (argc, argv,
38 -                      "#:12a:A:b:BcC::d:D:e::E::f:F:gGhH::i:I:jJ:kKlL:mM:n:N:o:Op:P:qrRs:S:t:T:u::U:vVW:X:zZ",
39 +                      "#:12a:A:b:BcC::d:D:e::E::f:F:gGhH::i:I:jJ:kKlL:m::M:n:N:o:Op:P:qrRs:S:t:T:u::U:vVW:X:zZ",
40                        long_options, &option_index);
41  
42        if (c == -1)
43 @@ -1985,6 +1991,10 @@
44  
45         case 'm':               /* send mail upon completion */
46           mail = 1;
47 +         if(optarg)
48 +           mail_name = (optarg);
49 +         else
50 +           mail_name = (*passwd).pw_name;
51           break;
52  
53         case 'M':               /* select output media */
This page took 0.060074 seconds and 3 git commands to generate.