I used to be able to open 92 files under OS/2 2.1 with the below
program, but under OS/2 3.0 I can only get 13. Has something
changed with regards to file handles? The executable is
unchanged, and compiled with Watcom. BFN. Paul.
/* Test maximum number of files that can be opened */
/* Written by Paul Edwards and released to the public domain */
#include
int main(void)
{
int x;
char fnm[FILENAME_MAX];
FILE *fq;
printf("ISO guarantees at least %d\n", FOPEN_MAX - 3);
for (x=0; x< 200; x++)
{
sprintf(fnm, "maxxx.%d", x);
fq = fopen(fnm, "w");
if (fq == NULL)
{
printf("max is %d\n", x-1);
return (0);
}
}
printf("max is at least %d\n", x);
return (0);
}
@EOT:
---
* Origin: X (3:711/934.9)
|