Last change
on this file since 5260 was
5260,
checked in by jack, 17 years ago
|
anugavis: added event loop. Now drawing an empty screen.
|
File size:
584 bytes
|
Line | |
---|
1 | #include <stdarg.h> |
---|
2 | #include <netcdf.h> |
---|
3 | #include <SDL.h> |
---|
4 | #include "error.h" |
---|
5 | |
---|
6 | #define MAX_ERROR_LEN 100 |
---|
7 | |
---|
8 | static char error[MAX_ERROR_LEN]; |
---|
9 | |
---|
10 | char* AnugaVis_GetError(void){ |
---|
11 | return error; |
---|
12 | } |
---|
13 | |
---|
14 | void AnugaVis_SetError(const char *format, ...){ |
---|
15 | va_list args; |
---|
16 | va_start(args, format); |
---|
17 | vsnprintf(error, MAX_ERROR_LEN, format, args); |
---|
18 | va_end(args); |
---|
19 | } |
---|
20 | |
---|
21 | void AnugaVis_SDLError(void){ |
---|
22 | AnugaVis_SetError("SDL Error: %s", SDL_GetError()); |
---|
23 | SDL_ClearError(); |
---|
24 | } |
---|
25 | |
---|
26 | void AnugaVis_NetCDFError(int ncerr){ |
---|
27 | AnugaVis_SetError("NetCDF Error: %s", nc_strerror(ncerr)); |
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.