Deleted Added
full compact
ed.h (100616) ed.h (145479)
1/* $Header: /src/pub/tcsh/ed.h,v 3.33 2002/07/06 22:28:13 christos Exp $ */
1/* $Header: /src/pub/tcsh/ed.h,v 3.44 2005/03/05 03:20:15 christos Exp $ */
2/*
3 * ed.h: Editor declarations and globals
4 */
5/*-
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

--- 39 unchanged lines hidden (view full) ---

49/****************************************************************************/
50
51#define CCRETVAL char /* size needed for the different char editor */
52 /* return values */
53
54#define KEYCMD unsigned char /* size needed to index into CcFuncTbl */
55 /* Must be unsigned */
56
2/*
3 * ed.h: Editor declarations and globals
4 */
5/*-
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

--- 39 unchanged lines hidden (view full) ---

49/****************************************************************************/
50
51#define CCRETVAL char /* size needed for the different char editor */
52 /* return values */
53
54#define KEYCMD unsigned char /* size needed to index into CcFuncTbl */
55 /* Must be unsigned */
56
57typedef CCRETVAL(*PFCmd) __P((int)); /* pointer to function returning CCRETVAL */
57typedef CCRETVAL(*PFCmd) __P((Char)); /* pointer to function returning CCRETVAL */
58
59struct KeyFuncs { /* for the "bind" shell command */
58
59struct KeyFuncs { /* for the "bind" shell command */
60 char *name; /* function name for bind command */
60 const char *name; /* function name for bind command */
61 int func; /* function numeric value */
61 int func; /* function numeric value */
62 char *desc; /* description of function */
62 const char *desc; /* description of function */
63};
64
65extern PFCmd CcFuncTbl[]; /* table of available commands */
66extern KEYCMD CcKeyMap[]; /* keymap table, each index into above tbl */
67extern KEYCMD CcAltMap[]; /* Alt keymap table */
68extern KEYCMD CcEmacsMap[]; /* keymap table for Emacs default bindings */
69extern KEYCMD CcViCmdMap[]; /* for Vi command mode defaults */
70extern struct KeyFuncs FuncNames[]; /* string names vs. CcFuncTbl indices */

--- 73 unchanged lines hidden (view full) ---

144EXTERN int Hist_num; /* what point up the history we are at now. */
145EXTERN Char WhichBuf[INBUFSIZE]; /* buffer for which command */
146EXTERN Char *LastWhich; /* points to end of which buffer */
147EXTERN Char *CursWhich; /* points to the cursor point in which buf */
148EXTERN int HistWhich; /* Hist_num is saved in this */
149EXTERN char Expand; /* true if we are expanding a line */
150extern Char HistLit; /* true if history lines are shown literal */
151EXTERN Char CurrentHistLit; /* Literal status of current show history line */
63};
64
65extern PFCmd CcFuncTbl[]; /* table of available commands */
66extern KEYCMD CcKeyMap[]; /* keymap table, each index into above tbl */
67extern KEYCMD CcAltMap[]; /* Alt keymap table */
68extern KEYCMD CcEmacsMap[]; /* keymap table for Emacs default bindings */
69extern KEYCMD CcViCmdMap[]; /* for Vi command mode defaults */
70extern struct KeyFuncs FuncNames[]; /* string names vs. CcFuncTbl indices */

--- 73 unchanged lines hidden (view full) ---

