limits
Moderator, John Quarterman
std-unix at ut-sally.UUCP
Wed Nov 20 09:45:13 AEST 1985
Date: Mon, 18 Nov 85 13:28:03 cst
From: ihnp4!uiucdcs!ccvaxa!preece at SEISMO.CSS.GOV (Scott Preece)
> From: Dan Franklin <dan at BBN-PROPHET.ARPA>
> Instead of one system call which returns *everything*, there should be
> one system call which takes a numeric index "naming" the limit to be
> returned. An index of 0 would return the total number of limits.
> Limits.h would give the indices.
----------
I'd get rid of the numeric constants part of that, too. Use a call
like getenv, supplying a name as an Ascii string.
But does this mean we would have to malloc space for anything that
was sized to a system limit (i.e., one could no longer say
char buf[PATH_MAX]
but would have to do:
char *buf;
long bufsize;
...
bufsize = getlimit("PATH_MAX");
if (bufsize >= 0)
buf = (char *)malloc(bufsize);
else
perror("bufalloc:");
at run time?
Nobody ever said programming had to be easy, but this could
get old pretty quickly...
[ If the limits are taken from <limits.h>, presumably a program could,
if the programmer so chose, #include that file and size arrays at
compile time. -mod ]
__
scott preece
gould/csd urbana
ihnp4!uiucdcs!ccvaxa!preece
Volume-Number: Volume 3, Number 28
More information about the Mod.std.unix
mailing list