TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: andrew clarke
from: Paul Edwards
date: 1995-07-04 12:14:22
subject: BC/2++ bugs

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)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.