Module Name: src
Committed By: joerg
Date: Sat Jul 1 23:12:09 UTC 2017
Modified Files:
src/bin/ksh: edit.c edit.h exec.c expr.c proto.h var.c
Log Message:
Kill enough K&R cruft to build with clang again.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/bin/ksh/edit.c
cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/edit.h
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/exec.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/expr.c
cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/proto.h
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/var.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/ksh/edit.c
diff -u src/bin/ksh/edit.c:1.33 src/bin/ksh/edit.c:1.34
--- src/bin/ksh/edit.c:1.33 Fri Jun 30 05:18:36 2017
+++ src/bin/ksh/edit.c Sat Jul 1 23:12:08 2017
@@ -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;
Index: src/bin/ksh/edit.h
diff -u src/bin/ksh/edit.h:1.4 src/bin/ksh/edit.h:1.5
--- src/bin/ksh/edit.h:1.4 Fri Jun 30 04:41:19 2017
+++ src/bin/ksh/edit.h Sat Jul 1 23:12:08 2017
@@ -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));
Index: src/bin/ksh/exec.c
diff -u src/bin/ksh/exec.c:1.23 src/bin/ksh/exec.c:1.24
--- src/bin/ksh/exec.c:1.23 Fri Jun 30 04:41:19 2017
+++ src/bin/ksh/exec.c Sat Jul 1 23:12:08 2017
@@ -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
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
Index: src/bin/ksh/expr.c
diff -u src/bin/ksh/expr.c:1.10 src/bin/ksh/expr.c:1.11
--- src/bin/ksh/expr.c:1.10 Fri Jun 30 04:41:19 2017
+++ src/bin/ksh/expr.c Sat Jul 1 23:12:08 2017
@@ -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_s
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;
Index: src/bin/ksh/proto.h
diff -u src/bin/ksh/proto.h:1.9 src/bin/ksh/proto.h:1.10
--- src/bin/ksh/proto.h:1.9 Fri Jun 30 04:41:19 2017
+++ src/bin/ksh/proto.h Sat Jul 1 23:12:08 2017
@@ -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));
Index: src/bin/ksh/var.c
diff -u src/bin/ksh/var.c:1.20 src/bin/ksh/var.c:1.21
--- src/bin/ksh/var.c:1.20 Fri Jun 30 04:41:19 2017
+++ src/bin/ksh/var.c Sat Jul 1 23:12:08 2017
@@ -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;