aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-25 23:49:09 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-25 23:49:09 +0000
commitd35c21587a4139031c077fd122252217a4713681 (patch)
tree7bd14fd247492c00f3d38ae1dbd7727e03fda9ad /coreutils
parentffde8673fe8b2c32076aa3e01eab1fefc5f08e86 (diff)
downloadbusybox-d35c21587a4139031c077fd122252217a4713681.tar.gz
Commit Larry Doolittle's buffers-on-stack/buffers-via-malloc patch.
-Erik
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/tr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c
index d21e672fe..15e3709bb 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -144,10 +144,11 @@ extern int tr_main(int argc, char **argv)
int output_length=0, input_length;
int index = 1;
int i;
- /* set up big arrays here (better than making a bunch of static arrays up top) */
- unsigned char output[BUFSIZ], input[BUFSIZ];
- unsigned char vector[ASCII + 1];
- char invec[ASCII + 1], outvec[ASCII + 1];
+ RESERVE_BB_BUFFER(output, BUFSIZ);
+ RESERVE_BB_BUFFER(input, BUFSIZ);
+ RESERVE_BB_UBUFFER(vector, ASCII+1);
+ RESERVE_BB_BUFFER(invec, ASCII+1);
+ RESERVE_BB_BUFFER(outvec, ASCII+1);
/* ... but make them available globally */
poutput = output;