diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-09-05 16:45:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-09-05 16:45:42 -0300 |
commit | 1bdde38bd24b137a240aede92363837e3d1a79b9 (patch) | |
tree | feb4d9bc8c4dc3c3bf815bd1d21b837c92debf59 /lua.c | |
parent | b2bc3b44b6bdf5efd783a50c28e108ac3bcba9fd (diff) | |
download | lua-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.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 | ||
89 | static void l_message (const char *pname, const char *msg) { | 89 | static 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 | ||