-/* $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 $ */
/*-
#undef DIRAPPEND
-#if 0
- if (euid != 0 && uid != 0)
- *blkp++ = Strsave(STRdot);
-#endif
-
*blkp = NULL;
return (blk);
}
-/* $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 $ */
/*-
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));
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':
-/* $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 $ */
/*-
Char *ep, word[PATH_MAX];
if (pargv) {
-#ifdef notdef
- abort();
-#endif
blkfree(pargv);
}
pargsiz = GLOBSPACE;
-/* $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 $ */
/*-
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'){
(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)) {
-/* $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 $ */
/*-
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)
{
-/* $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 $ */
/*-
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 */
}
-/* $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 $ */
/*-
(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)
-/* $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 $ */
/*-
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,\
((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.
balance(struct varent *p, int f, int d)
{
struct varent *pp;
-
-#ifndef lint
struct varent *t; /* used by the rotate macros */
-
-#endif
int ff;
/*