run GNU protoize

protect header files
nuke some dead code
regenerate configure script
let silly code die
This commit is contained in:
tg
2004-10-28 11:53:44 +00:00
parent dc7da8ddbf
commit b2de14e57c
46 changed files with 1024 additions and 1991 deletions

63
c_sh.c
View File

@ -1,4 +1,4 @@
/** $MirBSD: c_sh.c,v 1.6 2004/10/28 11:11:17 tg Exp $ */
/** $MirBSD: c_sh.c,v 1.7 2004/10/28 11:53:39 tg Exp $ */
/* $OpenBSD: c_sh.c,v 1.17 2003/03/13 09:03:07 deraadt Exp $ */
/*
@ -10,22 +10,20 @@
#include "ksh_time.h"
#include "ksh_times.h"
__RCSID("$MirBSD: c_sh.c,v 1.6 2004/10/28 11:11:17 tg Exp $");
__RCSID("$MirBSD: c_sh.c,v 1.7 2004/10/28 11:53:39 tg Exp $");
static char *clocktos(clock_t t);
/* :, false and true */
int
c_label(wp)
char **wp;
c_label(char **wp)
{
return wp[0][0] == 'f' ? 1 : 0;
}
int
c_shift(wp)
char **wp;
c_shift(char **wp)
{
struct block *l = e->loc;
int n;
@ -56,8 +54,7 @@ c_shift(wp)
}
int
c_umask(wp)
char **wp;
c_umask(char **wp)
{
int i;
char *cp;
@ -176,8 +173,7 @@ c_umask(wp)
}
int
c_dot(wp)
char **wp;
c_dot(char **wp)
{
char *file, *cp;
char **argv;
@ -215,8 +211,7 @@ c_dot(wp)
}
int
c_wait(wp)
char **wp;
c_wait(char **wp)
{
int UNINITIALIZED(rv);
int sig;
@ -238,8 +233,7 @@ c_wait(wp)
}
int
c_read(wp)
char **wp;
c_read(char **wp)
{
int c = 0;
int expand = 1, history = 0;
@ -424,8 +418,7 @@ c_read(wp)
}
int
c_eval(wp)
char **wp;
c_eval(char **wp)
{
struct source *s;
@ -465,8 +458,7 @@ c_eval(wp)
}
int
c_trap(wp)
char **wp;
c_trap(char **wp)
{
int i;
char *s;
@ -488,18 +480,6 @@ c_trap(wp)
shprintf(" %s\n", p->name);
}
}
#if 0 /* this is ugly and not clear POSIX needs it */
/* POSIX may need this so output of trap can be saved and
* used to restore trap conditions
*/
if (anydfl) {
shprintf("trap -- -");
for (p = sigtraps, i = SIGNALS+1; --i >= 0; p++)
if (p->trap == NULL && p->name)
shprintf(" %s", p->name);
shprintf(newline);
}
#endif
return 0;
}
@ -525,8 +505,7 @@ c_trap(wp)
}
int
c_exitreturn(wp)
char **wp;
c_exitreturn(char **wp)
{
int how = LEXIT;
int n;
@ -568,8 +547,7 @@ c_exitreturn(wp)
}
int
c_brkcont(wp)
char **wp;
c_brkcont(char **wp)
{
int n, quit;
struct env *ep, *last_ep = (struct env *) 0;
@ -622,8 +600,7 @@ c_brkcont(wp)
}
int
c_set(wp)
char **wp;
c_set(char **wp)
{
int argi, setargs;
struct block *l = e->loc;
@ -658,8 +635,7 @@ c_set(wp)
}
int
c_unset(wp)
char **wp;
c_unset(char **wp)
{
char *id;
int optc, unset_var = 1;
@ -713,9 +689,7 @@ c_times(char **wp GCC_FUNC_ATTR(unused))
* time pipeline (really a statement, not a built-in command)
*/
int
timex(t, f)
struct op *t;
int f;
timex(struct op *t, int f)
{
#define TF_NOARGS BIT(0)
#define TF_NOREAL BIT(1) /* don't report real time */
@ -770,9 +744,7 @@ timex(t, f)
}
void
timex_hook(t, app)
struct op *t;
char ** volatile *app;
timex_hook(struct op *t, char **volatile *app)
{
char **wp = *app;
int optc;
@ -805,8 +777,7 @@ timex_hook(t, app)
}
static char *
clocktos(t)
clock_t t;
clocktos(clock_t t)
{
static char temp[22]; /* enough for 64 bit clock_t */
int i;