summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2009-06-04 06:55:59 +0000
committerTaco Hoekwater <taco@elvenkind.com>2009-06-04 06:55:59 +0000
commit25e7ea0b0a91e26fcee46d54cc67f82b5253f504 (patch)
tree9cf7bcb0e7dae279ec16dc456664b191a2a9c86d /Build/source
parent68ecfa2478c6a1418f0b37565693eb67d0317387 (diff)
"avoid variable declaration after statement" patch from Vladimir Volovich
git-svn-id: svn://tug.org/texlive/trunk@13625 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/font/luafont.c11
-rw-r--r--Build/source/texk/web2c/luatexdir/image/writeimg.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luainit.c3
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c5
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfpage.h5
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/primitive.c3
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/avlstuff.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/synctex.c3
9 files changed, 27 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 9f1214e7953..42f428fe805 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-04 Taco Hoekwater <taco@luatex.org>
+
+ * luatexdir: "avoid variable declaration after statement" patch
+ from Vladimir Volovich
+
2009-06-03 Taco Hoekwater <taco@luatex.org>
* luatexdir/luafontloader/fontforge/fontforge/namelist.c (psaltnames): add
diff --git a/Build/source/texk/web2c/luatexdir/font/luafont.c b/Build/source/texk/web2c/luatexdir/font/luafont.c
index 7bfbfdfc319..bbbda9f9c8b 100644
--- a/Build/source/texk/web2c/luatexdir/font/luafont.c
+++ b/Build/source/texk/web2c/luatexdir/font/luafont.c
@@ -2000,15 +2000,16 @@ static halfword handle_lig_word(halfword cur)
if (vlink_no_break(cur)!=null)
handle_lig_nest(no_break(cur),vlink_no_break(cur));
while ((fwd = vlink(cur)) != null ) {
+ halfword nob, pst, next;
if (type(fwd) != glyph_node) break;
- halfword nob = tlink_no_break(cur);
- halfword pst = tlink_post_break(cur);
+ nob = tlink_no_break(cur);
+ pst = tlink_post_break(cur);
if ((nob == null || !test_ligature(&lig, nob, fwd)) &&
(pst == null || !test_ligature(&lig, pst, fwd)) )
break;
nesting_append(no_break(cur),copy_node(fwd));
handle_lig_nest(no_break(cur),nob);
- halfword next = vlink(fwd);
+ next = vlink(fwd);
uncouple_node(fwd);
try_couple_nodes(cur, next);
nesting_append(post_break(cur),fwd);
@@ -2027,7 +2028,7 @@ static halfword handle_lig_word(halfword cur)
/* Building an init_disc followed by a select_disc
* {a-}{b}{AB} {-}{}{} 'c'
*/
- halfword last = vlink(next);
+ halfword last = vlink(next), tail;
uncouple_node(next);
try_couple_nodes(fwd, last);
/* {a-}{b}{AB} {-}{c}{} */
@@ -2044,7 +2045,7 @@ static halfword handle_lig_word(halfword cur)
nesting_prepend_list(no_break(fwd),copy_node_list(vlink_no_break(cur)));
}
/* {a-}{b}{ABC} {b-}{c}{AB-} */
- halfword tail = tlink_no_break(cur);
+ tail = tlink_no_break(cur);
nesting_append(no_break(cur),copy_node(next));
handle_lig_nest(no_break(cur),tail);
/* {a-}{BC}{ABC} {b-}{c}{AB-} */
diff --git a/Build/source/texk/web2c/luatexdir/image/writeimg.c b/Build/source/texk/web2c/luatexdir/image/writeimg.c
index 184696c26a0..1e9831159ab 100644
--- a/Build/source/texk/web2c/luatexdir/image/writeimg.c
+++ b/Build/source/texk/web2c/luatexdir/image/writeimg.c
@@ -852,10 +852,10 @@ void scale_image(integer ref)
void out_image(integer ref, scaled hpos, scaled vpos)
{
+ image *a = img_array[ref];
scaledpos pos;
pos.h = hpos;
pos.v = vpos;
- image *a = img_array[ref];
out_img(a, pstruct, &pos);
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.c b/Build/source/texk/web2c/luatexdir/lua/luainit.c
index cf7d14b1daa..11b0d8d1900 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luainit.c
+++ b/Build/source/texk/web2c/luatexdir/lua/luainit.c
@@ -530,6 +530,7 @@ void lua_initialize(int ac, char **av)
}
/* now run the file */
if (startup_filename != NULL) {
+ char *v1;
/* hide the 'tex' and 'pdf' table */
tex_table_id = hide_lua_table(Luas, "tex");
token_table_id = hide_lua_table(Luas, "token");
@@ -585,7 +586,7 @@ void lua_initialize(int ac, char **av)
get_lua_boolean("texconfig", "halt_on_error", &haltonerrorp);
/* restrictedshell */
- char *v1 = NULL;
+ v1 = NULL;
get_lua_string("texconfig", "shell_escape", &v1);
if (v1) {
if (*v1 == 't' || *v1 == 'y' || *v1 == '1') {
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c b/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
index bc344fdd416..845dc784f0e 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/src/luafflib.c
@@ -2130,9 +2130,10 @@ handle_splinefont(lua_State *L, struct splinefont *sf) {
}
if (sf->loadvalidation_state != 0) {
+ int val, st;
lua_newtable(L);
- int val = 1;
- int st = sf->loadvalidation_state;
+ val = 1;
+ st = sf->loadvalidation_state;
if (st & lvs_bad_ps_fontname) {
lua_pushliteral(L, "bad_ps_fontname"); lua_rawseti(L,-2,val++);
}
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfpage.h b/Build/source/texk/web2c/luatexdir/pdf/pdfpage.h
index c3c8292c45c..aff5e0201e1 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfpage.h
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfpage.h
@@ -45,6 +45,11 @@ typedef enum { WMODE_H, WMODE_V } writing_mode; /* []TJ runs horizontal or verti
# define setpdffloat(a,b,c) {(a).m = (b); (a).e = (c);}
+#ifdef hz
+/* AIX 4.3 defines hz as 100 in system headers */
+#undef hz
+#endif
+
typedef struct {
pdfpos pdf; /* pos. on page (PDF page raster) */
pdfpos pdf_bt_pos; /* pos. at begin of BT-ET group (PDF page raster) */
diff --git a/Build/source/texk/web2c/luatexdir/tex/primitive.c b/Build/source/texk/web2c/luatexdir/tex/primitive.c
index aef93f7b5c0..61422a2058d 100644
--- a/Build/source/texk/web2c/luatexdir/tex/primitive.c
+++ b/Build/source/texk/web2c/luatexdir/tex/primitive.c
@@ -331,6 +331,7 @@ primitive(str_number ss, quarterword c, halfword o, halfword off,
{
str_number s; /* actual |str_number| used */
integer prim_val; /* needed to fill |prim_eqtb| */
+ char *thes;
assert(o >= off);
if (ss < string_offset) {
if (ss > 127)
@@ -340,7 +341,7 @@ primitive(str_number ss, quarterword c, halfword o, halfword off,
} else {
s = ss;
}
- char *thes = makecstring(s);
+ thes = makecstring(s);
if (cmd_origin == tex_command || cmd_origin == core_command) {
primitive_def(thes, strlen(thes), c, o);
}
diff --git a/Build/source/texk/web2c/luatexdir/utils/avlstuff.c b/Build/source/texk/web2c/luatexdir/utils/avlstuff.c
index 7fe15227745..363eb15088f 100644
--- a/Build/source/texk/web2c/luatexdir/utils/avlstuff.c
+++ b/Build/source/texk/web2c/luatexdir/utils/avlstuff.c
@@ -163,8 +163,8 @@ integer avl_find_obj(integer t, integer i, integer byname)
static void destroy_oentry(void *pa, void *pb)
{
- (void) pb;
oentry *p = (oentry *) pa;
+ (void) pb;
xfree(p);
}
diff --git a/Build/source/texk/web2c/luatexdir/utils/synctex.c b/Build/source/texk/web2c/luatexdir/utils/synctex.c
index d4471b4bed7..45a1c060946 100644
--- a/Build/source/texk/web2c/luatexdir/utils/synctex.c
+++ b/Build/source/texk/web2c/luatexdir/utils/synctex.c
@@ -1023,8 +1023,9 @@ void synctex_current(void)
if (SYNCTEX_IGNORE(nothing)) {
return;
} else {
+ size_t len;
pos = synch_p_with_c(cur);
- size_t len = SYNCTEX_fprintf(SYNCTEX_FILE,"x%i,%i:%i,%i\n",
+ len = SYNCTEX_fprintf(SYNCTEX_FILE,"x%i,%i:%i,%i\n",
synctex_ctxt.tag,synctex_ctxt.line,
pos.h UNIT,pos.v UNIT);
if(len>0) {