aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-04-06 11:14:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-04-06 11:14:27 -0300
commit19a1e19ae1014d8afbfe4d8f49eb37e2f7df8f35 (patch)
tree5526a5d01f3bc89ba4c56952da2b87684a7376b4
parent3a9516ffc8de0d33051f83dc786dba615d6bac49 (diff)
downloadlua-19a1e19ae1014d8afbfe4d8f49eb37e2f7df8f35.tar.gz
lua-19a1e19ae1014d8afbfe4d8f49eb37e2f7df8f35.tar.bz2
lua-19a1e19ae1014d8afbfe4d8f49eb37e2f7df8f35.zip
detail: better way to put a "..." in message.
-rw-r--r--inout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/inout.c b/inout.c
index 25390926..8332c257 100644
--- a/inout.c
+++ b/inout.c
@@ -5,7 +5,7 @@
5** Also provides some predefined lua functions. 5** Also provides some predefined lua functions.
6*/ 6*/
7 7
8char *rcs_inout="$Id: inout.c,v 2.55 1997/04/04 22:24:51 roberto Exp roberto $"; 8char *rcs_inout="$Id: inout.c,v 2.56 1997/04/06 14:08:08 roberto Exp roberto $";
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include <string.h> 11#include <string.h>
@@ -95,8 +95,8 @@ void lua_openstring (char *s)
95 char buff[SIZE_PREF+25]; 95 char buff[SIZE_PREF+25];
96 lua_setinput(stringinput); 96 lua_setinput(stringinput);
97 st = s; 97 st = s;
98 sprintf(buff, "(dostring) >> %.20s", s); 98 sprintf(buff, "(dostring) >> %.20s%s", s,
99 if (strlen(s) > SIZE_PREF) strcat(buff, "..."); 99 (strlen(s) > SIZE_PREF) ? "..." : "");
100 lua_parsedfile = luaI_createfixedstring(buff)->str; 100 lua_parsedfile = luaI_createfixedstring(buff)->str;
101} 101}
102 102