summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-15 15:16:51 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-15 15:16:51 +0000
commita13fa3342001a13e250113815da70344a009380e (patch)
tree2b6c5ffb03d5ffc6538bfccb517d7db3a9c75cea
parent9b9bd438a2fac27b0347aef44b584acfd52d53ab (diff)
avoid compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@13758 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/cpascal.h31
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog11
-rw-r--r--Build/source/texk/web2c/lib/basechsuffix.c1
-rw-r--r--Build/source/texk/web2c/lib/chartostring.c1
-rw-r--r--Build/source/texk/web2c/lib/eofeoln.c2
-rw-r--r--Build/source/texk/web2c/lib/fprintreal.c1
-rw-r--r--Build/source/texk/web2c/lib/input2int.c1
-rw-r--r--Build/source/texk/web2c/lib/inputint.c2
-rw-r--r--Build/source/texk/web2c/lib/lib.h53
-rw-r--r--Build/source/texk/web2c/lib/main.c2
-rw-r--r--Build/source/texk/web2c/lib/openclose.c9
-rw-r--r--Build/source/texk/web2c/lib/printversion.c1
-rw-r--r--Build/source/texk/web2c/lib/zround.c1
14 files changed, 84 insertions, 37 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 7554a5848d8..a293d1b9c4e 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * cpascal.h: #include "lib/lib.h" and move declarations for
+ lib/*.c to that new file.
+
2009-06-04 Karl Berry <karl@tug.org>
* tex.ch: do not announce file_line_error or parse_first_line
diff --git a/Build/source/texk/web2c/cpascal.h b/Build/source/texk/web2c/cpascal.h
index 7ce0a165d32..254666359de 100644
--- a/Build/source/texk/web2c/cpascal.h
+++ b/Build/source/texk/web2c/cpascal.h
@@ -283,37 +283,8 @@ typedef struct option getoptstruct;
/* Declarations for the routines we provide ourselves in lib/. */
+#include "lib/lib.h"
-extern string basenamechangesuffix P3H(const_string,const_string,const_string);
-extern string chartostring P1H(char);
-extern boolean eof P1H(FILE *);
-extern boolean eoln P1H(FILE *);
-extern void readln P1H(FILE *);
-extern void fprintreal P4H(FILE *, double, int, int);
-extern integer inputint P1H(FILE *);
extern int loadpoolstrings P1H(integer);
-extern void printversionandexit P4H(const_string, const_string, const_string, char*);
-extern void zinput2ints P2H(integer *, integer *);
-extern void zinput3ints P3H(integer *, integer *, integer *);
-extern integer zround P1H(double);
-
-/* main.c */
-extern int argc;
-extern string *argv;
-extern string cmdline P1H(int);
-extern TEXDLL void mainbody P1H(void); /* generated by web2c */
-
-/* openclose.c */
-extern boolean open_input P3H(FILE **, int, const_string fopen_mode);
-extern boolean open_output P2H(FILE **, const_string fopen_mode);
-extern void close_file P1H(FILE *);
-extern void recorder_change_filename P1H(string);
-extern boolean recorder_enabled;
-extern string output_directory;
-extern void recorder_record_input P1H(const_string);
-extern void recorder_record_output P1H(const_string);
-
-/* version.c */
-extern string versionstring;
#endif /* not CPASCAL_H */
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 9a1fa61aa85..256e7009e81 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CFLAGS): enable compiler warnings.
+ * lib.h (new): declarations for *.c from ../cpascal.h.
+ * basechsuffix.c, chartostring.c, eofeoln.c, fprintreal.c,
+ input2int.c, inputint.c, main.c, openclose.c, printversion.c,
+ zround.c: #include "lib.h" to declare function prototypes.
+ * openclose.c: declare internal function recorder_record_name as
+ static; declare arg of recorder_record_input and
+ recorder_record_output as const_string as from ../cpascal.h.
+
2009-06-01 Karl Berry <karl@tug.org>
* printversion.c (printversionandexit): it's 2009.
diff --git a/Build/source/texk/web2c/lib/basechsuffix.c b/Build/source/texk/web2c/lib/basechsuffix.c
index f2c2d7bb06f..28f269dd7d3 100644
--- a/Build/source/texk/web2c/lib/basechsuffix.c
+++ b/Build/source/texk/web2c/lib/basechsuffix.c
@@ -3,6 +3,7 @@
Written in 1995 by Karl Berry. Public domain. */
#include "config.h"
+#include "lib.h"
/* Return the basename of NAME, with trailing characters OLD replaced by
NEW. (If last characters in NAME are not OLD, just append NEW.)
diff --git a/Build/source/texk/web2c/lib/chartostring.c b/Build/source/texk/web2c/lib/chartostring.c
index 8f98feb7dac..ece5fe5e2f3 100644
--- a/Build/source/texk/web2c/lib/chartostring.c
+++ b/Build/source/texk/web2c/lib/chartostring.c
@@ -4,6 +4,7 @@
Written in 1994 by Karl Berry. Public domain. */
#include "config.h"
+#include "lib.h"
/* This is needed because web2c turns the Pascal construct 'x' into the
C character constant 'x', not the string "x". And we need to keep it
diff --git a/Build/source/texk/web2c/lib/eofeoln.c b/Build/source/texk/web2c/lib/eofeoln.c
index 1107a30e855..6e1225575be 100644
--- a/Build/source/texk/web2c/lib/eofeoln.c
+++ b/Build/source/texk/web2c/lib/eofeoln.c
@@ -2,7 +2,7 @@
testing. Public domain. */
#include "config.h"
-
+#include "lib.h"
/* Return true if we're at the end of FILE, else false. This implements
Pascal's `eof' builtin. */
diff --git a/Build/source/texk/web2c/lib/fprintreal.c b/Build/source/texk/web2c/lib/fprintreal.c
index 55f3fdc50a0..e30261b9520 100644
--- a/Build/source/texk/web2c/lib/fprintreal.c
+++ b/Build/source/texk/web2c/lib/fprintreal.c
@@ -2,6 +2,7 @@
file F. Public domain. */
#include "config.h"
+#include "lib.h"
void
fprintreal P4C(FILE*, f, double, r, int, n, int, m)
diff --git a/Build/source/texk/web2c/lib/input2int.c b/Build/source/texk/web2c/lib/input2int.c
index 0ed5cf94686..6bed88bf9e2 100644
--- a/Build/source/texk/web2c/lib/input2int.c
+++ b/Build/source/texk/web2c/lib/input2int.c
@@ -2,6 +2,7 @@
routines are only used in patgen. Public domain. */
#include "config.h"
+#include "lib.h"
#ifdef INTEGER_IS_INT
#define SCAN2INT "%d %d"
diff --git a/Build/source/texk/web2c/lib/inputint.c b/Build/source/texk/web2c/lib/inputint.c
index 6ee9a59db00..3082c8a112f 100644
--- a/Build/source/texk/web2c/lib/inputint.c
+++ b/Build/source/texk/web2c/lib/inputint.c
@@ -3,7 +3,7 @@
necessary. Public domain. */
#include "config.h"
-
+#include "lib.h"
/* Read an integer from the file F, reading past the subsequent end of
line. */
diff --git a/Build/source/texk/web2c/lib/lib.h b/Build/source/texk/web2c/lib/lib.h
new file mode 100644
index 00000000000..156e1350d15
--- /dev/null
+++ b/Build/source/texk/web2c/lib/lib.h
@@ -0,0 +1,53 @@
+/* lib.h: declare prototypes for functions in lib.a.
+ Public domain. */
+
+#ifndef LIB_LIB_H
+#define LIB_LIB_H
+
+/* basechsuffix.c */
+extern string basenamechangesuffix (const_string, const_string, const_string);
+
+/* chartostring.c */
+extern string chartostring (char);
+
+/* eofeoln.c */
+extern boolean eof (FILE *);
+extern boolean eoln (FILE *);
+extern void readln (FILE *);
+
+/* fprintreal.c */
+extern void fprintreal (FILE *, double, int, int);
+
+/* inputint.c */
+extern integer inputint (FILE *);
+
+/* input2int.c */
+extern void zinput2ints (integer *, integer *);
+extern void zinput3ints (integer *, integer *, integer *);
+
+/* main.c */
+extern int argc;
+extern string *argv;
+extern string cmdline (int);
+extern TEXDLL void mainbody (void); /* generated by web2c */
+
+/* openclose.c */
+extern boolean open_input (FILE **, int, const_string fopen_mode);
+extern boolean open_output (FILE **, const_string fopen_mode);
+extern void close_file (FILE *);
+extern void recorder_change_filename (string);
+extern boolean recorder_enabled;
+extern string output_directory;
+extern void recorder_record_input (const_string);
+extern void recorder_record_output (const_string);
+
+/* printversion.c */
+extern void printversionandexit (const_string, const_string, const_string, char*);
+
+/* version.c */
+extern char *versionstring;
+
+/* zround.c */
+extern integer zround (double);
+
+#endif /* not LIB_LIB_H */
diff --git a/Build/source/texk/web2c/lib/main.c b/Build/source/texk/web2c/lib/main.c
index b699db57b94..8341b979543 100644
--- a/Build/source/texk/web2c/lib/main.c
+++ b/Build/source/texk/web2c/lib/main.c
@@ -2,7 +2,7 @@
/* Public domain. */
#include "config.h"
-
+#include "lib.h"
/* These variables are referenced from the change files. */
char **argv;
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index c3ff5c2ec1e..72ca0d890dd 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -3,6 +3,7 @@
Written 1995, 96 Karl Berry. Public domain. */
#include "config.h"
+#include "lib.h"
#include <kpathsea/c-pathch.h>
#include <kpathsea/tex-file.h>
#include <kpathsea/variable.h>
@@ -70,8 +71,8 @@ recorder_change_filename P1C(string, new_name)
}
/* helper for recorder_record_* */
-void
-recorder_record_name P2C(string, prefix, string, nameoffile)
+static void
+recorder_record_name P2C(string, prefix, const_string, nameoffile)
{
if (recorder_enabled) {
if (!recorder_file)
@@ -83,14 +84,14 @@ recorder_record_name P2C(string, prefix, string, nameoffile)
/* record an input file */
void
-recorder_record_input P1C(string, nameoffile)
+recorder_record_input P1C(const_string, nameoffile)
{
recorder_record_name ("INPUT", nameoffile);
}
/* record an output file */
void
-recorder_record_output P1C(string, nameoffile)
+recorder_record_output P1C(const_string, nameoffile)
{
recorder_record_name ("OUTPUT", nameoffile);
}
diff --git a/Build/source/texk/web2c/lib/printversion.c b/Build/source/texk/web2c/lib/printversion.c
index d5518d6f2e2..f532c729d93 100644
--- a/Build/source/texk/web2c/lib/printversion.c
+++ b/Build/source/texk/web2c/lib/printversion.c
@@ -3,6 +3,7 @@
Written in 1996 by Karl Berry. Public domain. */
#include "config.h"
+#include "lib.h"
/* We're passed in the original WEB banner string, which has the form
This is PROGRAM, Version VERSION-NUMBER
diff --git a/Build/source/texk/web2c/lib/zround.c b/Build/source/texk/web2c/lib/zround.c
index 1df2e5d5c96..ff951e13f03 100644
--- a/Build/source/texk/web2c/lib/zround.c
+++ b/Build/source/texk/web2c/lib/zround.c
@@ -2,6 +2,7 @@
implement the predefined Pascal round function. Public domain. */
#include "config.h"
+#include "lib.h"
integer
zround P1C(double, r)