~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_error.c

  • Committer: Brian Aker
  • Date: 2008-07-14 22:18:37 UTC
  • mfrom: (77.1.96 codestyle)
  • Revision ID: brian@tangent.org-20080714221837-oceoshx7fjkla9u3
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
#include "mysys_priv.h"
17
17
#include "mysys_err.h"
18
 
#include <mystrings/m_string.h>
 
18
#include <m_string.h>
19
19
#include <stdarg.h>
20
 
#include <mystrings/m_ctype.h>
 
20
#include <m_ctype.h>
21
21
 
22
22
/* Define some external variables for error handling */
23
23
 
72
72
  struct my_err_head *meh_p;
73
73
  va_list args;
74
74
  char ebuff[ERRMSGSIZE + 20];
 
75
  DBUG_ENTER("my_error");
 
76
  DBUG_PRINT("my", ("nr: %d  MyFlags: %d  errno: %d", nr, MyFlags, errno));
75
77
 
76
78
  /* Search for the error messages array, which could contain the message. */
77
79
  for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next)
89
91
    va_end(args);
90
92
  }
91
93
  (*error_handler_hook)(nr, ebuff, MyFlags);
92
 
  return;
 
94
  DBUG_VOID_RETURN;
93
95
}
94
96
 
95
97
 
108
110
{
109
111
  va_list args;
110
112
  char ebuff[ERRMSGSIZE+20];
 
113
  DBUG_ENTER("my_printf_error");
 
114
  DBUG_PRINT("my", ("nr: %d  MyFlags: %d  errno: %d  Format: %s",
 
115
                    error, MyFlags, errno, format));
111
116
 
112
117
  va_start(args,MyFlags);
113
118
  (void) vsnprintf (ebuff, sizeof(ebuff), format, args);
114
119
  va_end(args);
115
120
  (*error_handler_hook)(error, ebuff, MyFlags);
116
 
  return;
 
121
  DBUG_VOID_RETURN;
117
122
}
118
123
 
119
124
/*