~eday/drizzle/eday-dev

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Eric Day
  • Date: 2010-01-07 20:02:38 UTC
  • mfrom: (971.3.291 staging)
  • Revision ID: eday@oddments.org-20100107200238-uqw8v6kv9pl7nny5
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#include "client_priv.h"
37
37
#include <string>
 
38
#include <drizzled/gettext.h>
 
39
#include <iostream>
 
40
#include <map>
38
41
#include <algorithm>
39
 
#include <mystrings/m_ctype.h>
 
42
#include <limits.h>
 
43
#include <cassert>
 
44
#include "drizzled/charset_info.h"
40
45
#include <stdarg.h>
 
46
#include <math.h>
41
47
#include "client/linebuffer.h"
42
48
#include <signal.h>
43
49
#include <sys/ioctl.h>
44
50
#include <drizzled/configmake.h>
 
51
#include "drizzled/charset.h"
45
52
 
46
53
#if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
47
54
#include <curses.h>
126
133
#include <locale.h>
127
134
#endif
128
135
 
129
 
#include <drizzled/gettext.h>
130
 
 
131
 
 
132
 
void* sql_alloc(unsigned size);       // Don't use drizzled alloc for these
133
 
void sql_element_free(void *ptr);
134
136
 
135
137
 
136
138
#if !defined(HAVE_VIDATTR)
138
140
#define vidattr(A) {}      // Can't get this to work
139
141
#endif
140
142
 
141
 
#include <iostream>
142
 
#include <map>
143
143
 
144
144
using namespace std;
145
145
 
1025
1025
static void window_resize(int sig);
1026
1026
#endif
1027
1027
 
1028
 
static inline int is_prefix(const char *s, const char *t)
1029
 
{
1030
 
  while (*t)
1031
 
    if (*s++ != *t++) return 0;
1032
 
  return 1;                                     /* WRONG */
1033
 
}
1034
 
 
1035
1028
/**
1036
1029
  Shutdown the server that we are currently connected to.
1037
1030
 
2547
2540
 
2548
2541
/* for gnu readline */
2549
2542
 
2550
 
#ifndef HAVE_INDEX
2551
 
extern "C" {
2552
 
  extern char *index(const char *,int c),*rindex(const char *,int);
2553
 
 
2554
 
  char *index(const char *s,int c)
2555
 
  {
2556
 
    for (;;)
2557
 
    {
2558
 
      if (*s == (char) c) return (char*) s;
2559
 
      if (!*s++) return NULL;
2560
 
    }
2561
 
  }
2562
 
 
2563
 
  char *rindex(const char *s,int c)
2564
 
  {
2565
 
    register char *t;
2566
 
 
2567
 
    t = NULL;
2568
 
    do if (*s == (char) c) t = (char*) s; while (*s++);
2569
 
    return (char*) t;
2570
 
  }
2571
 
}
2572
 
#endif
2573
 
 
2574
2543
 
2575
2544
static int reconnect(void)
2576
2545
{