summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/util/check_error.c13
-rw-r--r--src/util/sqlinfoprint.c73
-rw-r--r--src/util/sqlinfoprint.h15
3 files changed, 100 insertions, 1 deletions
diff --git a/src/util/check_error.c b/src/util/check_error.c
index dbe5b8f..cd00439 100644
--- a/src/util/check_error.c
+++ b/src/util/check_error.c
@@ -1,10 +1,16 @@
1#include <GL/glut.h>1#include <GL/glut.h>
2#include <error.h>2#include <error.h>
3#include <errno.h>3#include <errno.h>
4#include "sqlinfoprint.h"
5extern struct sqlca sqlca;
46
5void7void
6check_error (const char *filename, unsigned int linenum)8check_error (const char *filename, const unsigned int linenum)
7{9{
10
11 /*
12 * Check for an error from the OpenGL API.
13 */
8 GLenum errCode = glGetError ();14 GLenum errCode = glGetError ();
9 if (errCode != GL_NO_ERROR)15 if (errCode != GL_NO_ERROR)
10 {16 {
@@ -13,5 +19,10 @@ check_error (const char *filename, unsigned int linenum)
13 "OpenGL Error %s", errString);19 "OpenGL Error %s", errString);
14 }20 }
1521
22 /*
23 * Check for an error from the Database API.
24 */
25 sqlinfoprint ("DB Error", &sqlca, filename, linenum);
26
16 return;27 return;
17}28}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.