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.
This commit is contained in:
Bruce Evans 1996-09-28 13:15:06 +00:00
parent 552690d2b1
commit 3e163cc6fc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18532

View File

@ -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);