| 49 | static FILE* dos_fp_ = NULL; |
| 50 | |
| 51 | void open_dos(void) |
| 52 | { |
| 53 | if (dos_fp_) |
| 54 | return; |
| 55 | |
| 56 | // �� DOS ���� |
| 57 | AllocConsole(); |
| 58 | |
| 59 | #if _MSC_VER >= 1500 |
| 60 | if (freopen_s(&dos_fp_,"CONOUT$", "w+t", stdout) != 0) |
| 61 | dos_fp_ = NULL; |
| 62 | #else |
| 63 | dos_fp_ = freopen("CONOUT$", "w+t", stdout); |
| 64 | #endif |
| 65 | if (dos_fp_ == NULL) |
| 66 | { |
| 67 | printf("open DOS error %s\r\n", last_serror()); |
| 68 | FreeConsole(); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void close_dos(void) |
| 73 | { |
no test coverage detected
searching dependent graphs…