commit eb8fa81fde9468b9e9c0609857169da72d76ad08
parent 02aef996cac4cbda249c818d097fb3126bedc2fc
Author: Kyle Milz <krwmilz@gmail.com>
Date: Mon, 16 Aug 2021 18:12:40 +0000
Assume NeedFunctionPrototypes
Diffstat:
6 files changed, 2 insertions(+), 82 deletions(-)
diff --git a/filefind.h b/filefind.h
@@ -39,11 +39,7 @@ typedef char Boolean;
#endif
#ifndef ARGS
-#if NeedFunctionPrototypes
#define ARGS(x) x
-#else
-#define ARGS(x) ()
-#endif
#endif
/*
diff --git a/ft.c b/ft.c
@@ -111,13 +111,7 @@ xdvi_stream_close(stream)
*/
static void
-#if NeedFunctionPrototypes
read_ft_char(struct font *fontp, wide_ubyte ch)
-#else /* !NeedFunctionPrototypes */
-read_ft_char(fontp, ch)
- struct font *fontp;
- ubyte ch;
-#endif /* NeedFunctionPrototypes */
{
struct glyph *g;
FT_Face face;
diff --git a/gf.c b/gf.c
@@ -81,13 +81,7 @@ too_many_bits(ch)
static void
-#if NeedFunctionPrototypes
read_GF_char(struct font *fontp, wide_ubyte ch)
-#else /* !NeedFunctionPrototypes */
-read_GF_char(fontp, ch)
- struct font *fontp;
- ubyte ch;
-#endif /* NeedFunctionPrototypes */
{
struct glyph *g;
ubyte cmnd;
diff --git a/pk.c b/pk.c
@@ -135,13 +135,7 @@ PK_skip_specials(fontp)
*/
static void
-#if NeedFunctionPrototypes
read_PK_char(struct font *fontp, wide_ubyte ch)
-#else /* !NeedFunctionPrototypes */
-read_PK_char(fontp, ch)
- struct font *fontp;
- ubyte ch;
-#endif /* NeedFunctionPrototypes */
{
int i, j;
int n;
diff --git a/special.c b/special.c
@@ -814,13 +814,7 @@ ps_parseraw(PostScript_cmd)
/* ARGSUSED */
void
-#if NeedFunctionPrototypes
drawbegin_none(int xul, int yul, const char *cp)
-#else /* !NeedFunctionPrototypes */
-drawbegin_none(xul, yul, cp)
- int xul, yul;
- const char *cp;
-#endif /* NeedFunctionPrototypes */
{
draw_bbox();
}
diff --git a/xdvi.h b/xdvi.h
@@ -38,21 +38,9 @@ NOTE:
#include "config.h"
-
-/* If xmkmf is broken and there's a symlink from /usr/include/X11 to the right
- * place, then there will be no -I... argument on the cc command line for the
- * X include files. Since gcc version 3 and higher sets __STDC__ to 0 when
- * including system header files on some platforms, we may end up with
- * NeedFunctionPrototypes set to 0 when it should be 1. So, let's force the
- * issue.
- */
-
-#if __STDC__ && !defined(FUNCPROTO)
-# define FUNCPROTO (-1)
-#endif
-
#include <stddef.h>
#include <stdlib.h>
+
/* the following works around the wchar_t problem */
#include <X11/X.h>
#include <X11/Xosdefs.h>
@@ -101,19 +89,8 @@ typedef char Bool3; /* Yes/No/Maybe */
# include FT_FREETYPE_H
#endif
-#ifndef NeedFunctionPrototypes
-#if __STDC__
-#define NeedFunctionPrototypes 1
-#else /* STDC */
-#define NeedFunctionPrototypes 0
-#endif /* STDC */
-#endif /* NeedFunctionPrototypes */
-
-#if NeedFunctionPrototypes
+/* NeedFunctionPrototypes */
#define ARGS(x) x
-#else
-#define ARGS(x) ()
-#endif
#ifndef KPATHSEA
@@ -122,8 +99,6 @@ typedef char Bool3; /* Yes/No/Maybe */
definitions. See <ansidecl.h> from the GNU C library. P1H(void)
also works for definitions of routines which take no args. */
-#if NeedFunctionPrototypes /* Don't use __STDC__ here (gcc + SunOS 4) */
-
#define P1H(p1) (p1)
#define P2H(p1, p2) (p1, p2)
@@ -132,29 +107,8 @@ typedef char Bool3; /* Yes/No/Maybe */
#define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
#define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
-#else /* not NeedFunctionPrototypes */
-
-#define P1H(p1) ()
-#define P2H(p1, p2) ()
-
-#define P1C(t1,n1) (n1) t1 n1;
-#define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2;
-#define P3C(t1,n1, t2,n2, t3,n3) (n1,n2,n3) t1 n1; t2 n2; t3 n3;
-#define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1,n2,n3,n4) \
- t1 n1; t2 n2; t3 n3; t4 n4;
-
-#endif /* not NeedFunctionPrototypes */
-
#endif /* not KPATHSEA */
-#ifndef NeedWidePrototypes
-#define NeedWidePrototypes NeedFunctionPrototypes
-#endif
-
-#ifndef NeedVarargsPrototypes
-#define NeedVarargsPrototypes NeedFunctionPrototypes
-#endif
-
#if NeedVarargsPrototypes
#define VARGS(x) x
#else
@@ -223,15 +177,9 @@ typedef char Bool3; /* Yes/No/Maybe */
typedef unsigned char ubyte;
-#if NeedWidePrototypes
-typedef unsigned int wide_ubyte;
-typedef int wide_bool;
-#define WIDENINT (int)
-#else
typedef ubyte wide_ubyte;
typedef Boolean wide_bool;
#define WIDENINT
-#endif
#if defined(MAKETEXPK) && !defined(MKTEXPK)
#define MKTEXPK 1