21 |
#ifndef WPT_ERRORS_H |
#ifndef WPT_ERRORS_H |
22 |
#define WPT_ERRORS_H |
#define WPT_ERRORS_H |
23 |
|
|
24 |
|
#define w32_errno ((int)GetLastError ()) |
25 |
|
|
26 |
#define DEBUG(MSG) debug (MSG, __FILE__, __LINE__) |
#define DEBUG(MSG) debug (MSG, __FILE__, __LINE__) |
27 |
#define DEBUG_F(MSG) debug_f (MSG, __FILE__, __LINE__) |
#define DEBUG_F(MSG) debug_f (MSG, __FILE__, __LINE__) |
28 |
|
|
29 |
|
/* Error constants. */ |
30 |
enum { |
enum winpt_err_t { |
31 |
WPTERR_GENERAL = 1, |
WPTERR_GENERAL = 1, |
32 |
WPTERR_FILE_OPEN = 2, |
WPTERR_FILE_OPEN = 2, |
33 |
WPTERR_FILE_CREAT = 3, |
WPTERR_FILE_CREAT = 3, |
72 |
WPTERR_CDISK_QUERY = 206, |
WPTERR_CDISK_QUERY = 206, |
73 |
}; |
}; |
74 |
|
|
75 |
|
void debug_end (void); |
76 |
const char * winpt_strerror (int errid); |
const char * winpt_strerror (int errid); |
77 |
void winpt_errmsg (const char * name, int is_file); |
void winpt_errmsg (const char * name, int is_file); |
78 |
void winpt_debug_msg (void); |
void winpt_debug_msg (void); |
79 |
void debug_box (const char * msg, const char * file, int line); |
void debug_box (const char * msg, const char * file, int line); |
80 |
void debug_f (const char * msg, const char * file, int line); |
void debug_f (const char * msg, const char * file, int line); |
81 |
void log_f (const char * format, ...); |
void log_debug (const char * format, ...); |
82 |
int log_box (const char * title, int style, const char * format, ...); |
int log_box (const char * title, int style, const char * format, ...); |
83 |
|
|
84 |
/*-- wptW32API.cpp --*/ |
/*-- wptW32API.cpp --*/ |
86 |
int show_msg (HWND hWnd, int millis, LPCTSTR string); |
int show_msg (HWND hWnd, int millis, LPCTSTR string); |
87 |
#define status_box(hwnd, text, title) msg_box (hwnd, text, title, MB_OK) |
#define status_box(hwnd, text, title) msg_box (hwnd, text, title, MB_OK) |
88 |
|
|
|
#endif /* WPT_ERRORS_H */ |
|
89 |
|
#endif /* WPT_ERRORS_H */ |