summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2022-12-11 15:43:11 -0800
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2022-12-11 16:07:37 -0800
commit19e90648da96078d7e36434f6003ca24fdbb29bd (patch)
tree070a597b5080d6cde7a1c786d6521d7e8f381916
parente27b562aae4195de3039d11a2697f1438c35a173 (diff)
Assume the compiler is from this millennium
`unifdef -D__STDC__` over the tree Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r--include/tet_api.h4
-rw-r--r--src/tet3/apilib/dresfile.c21
-rw-r--r--src/tet3/inc/dtmac.h2
-rw-r--r--src/tet3/inc/error.h4
-rw-r--r--src/tet3/llib/llib-lapi.c10
-rw-r--r--xts5/include/Vlib.h4
-rw-r--r--xts5/include/Xstlib.h9
-rw-r--r--xts5/include/xtestlib.h14
-rw-r--r--xts5/include/xtlibproto.h243
-rw-r--r--xts5/src/bin/mc/mcproto.h95
-rw-r--r--xts5/src/lib/checkfont.c6
-rw-r--r--xts5/src/lib/delete.c14
-rw-r--r--xts5/src/lib/ex_startup.c5
-rw-r--r--xts5/src/lib/report.c70
-rw-r--r--xts5/src/lib/rpt.c34
-rw-r--r--xts5/src/lib/startup.c5
-rw-r--r--xts5/src/lib/tpstartup.c5
-rw-r--r--xts5/src/libXtmu/CursorName.c4
-rw-r--r--xts5/src/libproto/MakeReq.c72
-rw-r--r--xts5/src/libproto/MakeXIReq.c76
-rw-r--r--xts5/src/libproto/delete.c14
21 files changed, 0 insertions, 711 deletions
diff --git a/include/tet_api.h b/include/tet_api.h
index 36561eaf..d69330e6 100644
--- a/include/tet_api.h
+++ b/include/tet_api.h
@@ -165,10 +165,8 @@ extern "C" {
/* the following are needed for types used in declarations */
#include <sys/types.h>
#define TET_PID_T_DEFINED
-#if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32)
# include <time.h>
# include <stdarg.h>
-#endif
#ifdef TET_POSIX_THREADS
# include <pthread.h>
#else /* !TET_POSIX_THREADS */
@@ -231,11 +229,9 @@ extern "C" {
** function prototype macros
*/
-#if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32)
# ifndef TET_PROTOTYPES
# define TET_PROTOTYPES
# endif
-#endif
#ifdef TET_PROTOTYPES
# define TET_PROTOLIST(list) list
diff --git a/src/tet3/apilib/dresfile.c b/src/tet3/apilib/dresfile.c
index 70aacfcc..b94898b1 100644
--- a/src/tet3/apilib/dresfile.c
+++ b/src/tet3/apilib/dresfile.c
@@ -164,11 +164,7 @@ MODIFICATIONS:
************************************************************************/
#include <stdlib.h>
-#if defined (__STDC__) || defined (_WIN32)
# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -703,7 +699,6 @@ va_list ap;
** combined results file
*/
-#if defined (__STDC__) || defined (_WIN32)
TET_IMPORT int tet_printf(char *format, ...)
{
int rval;
@@ -715,22 +710,6 @@ TET_IMPORT int tet_printf(char *format, ...)
return rval;
}
-#else /* !(__STDC__ || _WIN32) */
-TET_IMPORT int tet_printf(va_alist)
-va_dcl
-{
- char *format;
- int rval;
- va_list ap;
-
- va_start(ap);
- format = va_arg(ap, char *);
- rval = tet_vprintf(format, ap);
- va_end(ap);
-
- return rval;
-}
-#endif /* !(__STDC__ || _WIN32) */
/*
** tet_result() - send a test purpose result to XRESD or tmpfile
diff --git a/src/tet3/inc/dtmac.h b/src/tet3/inc/dtmac.h
index 87527806..8a3f63db 100644
--- a/src/tet3/inc/dtmac.h
+++ b/src/tet3/inc/dtmac.h
@@ -111,11 +111,9 @@ MODIFICATIONS:
** are protected against multiple inclusion as well
*/
-#if defined(__STDC__) || defined(__cplusplus)
# ifndef PROTOTYPES
# define PROTOTYPES
# endif
-#endif
/* function prototype macro */
#ifdef PROTOTYPES
diff --git a/src/tet3/inc/error.h b/src/tet3/inc/error.h
index b8746f0b..d992abe8 100644
--- a/src/tet3/inc/error.h
+++ b/src/tet3/inc/error.h
@@ -65,12 +65,8 @@ TET_NORETURN TET_IMPORT_FUNC_PTR(void, tet_libfatal,
/* test an assertion, exit if it fails */
TET_IMPORT_ARRAY(char, tet_assertmsg, []);
-#if defined(__STDC__) || defined(_WIN32) || defined(__cplusplus)
/* assume cpp understands #x whatever the value of __STDC__ */
# define ASSERT(x) if (!(x)) fatal(0, tet_assertmsg, #x); else
-#else
-# define ASSERT(x) if (!(x)) fatal(0, tet_assertmsg, "x"); else
-#endif
/* test an assertion only in TETware-Lite */
#ifdef TET_LITE /* -LITE-CUT-LINE- */
diff --git a/src/tet3/llib/llib-lapi.c b/src/tet3/llib/llib-lapi.c
index 4904bb0c..58cefca1 100644
--- a/src/tet3/llib/llib-lapi.c
+++ b/src/tet3/llib/llib-lapi.c
@@ -42,10 +42,6 @@ MODIFICATIONS:
typedef int pid_t;
#endif
-#ifndef __STDC__
-#include <time.h>
-#include <varargs.h>
-#endif
#if defined(TET_THREADS) && !defined(TET_POSIX_THREADS)
#include <synch.h>
#endif
@@ -139,14 +135,8 @@ struct tet_synmsg *msgp;
return 0;
}
-#ifdef __STDC__
/* PRINTFLIKE1 */ /* VARARGS1 */
int tet_printf(char *format, ...)
-#else
-/* PRINTFLIKE1 */ /* VARARGS1 */
-int tet_printf(format)
-char *format;
-#endif
{
return 0;
}
diff --git a/xts5/include/Vlib.h b/xts5/include/Vlib.h
index 09da62e3..7ec91611 100644
--- a/xts5/include/Vlib.h
+++ b/xts5/include/Vlib.h
@@ -113,11 +113,7 @@ purpose. It is provided "as is" without express or implied warranty.
#include <X11/X.h>
#ifndef NeedFunctionPrototypes
-#if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
#define NeedFunctionPrototypes 1
-#else
-#define NeedFunctionPrototypes 0
-#endif /* __STDC__ */
#endif /* NeedFunctionPrototypes */
#ifndef NeedWidePrototypes
diff --git a/xts5/include/Xstlib.h b/xts5/include/Xstlib.h
index ad7c4b6d..80a53873 100644
--- a/xts5/include/Xstlib.h
+++ b/xts5/include/Xstlib.h
@@ -307,19 +307,10 @@ extern CL Xst_clients[MAX_CLIENTS];
* type - type of request (e.g. GrabButton)
*/
-#ifdef __STDC__
#define Get_Value_Ptr(rp,type) ((unsigned long *) (((unsigned long) (rp) + sizeof (x##type##Req))))
-#else
-#define Get_Value_Ptr(rp,type) ((unsigned long *) (((unsigned long) (rp) + sizeof (x/**/type/**/Req))))
-#endif
-#ifdef __STDC__
#define Get_Value_Len(rp,type) ((unsigned long) (((rp)->length<<2) - \
sizeof (x##type##Req)))
-#else
-#define Get_Value_Len(rp,type) ((unsigned long) (((rp)->length<<2) - \
- sizeof (x/**/type/**/Req)))
-#endif
/*
* Test Resource Management
diff --git a/xts5/include/xtestlib.h b/xts5/include/xtestlib.h
index 0ba3d225..f91ecfb1 100644
--- a/xts5/include/xtestlib.h
+++ b/xts5/include/xtestlib.h
@@ -169,11 +169,9 @@ struct fontinfo {
* predicate procedure argument types
*/
typedef Bool (*Predicate) (
-#ifdef __STDC__
Display *display,
XEvent *error_event,
char *arg
-#endif
);
/*
@@ -185,38 +183,26 @@ typedef Bool (*Predicate) (
*/
typedef union {
int (*a0)(
-#ifdef __STDC__
/*
* The arguments have been commented out at present, because
* some compilers have problems with this.
*/
/* Display *d, int a */
-#endif
);
int (*a1)(
-#ifdef __STDC__
/* Display *d, XEvent *e, Predicate p, char *cp */
-#endif
);
int (*a2)(
-#ifdef __STDC__
/* Display *d, long l, XEvent *ep */
-#endif
);
int (*a3)(
-#ifdef __STDC__
/* Display *d, XEvent *e */
-#endif
);
int (*a4)(
-#ifdef __STDC__
/* Display *d, Window w, long l, XEvent *ep */
-#endif
);
int (*a5)(
-#ifdef __STDC__
/* Display *d */
-#endif
);
} Block_Proc;
diff --git a/xts5/include/xtlibproto.h b/xts5/include/xtlibproto.h
index e7ace8da..d8fb4a78 100644
--- a/xts5/include/xtlibproto.h
+++ b/xts5/include/xtlibproto.h
@@ -112,8 +112,6 @@ makes no representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
*/
-#ifdef __STDC__
-
void startup(void);
void cleanup(void);
void fontstartup(void);
@@ -352,245 +350,4 @@ int defcur(Display *display, Window window);
int spriteiswin(Display *display, Window window);
const char *outfile(const char *fn);
-#else
-
-void startup();
-void cleanup();
-void fontstartup();
-void setxtfontpath();
-void fontcleanup();
-void focusstartup();
-void focuscleanup();
-void fontfocusstartup();
-void fontfocuscleanup();
-void rmstartup();
-void aborttest();
-void reset_delay();
-void exec_startup();
-void exec_cleanup();
-char *boolname();
-char *eventmaskname();
-char *eventname();
-char *keymaskname();
-char *modifiername();
-char *buttonmaskname();
-char *buttonname();
-char *notifymodename();
-char *notifydetailname();
-char *visibilityname();
-char *grabreplyname();
-char *alloweventmodename();
-char *reverttoname();
-char *errorname();
-char *classname();
-char *bitgravityname();
-char *wingravityname();
-char *backingstorename();
-char *gcfunctionname();
-char *linestylename();
-char *capstylename();
-char *joinstylename();
-char *fillstylename();
-char *displayclassname();
-char *protoname();
-char *atomname();
-char *mapstatename();
-char *visualmaskname();
-char *contexterrorname();
-int error_status();
-int unexp_err();
-int io_err();
-int geterr();
-int getbadvalue();
-void reseterr();
-int getevent();
-int stackorder();
-void report();
-void trace();
-/*APTEST*/
-void report_purpose();
-void report_assertion();
-void report_strategy();
-void check();
-void debug();
-void tccabort();
-void setdblev();
-int getdblev();
-Window iponlywin();
-Window badwin();
-void _startcall();
-void startcall();
-void _endcall();
-void endcall();
-Window makewin();
-void winpair();
-Drawable makewinpos();
-int checkevent();
-int initvclass();
-void resetvclass();
-int nextvclass();
-int nvclass();
-GC badgc();
-Pixmap badpixm();
-Font badfont();
-void badvis();
-void linkstart();
-void linkclean();
-int issuppvis();
-unsigned long visualsupported();
-void resetsupvis();
-int nextsupvis();
-int nsupvis();
-Status checkarea();
-Status checkclear();
-Status checkregion();
-void getsize();
-unsigned int getdepth();
-void pattern();
-Status checkpattern();
-Window crechild();
-Window creunmapchild();
-Status checktile();
-Pixmap maketile();
-Pixmap makepixm();
-void resetvinf();
-int nextvinf();
-int nvinf();
-Drawable defdraw();
-Window defwin();
-GC makegc();
-void setgcfont();
-void dumpimage();
-int verifyimage();
-void dclear();
-void dset();
-void delete();
-int isdeleted();
-void resetdelete();
-void cancelrest();
-void unsupported();
-void notinuse();
-void untested();
-XImage *savimage();
-Status compsavimage();
-Status diffsavimage();
-int checkpixel();
-unsigned long getpixel();
-Status checkpixels();
-int notmember();
-int notmaskmember();
-void setwidth();
-void setcapstyle();
-void setlinestyle();
-void setjoinstyle();
-int checkgccomponent();
-void gcflush();
-void tpstartup();
-void tpcleanup();
-Pixmap nondepth1pixmap();
-void setfuncpixel();
-void regid();
-void freereg();
-int regenable();
-int regdisable();
-void openfonts();
-int checkfsp();
-void txtextents();
-void txtextents16();
-int txtwidth();
-int txtwidth16();
-Colormap badcolormap();
-Colormap makecolmap();
-int lg();
-char *bitstr();
-Cursor makecurnum();
-Cursor makecur();
-Cursor makecur2();
-XImage *makeimg();
-void dsetimg();
-void patternimg();
-Status checkimg();
-Status checkimgstruct();
-Display *opendisplay();
-unsigned int bitcount();
-unsigned long getpix();
-int atov();
-void initconfig();
-Window mkwinchild();
-Window mkwin();
-Status block();
-Winh *winh_adopt();
-int winh_create();
-Winh *winh_find();
-int winh_plant();
-int winh_pending();
-int winh_harvest();
-int winh_weed();
-int winh_ignore_event();
-int winh_selectinput();
-int winh_changewindowattributes();
-void winh_free();
-int winh_walk();
-int winh_climb();
-int winh_eventindex();
-int winh_ordercheck();
-int winh();
-PointerPlace *warppointer();
-Bool pointermoved();
-void unwarppointer();
-void pointerrootpos();
-void rootcoordset();
-void serialset();
-Bool serialtest();
-Time gettime();
-int maxsize();
-char *xt_strdup();
-struct buildtree *buildtree();
-struct buildtree *btntobtp();
-struct buildtree *btwtobtp();
-Window btntow();
-char *btwton();
-void setforexpose();
-Status exposefill();
-Status exposecheck();
-Status expose_test_restored();
-void settimeout();
-unsigned long cleartimeout();
-Region makeregion();
-int samehost();
-int pfcount();
-int rptcounts();
-Status SimulateKeyPressEvent();
-Status SimulateKeyReleaseEvent();
-Status SimulateButtonPressEvent();
-Status SimulateButtonReleaseEvent();
-Status CompareCursorWithWindow();
-Status CompareCurrentWithWindow();
-Status SimulateMotionEvent();
-Status XTestDiscard();
-void XTestSetGContextOfGC();
-void XTestSetVisualIDOfVisual();
-void buttonpress();
-void buttonrel();
-void keypress();
-void keyrel();
-void relbuttons();
-void relkeys();
-void relalldev();
-unsigned int wantmods();
-int modpress();
-int modrel();
-int ismodkey();
-int restoredevstate();
-int noext();
-int nbuttons();
-int getkeycode();
-Status IsExtTestAvailable();
-int xtest_putenv();
-int curofwin();
-int defcur();
-int spriteiswin();
-char *outfile();
-
-#endif
diff --git a/xts5/src/bin/mc/mcproto.h b/xts5/src/bin/mc/mcproto.h
index 16df2949..adb03385 100644
--- a/xts5/src/bin/mc/mcproto.h
+++ b/xts5/src/bin/mc/mcproto.h
@@ -67,7 +67,6 @@ revisions cannot be separated from the freely copyable material, the net
result is that use of this software is governed by the ApTest copyright.
*/
-#if __STDC__ == 1
void mcstart(char *buf);
void mcend(char *buf);
@@ -160,98 +159,4 @@ char *name10lc(char *name);
int main(int argc, char **argv);
char *strinstr(char *s1, char *s2);
-#else
-
-void mcstart();
-void mcend();
-void mccopyright();
-void mcheader();
-int defargnames();
-void mcassertion();
-int assertfill();
-int joinpunct();
-void mcstrategy();
-void mccode();
-void mcexterncode();
-int funcstart();
-int funcend();
-int doxcall();
-void mcdefassertion();
-void mcincstart();
-void mcincend();
-int hashcmd();
-int doif();
-int doelse();
-int doendif();
-void defargtype();
-int errtext();
-int valerror();
-int valerrdefs();
-int erralternates();
-int errcode();
-void mepcopyright();
-void mepecho();
-void mepstart();
-void mepend();
-void mepset();
-void mepcomment();
-FILE *nextfile();
-void outcopy();
-FILE *cretmpfile();
-int outfile();
-int remfiles();
-int includefile();
-void filetemp();
-char *mcpath();
-int gccomps();
-void macopyright();
-void maheader();
-void maassertion();
-void madefassertion();
-void mastart();
-void maend();
-void macomment();
-int main();
-char *newline();
-int putbackline();
-void expandxname();
-int err();
-int errexit();
-char *mcstrdup();
-char *strinstr();
-int isassertwanted();
-void mmstart();
-void mmend();
-void mmcopyright();
-void mmheader();
-void mmmake();
-void mmcfiles();
-void mmincstart();
-struct mclist *createmclist();
-struct mclist *addmclist();
-char *getmclistitem();
-void mascopyright();
-void masheader();
-void masassertion();
-void masstrategy();
-void masdefassertion();
-void masstart();
-void masend();
-int dosections();
-int assertion();
-void do1sec();
-int dohook();
-void skip();
-void echo();
-void echon();
-void dodefaults();
-int setcmd();
-char *name12();
-char *name12lc();
-char *name10();
-char *name10lc();
-int main();
-char *strinstr();
-
-#endif
diff --git a/xts5/src/lib/checkfont.c b/xts5/src/lib/checkfont.c
index 094972d7..a1d2c167 100644
--- a/xts5/src/lib/checkfont.c
+++ b/xts5/src/lib/checkfont.c
@@ -150,15 +150,9 @@ struct fontinfo fontinfo[] = {
};
int nfontinfo = NELEM(fontinfo);
-#ifdef __STDC__
static int checkprops(XFontStruct *fsp, XFontStruct *good, char *str);
static XCharStruct *getmetric(XFontStruct *fsp, unsigned int c);
static int check1prop(XFontStruct *fsp, XFontProp *fp, char *str);
-#else
-static int checkprops();
-static XCharStruct *getmetric();
-static int check1prop();
-#endif
/*
* Check a XCharStruct item. FAIL is issued on error, PASS is not.
diff --git a/xts5/src/lib/delete.c b/xts5/src/lib/delete.c
index e5bcefcd..25699745 100644
--- a/xts5/src/lib/delete.c
+++ b/xts5/src/lib/delete.c
@@ -125,11 +125,7 @@ purpose. It is provided "as is" without express or implied warranty.
#include "xtestlib.h"
#include "pixval.h"
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#define LINELEN 1024
@@ -149,22 +145,12 @@ static int TestDeleted = True;
/*VARARGS1*/
void
-#ifdef __STDC__
delete(char *mess, ... )
-#else
-delete(mess, va_alist)
-char *mess;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, mess);
-#else
- va_start(args);
-#endif
if (mess && *mess) {
diff --git a/xts5/src/lib/ex_startup.c b/xts5/src/lib/ex_startup.c
index b077ff75..c1a307e9 100644
--- a/xts5/src/lib/ex_startup.c
+++ b/xts5/src/lib/ex_startup.c
@@ -151,13 +151,8 @@ exec_startup()
{
char *disp;
char *cp;
-#ifdef __STDC__
extern int unexp_err(Display *, XErrorEvent *ep);
extern int io_err(Display *);
-#else
-extern int unexp_err();
-extern int io_err();
-#endif
initconfig();
diff --git a/xts5/src/lib/report.c b/xts5/src/lib/report.c
index 669ed905..2abc7a99 100644
--- a/xts5/src/lib/report.c
+++ b/xts5/src/lib/report.c
@@ -139,11 +139,7 @@ purpose. It is provided "as is" without express or implied warranty.
#include "xtestlib.h"
#include "tet_api.h"
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#define LINELEN 1024
@@ -157,22 +153,12 @@ int purpose_reported = 0;
/*VARARGS1*/
void
-#ifdef __STDC__
report(char *fmt, ...)
-#else
-report(fmt, va_alist)
-char *fmt;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, fmt);
-#else
- va_start(args);
-#endif
strcpy(buf, "REPORT: ");
vsprintf(buf+strlen("REPORT: "), fmt, args);
@@ -183,12 +169,7 @@ va_list args;
}
/*APTEST*/
-#ifdef __STDC__
void report_purpose(int number)
-#else
-void report_purpose(number)
-int number;
-#endif
{
char buf[LINELEN];
@@ -197,22 +178,12 @@ int number;
purpose_reported = number;
}
-#ifdef __STDC__
void report_assertion(char* line)
-#else
-void report_assertion(line)
-char *line;
-#endif
{
tet_infoline(line);
}
-#ifdef __STDC__
void report_strategy(char* line)
-#else
-void report_strategy(line)
-char *line;
-#endif
{
char buf[LINELEN];
@@ -223,13 +194,7 @@ char *line;
/*VARARGS1*/
void
-#ifdef __STDC__
trace(char *fmt, ...)
-#else
-trace(fmt, va_alist)
-char *fmt;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
@@ -237,11 +202,7 @@ va_list args;
if (config.option_no_trace)
return;
-#ifdef __STDC__
va_start(args, fmt);
-#else
- va_start(args);
-#endif
strcpy(buf, "TRACE: ");
vsprintf(buf+strlen("TRACE: "), fmt, args);
@@ -253,13 +214,7 @@ va_list args;
/*VARARGS1*/
void
-#ifdef __STDC__
check(char *fmt, ...)
-#else
-check(fmt, va_alist)
-char *fmt;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
@@ -267,11 +222,7 @@ va_list args;
if (config.option_no_check)
return;
-#ifdef __STDC__
va_start(args, fmt);
-#else
- va_start(args);
-#endif
strcpy(buf, "CHECK: ");
vsprintf(buf+strlen("CHECK: "), fmt, args);
@@ -283,14 +234,7 @@ va_list args;
/*VARARGS2*/
void
-#ifdef __STDC__
debug(int lev, char *fmt, ...)
-#else
-debug(lev, fmt, va_alist)
-int lev;
-char *fmt;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
@@ -298,11 +242,7 @@ va_list args;
if (lev > DebugLevel)
return;
-#ifdef __STDC__
va_start(args, fmt);
-#else
- va_start(args);
-#endif
strcpy(buf, "DEBUG: ");
vsprintf(buf+strlen("DEBUG: "), fmt, args);
@@ -321,22 +261,12 @@ va_list args;
/*VARARGS1*/
void
-#ifdef __STDC__
tccabort(char *fmt, ...)
-#else
-tccabort(fmt, va_alist)
-char *fmt;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, fmt);
-#else
- va_start(args);
-#endif
if (purpose_reported == 0)
report_purpose((tet_thistest == 0) ? 1: tet_thistest);
diff --git a/xts5/src/lib/rpt.c b/xts5/src/lib/rpt.c
index bbf49ade..33d0b798 100644
--- a/xts5/src/lib/rpt.c
+++ b/xts5/src/lib/rpt.c
@@ -124,11 +124,7 @@ purpose. It is provided "as is" without express or implied warranty.
#include "xtestlib.h"
#include "tet_api.h"
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#define LINELEN 1024
@@ -144,22 +140,12 @@ purpose. It is provided "as is" without express or implied warranty.
/*VARARGS1*/
void
-#ifdef __STDC__
unsupported(char *mess, ... )
-#else
-unsupported(mess, va_alist)
-char *mess;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, mess);
-#else
- va_start(args);
-#endif
if (mess && *mess) {
@@ -177,22 +163,12 @@ va_list args;
/*VARARGS1*/
void
-#ifdef __STDC__
notinuse(char *mess, ... )
-#else
-notinuse(mess, va_alist)
-char *mess;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, mess);
-#else
- va_start(args);
-#endif
if (mess && *mess) {
@@ -210,22 +186,12 @@ va_list args;
/*VARARGS1*/
void
-#ifdef __STDC__
untested(char *mess, ... )
-#else
-untested(mess, va_alist)
-char *mess;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, mess);
-#else
- va_start(args);
-#endif
if (mess && *mess) {
diff --git a/xts5/src/lib/startup.c b/xts5/src/lib/startup.c
index 9d4d9bc9..c7c98931 100644
--- a/xts5/src/lib/startup.c
+++ b/xts5/src/lib/startup.c
@@ -184,13 +184,8 @@ char *disp;
char *cp;
/* APTETS extern char *TestName; */
extern struct tet_testlist tet_testlist[];
-#ifdef __STDC__
extern int unexp_err(Display *d, XErrorEvent *ev);
extern int io_err(Display *d);
-#else
-extern int unexp_err();
-extern int io_err();
-#endif
/*
* Set the debug level first (it is used in initconfig).
diff --git a/xts5/src/lib/tpstartup.c b/xts5/src/lib/tpstartup.c
index d8e08566..6ef202f2 100644
--- a/xts5/src/lib/tpstartup.c
+++ b/xts5/src/lib/tpstartup.c
@@ -133,13 +133,8 @@ static int brkval;
void
tpstartup()
{
-#ifdef __STDC__
extern int unexp_err(Display *, XErrorEvent *ep);
extern int io_err(Display *);
-#else
-extern int unexp_err();
-extern int io_err();
-#endif
XSetErrorHandler(unexp_err);
XSetIOErrorHandler(io_err);
diff --git a/xts5/src/libXtmu/CursorName.c b/xts5/src/libXtmu/CursorName.c
index ce6c4e23..47cc0065 100644
--- a/xts5/src/libXtmu/CursorName.c
+++ b/xts5/src/libXtmu/CursorName.c
@@ -90,11 +90,7 @@ SOFTWARE.
#include <X11/Xmu/CurUtil.h>
#include <X11/cursorfont.h>
-#if __STDC__
#define Const const
-#else
-#define Const /**/
-#endif
#if NeedFunctionPrototypes
int XmuCursorNameToIndex (_Xconst char *name)
diff --git a/xts5/src/libproto/MakeReq.c b/xts5/src/libproto/MakeReq.c
index ac0d571a..0f81a336 100644
--- a/xts5/src/libproto/MakeReq.c
+++ b/xts5/src/libproto/MakeReq.c
@@ -212,7 +212,6 @@ static int this_client;
*
*/
-#ifdef __STDC__
#define GetReq(name, req) \
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
((sizeof(x##name##Req))>>2) : \
@@ -228,23 +227,6 @@ static int this_client;
req = (xReq *)Xstmalloc(max(sizeof(x##name##Req), (alloc_len<<2))); \
req->length = (sizeof(x##name##Req))>>2;\
req->reqType = X_##name
-#else
-#define GetReq(name, req) \
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- ((sizeof(x/**/name/**/Req))>>2) : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- ((sizeof(x/**/name/**/Req))>>2) + 1 : \
- ((sizeof(x/**/name/**/Req))>>2) - 1 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max(sizeof(x/**/name/**/Req), (alloc_len<<2))); \
- req->length = (sizeof(x/**/name/**/Req))>>2;\
- req->reqType = X_/**/name
-#endif
/*
* Macro: GetReqExtra - allocates memory for a variable-length request
@@ -268,7 +250,6 @@ static int this_client;
*
*/
-#ifdef __STDC__
#define GetReqExtra(name, n, req) \
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
(sizeof(x##name##Req)+padup(n))>>2 : \
@@ -285,24 +266,6 @@ static int this_client;
req->length = (sizeof(x##name##Req)+padup(n))>>2;\
req->reqType = X_##name; \
valuePtr = (char *) Get_Value_Ptr(req,name)
-#else
-#define GetReqExtra(name, n, req) \
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- (sizeof(x/**/name/**/Req)+padup(n))>>2 : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- ((sizeof(x/**/name/**/Req)+padup(n))>>2) + 1 : \
- ((sizeof(x/**/name/**/Req))>>2) - 1 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max((sizeof(x/**/name/**/Req)+padup(n)), (alloc_len<<2))); \
- req->length = (sizeof(x/**/name/**/Req)+padup(n))>>2;\
- req->reqType = X_/**/name;\
- valuePtr = (char *) Get_Value_Ptr(req,name)
-#endif
/*
* Macro: GetEmptyReq - allocate memory for a request that takes no
@@ -324,7 +287,6 @@ static int this_client;
*
*/
-#ifdef __STDC__
#define GetEmptyReq(name, req) \
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
1 : \
@@ -339,22 +301,6 @@ static int this_client;
req = (xReq *)Xstmalloc(max(sizeof(xReq), (alloc_len<<2))); \
req->length = 1;\
req->reqType = X_##name
-#else
-#define GetEmptyReq(name, req) \
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- 1 : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- 2 : 0 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max(sizeof(xReq), (alloc_len<<2))); \
- req->length = 1;\
- req->reqType = X_/**/name
-#endif
/*
intent: allocate memory for a request that takes one parameter,
@@ -369,7 +315,6 @@ static int this_client;
methods:
*/
-#ifdef __STDC__
#define GetResReq(name,rid,req)\
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
2 : \
@@ -385,23 +330,6 @@ static int this_client;
req->length = 2;\
req->reqType = X_##name;\
((xResourceReq *)req)->id = (rid)
-#else
-#define GetResReq(name,rid,req)\
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- 2 : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- 3 : 1 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max(sizeof(xResourceReq), (alloc_len<<2)));\
- req->length = 2;\
- req->reqType = X_/**/name;\
- ((xResourceReq *)req)->id = (rid)
-#endif
#define UNKNOWN_LENGTH 0
diff --git a/xts5/src/libproto/MakeXIReq.c b/xts5/src/libproto/MakeXIReq.c
index 2e42421d..7cbd5614 100644
--- a/xts5/src/libproto/MakeXIReq.c
+++ b/xts5/src/libproto/MakeXIReq.c
@@ -243,7 +243,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
*
*/
-#ifdef __STDC__
#define GetReq(name, req) \
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
((sizeof(x##name##Req))>>2) : \
@@ -260,24 +259,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
req->length = (sizeof(x##name##Req))>>2;\
((x##name##Req *)req)->ReqType = X_##name;\
req->reqType = XInputMajorOpcode
-#else
-#define GetReq(name, req) \
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- ((sizeof(x/**/name/**/Req))>>2) : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- ((sizeof(x/**/name/**/Req))>>2) + 1 : \
- ((sizeof(x/**/name/**/Req))>>2) - 1 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max(sizeof(x/**/name/**/Req), (alloc_len<<2))); \
- req->length = (sizeof(x/**/name/**/Req))>>2;\
- ((x/**/name/**/Req *)req)->ReqType = X_/**/name;\
- req->reqType = XInputMajorOpcode
-#endif
/*
* Macro: GetReqExtra - allocates memory for a variable-length request
@@ -301,7 +282,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
*
*/
-#ifdef __STDC__
#define GetReqExtra(name, n, req) \
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
(sizeof(x##name##Req)+padup(n))>>2 : \
@@ -319,25 +299,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
req->reqType = XInputMajorOpcode;\
((x##name##Req *)req)->ReqType = X_##name;\
valuePtr = (char *) Get_Value_Ptr(req,name)
-#else
-#define GetReqExtra(name, n, req) \
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- (sizeof(x/**/name/**/Req)+padup(n))>>2 : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- ((sizeof(x/**/name/**/Req)+padup(n))>>2) + 1 : \
- ((sizeof(x/**/name/**/Req))>>2) - 1 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max((sizeof(x/**/name/**/Req)+padup(n)), (alloc_len<<2))); \
- req->length = (sizeof(x/**/name/**/Req)+padup(n))>>2;\
- req->reqType = XInputMajorOpcode;\
- ((x/**/name/**/Req *)req)->ReqType = X_/**/name;\
- valuePtr = (char *) Get_Value_Ptr(req,name)
-#endif
/*
* Macro: GetEmptyReq - allocate memory for a request that takes no
@@ -359,7 +320,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
*
*/
-#ifdef __STDC__
#define GetEmptyReq(name, req) \
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
1 : \
@@ -375,23 +335,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
req->length = 1;\
req->reqType = XInputMajorOpcode;\
((x##name##Req *)req)->ReqType = X_##name
-#else
-#define GetEmptyReq(name, req) \
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- 1 : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- 2 : 0 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max(sizeof(xReq), (alloc_len<<2))); \
- req->length = 1;\
- req->reqType = XInputMajorOpcode;\
- ((x/**/name/**/Req *)req)->ReqType = X_/**/name
-#endif
/*
intent: allocate memory for a request that takes one parameter,
@@ -406,7 +349,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
methods:
*/
-#ifdef __STDC__
#define GetResReq(name,rid,req)\
bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
2 : \
@@ -423,24 +365,6 @@ static int alloc_len; /* significantly different only in TOO_LONG tests */
req->reqType = XInputMajorOpcode;\
((x##name##Req *)req)->ReqType = X_##name;\
((xResourceReq *)req)->id = (rid)
-#else
-#define GetResReq(name,rid,req)\
- bad_len = (Get_Test_Type(this_client) == TOO_LONG) ? \
- 2 : \
- ( \
- (Get_Test_Type(this_client) == JUST_TOO_LONG) ? \
- 3 : 1 \
- );\
- if (Get_Test_Type(this_client) == TOO_LONG) \
- alloc_len = Get_Max_Request(client) + 1; \
- else \
- alloc_len = bad_len; \
- req = (xReq *)Xstmalloc(max(sizeof(xResourceReq), (alloc_len<<2)));\
- req->length = 2;\
- req->reqType = XInputMajorOpcode;\
- ((x##name##Req *)req)->ReqType = X_/**/name;\
- ((xResourceReq *)req)->id = (rid)
-#endif
#define UNKNOWN_LENGTH 0
diff --git a/xts5/src/libproto/delete.c b/xts5/src/libproto/delete.c
index e5e55b4c..5ae5ba9b 100644
--- a/xts5/src/libproto/delete.c
+++ b/xts5/src/libproto/delete.c
@@ -126,11 +126,7 @@ purpose. It is provided "as is" without express or implied warranty.
#include "pixval.h"
#include "XstlibInt.h"
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#define LINELEN 1024
@@ -153,22 +149,12 @@ extern int tet_thistest;
/*VARARGS1*/
void
-#ifdef __STDC__
delete(char *mess, ... )
-#else
-delete(mess, va_alist)
-char *mess;
-va_dcl
-#endif
{
char buf[LINELEN];
va_list args;
-#ifdef __STDC__
va_start(args, mess);
-#else
- va_start(args);
-#endif
Xst_delete_count++;