diff options
Diffstat (limited to 'print/pdq/files')
-rw-r--r-- | print/pdq/files/patch-aa | 62 | ||||
-rw-r--r-- | print/pdq/files/patch-ab | 88 | ||||
-rw-r--r-- | print/pdq/files/patch-ad | 10 | ||||
-rw-r--r-- | print/pdq/files/patch-af | 39 | ||||
-rw-r--r-- | print/pdq/files/patch-ag | 34 | ||||
-rw-r--r-- | print/pdq/files/patch-ak | 11 |
6 files changed, 244 insertions, 0 deletions
diff --git a/print/pdq/files/patch-aa b/print/pdq/files/patch-aa new file mode 100644 index 000000000000..4e0d8bb786c9 --- /dev/null +++ b/print/pdq/files/patch-aa @@ -0,0 +1,62 @@ +--- src/job.c.orig Sat May 15 01:03:09 1999 ++++ src/job.c Sat May 15 01:08:30 1999 +@@ -248,12 +248,9 @@ + } + sprintf(pat, "%s/[0-9][0-9][0-9].status", sd); + i = glob (pat, 0, NULL, &globbuf); +- if (i != 0) { +- if (i != GLOB_NOMATCH) { ++ if (i != 0) return (NULL); + /* Unknown error (or on some systems, no match) */ +- return (NULL); +- } +- } else { ++ else { + if (globbuf.gl_pathc == 0) { + /* No match */ + return (NULL); +@@ -385,14 +382,10 @@ + i = glob (pat, 0, NULL, &globbuf); + free (pat); + if (i != 0) { +- if (i != GLOB_NOMATCH) { + fprintf (stderr, "Unknown error globbing for job id.\n"); + perror (NULL); + fprintf (stderr, "Failed to purge old jobs.\n"); + my_exit (1); +- } else { +- /* No match */ +- } + } else { + if (globbuf.gl_pathc == 0) { + return; +@@ -432,14 +425,10 @@ + i = glob (pat, 0, NULL, &globbuf); + free (pat); + if (i != 0) { +- if (i != GLOB_NOMATCH) { + fprintf (stderr, "Unknown error globbing for job id.\n"); + perror (NULL); + fprintf (stderr, "Failed to purge old jobs.\n"); + my_exit (1); +- } else { +- /* No match */ +- } + } else { + if (globbuf.gl_pathc == 0) { + return; +@@ -495,11 +484,9 @@ + i = glob (pat, 0, NULL, &globbuf); + free (pat); + if (i != 0) { +- if (i != GLOB_NOMATCH) { +- fprintf (stderr, "Unknown error globbing for job id.\n"); +- perror (NULL); +- my_exit (1); +- } ++ fprintf (stderr, "Unknown error globbing for job id.\n"); ++ perror (NULL); ++ my_exit (1); + claim_try = 1; + } else { + if (globbuf.gl_pathc == 0) { diff --git a/print/pdq/files/patch-ab b/print/pdq/files/patch-ab new file mode 100644 index 000000000000..3b85203a2cea --- /dev/null +++ b/print/pdq/files/patch-ab @@ -0,0 +1,88 @@ +--- src/parse_rc.c.orig Sat May 15 01:03:20 1999 ++++ src/parse_rc.c Sat May 15 07:06:17 1999 +@@ -23,7 +23,6 @@ + #include <glob.h> + #include <string.h> + #include <stdlib.h> +-#include <values.h> + + + #include "parse.h" +@@ -35,6 +34,8 @@ + #include "driver.h" + #include "interface.h" + ++#define PRINTRC "/usr/local/etc/printrc" ++ + void try_parse_rc_glob (char *rc_glob, rc_items *rc) { + + glob_t globbuf; +@@ -46,12 +47,8 @@ + i = glob (d, 0, NULL, &globbuf); + free (d); + if (i != 0) { +- if (i == GLOB_NOMATCH) { +- /* Keep on going */ +- } else { +- fprintf (stderr, "Died while globbing %s\n", d); +- my_exit (1); +- } ++ fprintf (stderr, "Died while globbing %s\n", d); ++ my_exit (1); + } else { + /* Globbed something real */ + for (i = 0; i < globbuf.gl_pathc; i++) { +@@ -71,11 +68,7 @@ + + i = glob (d, 0, NULL, &globbuf); + if (i != 0) { +- if (i == GLOB_NOMATCH) { +- fprintf (stderr, "No files match %s\n", d); +- } else { +- fprintf (stderr, "Died while globbing %s\n", d); +- } ++ fprintf (stderr, "Died while globbing %s\n", d); + free (d); + my_exit (1); + } else { +@@ -258,7 +251,7 @@ + int trouble_flag; + + rc_locs = NULL; +- find_rc_glob_locations (type, name, "/etc/printrc", &rc_locs); ++ find_rc_glob_locations (type, name, PRINTRC, &rc_locs); + find_rc_glob_locations (type, name, "~/.printrc", &rc_locs); + + set_flag = 0; +@@ -282,7 +275,7 @@ + } + + if ( (set_flag == 0) || (trouble_flag == 1) ) { +- if (0 != append_to_rc_file ("/etc/printrc", buf) ) { ++ if (0 != append_to_rc_file (PRINTRC, buf) ) { + append_to_rc_file ("~/.printrc", buf); /* Return code not checked. + * What else can we do? + */ +@@ -299,7 +292,7 @@ + int trouble_flag; + + rc_locs = NULL; +- find_rc_glob_locations (type, name, "/etc/printrc", &rc_locs); ++ find_rc_glob_locations (type, name, PRINTRC, &rc_locs); + find_rc_glob_locations (type, name, "~/.printrc", &rc_locs); + + trouble_flag = 0; +@@ -315,11 +308,11 @@ + + /* In this case, buf should have been set to some commands that + * indicate to delete the object. For example, say printer foo is +- * defined in /etc/printrc. Ordinary users cannot delete it, but ++ * defined in /usr/local/etc/printrc. Ordinary users cannot delete it, but + * they may add the command "printer foo delete" to their own rc file. + */ + if (trouble_flag == 1) { +- if (0 != append_to_rc_file ("/etc/printrc", buf) ) { ++ if (0 != append_to_rc_file (PRINTRC, buf) ) { + append_to_rc_file ("~/.printrc", buf); /* Return code not checked. + * What else can we do? + */ diff --git a/print/pdq/files/patch-ad b/print/pdq/files/patch-ad new file mode 100644 index 000000000000..619641bcf84a --- /dev/null +++ b/print/pdq/files/patch-ad @@ -0,0 +1,10 @@ +--- src/util.c.orig Sat May 15 01:34:56 1999 ++++ src/util.c Sat May 15 02:07:16 1999 +@@ -16,6 +16,7 @@ + * + */ + ++#include <stdio.h> + #include <unistd.h> + #include <string.h> + #include <pwd.h> diff --git a/print/pdq/files/patch-af b/print/pdq/files/patch-af new file mode 100644 index 000000000000..532e2726ee9f --- /dev/null +++ b/print/pdq/files/patch-af @@ -0,0 +1,39 @@ +--- src/xpdq_printer.c.orig Sat May 15 07:19:13 1999 ++++ src/xpdq_printer.c Sat May 15 11:43:47 1999 +@@ -29,23 +29,30 @@ + #include "printer.h" + #include "argument.h" + ++#define PRINTRC "/usr/local/etc/printrc" ++ + void xpdq_add_printer (void) { + + pwizard_state *wizard; + dl_list *list; ++ char *error; + + list = first_list_element (rc->driver_list); + if (list == NULL) { +- xpdq_error ("There are no printer drivers defined in\n" +- "/etc/printrc or ~/.printrc. Without printer drivers,\n" +- "the wizard cannot add printers."); ++ error = malloc(256); ++ sprintf (error, "There are no printer drivers defined in\n" ++ "%s or ~/.printrc. Without printer drivers,\n" ++ "the wizard cannot add printers.", PRINTRC); ++ xpdq_error(error); + return; + } + list = first_list_element (rc->interface_list); + if (list == NULL) { +- xpdq_error ("There are no printer interfaces defined in\n" +- "/etc/printrc or ~/.printrc. Without printer interfaces,\n" +- "the wizard cannot add printers."); ++ error = malloc(256); ++ sprintf (error, "There are no printer drivers defined in\n" ++ "%s or ~/.printrc. Without printer drivers,\n" ++ "the wizard cannot add printers.", PRINTRC); ++ xpdq_error(error); + return; + } + wizard = new_pwizard (); diff --git a/print/pdq/files/patch-ag b/print/pdq/files/patch-ag new file mode 100644 index 000000000000..3ce08476c57b --- /dev/null +++ b/print/pdq/files/patch-ag @@ -0,0 +1,34 @@ +--- src/xpdq_wizard.c.orig Sat May 15 11:45:15 1999 ++++ src/xpdq_wizard.c Sat May 15 11:50:44 1999 +@@ -29,6 +29,8 @@ + #include "printer.h" + #include "argument.h" + ++#define PRINTRC "/usr/local/etc/printrc" ++ + pwizard_state *new_pwizard() { + + pwizard_state *wizard; +@@ -315,6 +317,7 @@ + driver *d; + int i, row; + char *dname; ++ char *error; + + panel = gtk_vbox_new (FALSE, 0); + gtk_container_border_width (GTK_CONTAINER (panel), 10); +@@ -348,9 +351,11 @@ + gtk_clist_set_selection_mode (GTK_CLIST(widget), GTK_SELECTION_BROWSE); + list = first_list_element (rc->driver_list); + if (list == NULL) { +- xpdq_error ("This system has no drivers. Please make sure\n" +- "that there are drivers defined in /etc/printrc, ~/.printrc,\n" +- "or in files included by /etc/printrc or ~/.printrc."); ++ error = malloc(256); ++ sprintf(error, "This system has no drivers. Please make sure\n" ++ "that there are drivers defined in %s, ~/.printrc,\n" ++ "or in files included by %s or ~/.printrc.", PRINTRC, PRINTRC); ++ xpdq_error(error); + } + while (list != NULL) { + d = (driver *) list->data; diff --git a/print/pdq/files/patch-ak b/print/pdq/files/patch-ak new file mode 100644 index 000000000000..20e3099ee65a --- /dev/null +++ b/print/pdq/files/patch-ak @@ -0,0 +1,11 @@ +--- lpd/lpd_interface.c.orig Sat May 15 02:26:06 1999 ++++ lpd/lpd_interface.c Sat May 15 02:26:25 1999 +@@ -80,7 +80,7 @@ + + MESSAGE (2, connecting...); + +- if ( connect(sckt, &serv_addr, sizeof(serv_addr)) != 0 ) { ++ if ( connect(sckt, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0 ) { + perror ("connect"); + exit (1); + } |