]> git.pld-linux.org Git - packages/texlive.git/blame - texlive-source-warns.patch
- functional subpackages under working...
[packages/texlive.git] / texlive-source-warns.patch
CommitLineData
768e5264
AM
1--- libs/teckit/source/Compiler.cpp
2+++ libs/teckit/source/Compiler.cpp 2007-03-02 10:34:35.000000000 +0000
3@@ -1397,13 +1397,16 @@ Compiler::Compiler(const char* txt, UInt
4 if (dest != 0) {
5 int result = compress2(dest + 8, &destLen, compiledTable, compiledSize, Z_BEST_COMPRESSION);
6 if (result == Z_OK) {
7- destLen += 8;
8- realloc(dest, destLen);
9- WRITE(((FileHeader*)dest)->type, kMagicNumberCmp);
10- WRITE(((FileHeader*)dest)->version, compiledSize);
11- free(compiledTable);
12- compiledTable = dest;
13- compiledSize = destLen;
14+ if (realloc(dest, destLen+8) != NULL) {
15+ destLen += 8;
16+ WRITE(((FileHeader*)dest)->type, kMagicNumberCmp);
17+ WRITE(((FileHeader*)dest)->version, compiledSize);
18+ free(compiledTable);
19+ compiledTable = dest;
20+ compiledSize = destLen;
21+ }
22+ else
23+ free(dest);
24 }
25 else
26 free(dest);
27--- texk/kpathsea/xputenv.c
28+++ texk/kpathsea/xputenv.c 2007-03-02 10:14:53.000000000 +0000
29@@ -95,7 +95,7 @@ xputenv(const char *var, const char *val
30 if (cur_loc == saved_count) {
31 /* No old string. */
32 saved_count++;
33- saved_env = XRETALLOC(saved_env, saved_count, const char *);
34+ XRETALLOC(saved_env, saved_count, const char *);
35 } else {
36 /* We owned the old string. */
37 free(saved_env[cur_loc]);
38--- texk/ps2pkm/token.c
39+++ texk/ps2pkm/token.c 2007-01-10 09:26:00.000000000 +0100
40@@ -108,7 +108,7 @@ static DOUBLE P10(exponent)
41 if (exponent < 0) {
42 power = 0.1;
43 value = (exponent & 1 ? power : 1.0);
44- exponent = -(++exponent >> 1); /* portable C for -(exponent/2) */
45+ exponent = -((exponent+1) >> 1); /* portable C for -(exponent/2) */
46 }
47 else {
48 power = 10.0;
49--- texk/ps2pkm/type1.c
50+++ texk/ps2pkm/type1.c 2007-01-10 17:09:30.000000000 +0100
51@@ -110,11 +110,11 @@ typedef struct xobject xobject;
52 static DOUBLE tmpx; /* Store macro argument in tmpx to avoid re-evaluation */
53 static LONG tmpi; /* Store converted value in tmpi to avoid re-evaluation */
54
55-#define FABS(x) (((tmpx = (x)) < 0.0) ? -tmpx : tmpx)
56+#define FABS(x) ({ tmpx = (x); (tmpx < 0.0) ? -tmpx : tmpx; })
57
58-#define CEIL(x) (((tmpi = (LONG) (tmpx = (x))) < tmpx) ? ++tmpi : tmpi)
59+#define CEIL(x) ({ tmpi = (LONG) (tmpx = (x)); (tmpi < tmpx) ? ++tmpi : tmpi; })
60
61-#define FLOOR(x) (((tmpi = (LONG) (tmpx = (x))) > tmpx) ? --tmpi : tmpi)
62+#define FLOOR(x) ({ tmpi = (LONG) (tmpx = (x)); (tmpi > tmpx) ? --tmpi : tmpi; })
63
64 #define ROUND(x) FLOOR((x) + 0.5)
65
66--- texk/web2c/mpware/mpto.c
67+++ texk/web2c/mpware/mpto.c 2007-03-02 10:36:04.000000000 +0000
68@@ -24,11 +24,7 @@
69
70 #include <stdio.h>
71 #include <stdlib.h>
72-
73-#ifdef WIN32
74 #include <string.h>
75-#endif
76-
77
78 /* MetaPost itself has a configurable max line length, but we can afford to
79 use smaller values than that */
80--- texk/web2c/pdftexdir/utils.c
81+++ texk/web2c/pdftexdir/utils.c 2007-03-02 10:16:35.000000000 +0000
82@@ -1369,7 +1369,7 @@ int newcolorstack(integer s, integer lit
83 colstacks_size += STACK_INCREMENT;
84 /* If (MAX_COLORSTACKS mod STACK_INCREMENT = 0) then we don't
85 need to check the case that size overruns MAX_COLORSTACKS. */
86- colstacks = xretalloc(colstacks, colstacks_size, colstack_type);
87+ xretalloc(colstacks, colstacks_size, colstack_type);
88 }
89 /* claim new color stack */
90 colstack_num = colstacks_used++;
91--- texk/makeindexk/genind.h
92+++ texk/makeindexk/genind.h 2007-03-15 15:28:43.000000000 +0000
93@@ -25,6 +25,20 @@
94 *
95 */
96
97+#ifndef __has_idx_printf
98+#define __has_idx_printf
99+#include <stdarg.h>
100+static __inline__ int idx_printf(FILE *stream, const char *format, ...)
101+{
102+ int ret;
103+ va_list ap;
104+ va_start(ap, format);
105+ ret = vfprintf(stream, format, ap);
106+ va_end(ap);
107+ return ret;
108+}
109+#endif
110+
111 #define IND_ERROR(F, D) { \
112 if (idx_dot) { \
113 fprintf(ilg_fp, "\n"); \
114@@ -33,7 +47,7 @@
115 fprintf(ilg_fp, \
116 "## Warning (input = %s, line = %d; output = %s, line = %d):\n -- ", \
117 curr->fn, curr->lc, ind_fn, ind_lc+1); \
118- fprintf(ilg_fp, F, D); \
119+ idx_printf(ilg_fp, F, D); \
120 ind_ec++; \
121 }
122
123--- texk/makeindexk/mkind.h
124+++ texk/makeindexk/mkind.h 2007-03-15 15:29:28.000000000 +0000
125@@ -253,10 +253,24 @@
126 #define STREQ(A, B) (strcmp(A, B) == 0)
127 #define STRNEQ(A, B) (strcmp(A, B) != 0)
128
129+#ifndef __has_idx_printf
130+#define __has_idx_printf
131+#include <stdarg.h>
132+static __inline__ int idx_printf(FILE *stream, const char *format, ...)
133+{
134+ int ret;
135+ va_list ap;
136+ va_start(ap, format);
137+ ret = vfprintf(stream, format, ap);
138+ va_end(ap);
139+ return ret;
140+}
141+#endif
142+
143 #define MESSAGE(F, S) { \
144 if (verbose) \
145- fprintf(stderr, F, S); \
146- fprintf(ilg_fp, F, S); \
147+ idx_printf(stderr, F, S); \
148+ idx_printf(ilg_fp, F, S); \
149 }
150
151 #if USE_KPATHSEA /* kpathsea defines a different FATAL */
152@@ -264,7 +278,7 @@
153 #endif
154
155 #define FATAL(F, S) { \
156- fprintf(stderr, F, S); \
157+ idx_printf(stderr, F, S); \
158 fprintf(stderr, USAGE, pgm_fn); \
159 EXIT(1); \
160 }
161--- texk/makeindexk/scanid.h
162+++ texk/makeindexk/scanid.h 2007-03-15 15:27:12.000000000 +0000
163@@ -101,6 +101,20 @@
164 return (FALSE); \
165 }
166
167+#ifndef __has_idx_printf
168+#define __has_idx_printf
169+#include <stdarg.h>
170+static __inline__ int idx_printf(FILE *stream, const char *format, ...)
171+{
172+ int ret;
173+ va_list ap;
174+ va_start(ap, format);
175+ ret = vfprintf(stream, format, ap);
176+ va_end(ap);
177+ return ret;
178+}
179+#endif
180+
181 #define IDX_ERROR(F, D) { \
182 if (idx_dot) { \
183 fprintf(ilg_fp, "\n"); \
184@@ -108,7 +122,7 @@
185 } \
186 fprintf(ilg_fp, "!! Input index error (file = %s, line = %d):\n -- ", \
187 idx_fn, idx_lc); \
188- fprintf(ilg_fp, F, D); \
189+ idx_printf(ilg_fp, F, D); \
190 idx_ec++; \
191 }
192
193--- texk/makeindexk/scanst.h
194+++ texk/makeindexk/scanst.h 2007-03-15 15:48:48.000000000 +0000
195@@ -145,6 +145,20 @@
196
197 #define INDENTLEN_DEF 16
198
199+#ifndef __has_idx_printf
200+#define __has_idx_printf
201+#include <stdarg.h>
202+static __inline__ int idx_printf(FILE *stream, const char *format, ...)
203+{
204+ int ret;
205+ va_list ap;
206+ va_start(ap, format);
207+ ret = vfprintf(stream, format, ap);
208+ va_end(ap);
209+ return ret;
210+}
211+#endif
212+
213 #define STY_ERROR(F, D) { \
214 if (idx_dot) { \
215 fprintf(ilg_fp, "\n"); \
216@@ -152,7 +166,7 @@
217 } \
218 fprintf(ilg_fp, "** Input style error (file = %s, line = %d):\n -- ", \
219 sty_fn, sty_lc); \
220- fprintf(ilg_fp, F, D); \
221+ idx_printf(ilg_fp, F, D); \
222 sty_ec++; \
223 put_dot = FALSE; \
224 }
This page took 0.054565 seconds and 4 git commands to generate.