##### Synopsis

    #include <__cross_studio_io.h>
    DEBUG_FILE *debug_open(const char *filename, const char *mode);

##### Description

debug_open opens the named file and returns a stream or NULL if the open fails. The mode is a string containing one of:

- r - open file for reading
- w - create file for writing
- a - open or create file for writing and position at the end of the file
- r+ - open file for reading and writing
- w+ - create file for reading and writing
- a+ - open or create text file for reading and writing and position at the end of the file

The mode should then include either "t" or "b" to specify if carriage return, linefeed combinations are translated into newline characters e.g. "rt", "a+b".

##### Portability

debug_open is an extension provided by CrossWorks C.