version 1.12, 2002/10/27 21:41:50 |
version 1.17.20.1, 2009/05/13 19:18:29 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright |
* 2. Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* documentation and/or other materials provided with the distribution. |
* 3. All advertising materials mentioning features or use of this software |
* 3. Neither the name of the University nor the names of its contributors |
* must display the following acknowledgement: |
|
* This product includes software developed by the University of |
|
* California, Berkeley and its contributors. |
|
* 4. Neither the name of the University nor the names of its contributors |
|
* may be used to endorse or promote products derived from this software |
* may be used to endorse or promote products derived from this software |
* without specific prior written permission. |
* without specific prior written permission. |
* |
* |
|
|
|
|
#define EL_BUFSIZ 1024 /* Maximum line size */ |
#define EL_BUFSIZ 1024 /* Maximum line size */ |
|
|
#define HANDLE_SIGNALS 1<<0 |
#define HANDLE_SIGNALS 0x01 |
#define NO_TTY 1<<1 |
#define NO_TTY 0x02 |
#define EDIT_DISABLED 1<<2 |
#define EDIT_DISABLED 0x04 |
|
#define UNBUFFERED 0x08 |
|
|
typedef int bool_t; /* True or not */ |
typedef int bool_t; /* True or not */ |
|
|
Line 72 typedef struct el_line_t { |
|
Line 69 typedef struct el_line_t { |
|
char *buffer; /* Input line */ |
char *buffer; /* Input line */ |
char *cursor; /* Cursor position */ |
char *cursor; /* Cursor position */ |
char *lastchar; /* Last character */ |
char *lastchar; /* Last character */ |
const char *limit; /* Max position */ |
const char *limit; /* Max position */ |
} el_line_t; |
} el_line_t; |
|
|
/* |
/* |
Line 84 typedef struct el_state_t { |
|
Line 81 typedef struct el_state_t { |
|
int argument; /* Numeric argument */ |
int argument; /* Numeric argument */ |
int metanext; /* Is the next char a meta char */ |
int metanext; /* Is the next char a meta char */ |
el_action_t lastcmd; /* Previous command */ |
el_action_t lastcmd; /* Previous command */ |
|
el_action_t thiscmd; /* this command */ |
|
char thisch; /* char that generated it */ |
} el_state_t; |
} el_state_t; |
|
|
/* |
/* |
* Until we come up with something better... |
* Until we come up with something better... |
*/ |
*/ |
|
#define el_strdup(a) strdup(a) |
#define el_malloc(a) malloc(a) |
#define el_malloc(a) malloc(a) |
#define el_realloc(a,b) realloc(a, b) |
#define el_realloc(a,b) realloc(a, b) |
#define el_free(a) free(a) |
#define el_free(a) free(a) |
Line 110 typedef struct el_state_t { |
|
Line 110 typedef struct el_state_t { |
|
|
|
struct editline { |
struct editline { |
char *el_prog; /* the program name */ |
char *el_prog; /* the program name */ |
|
FILE *el_infile; /* Stdio stuff */ |
FILE *el_outfile; /* Stdio stuff */ |
FILE *el_outfile; /* Stdio stuff */ |
FILE *el_errfile; /* Stdio stuff */ |
FILE *el_errfile; /* Stdio stuff */ |
int el_infd; /* Input file descriptor */ |
int el_infd; /* Input file descriptor */ |
int el_flags; /* Various flags. */ |
int el_flags; /* Various flags. */ |
|
int el_errno; /* Local copy of errno */ |
coord_t el_cursor; /* Cursor location */ |
coord_t el_cursor; /* Cursor location */ |
char **el_display; /* Real screen image = what is there */ |
char **el_display; /* Real screen image = what is there */ |
char **el_vdisplay; /* Virtual screen image = what we see */ |
char **el_vdisplay; /* Virtual screen image = what we see */ |