aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-09-05 16:45:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-09-05 16:45:42 -0300
commit1bdde38bd24b137a240aede92363837e3d1a79b9 (patch)
treefeb4d9bc8c4dc3c3bf815bd1d21b837c92debf59 /lua.c
parentb2bc3b44b6bdf5efd783a50c28e108ac3bcba9fd (diff)
downloadlua-1bdde38bd24b137a240aede92363837e3d1a79b9.tar.gz
lua-1bdde38bd24b137a240aede92363837e3d1a79b9.tar.bz2
lua-1bdde38bd24b137a240aede92363837e3d1a79b9.zip
no more newlines at the end of error messages
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lua.c b/lua.c
index 85ce0803..eed8be8a 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.102 2002/08/12 17:23:12 roberto Exp roberto $ 2** $Id: lua.c,v 1.103 2002/08/13 15:04:59 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*/
@@ -87,11 +87,8 @@ static void print_usage (void) {
87 87
88 88
89static void l_message (const char *pname, const char *msg) { 89static void l_message (const char *pname, const char *msg) {
90 size_t l = strlen(msg);
91 if (pname) fprintf(stderr, "%s: ", pname); 90 if (pname) fprintf(stderr, "%s: ", pname);
92 fprintf(stderr, "%s", msg); 91 fprintf(stderr, "%s\n", msg);
93 if (l > 0 && msg[l-1] != '\n') /* does not end with newline? */
94 fprintf(stderr, "\n"); /* add a newline */
95} 92}
96 93
97 94