aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-29 14:12:30 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-29 14:12:30 -0200
commit05afee0f50f64b64dbb4c0614ccf737ffdc06ab6 (patch)
tree76ddccce1152f3bb51ef80b801f6df4bf47c1525 /lua.c
parent351a446ec55d0e4a7520791cc4b6ff6097739e18 (diff)
downloadlua-05afee0f50f64b64dbb4c0614ccf737ffdc06ab6.tar.gz
lua-05afee0f50f64b64dbb4c0614ccf737ffdc06ab6.tar.bz2
lua-05afee0f50f64b64dbb4c0614ccf737ffdc06ab6.zip
definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'
moved to 'lauxlib.h' (they do not need to be stable or configurable) + prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lua.c b/lua.c
index d53c7f68..5838ef72 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.216 2014/10/20 18:19:26 roberto Exp roberto $ 2** $Id: lua.c,v 1.217 2014/10/20 22:21:05 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -126,12 +126,12 @@ static void laction (int i) {
126 126
127 127
128static void print_usage (const char *badoption) { 128static void print_usage (const char *badoption) {
129 luai_writestringerror("%s: ", progname); 129 lua_writestringerror("%s: ", progname);
130 if (badoption[1] == 'e' || badoption[1] == 'l') 130 if (badoption[1] == 'e' || badoption[1] == 'l')
131 luai_writestringerror("'%s' needs argument\n", badoption); 131 lua_writestringerror("'%s' needs argument\n", badoption);
132 else 132 else
133 luai_writestringerror("unrecognized option '%s'\n", badoption); 133 lua_writestringerror("unrecognized option '%s'\n", badoption);
134 luai_writestringerror( 134 lua_writestringerror(
135 "usage: %s [options] [script [args]]\n" 135 "usage: %s [options] [script [args]]\n"
136 "Available options are:\n" 136 "Available options are:\n"
137 " -e stat execute string 'stat'\n" 137 " -e stat execute string 'stat'\n"
@@ -151,8 +151,8 @@ static void print_usage (const char *badoption) {
151** (if present) 151** (if present)
152*/ 152*/
153static void l_message (const char *pname, const char *msg) { 153static void l_message (const char *pname, const char *msg) {
154 if (pname) luai_writestringerror("%s: ", pname); 154 if (pname) lua_writestringerror("%s: ", pname);
155 luai_writestringerror("%s\n", msg); 155 lua_writestringerror("%s\n", msg);
156} 156}
157 157
158 158
@@ -208,8 +208,8 @@ static int docall (lua_State *L, int narg, int nres) {
208 208
209 209
210static void print_version (void) { 210static void print_version (void) {
211 luai_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT)); 211 lua_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT));
212 luai_writeline(); 212 lua_writeline();
213} 213}
214 214
215 215
@@ -410,7 +410,7 @@ static void doREPL (lua_State *L) {
410 else report(L, status); 410 else report(L, status);
411 } 411 }
412 lua_settop(L, 0); /* clear stack */ 412 lua_settop(L, 0); /* clear stack */
413 luai_writeline(); 413 lua_writeline();
414 progname = oldprogname; 414 progname = oldprogname;
415} 415}
416 416