~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/errmsg.h

  • Committer: Monty Taylor
  • Date: 2008-08-15 19:50:07 UTC
  • Revision ID: monty@inaugust.com-20080815195007-bn1p87alyduya7ss
Changed client_errors to be exposed through a function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#ifdef  __cplusplus
28
28
extern "C" {
29
29
#endif
30
 
void    init_client_errs(void);
31
 
void    finish_client_errs(void);
32
 
extern const char *client_errors[];     /* Error messages */
 
30
const char * get_client_error(unsigned int err_index);
33
31
#ifdef  __cplusplus
34
32
}
35
33
#endif
37
35
#define CR_MIN_ERROR            2000    /* For easier client code */
38
36
#define CR_MAX_ERROR            2999
39
37
#if !defined(ER)
40
 
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
 
38
#define ER(X) get_client_error((X)-CR_MIN_ERROR)
41
39
#endif
42
40
#define CLIENT_ERRMAP           2       /* Errormap used by my_error() */
43
41