From: John Marino Date: Wed, 4 Nov 2015 13:23:20 +0000 (+0100) Subject: Reapply local modifications to tcsh source after merge X-Git-Tag: v4.5.0~184 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/028b796b5944fefc418651b9916586184f346231 Reapply local modifications to tcsh source after merge There are no longer modifications to: ed.screen.c gethost.c The previous changes were made upstream. --- diff --git a/contrib/tcsh-6/ed.init.c b/contrib/tcsh-6/ed.init.c index c7dfcce953..f2d4fc338f 100644 --- a/contrib/tcsh-6/ed.init.c +++ b/contrib/tcsh-6/ed.init.c @@ -66,7 +66,7 @@ static unsigned char ttychars[NN_IO][C_NCC] = { (uc)CWERASE, (uc)CSUSP, (uc)CDSUSP, (uc)CREPRINT, (uc)CDISCARD, (uc)CLNEXT, (uc)CSTATUS, (uc)CPAGE, (uc)CPGOFF, (uc)CKILL2, (uc)CBRK, (uc)CMIN, - (uc)CTIME + (uc)CTIME, (uc)CCHECKPT }, { CINTR, CQUIT, CERASE, CKILL, @@ -75,7 +75,7 @@ static unsigned char ttychars[NN_IO][C_NCC] = { _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, CDISCARD, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 1, - 0 + 0, CCHECKPT }, { 0, 0, 0, 0, diff --git a/contrib/tcsh-6/ed.term.c b/contrib/tcsh-6/ed.term.c index 8580007389..85878f6cd1 100644 --- a/contrib/tcsh-6/ed.term.c +++ b/contrib/tcsh-6/ed.term.c @@ -67,7 +67,8 @@ 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_CHECKPT)| + C_SH(C_LNEXT)), 0 } }, { @@ -507,6 +508,9 @@ static const struct tcshmodes { # if defined(VSTATUS) || defined(TIOCGPAGE) { "status", C_SH(C_STATUS), M_CHAR }, # endif /* VSTATUS */ +# if defined(VCHECKPT) || defined(TIOCGPAGE) + { "ckpt", C_SH(C_CHECKPT),M_CHAR }, +# endif /* VCHECKPT */ # if defined(VPAGE) || defined(TIOCGPAGE) { "page", C_SH(C_PAGE), M_CHAR }, # endif /* VPAGE */ @@ -834,6 +838,9 @@ tty_getchar(ttydata_t *td, unsigned char *s) # ifdef VSTATUS s[C_STATUS] = n->c_cc[VSTATUS]; # endif /* VSTATUS */ +# ifdef VCHECKPT + s[C_CHECKPT] = n->c_cc[VCHECKPT]; +# endif /* VCHECKPT */ # ifdef VPAGE s[C_PAGE] = n->c_cc[VPAGE]; # endif /* VPAGE */ @@ -858,6 +865,7 @@ tty_getchar(ttydata_t *td, unsigned char *s) struct ttypagestat *n = &td->d_pc; s[C_STATUS] = n->tps_statc; + s[C_CHECKPT] = n->tps_checkp; s[C_PAGE] = n->tps_pagec; s[C_PGOFF] = n->tps_pgoffc; } @@ -970,6 +978,9 @@ tty_setchar(ttydata_t *td, unsigned char *s) # ifdef VSTATUS n->c_cc[VSTATUS] = s[C_STATUS]; # endif /* VSTATUS */ +# ifdef VCHECKPT + n->c_cc[VCHECKPT] = s[C_CHECKPT]; +# endif /* VCHECKPT */ # ifdef VPAGE n->c_cc[VPAGE] = s[C_PAGE]; # endif /* VPAGE */ diff --git a/contrib/tcsh-6/ed.term.h b/contrib/tcsh-6/ed.term.h index 517af37c1c..2e9308adb1 100644 --- a/contrib/tcsh-6/ed.term.h +++ b/contrib/tcsh-6/ed.term.h @@ -196,6 +196,7 @@ # undef CDISCARD # undef CLNEXT # undef CSTATUS +# undef CCHECKPT # undef CPAGE # undef CPGOFF # undef CKILL2 @@ -283,6 +284,9 @@ #ifndef CSTATUS # define CSTATUS TO_CONTROL('t') #endif /* CSTATUS */ +#ifndef CCHECKPT +# define CCHECKPT TO_CONTROL('e') +#endif /* CCHECKPT */ #ifndef CPAGE # define CPAGE ' ' #endif /* CPAGE */ @@ -422,6 +426,11 @@ # undef VSTATUS # endif /* NUMCC <= VSTATUS */ # endif /* VSTATUS */ +# ifdef VCHECKPT +# if NUMCC <= VCHECKPT +# undef VCHECKPT +# endif /* NUMCC <= VCHECKPT */ +# endif /* VCHECKPT */ # ifdef VPAGE # if NUMCC <= VPAGE # undef VPAGE @@ -491,7 +500,8 @@ #define C_BRK 22 #define C_MIN 23 #define C_TIME 24 -#define C_NCC 25 +#define C_CHECKPT 25 +#define C_NCC 26 #define C_SH(A) (1 << (A)) /* diff --git a/contrib/tcsh-6/sh.c b/contrib/tcsh-6/sh.c index b760f04e7c..9cc74543f9 100644 --- a/contrib/tcsh-6/sh.c +++ b/contrib/tcsh-6/sh.c @@ -758,13 +758,17 @@ main(int argc, char **argv) /* * Re-initialize path if set in environment */ - if ((tcp = getenv("PATH")) == NULL) + if ((tcp = getenv("PATH")) == NULL) { #ifdef _PATH_DEFPATH importpath(str2short(_PATH_DEFPATH)); #else /* !_PATH_DEFPATH */ setq(STRpath, defaultpath(), &shvhed, VAR_READWRITE); #endif /* _PATH_DEFPATH */ - else + /* + * Export the path setting so that subsequent processes use the same path as we do. + */ + exportpath(adrof(STRpath)->vec); + } else /* Importpath() allocates memory for the path, and the * returned pointer from SAVE() was discarded, so * this was a memory leak.. (sg) diff --git a/contrib/tcsh-6/sh.decls.h b/contrib/tcsh-6/sh.decls.h index f8b69399c6..5fb38d93f9 100644 --- a/contrib/tcsh-6/sh.decls.h +++ b/contrib/tcsh-6/sh.decls.h @@ -399,6 +399,7 @@ extern void autoset_dspmbyte (const Char *); #if defined(AUTOSET_KANJI) extern void autoset_kanji (void); #endif +extern void exportpath (Char **); /* * sh.time.c diff --git a/contrib/tcsh-6/sh.func.c b/contrib/tcsh-6/sh.func.c index fe24d76729..8935c233c3 100644 --- a/contrib/tcsh-6/sh.func.c +++ b/contrib/tcsh-6/sh.func.c @@ -1973,6 +1973,10 @@ struct limits limits[] = { RLIMIT_SBSIZE, "sbsize", 1, "" }, # endif /* RLIMIT_SBSIZE */ +#ifdef RLIMIT_POSIXLOCKS + { RLIMIT_POSIXLOCKS, "posixlocks", 1, "" }, +#endif /* RLIMIT_POSIXLOCKS */ + # ifdef RLIMIT_SWAP { RLIMIT_SWAP, "swapsize", 1024, "kbytes" }, # endif /* RLIMIT_SWAP */ diff --git a/contrib/tcsh-6/sh.init.c b/contrib/tcsh-6/sh.init.c index e36d951ee7..8f7eb4ade5 100644 --- a/contrib/tcsh-6/sh.init.c +++ b/contrib/tcsh-6/sh.init.c @@ -1070,4 +1070,20 @@ mesginit(void) mesg[SIGXRLG3].pname = CSAVS(2, 108, "exeeded RLG3 limit"); } #endif /* SIGXRLG3 */ + +#ifdef SIGCKPT + /* DragonFly BSD */ + if (mesg[SIGCKPT].pname == NULL) { + mesg[SIGCKPT].iname = "CKPT"; + mesg[SIGCKPT].pname = CSAVS(2, 109, "CheckPoint"); + } +#endif /* SIGCKPT */ + +#ifdef SIGCKPTEXIT + /* DragonFly BSD */ + if (mesg[SIGCKPTEXIT].pname == NULL) { + mesg[SIGCKPTEXIT].iname = "CKPTEXIT"; + mesg[SIGCKPTEXIT].pname = CSAVS(2, 110, "CheckPointExit"); + } +#endif /* SIGCKPTEXIT */ } diff --git a/contrib/tcsh-6/sh.set.c b/contrib/tcsh-6/sh.set.c index 74981692d2..5d498cb36f 100644 --- a/contrib/tcsh-6/sh.set.c +++ b/contrib/tcsh-6/sh.set.c @@ -53,7 +53,6 @@ static Char *operate (int, Char *, Char *); static void putn1 (tcsh_number_t); static struct varent *madrof (Char *, struct varent *); static void unsetv1 (struct varent *); -static void exportpath (Char **); static void balance (struct varent *, int, int); /* @@ -911,7 +910,7 @@ shift(Char **v, struct command *c) update_vars(name); } -static void +void exportpath(Char **val) { struct Strbuf buf = Strbuf_INIT;