144EXTERN int Hist_num; /* what point up the history we are at now. */
145EXTERN Char WhichBuf[INBUFSIZE]; /* buffer for which command */
146EXTERN Char *LastWhich; /* points to end of which buffer */
147EXTERN Char *CursWhich; /* points to the cursor point in which buf */
148EXTERN int HistWhich; /* Hist_num is saved in this */
149EXTERN char Expand; /* true if we are expanding a line */
150extern Char HistLit; /* true if history lines are shown literal */
151EXTERN Char CurrentHistLit; /* Literal status of current show history line */
152extern int Tty_raw_mode;
152
153/*
154 * These are truly extern
155 */
156extern int MacroLvl;
153
154/*
155 * These are truly extern
156 */
157extern int MacroLvl;
158extern Char *litptr; /* Entries start at offsets divisible by LIT_FACTOR */
159#define LIT_FACTOR 4
160extern int didsetty;
157
158EXTERN Char *KeyMacro[MAXMACROLEVELS];
159
161
162EXTERN Char *KeyMacro[MAXMACROLEVELS];
163
164/* CHAR_DBWIDTH in Display and Vdisplay means the non-first column of a character
165 that is wider than one "regular" position. The cursor should never point
166 in the middle of a multiple-column character. */
160EXTERN Char **Display; /* display buffer seed vector */
161EXTERN int CursorV, /* real cursor vertical (line) */
162 CursorH, /* real cursor horisontal (column) */
163 TermV, /* number of real screen lines
164 * (sizeof(DisplayBuf) / width */
165 TermH; /* screen width */
167EXTERN Char **Display; /* display buffer seed vector */
168EXTERN int CursorV, /* real cursor vertical (line) */
169 CursorH, /* real cursor horisontal (column) */
170 TermV, /* number of real screen lines
171 * (sizeof(DisplayBuf) / width */
172 TermH; /* screen width */
166EXTERN Char **Vdisplay; /* new buffer */
173EXTERN Char **Vdisplay; /* new buffer */
167
168/* Variables that describe terminal ability */
169EXTERN int T_Lines, T_Cols; /* Rows and Cols of the terminal */
170EXTERN Char T_CanIns; /* true if I can insert characters */
171EXTERN Char T_CanDel; /* dito for delete characters */
172EXTERN Char T_Tabs; /* true if tty interface is passing tabs */
173EXTERN Char T_Margin;
174#define MARGIN_AUTO 1 /* term has auto margins */

--- 27 unchanged lines hidden (view full) ---

202# define M_NN 5
203#else /* GSTTY */
204# define M_CONTROL 0
205# define M_LOCAL 1
206# define M_CHAR 2
207# define M_NN 3
208#endif /* TERMIO */
209typedef struct {
174
175/* Variables that describe terminal ability */
176EXTERN int T_Lines, T_Cols; /* Rows and Cols of the terminal */
177EXTERN Char T_CanIns; /* true if I can insert characters */
178EXTERN Char T_CanDel; /* dito for delete characters */
179EXTERN Char T_Tabs; /* true if tty interface is passing tabs */
180EXTERN Char T_Margin;
181#define MARGIN_AUTO 1 /* term has auto margins */

--- 27 unchanged lines hidden (view full) ---

209# define M_NN 5
210#else /* GSTTY */
211# define M_CONTROL 0
212# define M_LOCAL 1
213# define M_CHAR 2
214# define M_NN 3
215#endif /* TERMIO */
216typedef struct {
210 char *t_name;
211 int t_setmask;
212 int t_clrmask;
217 const char *t_name;
218 unsigned int t_setmask;
219 unsigned int t_clrmask;
213} ttyperm_t[NN_IO][M_NN];
214
215extern ttyperm_t ttylist;
216#include "ed.term.h"
217#include "ed.decls.h"
218
220} ttyperm_t[NN_IO][M_NN];
221
222extern ttyperm_t ttylist;
223#include "ed.term.h"
224#include "ed.decls.h"
225
226#ifndef POSIX
227/*
228 * We don't prototype these, cause some systems have them wrong!
229 */
230extern int tgetent __P(());
231extern char *tgetstr __P(());
232extern int tgetflag __P(());
233extern int tgetnum __P(());
234extern char *tgoto __P(());
235# define PUTPURE putpure
236# define PUTRAW putraw
237#else
238extern int tgetent __P((char *, const char *));
239extern char *tgetstr __P((const char *, char **));
240extern int tgetflag __P((const char *));
241extern int tgetnum __P((const char *));
242extern char *tgoto __P((const char *, int, int));
243extern void tputs __P((const char *, int, void (*)(int)));
244# define PUTPURE ((void (*)__P((int))) putpure)
245# define PUTRAW ((void (*)__P((int))) putraw)
246#endif
247
219#endif /* _h_ed */
248#endif /* _h_ed */