Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 2021 05:35:46 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4d9a3cac70ba - stable/13 - tcsh: update to version 6.22.04.
Message-ID:  <202106020535.1525Zkku072637@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d9a3cac70baf51a6737210fd2e52a854641370d

commit 4d9a3cac70baf51a6737210fd2e52a854641370d
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-05-19 21:12:27 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2021-06-02 05:33:36 +0000

    tcsh: update to version 6.22.04.
    
    Merge commit '174d8b60324d7e8754709f7155e13ca95220b48c' into main.
    
    (cherry picked from commit 6560ac57ce879857203bc456cdc3849808dc0700)
---
 contrib/tcsh/Fixes         |   1 +
 contrib/tcsh/ed.chared.c   |  98 ++++++++++++++++----------------
 contrib/tcsh/ed.defns.c    |  10 ++--
 contrib/tcsh/ed.h          |  10 +++-
 contrib/tcsh/ed.init.c     |  48 ++++++++--------
 contrib/tcsh/ed.inputl.c   |  20 +++----
 contrib/tcsh/ed.refresh.c  |  16 +++---
 contrib/tcsh/ed.screen.c   |  18 +++---
 contrib/tcsh/ed.term.c     |  34 ++++++------
 contrib/tcsh/ed.term.h     |   6 +-
 contrib/tcsh/ed.xmap.c     |  10 ++--
 contrib/tcsh/gethost.c     |   8 +--
 contrib/tcsh/glob.c        |  18 +++---
 contrib/tcsh/glob.h        |   2 +-
 contrib/tcsh/ma.setp.c     |   4 +-
 contrib/tcsh/mi.termios.c  |   2 +-
 contrib/tcsh/mi.wait.h     |   2 +-
 contrib/tcsh/patchlevel.h  |   4 +-
 contrib/tcsh/sh.c          | 100 ++++++++++++++++-----------------
 contrib/tcsh/sh.char.c     | 136 ++++++++++++++++++++++-----------------------
 contrib/tcsh/sh.char.h     |   2 +-
 contrib/tcsh/sh.decls.h    |  14 ++---
 contrib/tcsh/sh.dir.c      |  44 +++++++--------
 contrib/tcsh/sh.dol.c      |  10 ++--
 contrib/tcsh/sh.err.c      |   2 +-
 contrib/tcsh/sh.exec.c     |  10 ++--
 contrib/tcsh/sh.exp.c      |  44 +++++++--------
 contrib/tcsh/sh.file.c     |   2 +-
 contrib/tcsh/sh.func.c     |  84 ++++++++++++++--------------
 contrib/tcsh/sh.glob.c     |  18 +++---
 contrib/tcsh/sh.h          |  36 ++++++------
 contrib/tcsh/sh.hist.c     |  46 +++++++++------
 contrib/tcsh/sh.init.c     |  12 ++--
 contrib/tcsh/sh.lex.c      |  16 +++---
 contrib/tcsh/sh.misc.c     |   6 +-
 contrib/tcsh/sh.parse.c    |   1 +
 contrib/tcsh/sh.print.c    |   6 +-
 contrib/tcsh/sh.proc.c     |  28 +++++-----
 contrib/tcsh/sh.sem.c      |  22 ++++----
 contrib/tcsh/sh.set.c      |  16 +++---
 contrib/tcsh/sh.time.c     |   6 +-
 contrib/tcsh/sh.types.h    |  36 ++++++------
 contrib/tcsh/tc.alloc.c    |  18 +++---
 contrib/tcsh/tc.bind.c     |   4 +-
 contrib/tcsh/tc.const.c    |  20 +++----
 contrib/tcsh/tc.decls.h    |   4 +-
 contrib/tcsh/tc.func.c     |  32 +++++------
 contrib/tcsh/tc.os.c       |  52 ++++++++---------
 contrib/tcsh/tc.os.h       |  22 ++++----
 contrib/tcsh/tc.printf.c   |   4 +-
 contrib/tcsh/tc.prompt.c   |  10 ++--
 contrib/tcsh/tc.str.c      |   8 +--
 contrib/tcsh/tc.vers.c     |  22 ++++----
 contrib/tcsh/tc.who.c      |   8 +--
 contrib/tcsh/tcsh.man      |   4 +-
 contrib/tcsh/tw.color.c    |   6 +-
 contrib/tcsh/tw.comp.c     |  14 ++---
 contrib/tcsh/tw.h          |   2 +-
 contrib/tcsh/tw.init.c     |  18 +++---
 contrib/tcsh/tw.parse.c    |  48 ++++++++--------
 contrib/tcsh/vms.termcap.c |   2 +-
 61 files changed, 663 insertions(+), 643 deletions(-)

diff --git a/contrib/tcsh/Fixes b/contrib/tcsh/Fixes
index e539c8241a86..76fdede0c4b7 100644
--- a/contrib/tcsh/Fixes
+++ b/contrib/tcsh/Fixes
@@ -1,3 +1,4 @@
+ 15. V6.22.04 - 20210426
  14. Don't crash with 'bindkey "^0" clear-screen' (Karl Jeacle)
  13. Fix $x:q:h and $x:q:t return the whole string for strings not containing /
  12. V6.22.03 - 20201118
