diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-06-17 14:04:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-06-17 14:04:03 -0300 |
commit | 36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8 (patch) | |
tree | efa22fb54a0d354249d9f3c9e0a26118d6527bd0 /lstrlib.c | |
parent | d4dce57f5ca64c65c7c49eac683b8f807e8dc02d (diff) | |
download | lua-36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8.tar.gz lua-36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8.tar.bz2 lua-36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8.zip |
better treatment for arbitrary limits
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.30 1999/05/05 19:22:26 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.31 1999/05/14 12:24:04 roberto Exp roberto $ |
3 | ** Standard library for strings and pattern-matching | 3 | ** Standard library for strings and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -117,7 +117,10 @@ static void str_char (void) { | |||
117 | ** ======================================================= | 117 | ** ======================================================= |
118 | */ | 118 | */ |
119 | 119 | ||
120 | #define MAX_CAPT 32 | 120 | #ifndef MAX_CAPT |
121 | #define MAX_CAPT 32 /* arbitrary limit */ | ||
122 | #endif | ||
123 | |||
121 | 124 | ||
122 | struct Capture { | 125 | struct Capture { |
123 | char *src_end; /* end ('\0') of source string */ | 126 | char *src_end; /* end ('\0') of source string */ |
@@ -499,7 +502,7 @@ static void luaI_addquoted (int arg) { | |||
499 | } | 502 | } |
500 | 503 | ||
501 | /* maximum size of each format specification (such as '%-099.99d') */ | 504 | /* maximum size of each format specification (such as '%-099.99d') */ |
502 | #define MAX_FORMAT 20 | 505 | #define MAX_FORMAT 20 /* arbitrary limit */ |
503 | 506 | ||
504 | static void str_format (void) { | 507 | static void str_format (void) { |
505 | int arg = 1; | 508 | int arg = 1; |