From 8dd1904c30af15d88628b33114aaa011d091ea04 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 28 Sep 1996 13:15:06 +0000 Subject: Eliminated NOFILE. Use the arbitrary (currently identical) limit of 64 instead (for the input stack size). `mail' was one of the 3 programs in /usr/src that (mis)used NOFILE. --- usr.bin/mail/aux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/mail') diff --git a/usr.bin/mail/aux.c b/usr.bin/mail/aux.c index 31038c8..f6f7211 100644 --- a/usr.bin/mail/aux.c +++ b/usr.bin/mail/aux.c @@ -295,7 +295,9 @@ struct sstack { FILE *s_file; /* File we were in. */ int s_cond; /* Saved state of conditionals */ int s_loading; /* Loading .mailrc, etc. */ -} sstack[NOFILE]; +}; +#define SSTACK_SIZE 64 /* XXX was NOFILE. */ +static struct sstack sstack[SSTACK_SIZE]; /* * Pushdown current input file and switch to a new one. @@ -315,7 +317,7 @@ source(arglist) perror(cp); return(1); } - if (ssp >= NOFILE - 1) { + if (ssp >= SSTACK_SIZE - 1) { printf("Too much \"sourcing\" going on.\n"); Fclose(fi); return(1); -- cgit v1.1