From 1bdde38bd24b137a240aede92363837e3d1a79b9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 5 Sep 2002 16:45:42 -0300 Subject: no more newlines at the end of error messages --- lua.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 85ce0803..eed8be8a 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.102 2002/08/12 17:23:12 roberto Exp roberto $ +** $Id: lua.c,v 1.103 2002/08/13 15:04:59 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -87,11 +87,8 @@ static void print_usage (void) { static void l_message (const char *pname, const char *msg) { - size_t l = strlen(msg); if (pname) fprintf(stderr, "%s: ", pname); - fprintf(stderr, "%s", msg); - if (l > 0 && msg[l-1] != '\n') /* does not end with newline? */ - fprintf(stderr, "\n"); /* add a newline */ + fprintf(stderr, "%s\n", msg); } -- cgit v1.2.3-55-g6feb