some lint cleanup
This commit is contained in:
8
edit.c
8
edit.c
@ -1,4 +1,4 @@
|
|||||||
/** $MirOS: src/bin/mksh/edit.c,v 1.7 2005/06/08 22:22:23 tg Exp $ */
|
/** $MirOS: src/bin/mksh/edit.c,v 1.8 2005/06/08 22:34:02 tg Exp $ */
|
||||||
/* $OpenBSD: edit.c,v 1.29 2005/04/13 02:33:08 deraadt Exp $ */
|
/* $OpenBSD: edit.c,v 1.29 2005/04/13 02:33:08 deraadt Exp $ */
|
||||||
/* $OpenBSD: edit.h,v 1.8 2005/03/28 21:28:22 deraadt Exp $ */
|
/* $OpenBSD: edit.h,v 1.8 2005/03/28 21:28:22 deraadt Exp $ */
|
||||||
/* $OpenBSD: emacs.c,v 1.37 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: emacs.c,v 1.37 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
@ -10,7 +10,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.7 2005/06/08 22:22:23 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.8 2005/06/08 22:34:02 tg Exp $");
|
||||||
|
|
||||||
#define BEL 0x07
|
#define BEL 0x07
|
||||||
|
|
||||||
@ -3788,7 +3788,7 @@ vi_cmd(int argcnt, const char *cmd)
|
|||||||
case 'g':
|
case 'g':
|
||||||
if (!argcnt)
|
if (!argcnt)
|
||||||
argcnt = hlast;
|
argcnt = hlast;
|
||||||
/* fall through */
|
/* FALLTHRU */
|
||||||
case 'G':
|
case 'G':
|
||||||
if (!argcnt)
|
if (!argcnt)
|
||||||
argcnt = 1;
|
argcnt = 1;
|
||||||
@ -3938,7 +3938,7 @@ vi_cmd(int argcnt, const char *cmd)
|
|||||||
c3 = 1;
|
c3 = 1;
|
||||||
srchlen = 0;
|
srchlen = 0;
|
||||||
lastsearch = *cmd;
|
lastsearch = *cmd;
|
||||||
/* fall through */
|
/* FALLTHRU */
|
||||||
case 'n':
|
case 'n':
|
||||||
case 'N':
|
case 'N':
|
||||||
if (lastsearch == ' ')
|
if (lastsearch == ' ')
|
||||||
|
6
eval.c
6
eval.c
@ -1,4 +1,4 @@
|
|||||||
/** $MirOS: src/bin/mksh/eval.c,v 1.3 2005/05/25 10:01:24 tg Exp $ */
|
/** $MirOS: src/bin/mksh/eval.c,v 1.4 2005/06/08 22:34:03 tg Exp $ */
|
||||||
/* $OpenBSD: eval.c,v 1.27 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: eval.c,v 1.27 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
@ -6,7 +6,7 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.3 2005/05/25 10:01:24 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.4 2005/06/08 22:34:03 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* string expansion
|
* string expansion
|
||||||
@ -339,7 +339,7 @@ expand(char *cp, /* input word */
|
|||||||
case '?':
|
case '?':
|
||||||
f &= ~DOBLANK;
|
f &= ~DOBLANK;
|
||||||
f |= DOTEMP_;
|
f |= DOTEMP_;
|
||||||
/* fall through */
|
/* FALLTHRU */
|
||||||
default:
|
default:
|
||||||
/* Enable tilde expansion */
|
/* Enable tilde expansion */
|
||||||
tilde_ok = 1;
|
tilde_ok = 1;
|
||||||
|
12
lex.c
12
lex.c
@ -1,11 +1,11 @@
|
|||||||
/** $MirOS: src/bin/mksh/lex.c,v 1.3 2005/06/08 21:51:21 tg Exp $ */
|
/** $MirOS: src/bin/mksh/lex.c,v 1.4 2005/06/08 22:34:03 tg Exp $ */
|
||||||
/* $OpenBSD: lex.c,v 1.36 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: lex.c,v 1.36 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.3 2005/06/08 21:51:21 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.4 2005/06/08 22:34:03 tg Exp $");
|
||||||
|
|
||||||
/* Structure to keep track of the lexing state and the various pieces of info
|
/* Structure to keep track of the lexing state and the various pieces of info
|
||||||
* needed for each particular state. */
|
* needed for each particular state. */
|
||||||
@ -184,7 +184,7 @@ yylex(int cf)
|
|||||||
*wp++ = c;
|
*wp++ = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through.. */
|
/* FALLTHRU */
|
||||||
Sbase1: /* includes *(...|...) pattern (*+?@!) */
|
Sbase1: /* includes *(...|...) pattern (*+?@!) */
|
||||||
if (c == '*' || c == '@' || c == '+' || c == '?' ||
|
if (c == '*' || c == '@' || c == '+' || c == '?' ||
|
||||||
c == '!') {
|
c == '!') {
|
||||||
@ -197,7 +197,7 @@ yylex(int cf)
|
|||||||
}
|
}
|
||||||
ungetsc(c2);
|
ungetsc(c2);
|
||||||
}
|
}
|
||||||
/* fall through.. */
|
/* FALLTHRU */
|
||||||
Sbase2: /* doesn't include *(...|...) pattern (*+?@!) */
|
Sbase2: /* doesn't include *(...|...) pattern (*+?@!) */
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '\\':
|
case '\\':
|
||||||
@ -504,7 +504,7 @@ yylex(int cf)
|
|||||||
*wp++ = c;
|
*wp++ = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through.. */
|
/* FALLTHRU */
|
||||||
default:
|
default:
|
||||||
if (c) { /* trailing \ is lost */
|
if (c) { /* trailing \ is lost */
|
||||||
*wp++ = '\\';
|
*wp++ = '\\';
|
||||||
@ -1123,7 +1123,7 @@ get_brace_var(XString *wsp, char *wp)
|
|||||||
state = PS_SAW_HASH;
|
state = PS_SAW_HASH;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through.. */
|
/* FALLTHRU */
|
||||||
case PS_SAW_HASH:
|
case PS_SAW_HASH:
|
||||||
if (letter(c))
|
if (letter(c))
|
||||||
state = PS_IDENT;
|
state = PS_IDENT;
|
||||||
|
22
main.c
22
main.c
@ -1,4 +1,4 @@
|
|||||||
/** $MirOS: src/bin/mksh/main.c,v 1.12 2005/06/08 22:22:24 tg Exp $ */
|
/** $MirOS: src/bin/mksh/main.c,v 1.13 2005/06/08 22:34:03 tg Exp $ */
|
||||||
/* $OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
/* $OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.12 2005/06/08 22:22:24 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.13 2005/06/08 22:34:03 tg Exp $");
|
||||||
|
|
||||||
const char ksh_version[] = "@(#)MIRBSD KSH R23 2005/06/08";
|
const char ksh_version[] = "@(#)MIRBSD KSH R23 2005/06/08";
|
||||||
|
|
||||||
@ -390,15 +390,15 @@ include(const char *name, int argc, char **argv, int intr_ok)
|
|||||||
*/
|
*/
|
||||||
if (intr_ok && (exstat - 128) != SIGTERM)
|
if (intr_ok && (exstat - 128) != SIGTERM)
|
||||||
return 1;
|
return 1;
|
||||||
/* fall through... */
|
/* FALLTHRU */
|
||||||
case LEXIT:
|
case LEXIT:
|
||||||
case LLEAVE:
|
case LLEAVE:
|
||||||
case LSHELL:
|
case LSHELL:
|
||||||
unwind(i);
|
unwind(i);
|
||||||
/*NOREACHED*/
|
/* NOTREACHED */
|
||||||
default:
|
default:
|
||||||
internal_errorf(1, "include: %d", i);
|
internal_errorf(1, "include: %d", i);
|
||||||
/*NOREACHED*/
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (argv) {
|
if (argv) {
|
||||||
@ -468,19 +468,19 @@ shell(Source * volatile s, volatile int toplevel)
|
|||||||
s->start = s->str = null;
|
s->start = s->str = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through... */
|
/* FALLTHRU */
|
||||||
case LEXIT:
|
case LEXIT:
|
||||||
case LLEAVE:
|
case LLEAVE:
|
||||||
case LRETURN:
|
case LRETURN:
|
||||||
source = old_source;
|
source = old_source;
|
||||||
quitenv(NULL);
|
quitenv(NULL);
|
||||||
unwind(i); /* keep on going */
|
unwind(i); /* keep on going */
|
||||||
/*NOREACHED*/
|
/* NOTREACHED */
|
||||||
default:
|
default:
|
||||||
source = old_source;
|
source = old_source;
|
||||||
quitenv(NULL);
|
quitenv(NULL);
|
||||||
internal_errorf(1, "shell: %d", i);
|
internal_errorf(1, "shell: %d", i);
|
||||||
/*NOREACHED*/
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -551,13 +551,11 @@ unwind(int i)
|
|||||||
case E_LOOP:
|
case E_LOOP:
|
||||||
case E_ERRH:
|
case E_ERRH:
|
||||||
siglongjmp(e->jbuf, i);
|
siglongjmp(e->jbuf, i);
|
||||||
/*NOTREACHED*/
|
/* NOTREACHED */
|
||||||
|
|
||||||
case E_NONE:
|
case E_NONE:
|
||||||
if (i == LINTR)
|
if (i == LINTR)
|
||||||
e->flags |= EF_FAKE_SIGDIE;
|
e->flags |= EF_FAKE_SIGDIE;
|
||||||
/* Fall through... */
|
/* FALLTHRU */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
quitenv(NULL);
|
quitenv(NULL);
|
||||||
}
|
}
|
||||||
|
6
tree.c
6
tree.c
@ -1,9 +1,9 @@
|
|||||||
/** $MirOS: src/bin/mksh/tree.c,v 1.1 2005/05/23 03:06:10 tg Exp $ */
|
/** $MirOS: src/bin/mksh/tree.c,v 1.2 2005/06/08 22:34:03 tg Exp $ */
|
||||||
/* $OpenBSD: tree.c,v 1.17 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: tree.c,v 1.17 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.1 2005/05/23 03:06:10 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.2 2005/06/08 22:34:03 tg Exp $");
|
||||||
|
|
||||||
#define INDENT 4
|
#define INDENT 4
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ ptree(struct op *t, int indent, struct shf *shf)
|
|||||||
}
|
}
|
||||||
case TSELECT:
|
case TSELECT:
|
||||||
fptreef(shf, indent, "select %s ", t->str);
|
fptreef(shf, indent, "select %s ", t->str);
|
||||||
/* fall through */
|
/* FALLTHRU */
|
||||||
case TFOR:
|
case TFOR:
|
||||||
if (t->type == TFOR)
|
if (t->type == TFOR)
|
||||||
fptreef(shf, indent, "for %s ", t->str);
|
fptreef(shf, indent, "for %s ", t->str);
|
||||||
|
Reference in New Issue
Block a user