1 |
douglas |
1 |
// Douglas Thrift |
2 |
|
|
// |
3 |
|
|
// CCS Computer Science |
4 |
|
|
// Common Functions |
5 |
|
|
// |
6 |
|
|
// $Id$ |
7 |
|
|
|
8 |
douglas |
438 |
#ifndef _mysql_h_ |
9 |
|
|
#define _mysql_h_ |
10 |
douglas |
1 |
|
11 |
douglas |
438 |
#include "common.h" |
12 |
douglas |
1 |
|
13 |
douglas |
438 |
#include <assert.h> |
14 |
|
|
#include <mysql.h> |
15 |
douglas |
1 |
|
16 |
douglas |
438 |
#define MYSQL_EXCEPTION 3 |
17 |
douglas |
1 |
|
18 |
douglas |
438 |
#define MYSQL_BEGIN() MYSQL *mysql = mysql_init(NULL); \ |
19 |
|
|
\ |
20 |
|
|
assert(mysql != NULL) |
21 |
douglas |
1 |
|
22 |
douglas |
438 |
#define MYSQL_END() mysql_close(mysql); \ |
23 |
|
|
mysql_library_end() |
24 |
douglas |
1 |
|
25 |
douglas |
438 |
void mysqlcheck(int value, jmp_buf environment); |
26 |
|
|
void mysqlpassword(MYSQL *mysql, char user[MAXLOGNAME], char password[_PASSWORD_LEN], jmp_buf environment); |
27 |
douglas |
264 |
|
28 |
douglas |
438 |
#endif//_mysql_h_ |