summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-60-warnings
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-60-warnings')
-rw-r--r--Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-60-warnings236
1 files changed, 236 insertions, 0 deletions
diff --git a/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-60-warnings b/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-60-warnings
new file mode 100644
index 00000000000..d090508a274
--- /dev/null
+++ b/Build/source/texk/dvi2tty/dvi2tty-5.3.1-PATCHES/patch-60-warnings
@@ -0,0 +1,236 @@
+diff -ur dvi2tty-5.3.1.orig/disdvi.c dvi2tty-5.3.1/disdvi.c
+--- dvi2tty-5.3.1.orig/disdvi.c 2010-10-22 09:08:02.000000000 +0200
++++ dvi2tty-5.3.1/disdvi.c 2010-10-22 09:15:58.000000000 +0200
+@@ -124,7 +124,7 @@
+ void postamble (void);
+ void postpostamble (void);
+ void fontdef (int x);
+-char * fontname (unsigned long fntnum);
++const char * fontname (unsigned long fntnum);
+ void special (int x);
+ void printnonprint (int ch);
+ unsigned long num (int size);
+@@ -493,7 +493,7 @@
+ * FONTNAME -- Return font name.
+ */
+
+-char * fontname(unsigned long fntnum)
++const char * fontname(unsigned long fntnum)
+ {
+ font * fnt;
+
+diff -ur dvi2tty-5.3.1.orig/dvi2tty.c dvi2tty-5.3.1/dvi2tty.c
+--- dvi2tty-5.3.1.orig/dvi2tty.c 2010-10-22 14:10:28.000000000 +0200
++++ dvi2tty-5.3.1/dvi2tty.c 2010-10-22 14:15:38.000000000 +0200
+@@ -236,13 +236,13 @@
+ long foo; /* utility variable, "register" */
+ #if !defined(MSDOS) && !defined(VMS) && !defined(THINK_C) && !defined(AMIGA)
+ bool pager; /* tells if output is piped to a pager */
+-char * path; /* name of the pager to run */
++const char * path; /* name of the pager to run */
+ #endif
+ char * progname; /* our name */
+ int Argc;
+ char ** Argv;
+ char DVIfilename[MAXLEN];
+-char * OUTfilename;
++const char * OUTfilename;
+ char optch; /* for option handling */
+
+
+@@ -252,26 +252,26 @@
+ */
+
+ #if defined(MSDOS)
+-void setoption (char *);
++void setoption (const char *);
+ void getargs (void);
+-void getpages (int, char *);
++void getpages (int, const char *);
+ void plcnxt (int);
+-void getfname (char *);
+-int getinteger(int *, int *, char *);
+-int getlong (long *, int *, char *);
++void getfname (const char *);
++int getinteger(int *, int *, const char *);
++int getlong (long *, int *, const char *);
+ void usage (int);
+ #else
+
+ # if defined(VMS)
+ main (int argc, char ** argv);
+ # endif
+-void setoption (char * optarg);
++void setoption (const char * optarg);
+ void getargs (void);
+-void getpages (int j, char * str);
++void getpages (int j, const char * str);
+ void plcnxt (int pagnr);
+-void getfname (char * str);
+-int getinteger(int * dest, int * j, char * str);
+-int getlong (long * dest, int * j, char * str);
++void getfname (const char * str);
++int getinteger(int * dest, int * j, const char * str);
++int getlong (long * dest, int * j, const char * str);
+ void usage (int uerr);
+ #endif
+
+@@ -360,7 +360,8 @@
+
+ void getargs(void)
+ {
+- char *str, *envp;
++ const char *str;
++ char *envp;
+ bool DVIfound; /* if a dvi filename found */
+
+ #if !defined(THINK_C)
+@@ -494,7 +495,7 @@
+ * SETOPTION -- Process an option.
+ */
+
+-void setoption(char *optarg)
++void setoption(const char *optarg)
+ {
+ int j = 0;
+
+@@ -571,7 +572,7 @@
+ * GETPAGES -- Getr a list of pages to print.
+ */
+
+-void getpages(int j, char *str)
++void getpages(int j, const char *str)
+ {
+ int i, c;
+ int num;
+@@ -695,7 +696,7 @@
+ * GETFNAME -- {Make sure we have a .dvi filename.
+ */
+
+-void getfname(char *str)
++void getfname(const char *str)
+ {
+ int i;
+
+@@ -722,7 +723,7 @@
+ * call for it.
+ */
+
+-int getinteger(int *dest, int *j, char *str)
++int getinteger(int *dest, int *j, const char *str)
+ {
+ int cum;
+ int sgn;
+@@ -758,7 +759,7 @@
+ * call for it.
+ */
+
+-int getlong(long *dest, int *j, char *str)
++int getlong(long *dest, int *j, const char *str)
+ {
+ long cum;
+ int sgn;
+diff -ur dvi2tty-5.3.1.orig/dvistuff.c dvi2tty-5.3.1/dvistuff.c
+--- dvi2tty-5.3.1.orig/dvistuff.c 2010-10-22 13:45:27.000000000 +0200
++++ dvi2tty-5.3.1/dvistuff.c 2010-10-22 14:07:21.391142887 +0200
+@@ -93,7 +93,9 @@
+ * Structure and variable definitions
+ */
+
++#if 0
+ char *dvistuff = "@(#) dvistuff.c 5.12 27may1996 M.J.E. Mol (c) 1989-1996";
++#endif
+
+ typedef struct {
+ long hh;
+@@ -186,7 +188,7 @@
+ void dochar (char);
+ void symchar (char);
+ void normchar (char);
+-void outchar (char);
++void outchar (unsigned char);
+ void putcharacter (long);
+ void setchar (long);
+ void fontdef (int);
+@@ -215,7 +217,7 @@
+ void dochar (char ch);
+ void symchar (char ch);
+ void normchar (char ch);
+-void outchar (char ch);
++void outchar (unsigned char ch);
+ void putcharacter (long charnr);
+ void setchar (long charnr);
+ void fontdef (int x);
+@@ -382,18 +384,20 @@
+ lastline = currentline;
+ firstcolumn = rightmargin;
+ if (pageswitchon) {
+- if ((sequenceon ? pagecounter : pagenr) != firstpage->pag)
++ if ((sequenceon ? pagecounter : pagenr) != firstpage->pag) {
+ if (noffd)
+ fprintf(output, "^L\n");
+ else
+ putc(FORM, output);
++ }
+ }
+ else
+- if (backpointer != -1) /* not FORM at first page */
++ if (backpointer != -1) { /* not FORM at first page */
+ if (noffd)
+ fprintf(output, "^L\n");
+ else
+ putc(FORM, output);
++ }
+
+ return;
+
+@@ -588,7 +592,7 @@
+ void printpage(void)
+ {
+ register int i, j;
+- register char ch;
++ register unsigned char ch;
+
+ if (sptr != 0)
+ fprintf(stderr, "dvi2tty: warning - stack not empty at eop.\n");
+@@ -667,7 +671,7 @@
+ {
+
+ register char ch; /* character to set rule with */
+- register long saveh, savev;
++ register long saveh = 0, savev;
+ /* rule -- starts up the recursive routine */
+ if (!moving)
+ saveh = h;
+@@ -837,11 +841,12 @@
+ /* temp->vv < v < temp->next->vv --- temp is above, temp->next is below */
+ topd = v - temp->vv;
+ botd = temp->next->vv - v;
+- if ((topd < lineheight) || (botd < lineheight))
++ if ((topd < lineheight) || (botd < lineheight)) {
+ if (topd < botd) /* take best fit */
+ return temp;
+ else
+ return temp->next;
++ }
+
+ /* no line fits suitable, generate a new one */
+ currentline = texlive_getline();
+@@ -1071,7 +1076,7 @@
+ * SHOULD BE MOVED OUT.
+ */
+
+-void outchar(char ch)
++void outchar(unsigned char ch)
+ {
+ register int i, j;
+
+@@ -1201,7 +1206,7 @@
+ void setchar(long charnr)
+ {
+
+- outchar(allchar ? charnr : '#');
++ outchar(allchar ? (unsigned char)charnr : '#');
+
+ return;
+