~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Monty Taylor
  • Date: 2009-01-09 05:20:49 UTC
  • mto: (779.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 784.
  • Revision ID: mordred@inaugust.com-20090109052049-bglg06jf2l7ix0a3
Updated some more build stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include <sys/ioctl.h>
45
45
#include <drizzled/configmake.h>
46
46
 
47
 
 
48
 
#if defined(HAVE_LOCALE_H)
49
 
#include <locale.h>
50
 
#endif
51
 
 
52
 
#include <drizzled/gettext.h>
53
 
 
54
 
#if defined(CMATH_NAMESPACE)
55
 
  using namespace CMATH_NAMESPACE;
56
 
#endif
57
 
 
58
 
const char *VER= "14.14";
59
 
 
60
 
/* Don't try to make a nice table if the data is too big */
61
 
#define MAX_COLUMN_LENGTH       (uint32_t)1024
62
 
 
63
 
/* Buffer to hold 'version' and 'version_comment' */
64
 
#define MAX_SERVER_VERSION_LENGTH     128
65
 
 
66
 
void* sql_alloc(unsigned size);       // Don't use drizzled alloc for these
67
 
void sql_element_free(void *ptr);
68
 
 
69
 
 
70
47
#if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
71
48
#include <curses.h>
72
49
#ifdef __sun
96
73
#endif
97
74
#endif
98
75
 
99
 
#undef bcmp                             // Fix problem with new readline
100
 
 
101
 
#ifdef HAVE_READLINE_HISTORY_H
102
 
#include <readline/history.h>
103
 
#endif
104
 
#include <readline/readline.h>
105
 
 
106
76
/**
107
77
 Make the old readline interface look like the new one.
108
78
*/
113
83
  completion_matches((char *)str, (CPFunction *)func)
114
84
#endif
115
85
 
 
86
#ifdef HAVE_LIBREADLINE
 
87
#  if defined(HAVE_READLINE_READLINE_H)
 
88
#    include <readline/readline.h>
 
89
#  elif defined(HAVE_READLINE_H)
 
90
#    include <readline.h>
 
91
#  else /* !defined(HAVE_READLINE_H) */
 
92
extern char *readline ();
 
93
#  endif /* !defined(HAVE_READLINE_H) */
 
94
char *cmdline = NULL;
 
95
#else /* !defined(HAVE_READLINE_READLINE_H) */
 
96
  /* no readline */
 
97
#  error Readline Required
 
98
#endif /* HAVE_LIBREADLINE */
 
99
 
 
100
#ifdef HAVE_READLINE_HISTORY
 
101
#  if defined(HAVE_READLINE_HISTORY_H)
 
102
#    include <readline/history.h>
 
103
#  elif defined(HAVE_HISTORY_H)
 
104
#    include <history.h>
 
105
#  else /* !defined(HAVE_HISTORY_H) */
 
106
extern void add_history ();
 
107
extern int write_history ();
 
108
extern int read_history ();
 
109
#  endif /* defined(HAVE_READLINE_HISTORY_H) */
 
110
    /* no history */
 
111
#endif /* HAVE_READLINE_HISTORY */
 
112
 
 
113
 
 
114
#if defined(HAVE_LOCALE_H)
 
115
#include <locale.h>
 
116
#endif
 
117
 
 
118
#include <drizzled/gettext.h>
 
119
 
 
120
#if defined(CMATH_NAMESPACE)
 
121
  using namespace CMATH_NAMESPACE;
 
122
#endif
 
123
 
 
124
const char *VER= "14.14";
 
125
 
 
126
/* Don't try to make a nice table if the data is too big */
 
127
#define MAX_COLUMN_LENGTH       (uint32_t)1024
 
128
 
 
129
/* Buffer to hold 'version' and 'version_comment' */
 
130
#define MAX_SERVER_VERSION_LENGTH     128
 
131
 
 
132
void* sql_alloc(unsigned size);       // Don't use drizzled alloc for these
 
133
void sql_element_free(void *ptr);
 
134
 
116
135
 
117
136
#if !defined(HAVE_VIDATTR)
118
137
#undef vidattr