aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-06-17 14:04:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-06-17 14:04:03 -0300
commit36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8 (patch)
treeefa22fb54a0d354249d9f3c9e0a26118d6527bd0 /lstrlib.c
parentd4dce57f5ca64c65c7c49eac683b8f807e8dc02d (diff)
downloadlua-36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8.tar.gz
lua-36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8.tar.bz2
lua-36b6fe8d175bb2aec8fc55ffb090eab90cb12fd8.zip
better treatment for arbitrary limits
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lstrlib.c b/lstrlib.c
index d03612af..b915cad9 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -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
122struct Capture { 125struct 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
504static void str_format (void) { 507static void str_format (void) {
505 int arg = 1; 508 int arg = 1;