diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-03-11 15:59:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-03-11 15:59:19 -0300 |
commit | 82ad0d57705dd3be41081118781762b72e334f1b (patch) | |
tree | 6913717d8034552944758a3275649550caeaadd0 /lauxlib.c | |
parent | 256d1bea08ca12890372c6c53fc191e7b90c5a8e (diff) | |
download | lua-82ad0d57705dd3be41081118781762b72e334f1b.tar.gz lua-82ad0d57705dd3be41081118781762b72e334f1b.tar.bz2 lua-82ad0d57705dd3be41081118781762b72e334f1b.zip |
details
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.15 1999/03/04 21:17:26 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.16 1999/03/10 14:19:41 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -128,8 +128,6 @@ void luaL_chunkid (char *out, char *source, int len) { | |||
128 | 128 | ||
129 | 129 | ||
130 | void luaL_filesource (char *out, char *filename, int len) { | 130 | void luaL_filesource (char *out, char *filename, int len) { |
131 | if (filename == NULL) | 131 | if (filename == NULL) filename = "(stdin)"; |
132 | strcpy(out, "@(stdin)"); | 132 | sprintf(out, "@%.*s", len-2, filename); /* -2 for '@' and '\0' */ |
133 | else | ||
134 | sprintf(out, "@%.*s", len-2, filename); /* -2 for '@' and '\0' */ | ||
135 | } | 133 | } |