summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2015-10-26 22:03:07 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2015-10-26 22:03:07 +0000
commit50b582ad363f83ba0c58cd4c51fd1775312f1b8d (patch)
tree57174f8b7b925d0134429c9d23b8720c1ddb736a /bin
parentc1486dad503c38da34b70c9d2cf81ec9a23baa57 (diff)
miscellaneous cruft:
* remove lint * unifdef S_IFLNK, S_ISFIFO, S_ISLNK, S_ISSOCK, O_APPEND * remove 0, NOTUSED, notdef -- untouched since original import * remove IIASA
Diffstat (limited to 'bin')
-rw-r--r--bin/csh/csh.c7
-rw-r--r--bin/csh/exp.c19
-rw-r--r--bin/csh/glob.c5
-rw-r--r--bin/csh/lex.c18
-rw-r--r--bin/csh/misc.c20
-rw-r--r--bin/csh/proc.c5
-rw-r--r--bin/csh/sem.c7
-rw-r--r--bin/csh/set.c26
8 files changed, 10 insertions, 97 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index 51d873ebf39..4839de79306 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.c,v 1.33 2015/10/26 21:57:42 naddy Exp $ */
+/* $OpenBSD: csh.c,v 1.34 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */
/*-
@@ -1278,11 +1278,6 @@ defaultpath(void)
#undef DIRAPPEND
-#if 0
- if (euid != 0 && uid != 0)
- *blkp++ = Strsave(STRdot);
-#endif
-
*blkp = NULL;
return (blk);
}
diff --git a/bin/csh/exp.c b/bin/csh/exp.c
index e271529ebfb..dbd0550af6b 100644
--- a/bin/csh/exp.c
+++ b/bin/csh/exp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exp.c,v 1.14 2015/10/26 21:57:42 naddy Exp $ */
+/* $OpenBSD: exp.c,v 1.15 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: exp.c,v 1.6 1995/03/21 09:02:51 cgd Exp $ */
/*-
@@ -426,10 +426,7 @@ exp6(Char ***vp, bool ignore)
break;
default:
- if (
-#ifdef S_IFLNK
- cp[1] == 'l' ? lstat(short2str(ep), &stb) :
-#endif
+ if (cp[1] == 'l' ? lstat(short2str(ep), &stb) :
stat(short2str(ep), &stb)) {
xfree(ep);
return (Strsave(STR0));
@@ -445,27 +442,15 @@ exp6(Char ***vp, bool ignore)
break;
case 'p':
-#ifdef S_ISFIFO
i = S_ISFIFO(stb.st_mode);
-#else
- i = 0;
-#endif
break;
case 'l':
-#ifdef S_ISLNK
i = S_ISLNK(stb.st_mode);
-#else
- i = 0;
-#endif
break;
case 's':
-#ifdef S_ISSOCK
i = S_ISSOCK(stb.st_mode);
-#else
- i = 0;
-#endif
break;
case 'z':
diff --git a/bin/csh/glob.c b/bin/csh/glob.c
index 7b4b54716a4..e2f0f3197f2 100644
--- a/bin/csh/glob.c
+++ b/bin/csh/glob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glob.c,v 1.19 2015/10/26 15:01:15 naddy Exp $ */
+/* $OpenBSD: glob.c,v 1.20 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: glob.c,v 1.10 1995/03/21 09:03:01 cgd Exp $ */
/*-
@@ -579,9 +579,6 @@ dobackp(Char *cp, bool literal)
Char *ep, word[PATH_MAX];
if (pargv) {
-#ifdef notdef
- abort();
-#endif
blkfree(pargv);
}
pargsiz = GLOBSPACE;
diff --git a/bin/csh/lex.c b/bin/csh/lex.c
index 130a9d554bf..895106f6144 100644
--- a/bin/csh/lex.c
+++ b/bin/csh/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.19 2015/06/17 03:59:12 deraadt Exp $ */
+/* $OpenBSD: lex.c,v 1.20 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: lex.c,v 1.9 1995/09/27 00:38:46 jtc Exp $ */
/*-
@@ -445,15 +445,6 @@ getdol(void)
default:
toolong = 0;
if (Isdigit(c)) {
-#ifdef notdef
- /* let $?0 pass for now */
- if (special) {
- seterror(ERR_DIGIT);
- *np = 0;
- addla(name);
- return;
- }
-#endif
/* we know that np < &name[4] */
ep = &np[MAXVARLEN];
while ((c = getC(DOEXCL)) != '\0'){
@@ -751,13 +742,6 @@ getsub(struct wordent *en)
(void) Strlcpy(lhsb, slhs, sizeof(lhsb)/sizeof(Char));
break;
-#ifdef notdef
- case '~':
- if (lhsb[0] == 0)
- goto badlhs;
- break;
-#endif
-
case 's':
delim = getC(0);
if (letter(delim) || Isdigit(delim) || any(" \t\n", delim)) {
diff --git a/bin/csh/misc.c b/bin/csh/misc.c
index 3e932a9d68c..5a82eb29c25 100644
--- a/bin/csh/misc.c
+++ b/bin/csh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.16 2015/10/26 15:01:15 naddy Exp $ */
+/* $OpenBSD: misc.c,v 1.17 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: misc.c,v 1.6 1995/03/21 09:03:09 cgd Exp $ */
/*-
@@ -139,24 +139,6 @@ saveblk(Char **v)
return (onewv);
}
-#ifdef NOTUSED
-char *
-strstr(char *s, char *t)
-{
- do {
- char *ss = s;
- char *tt = t;
-
- do
- if (*tt == '\0')
- return (s);
- while (*ss++ == *tt++);
- } while (*s++ != '\0');
- return (NULL);
-}
-
-#endif /* NOTUSED */
-
Char **
blkspl(Char **up, Char **vp)
{
diff --git a/bin/csh/proc.c b/bin/csh/proc.c
index db3e2c095c9..875cca9e6a2 100644
--- a/bin/csh/proc.c
+++ b/bin/csh/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.28 2015/10/26 21:57:42 naddy Exp $ */
+/* $OpenBSD: proc.c,v 1.29 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: proc.c,v 1.9 1995/04/29 23:21:33 mycroft Exp $ */
/*-
@@ -160,9 +160,6 @@ found:
pclrcurr(fp);
if (jobflags & PFOREGND) {
if (jobflags & (PSIGNALED | PSTOPPED | PPTIME) ||
-#ifdef IIASA
- jobflags & PAEXITED ||
-#endif
!eq(dcwd->di_name, fp->p_cwd->di_name)) {
; /* print in pjwait */
}
diff --git a/bin/csh/sem.c b/bin/csh/sem.c
index 17ea1bdb555..d60c23d3178 100644
--- a/bin/csh/sem.c
+++ b/bin/csh/sem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sem.c,v 1.19 2015/02/08 05:47:28 tedu Exp $ */
+/* $OpenBSD: sem.c,v 1.20 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: sem.c,v 1.9 1995/09/27 00:38:50 jtc Exp $ */
/*-
@@ -562,12 +562,7 @@ doio(struct command *t, int *pipein, int *pipeout)
(void) dcopy(SHOUT, 1);
(void) dcopy(SHERR, 2);
if ((flags & F_APPEND) &&
-#ifdef O_APPEND
(fd = open(tmp, O_WRONLY | O_APPEND)) >= 0);
-#else
- (fd = open(tmp, O_WRONLY)) >= 0)
- (void) lseek(STDOUT_FILENO, (off_t) 0, SEEK_END);
-#endif
else {
if (!(flags & F_OVERWRITE) && adrof(STRnoclobber)) {
if (flags & F_APPEND)
diff --git a/bin/csh/set.c b/bin/csh/set.c
index 16177a75fac..81bfb5a385c 100644
--- a/bin/csh/set.c
+++ b/bin/csh/set.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: set.c,v 1.17 2015/10/26 15:01:15 naddy Exp $ */
+/* $OpenBSD: set.c,v 1.18 2015/10/26 22:03:06 naddy Exp $ */
/* $NetBSD: set.c,v 1.8 1995/03/21 18:35:52 mycroft Exp $ */
/*-
@@ -585,11 +585,7 @@ exportpath(Char **val)
Setenv(STRPATH, exppath);
}
-#ifndef lint
- /*
- * Lint thinks these have null effect
- */
- /* macros to do single rotations on node p */
+/* macros to do single rotations on node p */
#define rright(p) (\
t = (p)->v_left,\
(t)->v_parent = (p)->v_parent,\
@@ -602,20 +598,6 @@ exportpath(Char **val)
((p)->v_right = t->v_left) ? (t->v_left->v_parent = (p)) : 0,\
(t->v_left = (p))->v_parent = t,\
(p) = t)
-#else
-struct varent *
-rleft(struct varent *p)
-{
- return (p);
-}
-struct varent *
-rright(struct varent *p)
-{
- return (p);
-}
-
-#endif /* ! lint */
-
/*
* Rebalance a tree, starting at p and up.
@@ -626,11 +608,7 @@ static void
balance(struct varent *p, int f, int d)
{
struct varent *pp;
-
-#ifndef lint
struct varent *t; /* used by the rotate macros */
-
-#endif
int ff;
/*