summaryrefslogtreecommitdiff
path: root/lib/libedit
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
commit3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch)
tree1a8b19c5db03f8c989fc8228811837b182feb7a3 /lib/libedit
parentcc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff)
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/el.c25
-rw-r--r--lib/libedit/history.c21
-rw-r--r--lib/libedit/sys.h10
3 files changed, 7 insertions, 49 deletions
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
index c786df21ff1..452d0dc3d0e 100644
--- a/lib/libedit/el.c
+++ b/lib/libedit/el.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: el.c,v 1.8 2001/04/13 20:35:19 millert Exp $ */
+/* $OpenBSD: el.c,v 1.9 2002/02/19 19:39:37 millert Exp $ */
/* $NetBSD: el.c,v 1.6 1997/04/24 18:54:16 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
#else
-static char rcsid[] = "$OpenBSD: el.c,v 1.8 2001/04/13 20:35:19 millert Exp $";
+static char rcsid[] = "$OpenBSD: el.c,v 1.9 2002/02/19 19:39:37 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -54,11 +54,7 @@ static char rcsid[] = "$OpenBSD: el.c,v 1.8 2001/04/13 20:35:19 millert Exp $";
#include <sys/param.h>
#include <string.h>
#include <stdlib.h>
-#ifdef __STDC__
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
#include <unistd.h>
#include "el.h"
@@ -159,26 +155,13 @@ el_reset(el)
* set the editline parameters
*/
public int
-#ifdef __STDC__
el_set(EditLine *el, int op, ...)
-#else
-el_set(va_alist)
- va_dcl
-#endif
{
va_list va;
int rv;
-#ifdef __STDC__
+
va_start(va, op);
-#else
- EditLine *el;
- int op;
- va_start(va);
- el = va_arg(va, EditLine *);
- op = va_arg(va, int);
-#endif
-
switch (op) {
case EL_PROMPT:
rv = prompt_set(el, va_arg(va, el_pfunc_t));
diff --git a/lib/libedit/history.c b/lib/libedit/history.c
index d266b82c077..d6b9e745662 100644
--- a/lib/libedit/history.c
+++ b/lib/libedit/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.6 2002/02/16 21:27:26 millert Exp $ */
+/* $OpenBSD: history.c,v 1.7 2002/02/19 19:39:37 millert Exp $ */
/* $NetBSD: history.c,v 1.5 1997/04/11 17:52:46 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93";
#else
-static char rcsid[] = "$OpenBSD: history.c,v 1.6 2002/02/16 21:27:26 millert Exp $";
+static char rcsid[] = "$OpenBSD: history.c,v 1.7 2002/02/19 19:39:37 millert Exp $";
#endif
#endif /* not lint && not SCCSID */
@@ -52,11 +52,7 @@ static char rcsid[] = "$OpenBSD: history.c,v 1.6 2002/02/16 21:27:26 millert Exp
#include <string.h>
#include <stdlib.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
static const char hist_cookie[] = "_HiStOrY_V1_\n";
@@ -575,27 +571,14 @@ history_next_string(h, str)
* User interface to history functions.
*/
const HistEvent *
-#ifdef __STDC__
history(History *h, int fun, ...)
-#else
-history(va_alist)
- va_dcl
-#endif
{
va_list va;
const HistEvent *ev = NULL;
const char *str;
static HistEvent sev = { 0, "" };
-#ifdef __STDC__
va_start(va, fun);
-#else
- History *h;
- int fun;
- va_start(va);
- h = va_arg(va, History *);
- fun = va_arg(va, int);
-#endif
switch (fun) {
case H_ADD:
diff --git a/lib/libedit/sys.h b/lib/libedit/sys.h
index 975dec2d7ba..b3a9e01fe1f 100644
--- a/lib/libedit/sys.h
+++ b/lib/libedit/sys.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys.h,v 1.5 2002/02/16 21:27:26 millert Exp $ */
+/* $OpenBSD: sys.h,v 1.6 2002/02/19 19:39:37 millert Exp $ */
/* $NetBSD: sys.h,v 1.3 1997/01/11 06:48:12 lukem Exp $ */
/*-
@@ -62,20 +62,12 @@
#ifndef _PTR_T
# define _PTR_T
-# ifdef __STDC__
typedef void* ptr_t;
-# else
-typedef char* ptr_t;
-# endif
#endif
#ifndef _IOCTL_T
# define _IOCTL_T
-# ifdef __STDC__
typedef void* ioctl_t;
-# else
-typedef char* ioctl_t;
-# endif
#endif
#include <stdio.h>