]> git.pld-linux.org Git - packages/enscript.git/blame - enscript-mail.patch
- updated to 1.6.6
[packages/enscript.git] / enscript-mail.patch
CommitLineData
521af142
JB
1--- enscript-1.6.6/src/main.c.orig 2011-10-30 17:48:42.000000000 +0100
2+++ enscript-1.6.6/src/main.c 2012-09-30 21:24:10.177497456 +0200
3@@ -329,6 +329,8 @@
cccb162b 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
521af142 12@@ -848,7 +850,7 @@
cccb162b 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'},
521af142 21@@ -1843,7 +1845,11 @@
cccb162b 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);
521af142 34@@ -2006,7 +2012,7 @@
3ca3bbf6 35 int i;
cccb162b 36
37 c = getopt_long (argc, argv,
521af142
JB
38- "#:123456789a: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:W:X:zZ",
39+ "#:123456789a: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:W:X:zZ",
cccb162b 40 long_options, &option_index);
41
42 if (c == -1)
521af142 43@@ -2207,6 +2213,10 @@
cccb162b 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.03532 seconds and 4 git commands to generate.