~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/errmsg_stderr/errmsg_stderr.cc

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <stdarg.h>  /* for va_list */
28
28
#include <unistd.h>  /* for write(2) */
29
29
 
 
30
using namespace drizzled;
 
31
 
30
32
/* todo, make this dynamic as needed */
31
33
#define MAX_MSG_LEN 8192
32
34
 
33
 
class Error_message_stderr : public drizzled::plugin::ErrorMessage
 
35
class Error_message_stderr : public plugin::ErrorMessage
34
36
{
35
37
public:
36
38
  Error_message_stderr()
37
 
   : drizzled::plugin::ErrorMessage("Error_message_stderr") {}
 
39
   : plugin::ErrorMessage("Error_message_stderr") {}
38
40
  virtual bool errmsg(Session *, int , const char *format, va_list ap)
39
41
  {
40
42
    char msgbuf[MAX_MSG_LEN];
54
56
};
55
57
 
56
58
static Error_message_stderr *handler= NULL;
57
 
static int errmsg_stderr_plugin_init(drizzled::plugin::Registry &registry)
 
59
static int errmsg_stderr_plugin_init(plugin::Registry &registry)
58
60
{
59
61
  handler= new Error_message_stderr();
60
62
  registry.add(handler);
62
64
  return 0;
63
65
}
64
66
 
65
 
static int errmsg_stderr_plugin_deinit(drizzled::plugin::Registry &registry)
 
67
static int errmsg_stderr_plugin_deinit(plugin::Registry &registry)
66
68
{
67
69
 
68
70
  if (handler)