Kill enough K&R cruft to build with clang again.
This commit is contained in:
parent
6d7e0c91f1
commit
da656e3d1c
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user