From dea6b6da9422f34ad91c8f6ad9ad3ed650e95713 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 7 May 2002 14:36:56 -0300 Subject: new function `lua_vpushstr' to replace uses of `sprintf' --- lundump.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lundump.c') diff --git a/lundump.c b/lundump.c index 6b2bb759..b9b7b505 100644 --- a/lundump.c +++ b/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 1.44 2001/11/28 20:13:13 roberto Exp roberto $ +** $Id: lundump.c,v 1.45 2002/03/25 17:47:14 roberto Exp roberto $ ** load pre-compiled Lua chunks ** See Copyright Notice in lua.h */ @@ -27,7 +27,7 @@ static const char* ZNAME (ZIO* Z) static void unexpectedEOZ (lua_State* L, ZIO* Z) { - luaO_verror(L,"unexpected end of file in `%.99s'",ZNAME(Z)); + luaO_verror(L,"unexpected end of file in `%s'",ZNAME(Z)); } static int ezgetc (lua_State* L, ZIO* Z) @@ -157,7 +157,7 @@ static void LoadConstants (lua_State* L, Proto* f, ZIO* Z, int swap) tsvalue(o)=LoadString(L,Z,swap); break; default: - luaO_verror(L,"bad constant type (%d) in `%.99s'",ttype(o),ZNAME(Z)); + luaO_verror(L,"bad constant type (%d) in `%s'",ttype(o),ZNAME(Z)); break; } } @@ -181,7 +181,7 @@ static Proto* LoadFunction (lua_State* L, TString* p, ZIO* Z, int swap) LoadConstants(L,f,Z,swap); LoadCode(L,f,Z,swap); #ifndef TRUST_BINARIES - if (!luaG_checkcode(f)) luaO_verror(L,"bad code in `%.99s'",ZNAME(Z)); + if (!luaG_checkcode(f)) luaO_verror(L,"bad code in `%s'",ZNAME(Z)); #endif return f; } @@ -191,14 +191,14 @@ static void LoadSignature (lua_State* L, ZIO* Z) const char* s=LUA_SIGNATURE; while (*s!=0 && ezgetc(L,Z)==*s) ++s; - if (*s!=0) luaO_verror(L,"bad signature in `%.99s'",ZNAME(Z)); + if (*s!=0) luaO_verror(L,"bad signature in `%s'",ZNAME(Z)); } static void TestSize (lua_State* L, int s, const char* what, ZIO* Z) { int r=LoadByte(L,Z); if (r!=s) - luaO_verror(L,"virtual machine mismatch in `%.99s':\n" + luaO_verror(L,"virtual machine mismatch in `%s':\n" " size of %.20s is %d but read %d",ZNAME(Z),what,s,r); } @@ -212,11 +212,11 @@ static int LoadHeader (lua_State* L, ZIO* Z) LoadSignature(L,Z); version=LoadByte(L,Z); if (version>VERSION) - luaO_verror(L,"`%.99s' too new:\n" + luaO_verror(L,"`%s' too new:\n" " read version %d.%d; expected at most %d.%d", ZNAME(Z),V(version),V(VERSION)); if (version