~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to cmd-line-utils/libedit/el.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-02-14 23:59:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120214235922-cux5uek1e5l0hje9
Tags: 5.5.20-0ubuntu1
* New upstream release.
* d/mysql-server-5.5.mysql.upstart: Fix stop on to make sure mysql is
  fully stopped before shutdown commences. (LP: #688541) Also simplify
  start on as it is redundant.
* d/control: Depend on upstart version which has apparmor profile load
  script to prevent failure on upgrade from lucid to precise.
  (LP: #907465)
* d/apparmor-profile: need to allow /run since that is the true path
  of /var/run files. (LP: #917542)
* d/control: mysql-server-5.5 has files in it that used to be owned
  by libmysqlclient-dev, so it must break/replace it. (LP: #912487)
* d/rules, d/control: 5.5.20 Fixes segfault on tests with gcc 4.6,
  change compiler back to system default.
* d/rules: Turn off embedded libedit/readline.(Closes: #659566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $NetBSD: el.h,v 1.17 2006/12/15 22:13:33 christos Exp $ */
 
1
/*      $NetBSD: el.h,v 1.25 2011/07/29 23:44:44 christos Exp $ */
2
2
 
3
3
/*-
4
4
 * Copyright (c) 1992, 1993
46
46
#define VIDEFAULT
47
47
#define ANCHOR
48
48
 
 
49
#include "histedit.h"
 
50
#include "chartype.h"
49
51
#include <stdio.h>
50
52
#include <sys/types.h>
51
53
 
52
 
#define EL_BUFSIZ       1024            /* Maximum line size            */
 
54
#define EL_BUFSIZ       ((size_t)4096)  /* Maximum line size            */
53
55
 
54
 
#define HANDLE_SIGNALS  0x01
55
 
#define NO_TTY          0x02
56
 
#define EDIT_DISABLED   0x04
57
 
#define UNBUFFERED      0x08
 
56
#define HANDLE_SIGNALS       0x01
 
57
#define NO_TTY               0x02
 
58
#define EDIT_DISABLED        0x04
 
59
#define UNBUFFERED           0x08
 
60
#define CHARSET_IS_MULTIBYTE 0x10
 
61
#define IGNORE_EXTCHARS      0x20            /* Ignore characters read > 0xff */
 
62
#define NARROW_HISTORY       0x40
 
63
#define NARROW_READ          0x80
58
64
 
59
65
typedef int bool_t;                     /* True or not                  */
60
66
 
66
72
} coord_t;
67
73
 
68
74
typedef struct el_line_t {
69
 
        char    *buffer;                /* Input line                   */
70
 
        char    *cursor;                /* Cursor position              */
71
 
        char    *lastchar;              /* Last character               */
72
 
        const char      *limit;         /* Max position                 */
 
75
        Char            *buffer;        /* Input line                   */
 
76
        Char            *cursor;        /* Cursor position              */
 
77
        Char            *lastchar;      /* Last character               */
 
78
        const Char      *limit;         /* Max position                 */
73
79
} el_line_t;
74
80
 
75
81
/*
82
88
        int             metanext;       /* Is the next char a meta char */
83
89
        el_action_t     lastcmd;        /* Previous command             */
84
90
        el_action_t     thiscmd;        /* this command                 */
85
 
        char            thisch;         /* char that generated it       */
 
91
        Char            thisch;         /* char that generated it       */
86
92
} el_state_t;
87
93
 
88
94
/*
89
95
 * Until we come up with something better...
90
96
 */
91
 
#define el_strdup(a)    strdup(a)
92
97
#define el_malloc(a)    malloc(a)
93
98
#define el_realloc(a,b) realloc(a, b)
94
99
#define el_free(a)      free(a)
95
100
 
96
101
#include "tty.h"
97
102
#include "prompt.h"
98
 
#include "key.h"
99
 
#include "el_term.h"
 
103
#include "keymacro.h"
 
104
#include "el_terminal.h"
100
105
#include "refresh.h"
101
106
#include "chared.h"
102
107
#include "common.h"
109
114
#include "read.h"
110
115
 
111
116
struct editline {
112
 
        char             *el_prog;      /* the program name             */
 
117
        Char             *el_prog;      /* the program name             */
113
118
        FILE             *el_infile;    /* Stdio stuff                  */
114
119
        FILE             *el_outfile;   /* Stdio stuff                  */
115
120
        FILE             *el_errfile;   /* Stdio stuff                  */
116
121
        int               el_infd;      /* Input file descriptor        */
 
122
        int               el_outfd;     /* Output file descriptor       */
 
123
        int               el_errfd;     /* Error file descriptor        */
117
124
        int               el_flags;     /* Various flags.               */
 
125
        int               el_errno;     /* Local copy of errno          */
118
126
        coord_t           el_cursor;    /* Cursor location              */
119
 
        char            **el_display;   /* Real screen image = what is there */
120
 
        char            **el_vdisplay;  /* Virtual screen image = what we see */
 
127
        Char            **el_display;   /* Real screen image = what is there */
 
128
        Char            **el_vdisplay;  /* Virtual screen image = what we see */
121
129
        void             *el_data;      /* Client data                  */
122
130
        el_line_t         el_line;      /* The current line information */
123
131
        el_state_t        el_state;     /* Current editor state         */
124
 
        el_term_t         el_term;      /* Terminal dependent stuff     */
 
132
        el_terminal_t     el_terminal;  /* Terminal dependent stuff     */
125
133
        el_tty_t          el_tty;       /* Tty dependent stuff          */
126
134
        el_refresh_t      el_refresh;   /* Refresh stuff                */
127
135
        el_prompt_t       el_prompt;    /* Prompt stuff                 */
128
136
        el_prompt_t       el_rprompt;   /* Prompt stuff                 */
129
137
        el_chared_t       el_chared;    /* Characted editor stuff       */
130
138
        el_map_t          el_map;       /* Key mapping stuff            */
131
 
        el_key_t          el_key;       /* Key binding stuff            */
 
139
        el_keymacro_t     el_keymacro;  /* Key binding stuff            */
132
140
        el_history_t      el_history;   /* History stuff                */
133
141
        el_search_t       el_search;    /* Search stuff                 */
134
142
        el_signal_t       el_signal;    /* Signal handling stuff        */
135
143
        el_read_t         el_read;      /* Character reading stuff      */
 
144
#ifdef WIDECHAR
 
145
        ct_buffer_t       el_scratch;   /* Scratch conversion buffer    */
 
146
        ct_buffer_t       el_lgcyconv;  /* Buffer for legacy wrappers   */
 
147
        LineInfo          el_lgcylinfo; /* Legacy LineInfo buffer       */
 
148
#endif
136
149
};
137
150
 
138
 
protected int   el_editmode(EditLine *, int, const char **);
 
151
protected int   el_editmode(EditLine *, int, const Char **);
139
152
 
140
153
/* XXXMYSQL: Bug#23097 mysql can't insert korean on mysql prompt. */
141
154
#define el_isprint(x)   ((unsigned char) (x) < 0x80 ? isprint(x) : 1)