Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh Kill enough K&R cruft to build with clang again.
details: https://anonhg.NetBSD.org/src/rev/399f1a5d59d0
branches: trunk
changeset: 354853:399f1a5d59d0
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Jul 01 23:12:08 2017 +0000
description:
Kill enough K&R cruft to build with clang again.
diffstat:
bin/ksh/edit.c | 7 +++----
bin/ksh/edit.h | 6 +++---
bin/ksh/exec.c | 10 ++++------
bin/ksh/expr.c | 13 ++++---------
bin/ksh/proto.h | 6 +++---
bin/ksh/var.c | 8 +++-----
6 files changed, 20 insertions(+), 30 deletions(-)
diffs (184 lines):
diff -r 9d3cf166b051 -r 399f1a5d59d0 bin/ksh/edit.c
--- a/bin/ksh/edit.c Sat Jul 01 22:49:09 2017 +0000
+++ b/bin/ksh/edit.c Sat Jul 01 23:12:08 2017 +0000
@@ -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 @@
}
bool
-x_mode(onoff)
- bool onoff;
+x_mode(bool onoff)
{
static bool x_cur_mode;
bool prev;
diff -r 9d3cf166b051 -r 399f1a5d59d0 bin/ksh/edit.h
--- a/bin/ksh/edit.h Sat Jul 01 22:49:09 2017 +0000
+++ b/bin/ksh/edit.h Sat Jul 01 23:12:08 2017 +0000
@@ -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 @@
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 -r 9d3cf166b051 -r 399f1a5d59d0 bin/ksh/exec.c
--- a/bin/ksh/exec.c Sat Jul 01 22:49:09 2017 +0000
+++ b/bin/ksh/exec.c Sat Jul 01 23:12:08 2017 +0000
@@ -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 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 @@
* 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 -r 9d3cf166b051 -r 399f1a5d59d0 bin/ksh/expr.c
--- a/bin/ksh/expr.c Sat Jul 01 22:49:09 2017 +0000
+++ b/bin/ksh/expr.c Sat Jul 01 23:12:08 2017 +0000
@@ -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 @@
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 @@
/* 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 -r 9d3cf166b051 -r 399f1a5d59d0 bin/ksh/proto.h
--- a/bin/ksh/proto.h Sat Jul 01 22:49:09 2017 +0000
+++ b/bin/ksh/proto.h Sat Jul 01 23:12:08 2017 +0000
@@ -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 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 -r 9d3cf166b051 -r 399f1a5d59d0 bin/ksh/var.c
--- a/bin/ksh/var.c Sat Jul 01 22:49:09 2017 +0000
+++ b/bin/ksh/var.c Sat Jul 01 23:12:08 2017 +0000
@@ -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 @@
* 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;
Home |
Main Index |
Thread Index |
Old Index