diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2009-06-08 08:58:07 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2009-06-08 08:58:07 +0000 |
commit | 5adefaa278f30813af94c423bed99d1628b23a2c (patch) | |
tree | 76b0edd887559dcea0be9d28a569d8191f3e8307 /Build/source/texk/web2c/luatexdir/font | |
parent | be2021a8a7f377786a2fba684fd950975c892533 (diff) |
source code for luatex 0.40.3
git-svn-id: svn://tug.org/texlive/trunk@13669 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/font')
23 files changed, 157 insertions, 142 deletions
diff --git a/Build/source/texk/web2c/luatexdir/font/dofont.c b/Build/source/texk/web2c/luatexdir/font/dofont.c index 6c8411ec4eb..0570f420dfd 100644 --- a/Build/source/texk/web2c/luatexdir/font/dofont.c +++ b/Build/source/texk/web2c/luatexdir/font/dofont.c @@ -22,7 +22,7 @@ #include "luatex-api.h" static const char _svn_version[] = - "$Id: dofont.c 2321 2009-04-18 09:17:13Z hhenkel $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/dofont.c $"; + "$Id: dofont.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/dofont.c $"; #define TIMERS 0 @@ -50,8 +50,7 @@ static char *font_error_message(pointer u, char *nom, scaled s) return str; } -static int -do_define_font(integer f, char *cnom, scaled s, integer natural_dir) +static int do_define_font(integer f, char *cnom, scaled s, integer natural_dir) { boolean res; /* was the callback successful? */ @@ -115,7 +114,7 @@ do_define_font(integer f, char *cnom, scaled s, integer natural_dir) return 0; } } - } else if (callback_id==0) { + } else if (callback_id == 0) { res = read_tfm_info(f, cnom, s); if (res) { set_hyphen_char(f, get_default_hyphen_char()); diff --git a/Build/source/texk/web2c/luatexdir/font/luafont.c b/Build/source/texk/web2c/luatexdir/font/luafont.c index bbbda9f9c8b..2c170639f2e 100644 --- a/Build/source/texk/web2c/luatexdir/font/luafont.c +++ b/Build/source/texk/web2c/luatexdir/font/luafont.c @@ -1,6 +1,6 @@ /* luafont.c - Copyright 2006-2008 Taco Hoekwater <taco@luatex.org> + Copyright 2006-2009 Taco Hoekwater <taco@luatex.org> This file is part of LuaTeX. @@ -23,7 +23,7 @@ #include "nodes.h" static const char _svn_version[] = - "$Id: luafont.c 2312 2009-04-17 15:43:13Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/luafont.c $"; + "$Id: luafont.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/luafont.c $"; #define noVERBOSE @@ -107,10 +107,12 @@ static void dump_intfield(lua_State * L, char *n, int c) } -void dump_math_kerns (lua_State *L, charinfo *co, int l, int id) { - int i; - for (i=0; i<l;i++) { - lua_newtable(L); +void dump_math_kerns(lua_State * L, charinfo * co, int l, int id) +{ + int i; + for (i = 0; i < l; i++) { + lua_newtable(L); + /* *INDENT-OFF* */ if (id==top_left_kern) { dump_intfield(L, "height", co->top_left_math_kern_array[(2*i)]); dump_intfield(L, "kern", co->top_left_math_kern_array[(2*i)+1]); @@ -124,8 +126,9 @@ void dump_math_kerns (lua_State *L, charinfo *co, int l, int id) { dump_intfield(L, "height", co->bottom_left_math_kern_array[(2*i)]); dump_intfield(L, "kern", co->bottom_left_math_kern_array[(2*i)+1]); } - lua_rawseti(L,-2, (i+1)); - } + /* *INDENT-ON* */ + lua_rawseti(L, -2, (i + 1)); + } } @@ -287,37 +290,37 @@ void font_char_to_lua(lua_State * L, internalfontnumber f, charinfo * co) i = get_charinfo_math_kerns(co, top_right_kern); j = 0; - if (i>0) { + if (i > 0) { j++; lua_newtable(L); dump_math_kerns(L, co, i, top_right_kern); lua_setfield(L, -2, "top_right"); } i = get_charinfo_math_kerns(co, top_left_kern); - if (i>0) { + if (i > 0) { j++; lua_newtable(L); dump_math_kerns(L, co, i, top_left_kern); lua_setfield(L, -2, "top_left"); } i = get_charinfo_math_kerns(co, bottom_right_kern); - if (i>0) { + if (i > 0) { j++; lua_newtable(L); dump_math_kerns(L, co, i, bottom_right_kern); lua_setfield(L, -2, "bottom_right"); } i = get_charinfo_math_kerns(co, bottom_left_kern); - if (i>0) { + if (i > 0) { j++; lua_newtable(L); dump_math_kerns(L, co, i, bottom_left_kern); lua_setfield(L, -2, "bottom_left"); } - if (j>0) + if (j > 0) lua_setfield(L, -2, "mathkern"); else - lua_pop(L,1); + lua_pop(L, 1); } @@ -378,7 +381,7 @@ int font_to_lua(lua_State * L, int f) { int k; charinfo *co; - if (font_cache_id(f)>0) { + if (font_cache_id(f) > 0) { /* fetch the table from the registry if it was saved there by font_from_lua() */ lua_rawgeti(L, LUA_REGISTRYINDEX, font_cache_id(f)); @@ -509,9 +512,9 @@ int font_to_lua(lua_State * L, int f) } lua_setfield(L, -2, "characters"); - if (font_cache_id(f)==0) { /* renew */ + if (font_cache_id(f) == 0) { /* renew */ integer r; - lua_pushvalue(L,-1); + lua_pushvalue(L, -1); r = luaL_ref(Luas, LUA_REGISTRYINDEX); /* pops the table */ set_font_cache_id(f, r); } @@ -1124,37 +1127,36 @@ static void read_lua_math_parameters(lua_State * L, int f) #define MIN_INF -0x7FFFFFFF -static void -store_math_kerns (lua_State * L, charinfo *co, int id ) +static void store_math_kerns(lua_State * L, charinfo * co, int id) { int l, k; scaled ht, krn; - if (lua_istable(L, -1) && ((k=lua_objlen(L,-1))>0)) { - for (l=0;l<k;l++) { - lua_rawgeti(L,-1,(l+1)); + if (lua_istable(L, -1) && ((k = lua_objlen(L, -1)) > 0)) { + for (l = 0; l < k; l++) { + lua_rawgeti(L, -1, (l + 1)); if (lua_istable(L, -1)) { lua_getfield(L, -1, "height"); - if (lua_isnumber(L,-1)) { - ht = (scaled)lua_tonumber(L,-1); + if (lua_isnumber(L, -1)) { + ht = (scaled) lua_tonumber(L, -1); } else { ht = MIN_INF; } - lua_pop(L,1); + lua_pop(L, 1); lua_getfield(L, -1, "kern"); - if (lua_isnumber(L,-1)) { - krn = (scaled)lua_tonumber(L,-1); + if (lua_isnumber(L, -1)) { + krn = (scaled) lua_tonumber(L, -1); } else { krn = MIN_INF; } - lua_pop(L,1); - if (krn>MIN_INF && ht>MIN_INF) - add_charinfo_math_kern(co,id,ht,krn); + lua_pop(L, 1); + if (krn > MIN_INF && ht > MIN_INF) + add_charinfo_math_kern(co, id, ht, krn); } - lua_pop(L,1); + lua_pop(L, 1); } } } - + void font_char_from_lua(lua_State * L, internal_font_number f, integer i, integer * l_fonts) @@ -1284,22 +1286,22 @@ font_char_from_lua(lua_State * L, internal_font_number f, integer i, ["top_left"] ={ { ["height"]=620, ["kern"]=0 }, { ["height"]=720, ["kern"]=-80 } }, ["top_right"] ={ { ["height"]=676, ["kern"]=115 }, { ["height"]=776, ["kern"]=45 } }, } - */ + */ lua_rawgeti(L, LUA_REGISTRYINDEX, luaS_mathkern_index); lua_rawget(L, -2); if (lua_istable(L, -1)) { lua_getfield(L, -1, "top_left"); store_math_kerns(L, co, top_left_kern); - lua_pop(L,1); + lua_pop(L, 1); lua_getfield(L, -1, "top_right"); store_math_kerns(L, co, top_right_kern); - lua_pop(L,1); + lua_pop(L, 1); lua_getfield(L, -1, "bottom_right"); store_math_kerns(L, co, bottom_right_kern); - lua_pop(L,1); + lua_pop(L, 1); lua_getfield(L, -1, "bottom_left"); store_math_kerns(L, co, bottom_left_kern); - lua_pop(L,1); + lua_pop(L, 1); } lua_pop(L, 1); @@ -1433,18 +1435,18 @@ int font_from_lua(lua_State * L, int f) int ec; /* last char index */ char *s; integer *l_fonts = NULL; - integer save_ref = 1; /* unneeded, really */ + integer save_ref = 1; /* unneeded, really */ /* will we save a cache of the luat table? */ s = string_field(L, "cache", "yes"); - if (strcmp(s,"yes")==0) - save_ref=1; - else if (strcmp(s,"no")==0) - save_ref=-1; - else if (strcmp(s,"renew")==0) - save_ref=0; + if (strcmp(s, "yes") == 0) + save_ref = 1; + else if (strcmp(s, "no") == 0) + save_ref = -1; + else if (strcmp(s, "renew") == 0) + save_ref = 0; free(s); - + /* the table is at stack index -1 */ if (luaS_width_index == 0) @@ -1664,8 +1666,8 @@ int font_from_lua(lua_State * L, int f) font_name(f)); } - if (save_ref>0) { - r = luaL_ref(Luas, LUA_REGISTRYINDEX); /* pops the table */ + if (save_ref > 0) { + r = luaL_ref(Luas, LUA_REGISTRYINDEX); /* pops the table */ set_font_cache_id(f, r); } else { lua_pop(Luas, 1); @@ -1747,7 +1749,7 @@ static void nesting_prepend_list(halfword nest, halfword newn) } else { halfword tail = tail_of_list(newn); assert(alink(head) == nest); - assert(tail_of_list(head) == tlink(nest)); + assert(tail_of_list(head) == tlink(nest)); couple_nodes(tail, head); } } @@ -1995,36 +1997,37 @@ static halfword handle_lig_word(halfword cur) if (vlink_no_break(cur) != null || vlink_post_break(cur) != null) { halfword fwd; liginfo lig; - if (vlink_post_break(cur)!=null) - handle_lig_nest(post_break(cur),vlink_post_break(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; + if (vlink_post_break(cur) != null) + handle_lig_nest(post_break(cur), vlink_post_break(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; 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)) ) + (pst == null || !test_ligature(&lig, pst, fwd))) break; - nesting_append(no_break(cur),copy_node(fwd)); - handle_lig_nest(no_break(cur),nob); + nesting_append(no_break(cur), copy_node(fwd)); + handle_lig_nest(no_break(cur), nob); next = vlink(fwd); uncouple_node(fwd); try_couple_nodes(cur, next); - nesting_append(post_break(cur),fwd); - handle_lig_nest(post_break(cur),pst); + nesting_append(post_break(cur), fwd); + handle_lig_nest(post_break(cur), pst); } if (fwd != null && type(fwd) == disc_node) { halfword next = vlink(fwd); - if (vlink_no_break(fwd)==null && - vlink_post_break(fwd)==null && + if (vlink_no_break(fwd) == null && + vlink_post_break(fwd) == null && next != null && type(next) == glyph_node && - ((tlink_post_break(cur)!= null && - test_ligature(&lig,tlink_post_break(cur),next)) || - (tlink_no_break(cur)!= null && - test_ligature(&lig,tlink_no_break(cur),next)))) { + ((tlink_post_break(cur) != null && + test_ligature(&lig, tlink_post_break(cur), next)) || + (tlink_no_break(cur) != null && + test_ligature(&lig, tlink_no_break(cur), next)))) { /* Building an init_disc followed by a select_disc * {a-}{b}{AB} {-}{}{} 'c' */ @@ -2032,26 +2035,31 @@ static halfword handle_lig_word(halfword cur) uncouple_node(next); try_couple_nodes(fwd, last); /* {a-}{b}{AB} {-}{c}{} */ - nesting_append(post_break(fwd),copy_node(next)); + nesting_append(post_break(fwd), copy_node(next)); /* {a-}{b}{AB} {-}{c}{-} */ - if (vlink_no_break(cur)!=null) { - nesting_prepend(no_break(fwd),copy_node(vlink_pre_break(fwd))); + if (vlink_no_break(cur) != null) { + nesting_prepend(no_break(fwd), + copy_node(vlink_pre_break(fwd))); } /* {a-}{b}{AB} {b-}{c}{-} */ - if (vlink_post_break(cur)!=null) - nesting_prepend_list(pre_break(fwd),copy_node_list(vlink_post_break(cur))); + if (vlink_post_break(cur) != null) + nesting_prepend_list(pre_break(fwd), + copy_node_list(vlink_post_break + (cur))); /* {a-}{b}{AB} {b-}{c}{AB-} */ - if (vlink_no_break(cur)!=null) { - nesting_prepend_list(no_break(fwd),copy_node_list(vlink_no_break(cur))); + if (vlink_no_break(cur) != null) { + nesting_prepend_list(no_break(fwd), + copy_node_list(vlink_no_break + (cur))); } /* {a-}{b}{ABC} {b-}{c}{AB-} */ tail = tlink_no_break(cur); - nesting_append(no_break(cur),copy_node(next)); - handle_lig_nest(no_break(cur),tail); + nesting_append(no_break(cur), copy_node(next)); + handle_lig_nest(no_break(cur), tail); /* {a-}{BC}{ABC} {b-}{c}{AB-} */ tail = tlink_post_break(cur); - nesting_append(post_break(cur),next); - handle_lig_nest(post_break(cur),tail); + nesting_append(post_break(cur), next); + handle_lig_nest(post_break(cur), tail); /* and set the subtypes */ subtype(cur) = init_disc; subtype(fwd) = select_disc; diff --git a/Build/source/texk/web2c/luatexdir/font/macnames.c b/Build/source/texk/web2c/luatexdir/font/macnames.c index 5d7d1ae5039..3301cec2011 100644 --- a/Build/source/texk/web2c/luatexdir/font/macnames.c +++ b/Build/source/texk/web2c/luatexdir/font/macnames.c @@ -19,7 +19,7 @@ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ static const char __svn_version[] = - "$Id: macnames.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/macnames.c $"; + "$Id: macnames.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/macnames.c $"; const char notdef[] = ".notdef"; diff --git a/Build/source/texk/web2c/luatexdir/font/mapfile.c b/Build/source/texk/web2c/luatexdir/font/mapfile.c index 4519e1632c3..b9112517521 100644 --- a/Build/source/texk/web2c/luatexdir/font/mapfile.c +++ b/Build/source/texk/web2c/luatexdir/font/mapfile.c @@ -27,7 +27,7 @@ static const char _svn_version[] = "$Id: mapfile.c 2331 2009-04-18 16:39:50Z hhenkel $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/mapfile.c $"; + "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/mapfile.c $"; #define FM_BUF_SIZE 1024 diff --git a/Build/source/texk/web2c/luatexdir/font/pkin.c b/Build/source/texk/web2c/luatexdir/font/pkin.c index ed2ad493fcd..3b8512f8c76 100644 --- a/Build/source/texk/web2c/luatexdir/font/pkin.c +++ b/Build/source/texk/web2c/luatexdir/font/pkin.c @@ -45,7 +45,7 @@ #include "luatexfont.h" static const char _svn_version[] = - "$Id: pkin.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/pkin.c $"; + "$Id: pkin.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/pkin.c $"; /* * Now we have some routines to get stuff from the pk file. pkbyte returns diff --git a/Build/source/texk/web2c/luatexdir/font/sfnt.c b/Build/source/texk/web2c/luatexdir/font/sfnt.c index 7c2930e298b..9ec25099995 100644 --- a/Build/source/texk/web2c/luatexdir/font/sfnt.c +++ b/Build/source/texk/web2c/luatexdir/font/sfnt.c @@ -40,7 +40,7 @@ #include "sfnt.h" static const char _svn_version[] = - "$Id: sfnt.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/sfnt.c $"; + "$Id: sfnt.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/sfnt.c $"; #ifdef XETEX UNSIGNED_BYTE ft_unsigned_byte(sfnt * f) diff --git a/Build/source/texk/web2c/luatexdir/font/subfont.c b/Build/source/texk/web2c/luatexdir/font/subfont.c index fcbbc749257..92d4b70f3e8 100644 --- a/Build/source/texk/web2c/luatexdir/font/subfont.c +++ b/Build/source/texk/web2c/luatexdir/font/subfont.c @@ -22,7 +22,7 @@ #include <string.h> static const char _svn_version[] = - "$Id: subfont.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/subfont.c $"; + "$Id: subfont.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/subfont.c $"; static struct avl_table *sfd_tree = NULL; @@ -69,7 +69,7 @@ static void destroy_sfd_entry(void *pa, void *pb) subfont_entry *p, *q; sfd_entry *sfd; sfd = (sfd_entry *) pa; - (void)pb; + (void) pb; p = sfd->subfont; while (p != NULL) { q = p->next; @@ -82,7 +82,7 @@ static void destroy_sfd_entry(void *pa, void *pb) static int comp_sfd_entry(const void *pa, const void *pb, void *p) { - (void)p; + (void) p; return strcmp(((const sfd_entry *) pa)->name, ((const sfd_entry *) pb)->name); } diff --git a/Build/source/texk/web2c/luatexdir/font/texfont.c b/Build/source/texk/web2c/luatexdir/font/texfont.c index c75d5ecaa2a..0a6563b3404 100644 --- a/Build/source/texk/web2c/luatexdir/font/texfont.c +++ b/Build/source/texk/web2c/luatexdir/font/texfont.c @@ -34,8 +34,10 @@ #include "ptexlib.h" #include "luatex-api.h" +#define noDEBUG + static const char _svn_version[] = - "$Id: texfont.c 2321 2009-04-18 09:17:13Z hhenkel $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/texfont.c $"; + "$Id: texfont.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/texfont.c $"; #define proper_char_index(c) (c<=font_ec(f) && c>=font_bc(f)) #define dxfree(a,b) { xfree(a); a = b ; } @@ -146,11 +148,12 @@ charinfo *get_charinfo(internal_font_number f, integer c) if (!glyph) { glyph = ++font_tables[f]->charinfo_count; - if (glyph>=(unsigned)font_tables[f]->charinfo_size) { - font_bytes += (16*sizeof(charinfo)); + if (glyph >= (unsigned) font_tables[f]->charinfo_size) { + font_bytes += (16 * sizeof(charinfo)); do_realloc(font_tables[f]->charinfo, (glyph + 16), charinfo); - memset(&(font_tables[f]->charinfo[glyph]), 0, (16*sizeof(charinfo))); - font_tables[f]->charinfo_size += 16; + memset(&(font_tables[f]->charinfo[glyph]), 0, + (16 * sizeof(charinfo))); + font_tables[f]->charinfo_size += 16; } font_tables[f]->charinfo[glyph].ef = 1000; /* init */ set_sa_item(font_tables[f]->characters, c, glyph, 1); /* 1= global */ @@ -178,7 +181,7 @@ void set_charinfo(internal_font_number f, integer c, charinfo * ci) { sa_tree_item glyph; if (proper_char_index(c)) { - glyph = get_sa_item(font_tables[f]->characters, c); + glyph = get_sa_item(font_tables[f]->characters, c); if (glyph) { font_tables[f]->charinfo[glyph] = *ci; } else { @@ -1225,6 +1228,11 @@ boolean font_shareable(internal_font_number f, internal_font_number k) &&same_font_name(k, pdf_font_blink(f)))) { ret = 1; } +#ifdef DEBUG + printf("font_shareable(%d:%s:%s,%d:%s:%s): => %d\n", + f, font_filename(f), font_fullname(f), + k, font_filename(k), font_fullname(k), ret); +#endif } return ret; } diff --git a/Build/source/texk/web2c/luatexdir/font/texfont.h b/Build/source/texk/web2c/luatexdir/font/texfont.h index 8810f58ae46..35e6dde9963 100644 --- a/Build/source/texk/web2c/luatexdir/font/texfont.h +++ b/Build/source/texk/web2c/luatexdir/font/texfont.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ -/* $Id: texfont.h 2414 2009-06-03 12:57:01Z taco $ */ +/* $Id: texfont.h 2448 2009-06-08 07:43:50Z taco $ */ /* Here we have the interface to LuaTeX's font system, as seen from the main pascal program. There is a companion list in luatex.defines to @@ -397,9 +397,9 @@ typedef enum { # define space_stretch(f) font_param(f,space_stretch_code) # define space_shrink(f) font_param(f,space_shrink_code) # define x_height(f) font_param(f,x_height_code) -#ifdef quad -# undef quad -#endif +# ifdef quad +# undef quad +# endif # define quad(f) font_param(f,quad_code) # define extra_space(f) font_param(f,extra_space_code) diff --git a/Build/source/texk/web2c/luatexdir/font/tfmofm.c b/Build/source/texk/web2c/luatexdir/font/tfmofm.c index 164676afa97..f55289e16f8 100644 --- a/Build/source/texk/web2c/luatexdir/font/tfmofm.c +++ b/Build/source/texk/web2c/luatexdir/font/tfmofm.c @@ -1,6 +1,6 @@ /* tfmofm.c - Copyright 2006-2008 Taco Hoekwater <taco@luatex.org> + Copyright 2006-2009 Taco Hoekwater <taco@luatex.org> This file is part of LuaTeX. @@ -22,7 +22,7 @@ #include "luatexfont.h" static const char _svn_version[] = - "$Id: tfmofm.c 2414 2009-06-03 12:57:01Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/tfmofm.c $"; + "$Id: tfmofm.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/tfmofm.c $"; /* Here are some macros that help process ligatures and kerns */ @@ -375,8 +375,7 @@ additional parameter information, which is explained later. xfree(xligs); xfree(xkerns); return 1; } -int -open_tfm_file(char *nom, unsigned char **tfm_buf, integer * tfm_siz) +int open_tfm_file(char *nom, unsigned char **tfm_buf, integer * tfm_siz) { boolean res; /* was the callback successful? */ boolean opened; /* was |tfm_file| successfully opened? */ @@ -557,6 +556,7 @@ scaled store_scaled_f(scaled sq, scaled z_in) return (sw - alpha); else pdf_error(maketexstring("vf"), maketexstring("vf scaling")); + return sw; /* not reached, just to make the compiler happy */ } #define check_existence(z) \ diff --git a/Build/source/texk/web2c/luatexdir/font/tounicode.c b/Build/source/texk/web2c/luatexdir/font/tounicode.c index b4c3dea81c4..ecac8112e5c 100644 --- a/Build/source/texk/web2c/luatexdir/font/tounicode.c +++ b/Build/source/texk/web2c/luatexdir/font/tounicode.c @@ -20,7 +20,7 @@ #include "ptexlib.h" static const char _svn_version[] = - "$Id: tounicode.c 2321 2009-04-18 09:17:13Z hhenkel $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/tounicode.c $"; + "$Id: tounicode.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/tounicode.c $"; #define isXdigit(c) (isdigit(c) || ('A' <= (c) && (c) <= 'F')) #define UNI_UNDEF -1 @@ -31,7 +31,7 @@ static struct avl_table *glyph_unicode_tree = NULL; static int comp_glyph_unicode_entry(const void *pa, const void *pb, void *p) { - (void)p; + (void) p; return strcmp(((const glyph_unicode_entry *) pa)->name, ((const glyph_unicode_entry *) pb)->name); } @@ -49,7 +49,7 @@ static glyph_unicode_entry *new_glyph_unicode_entry(void) static void destroy_glyph_unicode_entry(void *pa, void *pb) { glyph_unicode_entry *e = (glyph_unicode_entry *) pa; - (void)pb; + (void) pb; xfree(e->name); if (e->code == UNI_STRING) { assert(e->unicode_seq != NULL); diff --git a/Build/source/texk/web2c/luatexdir/font/tt_glyf.c b/Build/source/texk/web2c/luatexdir/font/tt_glyf.c index 159b988d968..bd22db655ae 100644 --- a/Build/source/texk/web2c/luatexdir/font/tt_glyf.c +++ b/Build/source/texk/web2c/luatexdir/font/tt_glyf.c @@ -32,7 +32,7 @@ #include "writettf.h" static const char _svn_version[] = - "$Id: tt_glyf.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/tt_glyf.c $"; + "$Id: tt_glyf.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/tt_glyf.c $"; #define NUM_GLYPH_LIMIT 65534 #define TABLE_DATA_ALLOC_SIZE 40960 diff --git a/Build/source/texk/web2c/luatexdir/font/tt_table.c b/Build/source/texk/web2c/luatexdir/font/tt_table.c index b10bc365b82..5956303e47f 100644 --- a/Build/source/texk/web2c/luatexdir/font/tt_table.c +++ b/Build/source/texk/web2c/luatexdir/font/tt_table.c @@ -34,7 +34,7 @@ #include "tt_table.h" static const char _svn_version[] = - "$Id: tt_table.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/tt_table.c $"; + "$Id: tt_table.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/tt_table.c $"; /* tables contains information refered by other tables diff --git a/Build/source/texk/web2c/luatexdir/font/vfovf.c b/Build/source/texk/web2c/luatexdir/font/vfovf.c index 2c84ce0554b..d1299ae12f2 100644 --- a/Build/source/texk/web2c/luatexdir/font/vfovf.c +++ b/Build/source/texk/web2c/luatexdir/font/vfovf.c @@ -23,8 +23,8 @@ #include "luatexfont.h" static const char _svn_version[] = - "$Id: vfovf.c 2414 2009-06-03 12:57:01Z taco $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/vfovf.c $"; + "$Id: vfovf.c 2448 2009-06-08 07:43:50Z taco $ " + "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/vfovf.c $"; /* this is a hack! */ #define font_max 5000 @@ -1235,16 +1235,16 @@ int make_vf_table(lua_State * L, char *cnom, scaled atsize) case set_rule: vf_read(4, h); vf_read(4, v); - make_command2("rule", store_scaled_f(h, atsize), store_scaled_f(v, atsize), - k); + make_command2("rule", store_scaled_f(h, atsize), + store_scaled_f(v, atsize), k); packet_length -= 8; break; case put_rule: vf_read(4, h); vf_read(4, v); make_command0("push", k); - make_command2("rule", store_scaled_f(h, atsize), store_scaled_f(v, atsize), - k); + make_command2("rule", store_scaled_f(h, atsize), + store_scaled_f(v, atsize), k); make_command0("pop", k); packet_length -= 8; break; diff --git a/Build/source/texk/web2c/luatexdir/font/vfpacket.c b/Build/source/texk/web2c/luatexdir/font/vfpacket.c index 6f2edb1bdf9..77881da1271 100644 --- a/Build/source/texk/web2c/luatexdir/font/vfpacket.c +++ b/Build/source/texk/web2c/luatexdir/font/vfpacket.c @@ -21,7 +21,7 @@ #include "ptexlib.h" static const char _svn_version[] = - "$Id: vfpacket.c 2414 2009-06-03 12:57:01Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/vfpacket.c $"; + "$Id: vfpacket.c 2414 2009-06-03 12:57:01Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/vfpacket.c $"; /* The |do_vf_packet| procedure is called in order to interpret the diff --git a/Build/source/texk/web2c/luatexdir/font/writecff.c b/Build/source/texk/web2c/luatexdir/font/writecff.c index 18f7febad5f..ed08e8d4143 100644 --- a/Build/source/texk/web2c/luatexdir/font/writecff.c +++ b/Build/source/texk/web2c/luatexdir/font/writecff.c @@ -22,8 +22,8 @@ #include "writecff.h" static const char _svn_version[] = - "$Id: writecff.c 2414 2009-06-03 12:57:01Z taco $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writecff.c $"; + "$Id: writecff.c 2448 2009-06-08 07:43:50Z taco $ " + "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writecff.c $"; #define get_offset(s,n) get_unsigned(s, (n)) #define get_card8(a) a->stream[a->offset++] @@ -760,28 +760,28 @@ static void add_dict(cff_dict * dict, argtype == CFF_TYPE_SID || argtype == CFF_TYPE_OFFSET) { /* check for underflow here, as exactly one operand is expected */ if (stack_top < 1) { - *status = CFF_CFF_ERROR_STACK_UNDERFLOW; - return; - } + *status = CFF_CFF_ERROR_STACK_UNDERFLOW; + return; + } stack_top--; (dict->entries)[dict->count].count = 1; (dict->entries)[dict->count].values = xcalloc(1, sizeof(double)); (dict->entries)[dict->count].values[0] = arg_stack[stack_top]; - dict->count += 1; + dict->count += 1; } else { /* just ignore operator if there were no operands provided; - don't treat this as underflow (e.g. StemSnapV in TemporaLGCUni-Italic.otf) */ + don't treat this as underflow (e.g. StemSnapV in TemporaLGCUni-Italic.otf) */ if (stack_top > 0) { - (dict->entries)[dict->count].count = stack_top; - (dict->entries)[dict->count].values = - xcalloc(stack_top, sizeof(double)); - while (stack_top > 0) { + (dict->entries)[dict->count].count = stack_top; + (dict->entries)[dict->count].values = + xcalloc(stack_top, sizeof(double)); + while (stack_top > 0) { stack_top--; - (dict->entries)[dict->count].values[stack_top] = + (dict->entries)[dict->count].values[stack_top] = arg_stack[stack_top]; - } - dict->count += 1; - } + } + dict->count += 1; + } } *data += 1; diff --git a/Build/source/texk/web2c/luatexdir/font/writeenc.c b/Build/source/texk/web2c/luatexdir/font/writeenc.c index 6e7013f0e6b..76613f80eb5 100644 --- a/Build/source/texk/web2c/luatexdir/font/writeenc.c +++ b/Build/source/texk/web2c/luatexdir/font/writeenc.c @@ -21,7 +21,7 @@ #include "ptexlib.h" static const char _svn_version[] = - "$Id: writeenc.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writeenc.c $"; + "$Id: writeenc.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writeenc.c $"; /**********************************************************************/ /* All encoding entries go into AVL tree for fast search by name. */ @@ -32,7 +32,7 @@ struct avl_table *fe_tree = NULL; static int comp_fe_entry(const void *pa, const void *pb, void *p) { - (void)p; + (void) p; return strcmp(((const fe_entry *) pa)->name, ((const fe_entry *) pb)->name); } @@ -165,7 +165,7 @@ static void destroy_fe_entry(void *pa, void *pb) { fe_entry *p; int i; - (void)pb; + (void) pb; p = (fe_entry *) pa; xfree(p->name); if (p->glyph_names != NULL) diff --git a/Build/source/texk/web2c/luatexdir/font/writefont.c b/Build/source/texk/web2c/luatexdir/font/writefont.c index 5dd953ace40..5036092b0ed 100644 --- a/Build/source/texk/web2c/luatexdir/font/writefont.c +++ b/Build/source/texk/web2c/luatexdir/font/writefont.c @@ -23,7 +23,7 @@ static const char _svn_version[] = "$Id: writefont.c 2331 2009-04-18 16:39:50Z hhenkel $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writefont.c $"; + "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writefont.c $"; void write_cid_fontdictionary(fo_entry * fo, internalfontnumber f); void create_cid_fontdictionary(fm_entry * fm, integer font_objnum, diff --git a/Build/source/texk/web2c/luatexdir/font/writet1.c b/Build/source/texk/web2c/luatexdir/font/writet1.c index 9bf71a97b8a..18d1e858530 100644 --- a/Build/source/texk/web2c/luatexdir/font/writet1.c +++ b/Build/source/texk/web2c/luatexdir/font/writet1.c @@ -25,7 +25,7 @@ #include "luatex-api.h" static const char _svn_version[] = - "$Id: writet1.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writet1.c $"; + "$Id: writet1.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writet1.c $"; #define t1_log(str) if(tracefilenames) tex_printf("%s", str) #define get_length1() t1_length1 = t1_offset() - t1_save_offset @@ -1407,7 +1407,7 @@ static void cs_mark(const char *cs_name, int subr) static int comp_t1_glyphs(const void *pa, const void *pb, void *p) { - (void)p; + (void) p; return strcmp(*((const char **) pa), *((const char **) pb)); } diff --git a/Build/source/texk/web2c/luatexdir/font/writet3.c b/Build/source/texk/web2c/luatexdir/font/writet3.c index 84cecbc0404..69dbf1039d0 100644 --- a/Build/source/texk/web2c/luatexdir/font/writet3.c +++ b/Build/source/texk/web2c/luatexdir/font/writet3.c @@ -25,7 +25,7 @@ #include "luatexfont.h" static const char _svn_version[] = - "$Id: writet3.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writet3.c $"; + "$Id: writet3.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writet3.c $"; #define T3_BUF_SIZE 1024 diff --git a/Build/source/texk/web2c/luatexdir/font/writettf.c b/Build/source/texk/web2c/luatexdir/font/writettf.c index 38e65b298fa..5561b8e3d80 100644 --- a/Build/source/texk/web2c/luatexdir/font/writettf.c +++ b/Build/source/texk/web2c/luatexdir/font/writettf.c @@ -23,7 +23,7 @@ #include <string.h> static const char _svn_version[] = - "$Id: writettf.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writettf.c $"; + "$Id: writettf.c 2448 2009-06-08 07:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writettf.c $"; #define DEFAULT_NTABS 14 #define NEW_CMAP_SIZE 2 @@ -130,7 +130,7 @@ ttf_cmap_entry *new_ttf_cmap_entry(void) static void destroy_ttf_cmap_entry(void *pa, void *pb) { ttf_cmap_entry *p; - (void)pb; + (void) pb; p = (ttf_cmap_entry *) pa; xfree(p->ttf_name); xfree(p->table); @@ -148,7 +148,7 @@ static int comp_ttf_cmap_entry(const void *pa, const void *pb, void *p) const ttf_cmap_entry *p1 = (const ttf_cmap_entry *) pa, *p2 = (const ttf_cmap_entry *) pb; int i; - (void)p; + (void) p; assert(p1->ttf_name != NULL && p2->ttf_name != NULL); if ((i = strcmp(p1->ttf_name, p2->ttf_name)) != 0) return i; @@ -1423,7 +1423,7 @@ void do_writeotf(fd_entry * fd) { long i; dirtab_entry *tab; - (void)fd; + (void) fd; dir_tab = NULL; glyph_tab = NULL; if (tracefilenames) diff --git a/Build/source/texk/web2c/luatexdir/font/writetype0.c b/Build/source/texk/web2c/luatexdir/font/writetype0.c index 14af9aba1a9..3ae248c02b7 100644 --- a/Build/source/texk/web2c/luatexdir/font/writetype0.c +++ b/Build/source/texk/web2c/luatexdir/font/writetype0.c @@ -22,7 +22,7 @@ #include "writecff.h" static const char _svn_version[] = - "$Id: writetype0.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writetype0.c $"; + "$Id: writetype0.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writetype0.c $"; void writetype0(fd_entry * fd) { diff --git a/Build/source/texk/web2c/luatexdir/font/writetype2.c b/Build/source/texk/web2c/luatexdir/font/writetype2.c index 15dcc01af8a..ee901cdf27e 100644 --- a/Build/source/texk/web2c/luatexdir/font/writetype2.c +++ b/Build/source/texk/web2c/luatexdir/font/writetype2.c @@ -25,7 +25,7 @@ #include "tt_glyf.h" static const char _svn_version[] = - "$Id: writetype2.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.2/source/texk/web2c/luatexdir/font/writetype2.c $"; + "$Id: writetype2.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.3/source/texk/web2c/luatexdir/font/writetype2.c $"; /* forward*/ void make_tt_subset(fd_entry * fd, unsigned char *buffer, integer buflen); |