diff --git a/contrib/tcsh/ed.chared.c b/contrib/tcsh/ed.chared.c
index 2b4a63c8ca6e..2a8689713399 100644
--- a/contrib/tcsh/ed.chared.c
+++ b/contrib/tcsh/ed.chared.c
@@ -51,7 +51,7 @@
   hello world
   # echo "h<press key bound to dabbrev-expande>
   # echo "hello<cursor>
-  
+
   The former problem could be solved with minor modifications of c_preword()
   and c_endword(). The latter, however, required a significant rewrite of
   c_preword(), since quoted strings must be parsed from start to end to
@@ -207,9 +207,9 @@ c_delafter(int num)
     }
 #ifdef notdef
     else {
-	/* 
+	/*
 	 * XXX: We don't want to do that. In emacs mode overwrite should be
-	 * sticky. I am not sure how that affects vi mode 
+	 * sticky. I am not sure how that affects vi mode
 	 */
 	inputmode = MODE_INSERT;
     }
@@ -269,7 +269,7 @@ c_preword(Char *p, Char *low, int n, Char *delim)
       new = c_endword(prev-1, p, 1, delim); /* Skip to next non-word char */
       new++;			/* Step away from end of word */
       while (new <= p) {	/* Skip trailing non-word chars */
-	if (!Strchr(delim, *new) || new > prev && new[-1] == (Char)'\\')
+	if (!Strchr(delim, *new) || (new > prev && new[-1] == (Char)'\\'))
 	  break;
 	new++;
       }
@@ -314,12 +314,12 @@ c_prev_word(Char *p, Char *low, int n)
 
     if (!VImode) {
 	while (n--) {
-	    while ((p >= low) && !isword(*p)) 
+	    while ((p >= low) && !isword(*p))
 		p--;
-	    while ((p >= low) && isword(*p)) 
+	    while ((p >= low) && isword(*p))
 		p--;
 	}
-      
+
 	/* cp now points to one character before the word */
 	p++;
 	if (p < low)
@@ -327,7 +327,7 @@ c_prev_word(Char *p, Char *low, int n)
 	/* cp now points where we want it */
 	return(p);
     }
