T
Tristan Miller
Greetings.
I was under the impression that PATH_MAX (i.e., the maximum length, in
characters, of a fully-qualified filename) was part of standard C and
defined in <limits.h>, but apparently I am wrong. (At least, I can't
find it in the C9X draft, and a trivial program using it won't compile
with gcc -ansi.)
Any suggestions for what to replace it with? Is there some relatively
safe arbitrary numerical constant I could use? I.e., what's the
greatest value I'm likely to encounter on today's popular platforms?
I'd hate to pick some value, x, thinking it's "big enough", and then
have some user complain when she tries to input a filename of length
x+1.
The program is aimed at logicians, mathematicians, and computer
scientists, so I expect most of them will be running Windows, DOS,
MacOS, or some variant of Unix (including GNU, Linux, BSD, OS X, etc.).
No need to worry about accommodating obscure embedded systems and
what-not.
Regards,
Tristan
I was under the impression that PATH_MAX (i.e., the maximum length, in
characters, of a fully-qualified filename) was part of standard C and
defined in <limits.h>, but apparently I am wrong. (At least, I can't
find it in the C9X draft, and a trivial program using it won't compile
with gcc -ansi.)
Any suggestions for what to replace it with? Is there some relatively
safe arbitrary numerical constant I could use? I.e., what's the
greatest value I'm likely to encounter on today's popular platforms?
I'd hate to pick some value, x, thinking it's "big enough", and then
have some user complain when she tries to input a filename of length
x+1.
The program is aimed at logicians, mathematicians, and computer
scientists, so I expect most of them will be running Windows, DOS,
MacOS, or some variant of Unix (including GNU, Linux, BSD, OS X, etc.).
No need to worry about accommodating obscure embedded systems and
what-not.
Regards,
Tristan