summaryrefslogtreecommitdiff
path: root/Build/source/texk/psutils/TLPATCHES
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/psutils/TLPATCHES')
-rw-r--r--Build/source/texk/psutils/TLPATCHES/ChangeLog85
-rw-r--r--Build/source/texk/psutils/TLPATCHES/TL-Changes6
-rw-r--r--Build/source/texk/psutils/TLPATCHES/patch-01-bug-fix26
-rw-r--r--Build/source/texk/psutils/TLPATCHES/patch-20-texlive19
-rw-r--r--Build/source/texk/psutils/TLPATCHES/patch-30-unsigned83
5 files changed, 219 insertions, 0 deletions
diff --git a/Build/source/texk/psutils/TLPATCHES/ChangeLog b/Build/source/texk/psutils/TLPATCHES/ChangeLog
new file mode 100644
index 00000000000..7cab60f9ce3
--- /dev/null
+++ b/Build/source/texk/psutils/TLPATCHES/ChangeLog
@@ -0,0 +1,85 @@
+2014-06-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-30-unsigned (new): Avoid undefined behaviour.
+
+2014-01-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import psutils-1.23.
+
+ * patch-01-backport, patch-10-binary-mode, patch-11-WIN32,
+ patch-20-psnup-man (all removed): Obsolete.
+
+ * patch-01-bug-fix (new): Rename program => program_name.
+
+ * patch-20-texlive (new): For TeX Live we can not use
+ paper_size() from psutil.c because the default papersize is
+ given in a file to be found somewhere in the TDS hierarchy.
+
+2013-11-21 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-12-getopt (removed): Now using getopt() from kpathsea.
+ * patch-20-psnup-man (new): Fix psnup.1 typos and cleanup.
+
+2013-11-21 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-12-getopt (new): Adapt psnup.[1c] to non-GNU getopt.
+
+2013-10-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-11-WIN32: Adapt to Visual Studio 2010 (from Akira).
+
+2013-10-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Import psutils-1.21.
+
+ * patch-01-WIN32, patch-02-PERL, patch-03-main-is-int,
+ patch-04-warnings, patch-05-const, patch-07-TEMPDIR,
+ patch-08-non-free, patch-09-PERL, patch-11-extern: All removed
+ because either obsolete or included upstream.
+
+ * patch-01-backport (new): Backport from git repository.
+ * patch-10-binary-mode: Adapted (from Akira).
+ * patch-11-WIN32 (new): LFS defines for native WIN32 and MinGW.
+
+2012-08-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-01-WIN32: Adapt to W32TeX (from Akira Kakuto).
+ * patch-06-MINGW (removed): Obsolete.
+
+2012-03-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-11-extern (new): Remove extern decls from *.c files.
+
+2011-09-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-10-binary-mode (new): Fix error messages when setting
+ binary mode fails.
+
+2011-01-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-07-TEMPDIR: Fix broken perl syntax.
+ * patch-09-PERL (new): Avoid problems with Akira's perl.
+
+ Mail from Akira Sat, 08 Jan 2011 14:43:53.
+
+2010-12-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-07-TEMPDIR (new): Honor $TMPDIR, $TEMP, and $TMP.
+ * patch-08-non-free (new): Adapt to removal of non-free files.
+
+2010-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-02-PERL: Adapt to new kpsewhich semantics and
+ texmf layout.
+ Change basename => dirname and add 'use File::Basename'.
+
+2010-12-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Patches applied to psutils-1.17 as obtained from CTAN.
+ * patch-01-WIN32: Added various #ifdef WIN32.
+ * patch-02-PERL: Handling of perl scripts.
+ * patch-03-main-is-int: Changed return type of main() from void
+ to int; changed exit at end into return.
+ * patch-04-warnings: Avoid various compiler warnings.
+ * patch-05-const: Constify strings.
+ * patch-06-MINGW: Do not #include <win32lib.h> for MinGW32.
diff --git a/Build/source/texk/psutils/TLPATCHES/TL-Changes b/Build/source/texk/psutils/TLPATCHES/TL-Changes
new file mode 100644
index 00000000000..4543a57a63c
--- /dev/null
+++ b/Build/source/texk/psutils/TLPATCHES/TL-Changes
@@ -0,0 +1,6 @@
+Changes applied to the psutils-1.23 tree as obtained from:
+ https://github.com/rrthomas/psutils/archive/v1.23.tar.gz
+
+Remove:
+ .gitignore
+
diff --git a/Build/source/texk/psutils/TLPATCHES/patch-01-bug-fix b/Build/source/texk/psutils/TLPATCHES/patch-01-bug-fix
new file mode 100644
index 00000000000..4786ca5fb8f
--- /dev/null
+++ b/Build/source/texk/psutils/TLPATCHES/patch-01-bug-fix
@@ -0,0 +1,26 @@
+diff -ur psutils-1.23.orig/psutil.c psutils-1.23/psutil.c
+--- psutils-1.23.orig/psutil.c 2014-01-15 20:08:26.000000000 +0100
++++ psutils-1.23/psutil.c 2014-01-16 08:56:23.000000000 +0100
+@@ -18,12 +18,12 @@
+ #include <sys/stat.h>
+ #include <stdio.h>
+
++#include "progname.h"
+ #include "xvasprintf.h"
+ #include "verror.h"
+
+ #define iscomment(x,y) (strncmp(x,y,strlen(y)) == 0)
+
+-char *program;
+ int pages;
+ int verbose;
+ FILE *infile;
+@@ -44,7 +44,7 @@
+
+ _Noreturn void usage(void)
+ {
+- fprintf(stderr, "%s %s\n%sUsage: %s %s", program, PACKAGE_VERSION, COPYRIGHT_STRING, program, syntax);
++ fprintf(stderr, "%s %s\n%sUsage: %s %s", program_name, PACKAGE_VERSION, COPYRIGHT_STRING, program_name, syntax);
+ exit(1);
+ }
+
diff --git a/Build/source/texk/psutils/TLPATCHES/patch-20-texlive b/Build/source/texk/psutils/TLPATCHES/patch-20-texlive
new file mode 100644
index 00000000000..86a624003be
--- /dev/null
+++ b/Build/source/texk/psutils/TLPATCHES/patch-20-texlive
@@ -0,0 +1,19 @@
+diff -ur psutils-1.23.orig/psutil.c psutils-1.23/psutil.c
+--- psutils-1.23.orig/psutil.c 2014-01-16 08:56:23.000000000 +0100
++++ psutils-1.23/psutil.c 2014-01-16 08:57:40.000000000 +0100
+@@ -66,6 +66,7 @@
+ verror(1, 0, format, args); /* Does not return */
+ }
+
++#if 0 /* not used for TeX Live */
+ /* Read a line from a pipe and return it without any trailing newline. */
+ static char *pgetline(const char *cmd)
+ {
+@@ -94,6 +95,7 @@
+ free(cmd);
+ return res == 2;
+ }
++#endif /* not used for TeX Live */
+
+ /* Make a file seekable, using temporary files if necessary */
+ FILE *seekable(FILE *fp)
diff --git a/Build/source/texk/psutils/TLPATCHES/patch-30-unsigned b/Build/source/texk/psutils/TLPATCHES/patch-30-unsigned
new file mode 100644
index 00000000000..97d13b3c290
--- /dev/null
+++ b/Build/source/texk/psutils/TLPATCHES/patch-30-unsigned
@@ -0,0 +1,83 @@
+ Avoid undefined behaviour when char is unsigned.
+
+diff -ur psutils-1.23.orig/psselect.c psutils-1.23/psselect.c
+--- psutils-1.23.orig/psselect.c 2014-01-15 20:08:26.000000000 +0100
++++ psutils-1.23/psselect.c 2014-06-19 12:56:34.000000000 +0200
+@@ -43,9 +43,9 @@
+ if(!str) return NULL;
+
+ sign = (*str == '_' && ++str) ? -1 : 1;
+- if (isdigit(*str)) {
++ if (isdigit((unsigned char)*str)) {
+ first = sign*atoi(str);
+- while (isdigit(*str)) str++;
++ while (isdigit((unsigned char)*str)) str++;
+ }
+ switch (*str) {
+ case '\0':
+@@ -62,9 +62,9 @@
+ sign = (*str == '_' && ++str) ? -1 : 1;
+ if (!first)
+ first = 1;
+- if (isdigit(*str)) {
++ if (isdigit((unsigned char)*str)) {
+ int last = sign*atoi(str);
+- while (isdigit(*str)) str++;
++ while (isdigit((unsigned char)*str)) str++;
+ if (*str == '\0')
+ return (makerange(first, last, rp));
+ if (*str == ',')
+diff -ur psutils-1.23.orig/psspec.c psutils-1.23/psspec.c
+--- psutils-1.23.orig/psspec.c 2014-01-15 20:08:26.000000000 +0100
++++ psutils-1.23/psspec.c 2014-06-19 12:56:34.000000000 +0200
+@@ -35,7 +35,7 @@
+ char *s = *sp;
+ int num = atoi(s);
+
+- while (isdigit(*s))
++ while (isdigit((unsigned char)*s))
+ s++;
+ if (*sp == s) argerror();
+ *sp = s;
+@@ -47,7 +47,7 @@
+ char *s = *sp;
+ double num = atof(s);
+
+- while (isdigit(*s) || *s == '-' || *s == '.')
++ while (isdigit((unsigned char)*s) || *s == '-' || *s == '.')
+ s++;
+ if (*sp == s) argerror();
+ *sp = s;
+diff -ur psutils-1.23.orig/pstops.c psutils-1.23/pstops.c
+--- psutils-1.23.orig/pstops.c 2014-01-15 20:08:26.000000000 +0100
++++ psutils-1.23/pstops.c 2014-06-19 12:56:34.000000000 +0200
+@@ -34,7 +34,7 @@
+
+ head = tail = newspec();
+ while (*str) {
+- if (isdigit(*str)) {
++ if (isdigit((unsigned char)*str)) {
+ num = parseint(&str);
+ } else {
+ switch (*str++) {
+diff -ur psutils-1.23.orig/psutil.c psutils-1.23/psutil.c
+--- psutils-1.23.orig/psutil.c 2014-01-16 08:57:40.000000000 +0100
++++ psutils-1.23/psutil.c 2014-06-19 12:56:34.000000000 +0200
+@@ -258,7 +258,7 @@
+ if (fgets(buffer, BUFSIZ, infile) != NULL &&
+ iscomment(buffer, "%%Page:")) {
+ char *start, *end;
+- for (start = buffer+7; isspace(*start); start++);
++ for (start = buffer+7; isspace((unsigned char)*start); start++);
+ if (*start == '(') {
+ int paren = 1;
+ for (end = start+1; paren > 0; end++)
+@@ -275,7 +275,7 @@
+ break;
+ }
+ } else
+- for (end = start; !isspace(*end); end++);
++ for (end = start; !isspace((unsigned char)*end); end++);
+ strncpy(pagelabel, start, end-start);
+ pagelabel[end-start] = '\0';
+ pageno = atoi(end);