source: anuga_work/development/anugavis/src/libanugavis/error.c @ 5220

Last change on this file since 5220 was 5220, checked in by jack, 16 years ago

anugavis: Started work on simple height quantities.

File size: 480 bytes
Line 
1#include <stdarg.h>
2#include <SDL.h>
3#include "anugavis.h"
4#include "error.h"
5
6#define MAX_ERROR_LEN 100
7
8static char error[MAX_ERROR_LEN];
9
10char* AnugaVis_GetError(void){
11  return error;
12}
13
14void 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
21void AnugaVis_SDLError(void){
22  AnugaVis_SetError("SDL Error: %s", SDL_GetError());
23  SDL_ClearError();
24}
Note: See TracBrowser for help on using the repository browser.