-  
+
     while (n--) {
         int  c_class;
 
@@ -359,9 +359,9 @@ c_next_word(Char *p, Char *high, int n)
 {
     if (!VImode) {
 	while (n--) {
-	    while ((p < high) && !isword(*p)) 
+	    while ((p < high) && !isword(*p))
 		p++;
-	    while ((p < high) && isword(*p)) 
+	    while ((p < high) && isword(*p))
 		p++;
 	}
 	if (p > high)
@@ -399,9 +399,9 @@ static Char *
 c_nexword(Char *p, Char *high, int n)
 {
     while (n--) {
-	while ((p < high) && !Isspace(*p)) 
+	while ((p < high) && !Isspace(*p))
 	    p++;
-	while ((p < high) && Isspace(*p)) 
+	while ((p < high) && Isspace(*p))
 	    p++;
     }
 
@@ -507,7 +507,7 @@ excl_sw:
 	     * Search for a space, tab, or colon.  See if we have a number (as
 	     * in !1234:xyz).  Remember the number.
 	     */
-	    for (i = 0, all_dig = 1; 
+	    for (i = 0, all_dig = 1;
 		 *q != ' ' && *q != '\t' && *q != ':' && q < Cursor; q++) {
 		/*
 		 * PWP: !-4 is a valid history argument too, therefore the test
@@ -739,7 +739,7 @@ c_substitute(void)
      * Start p out one character before the cursor.  Move it backwards looking
      * for white space, the beginning of the line, or a history character.
      */
-    for (p = Cursor - 1; 
+    for (p = Cursor - 1;
 	 p > InputBuf && *p != ' ' && *p != '\t' && *p && *p != HIST; --p)
 	continue;
 
@@ -765,14 +765,14 @@ c_delfini(void)		/* Finish up delete action */
 
     ActionFlag = TCSHOP_NOP;
 
-    if (ActionPos == 0) 
+    if (ActionPos == 0)
 	return;
 
     UndoAction = TCSHOP_INSERT;
 
     if (Cursor > ActionPos) {
 	Size = (int) (Cursor-ActionPos);
-	c_delbefore(Size); 
+	c_delbefore(Size);
 	RefCursor();
     }
     else if (Cursor < ActionPos) {
@@ -1016,7 +1016,7 @@ GetHistLine(void)
 	if (LastChar < InputBuf)
 	    LastChar = InputBuf;
     }
-  
+
 #ifdef KSHVI
     if (VImode)
 	Cursor = InputBuf;
@@ -1082,7 +1082,7 @@ e_inc_search(int dir)
 	}
 	done = redo = 0;
 	*LastChar++ = '\n';
-	for (cp = newdir == F_UP_SEARCH_HIST ? STRbck : STRfwd; 
+	for (cp = newdir == F_UP_SEARCH_HIST ? STRbck : STRfwd;
 	     *cp; *LastChar++ = *cp++)
 	    continue;
 	*LastChar++ = pchar;
@@ -1128,7 +1128,7 @@ e_inc_search(int dir)
 	case F_DELPREV:
 	    if (patbuf.len > 1)
 		done++;
-	    else 
+	    else
 		SoundBeep();
 	    break;
 
@@ -1162,7 +1162,7 @@ e_inc_search(int dir)
 			break;
 		    }
 		break;
-	    
+
 	    default:		/* Terminate and execute cmd */
 		endcmd[0] = ch;
 		PushMacro(endcmd);
@@ -1253,7 +1253,7 @@ e_inc_search(int dir)
 	}
 	if (done || ret != CC_NORM)
 	    return(ret);
-	    
+
     }
 
 }
@@ -1359,7 +1359,7 @@ v_search(int dir)
     cleanup_until(&tmpbuf);
     LastCmd = (KEYCMD) dir; /* avoid c_hsetpat */
     Cursor = LastChar = InputBuf;
-    if ((dir == F_UP_SEARCH_HIST ? e_up_search_hist(0) : 
+    if ((dir == F_UP_SEARCH_HIST ? e_up_search_hist(0) :
 				   e_down_search_hist(0)) == CC_ERROR) {
 	Refresh();
 	return(CC_ERROR);
@@ -1472,7 +1472,7 @@ e_insert(Char c)
     else {
 	if (inputmode != MODE_INSERT) {
 	    int i;
-	    for (i = 0; i < Argument; i++) 
+	    for (i = 0; i < Argument; i++)
 		UndoBuf[UndoSize++] = Cursor[i];
 
 	    UndoBuf[UndoSize] = '\0';
@@ -1948,7 +1948,7 @@ e_down_search_hist(Char c)
 #ifdef SDEBUG
 	xprintf("Comparing with \"%S\"\n", hl);
 #endif
-	if ((Strncmp(hl, InputBuf, (size_t) (LastChar - InputBuf)) || 
+	if ((Strncmp(hl, InputBuf, (size_t) (LastChar - InputBuf)) ||
 	     hl[LastChar-InputBuf]) && c_hmatch(hl))
 	    found = h;
 	if (!HistLit)
@@ -2392,14 +2392,14 @@ e_delwordprev(Char c)
  * Changed the names of some of the ^D family of editor functions to
  * correspond to what they actually do and created new e_delnext_list
  * for completeness.
- *   
+ *
  *   Old names:			New names:
- *   
+ *
  *   delete-char		delete-char-or-eof
  *     F_DELNEXT		  F_DELNEXT_EOF
  *     e_delnext		  e_delnext_eof
  *     edelnxt			  edelnxteof
- *   delete-char-or-eof		delete-char			
+ *   delete-char-or-eof		delete-char
  *     F_DELNEXT_EOF		  F_DELNEXT
  *     e_delnext_eof		  e_delnext
  *     edelnxteof		  edelnxt
@@ -2445,13 +2445,13 @@ e_delnext_eof(Char c)
     USE(c);
     if (Cursor == LastChar) {/* if I'm at the end */
 	if (!VImode) {
-	    if (Cursor == InputBuf) {	
+	    if (Cursor == InputBuf) {
 		/* if I'm also at the beginning */
 		so_write(STReof, 4);/* then do a EOF */
 		flush();
 		return(CC_EOF);
 	    }
-	    else 
+	    else
 		return(CC_ERROR);
 	}
 	else {
@@ -2574,8 +2574,8 @@ e_tobeg(Char c)
     Cursor = InputBuf;
 
     if (VImode) {
-       while (Isspace(*Cursor)) /* We want FIRST non space character */
-	Cursor++;
+	while (Isspace(*Cursor)) /* We want FIRST non space character */
+	    Cursor++;
 	if (ActionFlag & TCSHOP_DELETE) {
 	    c_delfini();
 	    return(CC_REFRESH);
@@ -2761,7 +2761,7 @@ e_wordback(Char c)
 
     Cursor = c_prev_word(Cursor, InputBuf, Argument); /* bounds check */
 
-    if (VImode) 
+    if (VImode)
 	if (ActionFlag & TCSHOP_DELETE) {
 	    c_delfini();
 	    return(CC_REFRESH);
@@ -2892,9 +2892,9 @@ v_csearch_back(Char ch, int count, int tflag)
 
     cp = Cursor;
     while (count--) {
-	if (*cp == ch) 
+	if (*cp == ch)
 	    cp--;
-	while (cp > InputBuf && *cp != ch) 
+	while (cp > InputBuf && *cp != ch)
 	    cp--;
     }
 
@@ -2923,9 +2923,9 @@ v_csearch_fwd(Char ch, int count, int tflag)
 
     cp = Cursor;
     while (count--) {
-	if (*cp == ch) 
+	if (*cp == ch)
 	    cp++;
-	while (cp < LastChar && *cp != ch) 
+	while (cp < LastChar && *cp != ch)
 	    cp++;
     }
 
@@ -2955,21 +2955,21 @@ v_action(int c)
     if (ActionFlag == TCSHOP_DELETE) {
 	ActionFlag = TCSHOP_NOP;
 	ActionPos = 0;
-	
+
 	UndoSize = 0;
 	kp = UndoBuf;
 	for (cp = InputBuf; cp < LastChar; cp++) {
 	    *kp++ = *cp;
 	    UndoSize++;
 	}
-		
+
 	UndoAction = TCSHOP_INSERT;
 	UndoPtr  = InputBuf;
 	LastChar = InputBuf;
 	Cursor   = InputBuf;
 	if (c & TCSHOP_INSERT)
 	    c_alternativ_key_map(0);
-	    
+
 	return(CC_REFRESH);
     }
 #ifdef notdef
@@ -3359,7 +3359,7 @@ e_cleardisp(Char c)
 /*ARGSUSED*/
 CCRETVAL
 e_tty_int(Char c)
-{			
+{
     USE(c);
 #if defined(_MINIX) || defined(WINNT_NATIVE)
     /* SAK PATCH: erase all of current line, start again */
@@ -3398,9 +3398,9 @@ e_stuff_char(Char c)
      if (was_raw)
 	 (void) Rawmode();
      return(e_redisp(c));
-#else /* !TIOCSTI */  
+#else /* !TIOCSTI */
      return(CC_ERROR);
-#endif /* !TIOCSTI */  
+#endif /* !TIOCSTI */
 }
 
 /*ARGSUSED*/
@@ -3538,7 +3538,7 @@ e_copyprev(Char c)
 
     oldc = Cursor;
     /* does a bounds check */
-    cp = c_prev_word(Cursor, InputBuf, Argument);	
+    cp = c_prev_word(Cursor, InputBuf, Argument);
 
     c_insert((int)(oldc - cp));
     for (dp = oldc; cp < oldc && dp < LastChar; cp++)
@@ -3569,7 +3569,7 @@ e_load_average(Char c)
      * Here we pass &c to the ioctl because some os's (NetBSD) expect it
      * there even if they don't use it. (lukem@netbsd.org)
      */
-    if (ioctl(SHIN, TIOCSTAT, (ioctl_t) &c) < 0) 
+    if (ioctl(SHIN, TIOCSTAT, (ioctl_t) &c) < 0)
 #endif
 	xprintf("%s", CGETS(5, 1, "Load average unavailable\n"));
     return(CC_REFRESH);
@@ -3707,7 +3707,7 @@ v_rchar_fwd(Char c)
     if (srch_char == 0)
 	return CC_ERROR;
 
-    return srch_dir == CHAR_FWD ? v_csearch_fwd(srch_char, Argument, 0) : 
+    return srch_dir == CHAR_FWD ? v_csearch_fwd(srch_char, Argument, 0) :
 			          v_csearch_back(srch_char, Argument, 0);
 }
 
@@ -3719,7 +3719,7 @@ v_rchar_back(Char c)
     if (srch_char == 0)
 	return CC_ERROR;
 
-    return srch_dir == CHAR_BACK ? v_csearch_fwd(srch_char, Argument, 0) : 
+    return srch_dir == CHAR_BACK ? v_csearch_fwd(srch_char, Argument, 0) :
 			           v_csearch_back(srch_char, Argument, 0);
 }
 
@@ -3747,7 +3747,7 @@ v_undo(Char c)
 
 	LastChar -= UndoSize;
 	Cursor   =  UndoPtr;
-	
+
 	UndoAction = TCSHOP_INSERT;
 	break;
 
@@ -3816,12 +3816,12 @@ v_rsrch_back(Char c)
 {
     USE(c);
     if (patbuf.len == 0) return(CC_ERROR);
-    return(v_repeat_srch(searchdir == F_UP_SEARCH_HIST ? 
+    return(v_repeat_srch(searchdir == F_UP_SEARCH_HIST ?
 			 F_DOWN_SEARCH_HIST : F_UP_SEARCH_HIST));
 }
 
 #ifndef WINNT_NATIVE
-/* Since ed.defns.h  is generated from ed.defns.c, these empty 
+/* Since ed.defns.h  is generated from ed.defns.c, these empty
    functions will keep the F_NUM_FNS consistent
  */
 CCRETVAL
diff --git a/contrib/tcsh/ed.defns.c b/contrib/tcsh/ed.defns.c
index 02ae764510af..f4030b530f6d 100644
--- a/contrib/tcsh/ed.defns.c
+++ b/contrib/tcsh/ed.defns.c
@@ -245,7 +245,7 @@ PFCmd   CcFuncTbl[] = {		/* table of available commands */
 #define		F_PATH_NORM	103
     e_delnext_eof,		/* added by mtk@ari.ncl.omron.co.jp (920818) */
 #define		F_DELNEXT_EOF	104
-    e_stuff_char,		
+    e_stuff_char,
 #define		F_STUFF_CHAR	105
     e_complete_all,
 #define		F_COMPLETE_ALL	106
@@ -899,8 +899,8 @@ KEYCMD  CcViCmdMap[] = {
     F_UNASSIGNED,		/* ) */
     F_EXPAND_GLOB,		/* * */
     F_DOWN_HIST,		/* + */
-    V_RCHAR_BACK,		/* , */	
-    F_UP_HIST,			/* - */	
+    V_RCHAR_BACK,		/* , */
+    F_UP_HIST,			/* - */
     F_UNASSIGNED,		/* . */
     V_DSH_META,			/* / */
     V_ZERO,			/* 0 */
@@ -1416,13 +1416,13 @@ editinit(void)
     f++;
     f->name = "normalize-path";
     f->func = F_PATH_NORM;
-    f->desc = CSAVS(3, 53, 
+    f->desc = CSAVS(3, 53,
 		    "Expand pathnames, eliminating leading .'s and ..'s");
 
     f++;
     f->name = "normalize-command";
     f->func = F_COMMAND_NORM;
-    f->desc = CSAVS(3, 54, 
+    f->desc = CSAVS(3, 54,
 		    "Expand commands to the resulting pathname or alias");
 
     f++;
diff --git a/contrib/tcsh/ed.h b/contrib/tcsh/ed.h
index 60d061a80bda..50990dee92b6 100644
--- a/contrib/tcsh/ed.h
+++ b/contrib/tcsh/ed.h
@@ -219,7 +219,7 @@ EXTERN char T_HasMeta;		/* true if we have a meta key */
 # define M_CHAR		2
 # define M_NN		3
 #endif /* TERMIO */
-typedef struct { 
+typedef struct {
     const char *t_name;
     unsigned int  t_setmask;
     unsigned int  t_clrmask;
@@ -247,8 +247,12 @@ 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)
+static __inline void PUTPURE(int c) {
+    (void)putpure(c);
+}
+static __inline void PUTRAW(int c) {
+    (void)putraw(c);
+}
 #endif
 
 #endif /* _h_ed */
diff --git a/contrib/tcsh/ed.init.c b/contrib/tcsh/ed.init.c
index f90028499f53..4781f15a5ea5 100644
--- a/contrib/tcsh/ed.init.c
+++ b/contrib/tcsh/ed.init.c
@@ -41,7 +41,7 @@ int     Tty_raw_mode = 0;	/* Last tty change was to raw mode */
 int     MacroLvl = -1;		/* pointer to current macro nesting level; */
 				/* (-1 == none) */
 static int Tty_quote_mode = 0;	/* Last tty change was to quote mode */
-static unsigned char vdisable;	/* The value of _POSIX_VDISABLE from 
+static unsigned char vdisable;	/* The value of _POSIX_VDISABLE from
 				 * pathconf(2) */
 
 int     Tty_eight_bit = -1;	/* does the tty handle eight bits */
@@ -56,8 +56,8 @@ static ttydata_t extty, edtty, tstty;
 #define uc unsigned char
 static unsigned char ttychars[NN_IO][C_NCC] = {
     {
-	(uc)CINTR,	(uc)CQUIT, 	 (uc)CERASE, 	   (uc)CKILL,	
-	(uc)CEOF, 	(uc)CEOL, 	 (uc)CEOL2, 	   (uc)CSWTCH, 
+	(uc)CINTR,	(uc)CQUIT, 	 (uc)CERASE, 	   (uc)CKILL,
+	(uc)CEOF, 	(uc)CEOL, 	 (uc)CEOL2, 	   (uc)CSWTCH,
 	(uc)CDSWTCH,	(uc)CERASE2,	 (uc)CSTART, 	   (uc)CSTOP,
 	(uc)CWERASE, 	(uc)CSUSP, 	 (uc)CDSUSP, 	   (uc)CREPRINT,
 	(uc)CDISCARD, 	(uc)CLNEXT,	 (uc)CSTATUS,	   (uc)CPAGE,
@@ -65,15 +65,15 @@ static unsigned char ttychars[NN_IO][C_NCC] = {
 	(uc)CTIME
     },
     {
-	CINTR, 		 CQUIT, 	  CERASE, 	   CKILL, 
-	_POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 
-	_POSIX_VDISABLE, CERASE2,	  CSTART, 	   CSTOP, 	   
-	_POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 
-	CDISCARD, 	 _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 
+	CINTR, 		 CQUIT, 	  CERASE, 	   CKILL,
+	_POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE,
+	_POSIX_VDISABLE, CERASE2,	  CSTART, 	   CSTOP,
+	_POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE,
+	CDISCARD, 	 _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE,
 	_POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 1,
 	0
     },
-    {	
+    {
 	0,		 0,		  0,		   0,
 	0,		 0,		  0,		   0,
 	0,		 0,		  0,		   0,
@@ -136,7 +136,7 @@ ed_set_tty_eight_bit(void)
     Tty_eight_bit = tty_geteightbit(&extty);
 }
 
-			
+
 int
 ed_Setup(int rst)
 {
@@ -148,12 +148,12 @@ ed_Setup(int rst)
 
 #if defined(POSIX) && defined(_PC_VDISABLE) && !defined(BSD4_4) && \
     !defined(WINNT_NATIVE)
-    { 
+    {
 	long pcret;
 
 	if ((pcret = fpathconf(SHTTY, _PC_VDISABLE)) == -1L)
 	    vdisable = (unsigned char) _POSIX_VDISABLE;
-	else 
+	else
 	    vdisable = (unsigned char) pcret;
 	if (vdisable != (unsigned char) _POSIX_VDISABLE && rst != 0)
 	    for (rst = 0; rst < C_NCC; rst++) {
@@ -166,7 +166,7 @@ ed_Setup(int rst)
 #else /* ! POSIX || !_PC_VDISABLE || BSD4_4 || WINNT_NATIVE */
     vdisable = (unsigned char) _POSIX_VDISABLE;
 #endif /* POSIX && _PC_VDISABLE && !BSD4_4 && !WINNT_NATIVE */
-	
+
     if ((imode = adrof(STRinputmode)) != NULL && imode->vec != NULL) {
 	if (!Strcmp(*(imode->vec), STRinsert))
 	    inputmode = MODE_INSERT;
@@ -236,11 +236,11 @@ ed_Setup(int rst)
 	    /*
 	     * Don't affect CMIN and CTIME for the editor mode
 	     */
-	    for (rst = 0; rst < C_NCC - 2; rst++) 
+	    for (rst = 0; rst < C_NCC - 2; rst++)
 		if (ttychars[TS_IO][rst] != vdisable &&
 		    ttychars[ED_IO][rst] != vdisable)
 		    ttychars[ED_IO][rst] = ttychars[TS_IO][rst];
-	    for (rst = 0; rst < C_NCC; rst++) 
+	    for (rst = 0; rst < C_NCC; rst++)
 		if (ttychars[TS_IO][rst] != vdisable &&
 		    ttychars[EX_IO][rst] != vdisable)
 		    ttychars[EX_IO][rst] = ttychars[TS_IO][rst];
@@ -303,7 +303,7 @@ ed_Init(void)
 
 #ifdef DEBUG_EDIT
     CheckMaps();		/* do a little error checking on key maps */
-#endif 
+#endif
 
     if (ed_Setup(0) == -1)
 	return;
@@ -355,7 +355,7 @@ ed_Init(void)
 #endif /* WINNT_NATIVE */
 }
 
-/* 
+/*
  * Check and re-init the line. set the terminal into 1 char at a time mode.
  */
 int
@@ -416,12 +416,12 @@ Rawmode(void)
 
     if (tty_cooked_mode(&tstty)) {
 	/*
-	 * re-test for some things here (like maybe the user typed 
+	 * re-test for some things here (like maybe the user typed
 	 * "stty -tabs"
 	 */
 	if (tty_gettabs(&tstty) == 0)
 	    T_Tabs = 0;
-	else 
+	else
 	    T_Tabs = CanWeTab();
 
 # if defined(POSIX) || defined(TERMIO)
@@ -466,7 +466,7 @@ Rawmode(void)
 
 	if (T_Tabs)		/* order of &= and |= is important to XTABS */
 	    extty.d_t.sg_flags &= ~XTABS;
-	else 
+	else
 	    extty.d_t.sg_flags |= XTABS;
 
 	extty.d_lb = tstty.d_lb;
@@ -475,13 +475,13 @@ Rawmode(void)
 
 	edtty.d_t.sg_flags = extty.d_t.sg_flags;
 	if (T_Tabs) {	/* order of &= and |= is important to XTABS */
-	    edtty.d_t.sg_flags &= 
+	    edtty.d_t.sg_flags &=
 		    ~(ttylist[ED_IO][M_CONTROL].t_clrmask|XTABS);
 	    edtty.d_t.sg_flags |=   ttylist[ED_IO][M_CONTROL].t_setmask;
 	}
 	else {
 	    edtty.d_t.sg_flags &= ~ttylist[ED_IO][M_CONTROL].t_clrmask;
-	    edtty.d_t.sg_flags |= 
+	    edtty.d_t.sg_flags |=
 		    (ttylist[ED_IO][M_CONTROL].t_setmask|XTABS);
 	}
 
@@ -503,7 +503,7 @@ Rawmode(void)
 	    for (i = 0; i < C_NCC; i++)
 		if (ttychars[TS_IO][i] != ttychars[EX_IO][i])
 		    break;
-		
+
 	    if (i != C_NCC || didsetty) {
 		didsetty = 0;
 		/*
@@ -605,7 +605,7 @@ Load_input_line(void)
 #ifdef SUNOS4
     long chrs = 0;
 #else /* !SUNOS4 */
-    /* 
+    /*
      * *Everyone* else has an int, but SunOS wants long!
      * This breaks where int != long (alpha)
      */
diff --git a/contrib/tcsh/ed.inputl.c b/contrib/tcsh/ed.inputl.c
index 8d4c341631b0..35f21a4e95a8 100644
--- a/contrib/tcsh/ed.inputl.c
+++ b/contrib/tcsh/ed.inputl.c
@@ -114,7 +114,7 @@ Inputl(void)
 # ifdef SUNOS4
 	long chrs = 0;
 # else /* !SUNOS4 */
-	/* 
+	/*
 	 * *Everyone* else has an int, but SunOS wants long!
 	 * This breaks where int != long (alpha)
 	 */
@@ -384,7 +384,7 @@ Inputl(void)
 	    }
 	    if (InputBuf[curlen] && rotate) {
 		newlen = (int) (LastChar - InputBuf);
-		for (idx = (int) (Cursor - InputBuf); 
+		for (idx = (int) (Cursor - InputBuf);
 		     idx <= newlen; idx++)
 			InputBuf[idx - newlen + curlen] =
 			InputBuf[idx];
@@ -439,13 +439,13 @@ Inputl(void)
 		    else
 			SoundBeep();
 		    /*
-		     * Addition by David C Lawrence <tale@pawl.rpi.edu>: If an 
-		     * attempted completion is ambiguous, list the choices.  
-		     * (PWP: this is the best feature addition to tcsh I have 
+		     * Addition by David C Lawrence <tale@pawl.rpi.edu>: If an
+		     * attempted completion is ambiguous, list the choices.
+		     * (PWP: this is the best feature addition to tcsh I have
 		     * seen in many months.)
 		     */
-		    if (autol && autol->vec != NULL && 
-			(Strcmp(*(autol->vec), STRambiguous) != 0 || 
+		    if (autol && autol->vec != NULL &&
+			(Strcmp(*(autol->vec), STRambiguous) != 0 ||
 					 expnum == Cursor - InputBuf)) {
 			if (adrof(STRhighlight) && MarkIsSet) {
 			    /* clear highlighting before showing completions */
@@ -477,7 +477,7 @@ Inputl(void)
 	case CC_LIST_ALL:
 	    if (InputBuf[curlen] && rotate) {
 		newlen = (int) (LastChar - InputBuf);
-		for (idx = (int) (Cursor - InputBuf); 
+		for (idx = (int) (Cursor - InputBuf);
 		     idx <= newlen; idx++)
 			InputBuf[idx - newlen + curlen] =
 			InputBuf[idx];
@@ -667,7 +667,7 @@ RunCommand(Char *str)
 int
 GetCmdChar(Char ch)
 {
-#ifndef WINNT_NATIVE // We use more than 256 for various extended keys 
+#ifndef WINNT_NATIVE // We use more than 256 for various extended keys
     wint_t c = ch & CHAR;
 #else
     wint_t c = ch;
@@ -725,7 +725,7 @@ GetNextCommand(KEYCMD *cmdnum, Char *ch)
 		break;
 	    }
 	}
-	if (!AltKeyMap) 
+	if (!AltKeyMap)
 	    CurrentKeyMap = CcKeyMap;
     }
     *cmdnum = cmd;
diff --git a/contrib/tcsh/ed.refresh.c b/contrib/tcsh/ed.refresh.c
index 3619e1144bf6..c1f1cfb0b16f 100644
--- a/contrib/tcsh/ed.refresh.c
+++ b/contrib/tcsh/ed.refresh.c
@@ -76,7 +76,7 @@ dprintstr(char *str, const Char *f, const Char *t)
 #endif /* DEBUG_UPDATE */
 
 /* reprintf():
- *	Print to $DEBUGTTY, so that we can test editing on one pty, and 
+ *	Print to $DEBUGTTY, so that we can test editing on one pty, and
  *      print debugging stuff on another. Don't interrupt the shell while
  *	debugging cause you'll mangle up the file descriptors!
  */
@@ -461,7 +461,7 @@ GotoBottom(void)
     MoveToLine(OldvcV);
 }
 
-#endif 
+#endif
 
 void
 PastBottom(void)
@@ -602,7 +602,7 @@ update_line(Char *old, Char *new, int cur_line)
      */
     o = Strend(o);
 
-    /* 
+    /*
      * Remove any trailing blanks off of the end, being careful not to
      * back up past the beginning.
      */
@@ -628,7 +628,7 @@ update_line(Char *old, Char *new, int cur_line)
     }
     ne = n;
     *ne = (Char) 0;
-  
+
     /*
      * if no diff, continue to next line of redraw
      */
@@ -824,14 +824,14 @@ update_line(Char *old, Char *new, int cur_line)
 
     /*
      * at this point we have something like this:
-     * 
+     *
      * /old                  /ofd    /osb               /ose    /ols     /oe
      * v.....................v       v..................v       v........v
      * eddie> Oh, my fredded gruntle-buggy is to me, as foo var lurgid as
      * eddie> Oh, my fredded quiux buggy is to me, as gruntle-lurgid as
-     * ^.....................^     ^..................^       ^........^ 
+     * ^.....................^     ^..................^       ^........^
      * \new                  \nfd  \nsb               \nse     \nls    \ne
-     * 
+     *
      * fx is the difference in length between the the chars between nfd and
      * nsb, and the chars between ofd and osb, and is thus the number of
      * characters to delete if < 0 (new is shorter than old, as above),
@@ -1040,7 +1040,7 @@ update_line(Char *old, Char *new, int cur_line)
 #ifdef DEBUG_UPDATE
 	    reprintf("with stuff to keep at end\r\n");
 #endif /* DEBUG_UPDATE */
-	    /* 
+	    /*
 	     * We have to recalculate fx here because we set it
 	     * to zero above as a flag saying that we hadn't done
 	     * an early first insert.
diff --git a/contrib/tcsh/ed.screen.c b/contrib/tcsh/ed.screen.c
index e8b351fe800d..4c5339b2c307 100644
--- a/contrib/tcsh/ed.screen.c
+++ b/contrib/tcsh/ed.screen.c
@@ -135,7 +135,7 @@ static const struct {
 #define	T_fs	12
 #define	T_ho	13
 #define	T_ic	14
-#define	T_im	15 
+#define	T_im	15
 #define	T_ip	16
 #define	T_kd	17
 #define T_kh    18
@@ -477,7 +477,7 @@ SetTC(char *what, char *how)
 	    break;
 
     if (tv->name != NULL) {
-	if (tv == &tval[T_pt] || tv == &tval[T_km] || 
+	if (tv == &tval[T_pt] || tv == &tval[T_km] ||
 	    tv == &tval[T_am] || tv == &tval[T_xn]) {
 	    if (strcmp(how, "yes") == 0)
 		tv->val = 1;
@@ -491,7 +491,7 @@ SetTC(char *what, char *how)
 	    T_HasMeta = Val(T_km);
 	    T_Margin = Val(T_am) ? MARGIN_AUTO : 0;
 	    T_Margin |= Val(T_xn) ? MARGIN_MAGIC : 0;
-	    if (tv == &tval[T_am] || tv == &tval[T_xn]) 
+	    if (tv == &tval[T_am] || tv == &tval[T_xn])
 		ChangeSize(Val(T_li), Val(T_co));
 	    return;
 	}
@@ -593,7 +593,7 @@ EchoTC(Char **v)
 	goto end_flush;
     }
 
-    /* 
+    /*
      * Try to use our local definition first
      */
     scap = NULL;
@@ -894,8 +894,8 @@ BindArrowKeys(void)
 	    /*
 	     * Assign the arrow keys only if:
 	     *
-	     * 1. They are multi-character arrow keys and the user 
-	     *    has not re-assigned the leading character, or 
+	     * 1. They are multi-character arrow keys and the user
+	     *    has not re-assigned the leading character, or
 	     *    has re-assigned the leading character to be F_XKEY
 	     * 2. They are single arrow keys pointing to an unassigned key.
 	     */
@@ -1012,7 +1012,7 @@ CanWeTab(void)
 
 /* move to line <where> (first line == 0) as efficiently as possible; */
 void
-MoveToLine(int where)		
+MoveToLine(int where)
 {
     int     del;
 
@@ -1048,7 +1048,7 @@ MoveToLine(int where)
 		    del = 0;
 		}
 		else {
-		    for ( ; del > 0; del--) 
+		    for ( ; del > 0; del--)
 			(void) putraw('\n');
 		    CursorH = 0;	/* because the \n will become \r\n */
 		}
@@ -1415,7 +1415,7 @@ GetTermCaps(void)
     ptr = getenv("TERM");
 
 #ifdef apollo
-    /* 
+    /*
      * If we are on a pad, we pretend that we are dumb. Otherwise the termcap
      * library will put us in a weird screen mode, thinking that we are going
      * to use curses
diff --git a/contrib/tcsh/ed.term.c b/contrib/tcsh/ed.term.c
index b0bea10ab1d6..04aefd05bd78 100644
--- a/contrib/tcsh/ed.term.c
+++ b/contrib/tcsh/ed.term.c
@@ -35,7 +35,7 @@
 #include "ed.h"
 
 int didsetty = 0;
-ttyperm_t ttylist = {   
+ttyperm_t ttylist = {
     {
 #if defined(POSIX) || defined(TERMIO)
 	{ "iflag:", ICRNL, (INLCR|IGNCR) },
@@ -64,7 +64,7 @@ ttyperm_t ttylist = {
 	{ "chars:", (C_SH(C_MIN)|C_SH(C_TIME)|C_SH(C_SWTCH)|C_SH(C_DSWTCH)|
 		     C_SH(C_WERASE)|C_SH(C_REPRINT)|C_SH(C_SUSP)|C_SH(C_DSUSP)|
 		     C_SH(C_EOF)|C_SH(C_EOL)|C_SH(C_DISCARD)|C_SH(C_PGOFF)|
-		     C_SH(C_KILL2)|C_SH(C_PAGE)|C_SH(C_STATUS)|C_SH(C_LNEXT)), 
+		     C_SH(C_KILL2)|C_SH(C_PAGE)|C_SH(C_STATUS)|C_SH(C_LNEXT)),
 		     0 }
     },
     {
@@ -317,7 +317,7 @@ static const struct tcshmodes {
 # endif /* LCASE */
 # ifdef	ECHO
     { "echo",	ECHO,	M_CONTROL },
-# endif /* ECHO */	
+# endif /* ECHO */
 # ifdef	CRMOD
     { "crmod",	CRMOD,	M_CONTROL },
 # endif /* CRMOD */
@@ -432,7 +432,7 @@ static const struct tcshmodes {
 # endif /* LCRTKIL */
 # ifdef	LPASS8
     { "lpass8",	LPASS8,	M_LOCAL },
-# endif /* LPASS8 */	
+# endif /* LPASS8 */
 # ifdef	LCTLECH
     { "lctlech",LCTLECH,M_LOCAL },
 # endif /* LCTLECH */
@@ -510,7 +510,7 @@ static const struct tcshmodes {
 # if defined(VPGOFF) || defined(TIOCGPAGE)
     { "pgoff",		C_SH(C_PGOFF), 	M_CHAR },
 # endif /* VPGOFF */
-# if defined(VKILL2) 
+# if defined(VKILL2)
     { "kill2",		C_SH(C_KILL2), 	M_CHAR },
 # endif /* VKILL2 */
 # if defined(VBRK) || defined(TIOCGETC)
@@ -528,7 +528,7 @@ static const struct tcshmodes {
 /*
  * If EAGAIN and/or EWOULDBLOCK are defined, we can't just return -1 in all
  * situations where ioctl() does.
- * 
+ *
  * On AIX 4.1.5 (and presumably some other versions and OSes), as you
  * perform the manual test suite in the README, if you 'bg' vi immediately
  * after suspending it, all is well, but if you wait a few seconds,
@@ -537,7 +537,7 @@ static const struct tcshmodes {
  * 0, causing bgetc() to return -1, causing readc() to set doneinp to 1,
  * causing process() to break out of the main loop, causing tcsh to exit
  * prematurely.
- * 
+ *
  * If ioctl()'s errno is EAGAIN/EWOULDBLOCK ("Resource temporarily
  * unavailable"), apparently the tty is being messed with by the OS and we
  * need to try again.  In my testing, ioctl() was never called more than
@@ -595,7 +595,7 @@ dosetty(Char **v, struct command *t)
     cleanup_push(cmdname, xfree);
     setname(cmdname);
 
-    while (v && *v && v[0][0] == '-' && v[0][2] == '\0') 
+    while (v && *v && v[0][0] == '-' && v[0][2] == '\0')
 	switch (v[0][1]) {
 	case 'a':
*** 3800 LINES SKIPPED ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106020535.1525Zkku072637>