ac> I use Borland C++ for OS/2 1.0. I haven't come across any bugs, but then
ac> I haven't pushed it very far. Are there any bugs I should be aware of?
Here's another one that I forgot to document (I think), and which
I ran across again recently because I was investigating something...
/* This program demonstrates a bug in Borland C++ 1.5 for OS/2 */
/* ISO specifies that FOPEN_MAX should contain the maximum number */
/* of files that the implementation can guarantee can be opened */
/* This number includes stdout, stderr and stdin, so the maximum */
/* number of user files should be 3 less than reported by FOPEN_MAX. */
/* Borland returns 40 for FOPEN_MAX, which means I should be able to */
/* open 37 files of my own. I can only open 34. */
#include
int main(void)
{
int x;
char fnm[FILENAME_MAX];
FILE *fq;
printf("FOPEN_MAX is %d\n", FOPEN_MAX);
for (x=0; x< 200; x++)
{
sprintf(fnm, "maxxx.%d", x);
fq = fopen(fnm, "w");
if (fq == NULL)
{
printf("max is %d\n", x);
return (0);
}
}
printf("max is at least %d\n", x);
return (0);
}
@EOT:
---
* Origin: X (3:711/934.9)
|