diff options
author | mp <mp@FreeBSD.org> | 2007-03-11 22:33:41 +0000 |
---|---|---|
committer | mp <mp@FreeBSD.org> | 2007-03-11 22:33:41 +0000 |
commit | a40980339b13e3b506c2317b5b4864127039eb2c (patch) | |
tree | 34aefea92d30b614247ef1f2671f2362f4761785 /contrib/tcsh/ed.h | |
parent | 32837fb336d4709f0a121130a3a78f29be0db5ed (diff) | |
download | FreeBSD-src-a40980339b13e3b506c2317b5b4864127039eb2c.zip FreeBSD-src-a40980339b13e3b506c2317b5b4864127039eb2c.tar.gz |
Import of tcsh-6.15.00
Diffstat (limited to 'contrib/tcsh/ed.h')
-rw-r--r-- | contrib/tcsh/ed.h | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/contrib/tcsh/ed.h b/contrib/tcsh/ed.h index fba6299..10e519c 100644 --- a/contrib/tcsh/ed.h +++ b/contrib/tcsh/ed.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/ed.h,v 3.44 2005/03/05 03:20:15 christos Exp $ */ +/* $Header: /p/tcsh/cvsroot/tcsh/ed.h,v 3.49 2006/08/23 15:03:13 christos Exp $ */ /* * ed.h: Editor declarations and globals */ @@ -37,7 +37,6 @@ # define EXTERN extern #endif -#define TABSIZE 8 /* usually 8 spaces/tab */ #define MAXMACROLEVELS 10 /* max number of nested kbd macros */ #ifndef WINNT_NATIVE @@ -54,7 +53,7 @@ #define KEYCMD unsigned char /* size needed to index into CcFuncTbl */ /* Must be unsigned */ -typedef CCRETVAL(*PFCmd) __P((Char)); /* pointer to function returning CCRETVAL */ +typedef CCRETVAL(*PFCmd) (Char); /* pointer to function returning CCRETVAL */ struct KeyFuncs { /* for the "bind" shell command */ const char *name; /* function name for bind command */ @@ -100,7 +99,7 @@ typedef struct { int len; } CStr; -typedef union Xmapval { /* value passed to the Xkey routines */ +typedef union { /* value passed to the Xkey routines */ KEYCMD cmd; CStr str; } XmapVal; @@ -118,13 +117,14 @@ EXTERN KEYCMD *CurrentKeyMap; /* current command key map */ EXTERN int inputmode; /* insert, replace, replace1 mode */ EXTERN Char GettingInput; /* true if getting an input line (mostly) */ EXTERN Char NeedsRedraw; /* for editor and twenex error messages */ -EXTERN Char InputBuf[INBUFSIZE]; /* the real input data */ +EXTERN Char InputBuf[INBUFSIZE]; /* the real input data *//*FIXBUF*/ EXTERN Char *LastChar, *Cursor; /* point to the next open space */ EXTERN Char *InputLim; /* limit of size of InputBuf */ EXTERN Char MetaNext; /* flags for ^V and ^[ functions */ EXTERN Char AltKeyMap; /* Using alternative command map (for vi mode) */ EXTERN Char VImode; /* true if running in vi mode (PWP 6-27-88) */ EXTERN Char *Mark; /* the emacs "mark" (dot is Cursor) */ +EXTERN char MarkIsSet; /* true if the mark has been set explicitly */ EXTERN Char DoingArg; /* true if we have an argument */ EXTERN int Argument; /* "universal" argument value */ EXTERN KEYCMD LastCmd; /* previous command executed */ @@ -134,18 +134,20 @@ EXTERN int KillRingLen; /* current length of kill ring */ EXTERN int KillPos; /* points to next kill */ EXTERN int YankPos; /* points to next yank */ -EXTERN Char UndoBuf[INBUFSIZE]; +EXTERN Char UndoBuf[INBUFSIZE];/*FIXBUF*/ EXTERN Char *UndoPtr; EXTERN int UndoSize; EXTERN int UndoAction; -EXTERN Char HistBuf[INBUFSIZE]; /* history buffer */ -EXTERN Char *LastHist; /* points to end of history buffer */ +EXTERN struct Strbuf HistBuf; /* = Strbuf_INIT; history buffer */ EXTERN int Hist_num; /* what point up the history we are at now. */ -EXTERN Char WhichBuf[INBUFSIZE]; /* buffer for which command */ -EXTERN Char *LastWhich; /* points to end of which buffer */ -EXTERN Char *CursWhich; /* points to the cursor point in which buf */ -EXTERN int HistWhich; /* Hist_num is saved in this */ +/* buffer for which command and others */ +EXTERN struct Strbuf SavedBuf; /* = Strbuf_INIT; */ +EXTERN size_t LastSaved; /* points to end of saved buffer */ +EXTERN size_t CursSaved; /* points to the cursor point in saved buf */ +EXTERN int HistSaved; /* Hist_num is saved in this */ +EXTERN char RestoreSaved; /* true if SavedBuf should be restored */ +EXTERN int IncMatchLen; /* current match length during incremental search */ EXTERN char Expand; /* true if we are expanding a line */ extern Char HistLit; /* true if history lines are shown literal */ EXTERN Char CurrentHistLit; /* Literal status of current show history line */ @@ -176,14 +178,14 @@ EXTERN Char **Vdisplay; /* new buffer */ EXTERN int T_Lines, T_Cols; /* Rows and Cols of the terminal */ EXTERN Char T_CanIns; /* true if I can insert characters */ EXTERN Char T_CanDel; /* dito for delete characters */ -EXTERN Char T_Tabs; /* true if tty interface is passing tabs */ -EXTERN Char T_Margin; +EXTERN char T_Tabs; /* true if tty interface is passing tabs */ +EXTERN char T_Margin; #define MARGIN_AUTO 1 /* term has auto margins */ #define MARGIN_MAGIC 2 /* concept glitch */ EXTERN speed_t T_Speed; /* Tty input Baud rate */ EXTERN Char T_CanCEOL; /* true if we can clear to end of line */ EXTERN Char T_CanUP; /* true if this term can do reverse linefeen */ -EXTERN Char T_HasMeta; /* true if we have a meta key */ +EXTERN char T_HasMeta; /* true if we have a meta key */ /* note the extra characters in the Strchr() call in this macro */ #define isword(c) (Isalpha(c)||Isdigit(c)||Strchr(word_chars,c)) @@ -227,22 +229,22 @@ extern ttyperm_t ttylist; /* * We don't prototype these, cause some systems have them wrong! */ -extern int tgetent __P(()); -extern char *tgetstr __P(()); -extern int tgetflag __P(()); -extern int tgetnum __P(()); -extern char *tgoto __P(()); +extern int tgetent (); +extern char *tgetstr (); +extern int tgetflag (); +extern int tgetnum (); +extern char *tgoto (); # define PUTPURE putpure # define PUTRAW putraw #else -extern int tgetent __P((char *, const char *)); -extern char *tgetstr __P((const char *, char **)); -extern int tgetflag __P((const char *)); -extern int tgetnum __P((const char *)); -extern char *tgoto __P((const char *, int, int)); -extern void tputs __P((const char *, int, void (*)(int))); -# define PUTPURE ((void (*)__P((int))) putpure) -# define PUTRAW ((void (*)__P((int))) putraw) +extern int tgetent (char *, const char *); +extern char *tgetstr (const char *, char **); +extern int tgetflag (const char *); +extern int tgetnum (const char *); +extern char *tgoto (const char *, int, int); +extern void tputs (const char *, int, void (*)(int)); +# define PUTPURE ((void (*)(int)) putpure) +# define PUTRAW ((void (*)(int)) putraw) #endif #endif /* _h_ed */ |