Subversion Repositories Games.Carmageddon

Rev

Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 20
Line 5... Line 5...
5
// this has to be first
5
// this has to be first
6
#include <windows.h>
6
#include <windows.h>
7
 
7
 
8
#include <imagehlp.h>
8
#include <imagehlp.h>
9
 
9
 
10
#include "harness/config.h"
-
 
11
#include "harness/os.h"
10
#include "harness/os.h"
12
 
11
 
13
#include <assert.h>
12
#include <assert.h>
14
#include <direct.h>
13
#include <direct.h>
15
#include <errno.h>
14
#include <errno.h>
Line 161... Line 160...
161
    FILE* f;
160
    FILE* f;
162
    errno_t err;
161
    errno_t err;
163
 
162
 
164
    f = NULL;
163
    f = NULL;
165
    err = fopen_s(&f, pathname, mode);
164
    err = fopen_s(&f, pathname, mode);
166
    if (harness_game_config.verbose) {
-
 
167
        if (err != 0) {
165
    if (err != 0) {
168
            fprintf(stderr, "Failed to open \"%s\" (%s)\n", pathname, strerror(err));
166
        fprintf(stderr, "Failed to open \"%s\" (%s)\n", pathname, strerror(err));
169
        }
-
 
170
    }
167
    }
171
 
168
 
172
    return f;
169
    return f;
173
}
170
}
174
 
171