diff options
| author | joerg <joerg@NetBSD.org> | 2017-07-01 23:12:08 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2017-07-01 23:12:08 +0000 |
| commit | 59ca394562c5760973171f0d1bf7df6097072a56 (patch) | |
| tree | 2be1076f28748521d2c43d574b8840e83237b1d1 /bin/ksh | |
| parent | fe47da3ca71b1af997d0e42ee27d3ac599f6f922 (diff) | |
Kill enough K&R cruft to build with clang again.
Diffstat (limited to 'bin/ksh')
| -rw-r--r-- | bin/ksh/edit.c | 7 | ||||
| -rw-r--r-- | bin/ksh/edit.h | 6 | ||||
| -rw-r--r-- | bin/ksh/exec.c | 10 | ||||
| -rw-r--r-- | bin/ksh/expr.c | 13 | ||||
| -rw-r--r-- | bin/ksh/proto.h | 6 | ||||
| -rw-r--r-- | bin/ksh/var.c | 8 |
6 files changed, 20 insertions, 30 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index fc83315722f..1b19ef4c4c0 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $NetBSD: edit.c,v 1.33 2017/06/30 05:18:36 kamil Exp $ */ +/* $NetBSD: edit.c,v 1.34 2017/07/01 23:12:08 joerg Exp $ */ /* * Command line editing - common code @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: edit.c,v 1.33 2017/06/30 05:18:36 kamil Exp $"); +__RCSID("$NetBSD: edit.c,v 1.34 2017/07/01 23:12:08 joerg Exp $"); #endif #include <stdbool.h> @@ -194,8 +194,7 @@ x_puts(s) } bool -x_mode(onoff) - bool onoff; +x_mode(bool onoff) { static bool x_cur_mode; bool prev; diff --git a/bin/ksh/edit.h b/bin/ksh/edit.h index 272c82986be..14ffc27f9e8 100644 --- a/bin/ksh/edit.h +++ b/bin/ksh/edit.h @@ -1,4 +1,4 @@ -/* $NetBSD: edit.h,v 1.4 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: edit.h,v 1.5 2017/07/01 23:12:08 joerg Exp $ */ /* NAME: * edit.h - globals for edit modes @@ -10,7 +10,7 @@ * * * RCSid: - * $NetBSD: edit.h,v 1.4 2017/06/30 04:41:19 kamil Exp $ + * $NetBSD: edit.h,v 1.5 2017/07/01 23:12:08 joerg Exp $ * */ @@ -50,7 +50,7 @@ int x_getc ARGS((void)); void x_flush ARGS((void)); void x_putc ARGS((int c)); void x_puts ARGS((const char *s)); -bool x_mode ARGS((bool onoff)); +bool x_mode(bool onoff); int promptlen ARGS((const char *cp, const char **spp)); int x_do_comment ARGS((char *buf, int bsize, int *lenp)); void x_print_expansions ARGS((int nwords, char *const *words, int is_command)); diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index 31ef8dcd856..3d97c3e9216 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.23 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: exec.c,v 1.24 2017/07/01 23:12:08 joerg Exp $ */ /* * execute command tree @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: exec.c,v 1.23 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: exec.c,v 1.24 2017/07/01 23:12:08 joerg Exp $"); #endif #include <sys/stat.h> @@ -30,7 +30,7 @@ static int call_builtin ARGS((struct tbl *, char **)); static int iosetup ARGS((struct ioword *, struct tbl *)); static int herein ARGS((const char *, int)); #ifdef KSH -static char *do_selectargs ARGS((char **, bool)); +static char *do_selectargs(char **, bool); #endif /* KSH */ #ifdef KSH static int dbteste_isa ARGS((Test_env *, Test_meta)); @@ -1322,9 +1322,7 @@ herein(content, sub) * print the args in column form - assuming that we can */ static char * -do_selectargs(ap, print_menu) - register char **ap; - bool print_menu; +do_selectargs(char **ap, bool print_menu) { static const char *const read_args[] = { "read", "-r", "REPLY", (char *) 0 diff --git a/bin/ksh/expr.c b/bin/ksh/expr.c index 88ab86af6c4..9ac3d96bcc5 100644 --- a/bin/ksh/expr.c +++ b/bin/ksh/expr.c @@ -1,4 +1,4 @@ -/* $NetBSD: expr.c,v 1.10 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: expr.c,v 1.11 2017/07/01 23:12:08 joerg Exp $ */ /* * Korn expression evaluation @@ -9,7 +9,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: expr.c,v 1.10 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: expr.c,v 1.11 2017/07/01 23:12:08 joerg Exp $"); #endif @@ -138,8 +138,7 @@ static void evalerr ARGS((Expr_state *es, enum error_type type, const char *str)) GCC_FUNC_ATTR(noreturn); static struct tbl *evalexpr ARGS((Expr_state *es, enum prec prec)); static void token ARGS((Expr_state *es)); -static struct tbl *do_ppmm ARGS((Expr_state *es, enum token op, - struct tbl *vasn, bool is_prefix)); +static struct tbl *do_ppmm(Expr_state *, enum token, struct tbl *, bool); static void assign_check ARGS((Expr_state *es, enum token op, struct tbl *vasn)); static struct tbl *tempvar ARGS((void)); @@ -537,11 +536,7 @@ token(es) /* Do a ++ or -- operation */ static struct tbl * -do_ppmm(es, op, vasn, is_prefix) - Expr_state *es; - enum token op; - struct tbl *vasn; - bool is_prefix; +do_ppmm(Expr_state *es, enum token op, struct tbl *vasn, bool is_prefix) { struct tbl *vl; int oval; diff --git a/bin/ksh/proto.h b/bin/ksh/proto.h index aef3d9f7f56..a0b231e7b67 100644 --- a/bin/ksh/proto.h +++ b/bin/ksh/proto.h @@ -1,9 +1,9 @@ -/* $NetBSD: proto.h,v 1.9 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: proto.h,v 1.10 2017/07/01 23:12:08 joerg Exp $ */ /* * prototypes for PD-KSH * originally generated using "cproto.c 3.5 92/04/11 19:28:01 cthuang " - * $Id: proto.h,v 1.9 2017/06/30 04:41:19 kamil Exp $ + * $Id: proto.h,v 1.10 2017/07/01 23:12:08 joerg Exp $ */ #include <stdbool.h> @@ -255,7 +255,7 @@ void newblock ARGS((void)); void popblock ARGS((void)); void initvar ARGS((void)); struct tbl * global ARGS((const char *)); -struct tbl * local ARGS((const char *, bool)); +struct tbl * local(const char *, bool); char * str_val ARGS((struct tbl *)); long intval ARGS((struct tbl *)); int setstr ARGS((struct tbl *, const char *, int)); diff --git a/bin/ksh/var.c b/bin/ksh/var.c index 7cd7f7ca1e9..03e0af9936d 100644 --- a/bin/ksh/var.c +++ b/bin/ksh/var.c @@ -1,9 +1,9 @@ -/* $NetBSD: var.c,v 1.20 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: var.c,v 1.21 2017/07/01 23:12:08 joerg Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: var.c,v 1.20 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: var.c,v 1.21 2017/07/01 23:12:08 joerg Exp $"); #endif #include <sys/stat.h> @@ -254,9 +254,7 @@ global(n) * Search for local variable, if not found create locally. */ struct tbl * -local(n, copy) - register const char *n; - bool copy; +local(const char *n, bool copy) { register struct block *l = e->loc; register struct tbl *vp; |
