4 * Ullrich von bassewitz, 17.06.1997
15 static unsigned char amode_to_bmode (const char* mode)
16 /* Convert ASCII mode (like for fopen) to binary mode (for open) */
20 unsigned char binmode = 0;
44 FILE* _fopen (const char* name, const char* mode, FILE* f)
45 /* Open the specified file and fill the descriptor values into f */
48 unsigned char binmode;
51 /* Convert ASCII mode to binary mode */
52 if ((binmode = amode_to_bmode (mode)) == 0) {
53 /* Invalid mode, _errno already set */
58 fd = open (name, binmode);
60 /* Error - _oserror is set */
64 /* Remember fd, mark the file as opened */
68 /* Return the file descriptor */