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
4 * Send mail notification to user after print job has been completed.
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';
25 - strcat (spooler_options, "-m ");
27 + strcat (spooler_options, "-m ");
28 + strcat (spooler_options, mail_name);
29 + strcat (spooler_options, " ");
33 strcat (spooler_options, no_job_header_switch);
37 c = getopt_long (argc, argv,
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: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:X:zZ",
40 long_options, &option_index);
43 @@ -1985,6 +1991,10 @@
45 case 'm': /* send mail upon completion */
48 + mail_name = (optarg);
50 + mail_name = (*passwd).pw_name;
53 case 'M': /* select output media */