]> git.pld-linux.org Git - packages/enscript.git/commitdiff
- patch from rawhide. enscript-1_6_1-15
authorkloczek <kloczek@pld-linux.org>
Thu, 13 Dec 2001 22:28:08 +0000 (22:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    enscript-mail.patch -> 1.1

enscript-mail.patch [new file with mode: 0644]

diff --git a/enscript-mail.patch b/enscript-mail.patch
new file mode 100644 (file)
index 0000000..a390b0b
--- /dev/null
@@ -0,0 +1,53 @@
+--- enscript-1.6.1/src/main.c.mail     Thu Jun 25 04:26:00 1998
++++ enscript-1.6.1/src/main.c  Tue Jun 26 01:05:49 2001
+@@ -338,6 +338,8 @@
+  * Send mail notification to user after print job has been completed.
+  */
+ int mail = 0;
++char *mail_name;
++
+ /*
+  * -M, --media
+@@ -785,7 +787,7 @@
+   {"no-page-prefeed",         no_argument,            0, 'K'},
+   {"lineprinter",             no_argument,            0, 'l'},
+   {"lines-per-page",          required_argument,      0, 'L'},
+-  {"mail",                    no_argument,            0, 'm'},
++  {"mail",                    optional_argument,      0, 'm'},
+   {"media",                   required_argument,      0, 'M'},
+   {"copies",                  required_argument,      0, 'n'},
+   {"newline",                 required_argument,      0, 'N'},
+@@ -1637,7 +1639,11 @@
+       /* Format spooler options. */
+       spooler_options[0] = '\0';
+       if (mail)
+-      strcat (spooler_options, "-m ");
++      {
++        strcat (spooler_options, "-m ");
++        strcat (spooler_options, mail_name);
++        strcat (spooler_options, " ");
++      }
+       if (no_job_header)
+       {
+         strcat (spooler_options, no_job_header_switch);
+@@ -1797,7 +1803,7 @@
+       const char *cp;
+       c = getopt_long (argc, argv,
+-                     "#: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",
++                     "#: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",
+                      long_options, &option_index);
+       if (c == -1)
+@@ -1985,6 +1991,10 @@
+       case 'm':               /* send mail upon completion */
+         mail = 1;
++        if(optarg)
++          mail_name = (optarg);
++        else
++          mail_name = (*passwd).pw_name;
+         break;
+       case 'M':               /* select output media */
This page took 0.069712 seconds and 4 git commands to generate.