summaryrefslogtreecommitdiff
path: root/xc/lib/Xt
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib/Xt')
-rw-r--r--xc/lib/Xt/Alloc.c5
-rw-r--r--xc/lib/Xt/Convert.c16
-rw-r--r--xc/lib/Xt/Converters.c34
-rw-r--r--xc/lib/Xt/Display.c6
-rw-r--r--xc/lib/Xt/Event.c11
-rw-r--r--xc/lib/Xt/Geometry.c4
-rw-r--r--xc/lib/Xt/Imakefile6
-rw-r--r--xc/lib/Xt/Initialize.c14
-rw-r--r--xc/lib/Xt/Intrinsic.c14
-rw-r--r--xc/lib/Xt/Intrinsic.h37
-rw-r--r--xc/lib/Xt/IntrinsicI.h4
-rw-r--r--xc/lib/Xt/NextEvent.c89
-rw-r--r--xc/lib/Xt/PassivGraI.h7
-rw-r--r--xc/lib/Xt/ResConfig.c7
-rw-r--r--xc/lib/Xt/ResourceI.h4
-rw-r--r--xc/lib/Xt/Resources.c10
-rw-r--r--xc/lib/Xt/Selection.c2
-rw-r--r--xc/lib/Xt/Shell.c22
-rw-r--r--xc/lib/Xt/ShellI.h12
-rw-r--r--xc/lib/Xt/TMkey.c14
-rw-r--r--xc/lib/Xt/TMparse.c3
-rw-r--r--xc/lib/Xt/ThreadsI.h6
-rw-r--r--xc/lib/Xt/VarCreate.c142
-rw-r--r--xc/lib/Xt/VarGet.c55
-rw-r--r--xc/lib/Xt/Varargs.c13
-rw-r--r--xc/lib/Xt/VarargsI.h9
-rw-r--r--xc/lib/Xt/Xtos.h5
-rw-r--r--xc/lib/Xt/sharedlib.c35
-rw-r--r--xc/lib/Xt/util/Shell.ht5
-rw-r--r--xc/lib/Xt/util/StrDefs.ct5
-rw-r--r--xc/lib/Xt/util/StrDefs.ht5
31 files changed, 120 insertions, 481 deletions
diff --git a/xc/lib/Xt/Alloc.c b/xc/lib/Xt/Alloc.c
index 6c6ac493f..574a7df19 100644
--- a/xc/lib/Xt/Alloc.c
+++ b/xc/lib/Xt/Alloc.c
@@ -54,6 +54,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/Alloc.c,v 1.7 2001/07/29 05:01:12 tsi Exp $ */
/*
* X Toolkit Memory Allocation Routines
@@ -64,11 +65,7 @@ in this Software without prior written authorization from The Open Group.
#include "IntrinsicI.h"
#undef _XBCOPYFUNC
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
-#else
-char *malloc(), *realloc(), *calloc();
-#endif
#define Xmalloc(size) malloc((size))
#define Xrealloc(ptr, size) realloc((ptr), (size))
diff --git a/xc/lib/Xt/Convert.c b/xc/lib/Xt/Convert.c
index f94611219..0a63c18c0 100644
--- a/xc/lib/Xt/Convert.c
+++ b/xc/lib/Xt/Convert.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Convert.c,v 3.5 2001/01/17 19:43:03 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Convert.c,v 3.6 2001/07/25 15:04:51 dawes Exp $ */
/*
@@ -608,13 +608,8 @@ static void ComputeArgs(widget, convert_args, num_args, args)
break;
case XtBaseOffset:
-#if defined(CRAY1) && !defined(__STDC__)
- args[i].addr =
- (XPointer)((int)widget + (int)convert_args[i].address_id);
-#else
args[i].addr =
(XPointer)((char *)widget + (long)convert_args[i].address_id);
-#endif
break;
case XtWidgetBaseOffset:
@@ -625,13 +620,8 @@ static void ComputeArgs(widget, convert_args, num_args, args)
ancestor = _XtWindowedAncestor(widget);
}
-#if defined(CRAY1) && !defined(__STDC__)
- args[i].addr =
- (XPointer)((int)ancestor + (int)convert_args[i].address_id);
-#else
args[i].addr =
(XPointer)((char *)ancestor + (long)convert_args[i].address_id);
-#endif
break;
case XtImmediate:
@@ -661,11 +651,7 @@ static void ComputeArgs(widget, convert_args, num_args, args)
params,&num_params);
offset = 0;
}
-#if defined(CRAY1) && !defined(__STDC__)
- args[i].addr = (XPointer)((int)widget + offset);
-#else
args[i].addr = (XPointer)((char *)widget + offset);
-#endif
break;
default:
params[0] = XtName(widget);
diff --git a/xc/lib/Xt/Converters.c b/xc/lib/Xt/Converters.c
index 91b08bace..356a48ca8 100644
--- a/xc/lib/Xt/Converters.c
+++ b/xc/lib/Xt/Converters.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Converters.c,v 3.8 2001/01/17 19:43:04 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Converters.c,v 3.9 2001/07/25 15:04:51 dawes Exp $ */
/*
@@ -68,16 +68,6 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xlocale.h>
#include <errno.h> /* for StringToDirectoryString */
-#ifdef X_NOT_STDC_ENV
-extern int errno;
-#endif
-
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
-#endif
-
#ifdef __EMX__
#define IsNewline(str) ((str) == '\n' || (str) == '\r')
#define IsWhitespace(str) ((str)== ' ' || (str) == '\t' || (str) == '\r')
@@ -86,9 +76,9 @@ extern int errno;
#define IsWhitespace(str) ((str)== ' ' || (str) == '\t')
#endif
-static Const String XtNwrongParameters = "wrongParameters";
-static Const String XtNconversionError = "conversionError";
-static Const String XtNmissingCharsetList = "missingCharsetList";
+static const String XtNwrongParameters = "wrongParameters";
+static const String XtNconversionError = "conversionError";
+static const String XtNmissingCharsetList = "missingCharsetList";
/* Representation types */
@@ -434,7 +424,7 @@ Boolean XtCvtStringToBool(dpy, args, num_args, fromVal, toVal, closure_ret)
return False;
}
-XtConvertArgRec Const colorConvertArgs[] = {
+XtConvertArgRec const colorConvertArgs[] = {
{XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
sizeof(Screen *)},
{XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.colormap),
@@ -567,7 +557,7 @@ static void FreePixel(app, toVal, closure, args, num_args)
/* no longer used by Xt, but it's in the spec */
-XtConvertArgRec Const screenConvertArg[] = {
+XtConvertArgRec const screenConvertArg[] = {
{XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
sizeof(Screen *)}
};
@@ -589,7 +579,7 @@ static void FetchDisplayArg(widget, size, value)
value->addr = (XPointer)&DisplayOfScreen(XtScreenOfObject(widget));
}
-static XtConvertArgRec Const displayConvertArg[] = {
+static XtConvertArgRec const displayConvertArg[] = {
{XtProcedureArg, (XtPointer)FetchDisplayArg, 0},
};
@@ -603,8 +593,8 @@ Boolean XtCvtStringToCursor(dpy, args, num_args, fromVal, toVal, closure_ret)
XtPointer *closure_ret;
{
- static Const struct _CursorName {
- Const char *name;
+ static const struct _CursorName {
+ const char *name;
unsigned int shape;
} cursor_names[] = {
{"X_cursor", XC_X_cursor},
@@ -685,7 +675,7 @@ Boolean XtCvtStringToCursor(dpy, args, num_args, fromVal, toVal, closure_ret)
{"watch", XC_watch},
{"xterm", XC_xterm},
};
- Const struct _CursorName *nP;
+ const struct _CursorName *nP;
char *name = (char *)fromVal->addr;
register int i;
@@ -1098,7 +1088,7 @@ static void FetchLocaleArg(widget, size, value )
value->addr = (XPointer)&locale;
}
-static XtConvertArgRec Const localeDisplayConvertArgs[] = {
+static XtConvertArgRec const localeDisplayConvertArgs[] = {
{XtProcedureArg, (XtPointer)FetchDisplayArg, 0},
{XtProcedureArg, (XtPointer)FetchLocaleArg, 0},
};
@@ -1466,7 +1456,7 @@ XtCvtStringToInitialState(dpy, args, num_args, fromVal, toVal, closure_ret)
return False;
}
-static XtConvertArgRec Const visualConvertArgs[] = {
+static XtConvertArgRec const visualConvertArgs[] = {
{XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
sizeof(Screen *)},
{XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.depth),
diff --git a/xc/lib/Xt/Display.c b/xc/lib/Xt/Display.c
index 8c2359954..c1abba03e 100644
--- a/xc/lib/Xt/Display.c
+++ b/xc/lib/Xt/Display.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Display.c,v 3.10 2001/01/17 19:43:04 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Display.c,v 3.11 2001/07/25 15:04:52 dawes Exp $ */
/*
@@ -61,11 +61,7 @@ in this Software without prior written authorization from The Open Group.
#include "ResConfigP.h"
#endif
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
-#else
-extern char* getenv();
-#endif
#ifdef XTHREADS
void (*_XtProcessLock)() = NULL;
diff --git a/xc/lib/Xt/Event.c b/xc/lib/Xt/Event.c
index 6059685d2..deda99cdf 100644
--- a/xc/lib/Xt/Event.c
+++ b/xc/lib/Xt/Event.c
@@ -54,17 +54,12 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/Event.c,v 3.8 2001/07/29 05:01:12 tsi Exp $ */
#include "IntrinsicI.h"
#include "Shell.h"
#include "StringDefs.h"
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
-#endif
-
typedef struct _XtEventRecExt {
int type;
XtPointer select_data[1]; /* actual dimension is [mask] */
@@ -579,7 +574,7 @@ typedef struct _WWTable {
WWPair pairs; /* bogus entries */
} *WWTable;
-static Const WidgetRec WWfake; /* placeholder for deletions */
+static const WidgetRec WWfake; /* placeholder for deletions */
#define WWHASH(tab,win) ((win) & tab->mask)
#define WWREHASHVAL(tab,win) ((((win) % tab->rehash) + 2) | 1)
@@ -1235,7 +1230,7 @@ char * arg;
return(FALSE);
}
-static EventMask Const masks[] = {
+static EventMask const masks[] = {
0, /* Error, should never see */
0, /* Reply, should never see */
KeyPressMask, /* KeyPress */
diff --git a/xc/lib/Xt/Geometry.c b/xc/lib/Xt/Geometry.c
index fa3cc822f..e8e04c9e1 100644
--- a/xc/lib/Xt/Geometry.c
+++ b/xc/lib/Xt/Geometry.c
@@ -54,10 +54,11 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/Xt/Geometry.c,v 1.9 2001/01/17 19:43:04 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Geometry.c,v 1.10 2001/08/18 02:41:29 dawes Exp $ */
#include "IntrinsicI.h"
#include "ShellP.h"
+#include "ShellI.h"
static void ClearRectObjAreas(r, old)
RectObj r;
@@ -744,7 +745,6 @@ void XtTranslateCoords(w, x, y, rootx, rooty)
(String *)NULL, (Cardinal *)NULL);
else {
Position x, y;
- extern void _XtShellGetCoordinates();
_XtShellGetCoordinates( w, &x, &y );
*rootx += x + w->core.border_width;
*rooty += y + w->core.border_width;
diff --git a/xc/lib/Xt/Imakefile b/xc/lib/Xt/Imakefile
index 41d0bfc60..aae5b02b2 100644
--- a/xc/lib/Xt/Imakefile
+++ b/xc/lib/Xt/Imakefile
@@ -3,7 +3,7 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:12 cpqbld Exp $
-XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.15 2001/01/17 19:43:05 dawes Exp $
+XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.16 2001/07/23 13:15:42 dawes Exp $
#define DoNormalLib NormalLibXt
#define DoSharedLib SharedLibXt
@@ -246,10 +246,6 @@ SpecialCObjectRule(sharedlib,$(_NOOP_),$(SHLIBDEF))
SpecialCLibObjectRule(PassivGrab,$(_NOOP_),-O0)
#endif
-#ifdef MinixArchitecture
-SpecialCLibObjectRule(Shell,$(ICONFIGFILES),-DXT_NO_SM)
-#endif
-
STRINGS_FILES = StringDefs.c StringDefs.h Shell.h
STRINGS_TMPLS = util/StrDefs.ct util/StrDefs.ht util/Shell.ht
#ifdef OS2Architecture
diff --git a/xc/lib/Xt/Initialize.c b/xc/lib/Xt/Initialize.c
index c644d2985..1cfcc112f 100644
--- a/xc/lib/Xt/Initialize.c
+++ b/xc/lib/Xt/Initialize.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Initialize.c,v 3.16 2001/01/17 19:43:05 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Initialize.c,v 3.17 2001/07/25 15:04:52 dawes Exp $ */
/*
@@ -73,17 +73,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xos_r.h>
#endif
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
-#endif
-
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
-#else
-extern char *getenv();
-#endif
extern void _XtConvertInitialize();
@@ -123,7 +113,7 @@ extern void _XtConvertInitialize();
policy, which the toolkit avoids but I hate differing programs at this level.
*/
-static XrmOptionDescRec Const opTable[] = {
+static XrmOptionDescRec const opTable[] = {
{"+rv", "*reverseVideo", XrmoptionNoArg, (XtPointer) "off"},
{"+synchronous","*synchronous", XrmoptionNoArg, (XtPointer) "off"},
{"-background", "*background", XrmoptionSepArg, (XtPointer) NULL},
diff --git a/xc/lib/Xt/Intrinsic.c b/xc/lib/Xt/Intrinsic.c
index 7611b7ca4..dc2575206 100644
--- a/xc/lib/Xt/Intrinsic.c
+++ b/xc/lib/Xt/Intrinsic.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.17 2001/01/17 19:43:05 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.18 2001/07/25 15:04:52 dawes Exp $ */
/*
@@ -67,11 +67,7 @@ in this Software without prior written authorization from The Open Group.
#include <sys/stat.h>
#endif /* VMS */
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
-#else
-extern char *getenv();
-#endif
String XtCXtToolkitError = "XtToolkitError";
@@ -1636,19 +1632,13 @@ int direction ;
void
-#if NeedVarargsPrototypes
_XtGeoTrace (Widget widget, ...)
-#else
-_XtGeoTrace (widget, va_alist)
-Widget widget;
-va_dcl
-#endif
{
va_list args;
char *fmt;
int i ;
if (IsTattled(widget)) {
- Va_start(args, widget);
+ va_start(args, widget);
fmt = va_arg(args, char *);
for (i=0; i<n_tab; i++) printf(" ");
(void) vprintf(fmt, args);
diff --git a/xc/lib/Xt/Intrinsic.h b/xc/lib/Xt/Intrinsic.h
index 8f20a47d7..0b1a8dc62 100644
--- a/xc/lib/Xt/Intrinsic.h
+++ b/xc/lib/Xt/Intrinsic.h
@@ -44,7 +44,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/Xt/Intrinsic.h,v 3.6 2001/01/17 19:43:05 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Intrinsic.h,v 3.7 2001/07/25 15:04:52 dawes Exp $ */
#ifndef _XtIntrinsic_h
#define _XtIntrinsic_h
@@ -57,15 +57,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xos.h> /* for R4 compatibility */
#else
#include <X11/Xosdefs.h>
-#ifndef X_NOT_STDC_ENV
#include <string.h> /* for XtNewString */
-#else
-#ifdef SYSV
-#include <string.h>
-#else
-#include <strings.h>
-#endif /* SYSV else */
-#endif /* !X_NOT_STDC_ENV else */
#endif /* XT_BC else */
#define XtSpecificationRelease 6
@@ -98,9 +90,7 @@ typedef char *String;
#endif /* NeedFunctionPrototypes */
-#ifndef NULL
-#define NULL 0
-#endif
+#include <stddef.h>
#ifdef VMS
#define externalref globalref
@@ -747,13 +737,8 @@ extern void XtDisplayStringConversionWarning(
#endif
);
-#ifdef __STDC__
externalref XtConvertArgRec const colorConvertArgs[];
externalref XtConvertArgRec const screenConvertArg[];
-#else
-externalref XtConvertArgRec colorConvertArgs[];
-externalref XtConvertArgRec screenConvertArg[];
-#endif
extern void XtAppAddConverter( /* obsolete */
#if NeedFunctionPrototypes
@@ -2054,25 +2039,11 @@ extern void XtGetConstraintResourceList(
#define XtDefaultFont "XtDefaultFont"
#define XtDefaultFontSet "XtDefaultFontSet"
-#if defined(CRAY) || defined(__ACK)
-#if __STDC__ && !defined(__ACK)
+#if defined(CRAY)
#define XtOffset(p_type,field) _Offsetof(p_type,field)
-#else
-#ifdef CRAY2
-#define XtOffset(p_type,field) \
- (sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
-
-#else /* !CRAY2 */
-
-#define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
-
-#endif /* !CRAY2 */
-#endif /* __STDC__ */
-#else /* ! (CRAY || __arm || __ACK) */
-
+#else /* ! CRAY */
#define XtOffset(p_type,field) \
((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
-
#endif /* !CRAY */
#ifdef offsetof
diff --git a/xc/lib/Xt/IntrinsicI.h b/xc/lib/Xt/IntrinsicI.h
index e6d61c70f..a7e11f621 100644
--- a/xc/lib/Xt/IntrinsicI.h
+++ b/xc/lib/Xt/IntrinsicI.h
@@ -42,7 +42,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/IntrinsicI.h,v 3.5 2001/01/17 19:43:05 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/IntrinsicI.h,v 3.6 2001/07/25 15:04:52 dawes Exp $ */
#ifndef _XtintrinsicI_h
#define _XtintrinsicI_h
@@ -236,10 +236,8 @@ extern void _XtAddShellToHookObj(
extern void _XtGeoTab ();
extern void _XtGeoTrace (
-#if NeedVarargsPrototypes
Widget widget,
...
-#endif
);
#define CALLGEOTAT(f) f
diff --git a/xc/lib/Xt/NextEvent.c b/xc/lib/Xt/NextEvent.c
index 0dce4bf54..29d6002bf 100644
--- a/xc/lib/Xt/NextEvent.c
+++ b/xc/lib/Xt/NextEvent.c
@@ -54,24 +54,16 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.18 2001/02/11 04:41:28 keithp Exp $ */
+/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.20 2001/07/25 15:04:52 dawes Exp $ */
#include "IntrinsicI.h"
#include <stdio.h>
#include <errno.h>
-#ifdef X_NOT_STDC_ENV
-extern int errno;
-#endif
#ifdef __EMX__
#include <sys/time.h>
#endif
-#ifdef MINIX
-#include <sys/nbio.h>
-#define select(n,r,w,x,t) nbio_select(n,r,w,x,t)
-#endif
-
static TimerEventRec* freeTimerRecs;
static WorkProcRec* freeWorkRecs;
static SignalEventRec* freeSignalRecs;
@@ -153,12 +145,6 @@ static void AdjustHowLong (howlong, start_time)
*howlong -= (time_spent.tv_sec*1000+time_spent.tv_usec/1000);
}
-#ifdef AMOEBA
-/* For IoWait emulation: */
-static int DoIgnoreEvents;
-static int DoIgnoreInputs;
-#endif
-
typedef struct {
struct timeval cur_time;
struct timeval start_time;
@@ -234,7 +220,6 @@ static void InitFds (app, ignoreEvents, ignoreInputs, wf)
{
int ii;
app->rebuild_fdlist = FALSE;
-#ifndef AMOEBA
#ifndef USE_POLL
wf->nfds = app->fds.nfds;
if( !ignoreInputs ) {
@@ -317,10 +302,6 @@ static void InitFds (app, ignoreEvents, ignoreInputs, wf)
}
}
#endif
-#else /* AMOEBA */
- DoIgnoreEvents = ignoreEvents;
- DoIgnoreInputs = ignoreInputs;
-#endif /* AMOEBA */
}
static void AdjustTimes (app, block, howlong, ignoreTimers, wt)
@@ -351,7 +332,6 @@ static void AdjustTimes (app, block, howlong, ignoreTimers, wt)
#endif
}
-#ifndef AMOEBA
static int IoWait (wt, wf)
wait_times_ptr_t wt;
@@ -365,43 +345,6 @@ static int IoWait (wt, wf)
#endif
}
-#else /* AMOEBA */
-
-static int AppIoWait (app, wt, wf)
- XtAppContext app;
- wait_times_ptr_t wt;
- wait_fds_ptr_t wf;
-{
- /* Unfortunately we cannot use select() under Amoeba. We call
- * _X11TransAmSelect to wait for the display to produce input
- * or until the timer runs out. This has two disadvantages:
- * - We cannot wait for multiple displays (we just wait for the
- * first display).
- * - We cannot wait for other file descriptors (there is no easy solution
- * for this, but it seems that not too many applications need it).
- * There is a workaround, however, in the form of XamSetSema and XamBlock,
- * which allow you to wait for X events or other things.
- */
- long timout;
- int nfound;
-
- if (wt->wait_time_ptr != NULL) {
- timout = wt->wait_time_ptr->tv_sec*1000 +
- (wt->wait_time_ptr->tv_usec+999)/1000;
- } else {
- timout = -1;
- }
- if ((DoIgnoreEvents || app->count == 0) && timout >= 0) {
- millisleep(timout);
- nfound = 0;
- } else {
- nfound = _X11TransAmSelect(ConnectionNumber(app->list[0]), timout);
- }
-
- return nfound;
-}
-
-#endif /* AMOEBA */
static void FindInputs (app, wf, nfds, ignoreEvents, ignoreInputs, dpy_no, found_input)
XtAppContext app;
@@ -415,7 +358,6 @@ static void FindInputs (app, wf, nfds, ignoreEvents, ignoreInputs, dpy_no, found
XtInputMask condition;
InputEvent *ep;
int ii;
-#ifndef AMOEBA
#ifndef USE_POLL /* { check ready file descriptors block */
#ifdef XTHREADS
fd_set rmask;
@@ -549,26 +491,6 @@ ENDILOOP: ;
}
}
#endif /* } */
-#else /* AMOEBA */
- int dd;
-
- *dpy_no = -1;
- *found_input = False;
-
- for (ii = 0; ii < app->fds.nfds && nfds > 0; ii++) {
- if (!ignoreEvents) {
- for (dd = 0; dd < app->count; dd++) {
- if (ii == ConnectionNumber (app->list[dd])) {
- if (*dpy_no == -1) {
- if (XEventsQueued (app->list[dd], QueuedAfterReading))
- *dpy_no = dd;
- }
- }
- }
- }
- /* Inputs not implemented */
- }
-#endif /* AMOEBA */
}
/*
@@ -706,11 +628,7 @@ WaitLoop:
RESTORE_APP_LOCK(app, level, &pushed_thread);
} else
#endif /* } */
-#ifndef AMOEBA
nfds = IoWait (&wt, &wf);
-#else
- nfds = AppIoWait (app, &wt, &wf);
-#endif
if (nfds == -1) {
/*
* interrupt occured recalculate time value and wait again.
@@ -1070,7 +988,6 @@ XtInputId XtAppAddInput(app, source, Condition, proc, closure)
XtInputCallbackProc proc;
XtPointer closure;
{
-#ifndef AMOEBA
InputEvent* sptr;
XtInputMask condition = (XtInputMask) Condition;
@@ -1114,10 +1031,6 @@ XtInputId XtAppAddInput(app, source, Condition, proc, closure)
app->rebuild_fdlist = TRUE;
UNLOCK_APP(app);
return((XtInputId)sptr);
-#else /* AMOEBA */
- printf("XtAppAddInput not yet implemented\n");
- abort();
-#endif /* AMOEBA */
}
void XtRemoveInput( id )
diff --git a/xc/lib/Xt/PassivGraI.h b/xc/lib/Xt/PassivGraI.h
index 54519fe4b..883981296 100644
--- a/xc/lib/Xt/PassivGraI.h
+++ b/xc/lib/Xt/PassivGraI.h
@@ -47,6 +47,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/PassivGraI.h,v 1.2 2001/08/01 00:44:40 tsi Exp $ */
#ifndef _PDI_h_
#define _PDI_h_
@@ -188,4 +189,10 @@ extern void _XtRegisterPassiveGrabs(
#endif
);
+extern void _XtClearAncestorCache(
+#if NeedFunctionPrototypes
+ Widget /* widget */
+#endif
+);
+
#endif /* _PDI_h_ */
diff --git a/xc/lib/Xt/ResConfig.c b/xc/lib/Xt/ResConfig.c
index 9aadb1567..5e698798a 100644
--- a/xc/lib/Xt/ResConfig.c
+++ b/xc/lib/Xt/ResConfig.c
@@ -48,6 +48,7 @@ dealings in this Software without prior written authorization from the IBM
Corporation.
******************************************************************/
+/* $XFree86: xc/lib/Xt/ResConfig.c,v 3.6 2001/08/01 00:44:40 tsi Exp $ */
#include "Intrinsic.h"
#include "IntrinsicI.h"
@@ -57,10 +58,8 @@ Corporation.
#include "StringDefs.h"
#include "ResConfigP.h"
#include <X11/Xatom.h>
-
-#ifdef DEBUG
#include <stdio.h>
-#endif
+#include <stdlib.h>
#define MAX_BUFFER 512
@@ -988,7 +987,7 @@ _XtResourceConfigurationEH (w, client_data, event)
* resource and value fields.
*/
if (data) {
- resource_len = Strtoul (data, &data_ptr, 10);
+ resource_len = Strtoul ((void *)data, &data_ptr, 10);
data_ptr++;
data_ptr[resource_len] = '\0';
diff --git a/xc/lib/Xt/ResourceI.h b/xc/lib/Xt/ResourceI.h
index 6dd0ddda7..0e59c426b 100644
--- a/xc/lib/Xt/ResourceI.h
+++ b/xc/lib/Xt/ResourceI.h
@@ -42,6 +42,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xt/ResourceI.h,v 1.3 2001/08/18 11:55:49 tsi Exp $ */
/****************************************************************
*
@@ -82,3 +83,6 @@ extern void _XtCopyFromParent(
XrmValue* /* value */
#endif
);
+
+extern void _XtCopyToArg(char *src, XtArgVal *dst, unsigned int size);
+
diff --git a/xc/lib/Xt/Resources.c b/xc/lib/Xt/Resources.c
index 7cd8f5c19..762f82891 100644
--- a/xc/lib/Xt/Resources.c
+++ b/xc/lib/Xt/Resources.c
@@ -55,7 +55,7 @@ in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/Xt/Resources.c,v 1.7 2001/01/17 19:43:07 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Resources.c,v 1.8 2001/07/25 15:04:52 dawes Exp $ */
/*LINTLIBRARY*/
#include "IntrinsicI.h"
@@ -368,12 +368,8 @@ void _XtCompileResourceList(resources, num_resources)
xrmres->xrm_name = PSToQ(resources->resource_name);
xrmres->xrm_class = PSToQ(resources->resource_class);
xrmres->xrm_type = PSToQ(resources->resource_type);
-#if defined(CRAY1) && !defined(__STDC__)
- xrmres->xrm_offset = -(resources->resource_offset * sizeof(long) + 1);
-#else
xrmres->xrm_offset = (Cardinal)
(-(int)resources->resource_offset - 1);
-#endif
xrmres->xrm_default_type = PSToQ(resources->default_type);
}
#undef PSToQ
@@ -393,12 +389,8 @@ static void XrmCompileResourceListEphem(resources, num_resources)
xrmres->xrm_name = StringToName(resources->resource_name);
xrmres->xrm_class = StringToClass(resources->resource_class);
xrmres->xrm_type = StringToQuark(resources->resource_type);
-#if defined(CRAY1) && !defined(__STDC__)
- xrmres->xrm_offset = -(resources->resource_offset * sizeof(long) + 1);
-#else
xrmres->xrm_offset = (Cardinal)
(-(int)resources->resource_offset - 1);
-#endif
xrmres->xrm_default_type = StringToQuark(resources->default_type);
}
#undef xrmres
diff --git a/xc/lib/Xt/Selection.c b/xc/lib/Xt/Selection.c
index ce0e1ae46..131e9c0d8 100644
--- a/xc/lib/Xt/Selection.c
+++ b/xc/lib/Xt/Selection.c
@@ -54,11 +54,13 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/Selection.c,v 3.7 2001/08/01 00:44:40 tsi Exp $ */
#include "IntrinsicI.h"
#include "StringDefs.h"
#include "SelectionI.h"
#include <X11/Xatom.h>
+#include <stdio.h>
void _XtSetDefaultSelectionTimeout(timeout)
unsigned long *timeout;
diff --git a/xc/lib/Xt/Shell.c b/xc/lib/Xt/Shell.c
index 1591d162e..c6984227c 100644
--- a/xc/lib/Xt/Shell.c
+++ b/xc/lib/Xt/Shell.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Shell.c,v 3.9 2001/01/17 19:43:09 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Shell.c,v 3.12 2001/08/18 02:41:29 dawes Exp $ */
/*
@@ -66,12 +66,14 @@ in this Software without prior written authorization from The Open Group.
#include "StringDefs.h"
#include "Shell.h"
#include "ShellP.h"
+#include "ShellI.h"
#include "Vendor.h"
#include "VendorP.h"
#include <X11/Xatom.h>
#include <X11/Xlocale.h>
#include <X11/ICE/ICElib.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef EDITRES
#include <X11/Xmu/Editres.h>
@@ -1084,8 +1086,6 @@ static void ApplicationInitialize(req, new, args, num_args)
#define XtRestartStyleHintMask (1L<<7)
#define XtShutdownCommandMask (1L<<8)
-extern char *getenv();
-
static void JoinSession();
static void SetSessionProperties();
static void StopManagingSession();
@@ -1930,7 +1930,7 @@ static Bool isMine(dpy, event, arg)
return FALSE;
}
-static _wait_for_response(w, event, request_num)
+static Boolean _wait_for_response(w, event, request_num)
ShellWidget w;
XEvent *event;
unsigned long request_num;
@@ -1982,7 +1982,7 @@ static XtGeometryResult RootGeometryManager(gw, request, reply)
unsigned int mask = request->request_mode;
XEvent event;
Boolean wm;
- register struct _OldXSizeHints *hintp;
+ register struct _OldXSizeHints *hintp = NULL;
int oldx, oldy, oldwidth, oldheight, oldborder_width;
unsigned long request_num;
@@ -2252,13 +2252,14 @@ static Boolean SetValues(old, ref, new, args, num_args)
if (! (ow->shell.client_specified & _XtShellPositionValid)) {
Cardinal n;
- void _XtShellGetCoordinates();
for (n = *num_args; n; n--, args++) {
if (strcmp(XtNx, args->name) == 0) {
- _XtShellGetCoordinates(ow, &ow->core.x, &ow->core.y);
+ _XtShellGetCoordinates((Widget)ow, &ow->core.x,
+ &ow->core.y);
} else if (strcmp(XtNy, args->name) == 0) {
- _XtShellGetCoordinates(ow, &ow->core.x, &ow->core.y);
+ _XtShellGetCoordinates((Widget)ow, &ow->core.x,
+ &ow->core.y);
}
}
}
@@ -2690,7 +2691,6 @@ static void GetValuesHook(widget, args, num_args)
Cardinal* num_args;
{
ShellWidget w = (ShellWidget) widget;
- extern void _XtCopyToArg();
/* x and y resource values may be invalid after a shell resize */
if (XtIsRealized(widget) &&
@@ -3050,10 +3050,6 @@ static void GetIceEvent(client_data, source, id)
SessionShellWidget w = (SessionShellWidget) client_data;
IceProcessMessagesStatus status;
-#ifdef MINIX
- if (!MNX_IceMessagesAvailable(SmcGetIceConnection(w->session.connection)))
- return;
-#endif
status = IceProcessMessages(SmcGetIceConnection(w->session.connection),
NULL, NULL);
diff --git a/xc/lib/Xt/ShellI.h b/xc/lib/Xt/ShellI.h
new file mode 100644
index 000000000..33d45dab4
--- /dev/null
+++ b/xc/lib/Xt/ShellI.h
@@ -0,0 +1,12 @@
+/* $XFree86: xc/lib/Xt/ShellI.h,v 1.1 2001/08/18 02:41:29 dawes Exp $ */
+
+#ifndef _XtShellInternal_h
+#define _XtShellInternal_h
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+extern void _XtShellGetCoordinates(Widget widget, Position *x, Position *y);
+
+#endif /* _XtShellInternal_h */
diff --git a/xc/lib/Xt/TMkey.c b/xc/lib/Xt/TMkey.c
index aa80f24d8..23fbb8692 100644
--- a/xc/lib/Xt/TMkey.c
+++ b/xc/lib/Xt/TMkey.c
@@ -55,6 +55,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/TMkey.c,v 3.8 2001/08/01 00:44:41 tsi Exp $ */
#define XK_MISCELLANY
#define XK_LATIN1
@@ -64,11 +65,8 @@ in this Software without prior written authorization from The Open Group.
#include "IntrinsicI.h"
#include <X11/keysymdef.h>
-
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
+#ifdef XKB
+#include <X11/XKBlib.h>
#endif
#define FLUSHKEYCACHE(ctx) \
@@ -82,7 +80,7 @@ in this Software without prior written authorization from The Open Group.
*/
#define FM(i) i >> (8 - TMKEYCACHELOG2)
-static Const unsigned char modmix[256] = {
+static const unsigned char modmix[256] = {
FM(0x0f), FM(0x8f), FM(0x4f), FM(0xcf), FM(0x2f), FM(0xaf), FM(0x6f), FM(0xef),
FM(0x1f), FM(0x9f), FM(0x5f), FM(0xdf), FM(0x3f), FM(0xbf), FM(0x7f), FM(0xff),
FM(0x07), FM(0x87), FM(0x47), FM(0xc7), FM(0x27), FM(0xa7), FM(0x67), FM(0xe7),
@@ -597,9 +595,7 @@ void XtTranslateKey(dpy, keycode, modifiers,
}
#else
{
- XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return,
- keysym_return);
- return;
+ XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return, keysym_return);
}
#endif
diff --git a/xc/lib/Xt/TMparse.c b/xc/lib/Xt/TMparse.c
index 16c14ad3b..3a5d59155 100644
--- a/xc/lib/Xt/TMparse.c
+++ b/xc/lib/Xt/TMparse.c
@@ -32,7 +32,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/TMparse.c,v 3.5 2001/01/17 19:43:10 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/TMparse.c,v 3.6 2001/08/01 00:44:41 tsi Exp $ */
/*
@@ -59,6 +59,7 @@ in this Software without prior written authorization from The Open Group.
#include "IntrinsicI.h"
#include "StringDefs.h"
#include <ctype.h>
+#include <stdlib.h>
#ifndef NOTASCII
#define XK_LATIN1
#endif
diff --git a/xc/lib/Xt/ThreadsI.h b/xc/lib/Xt/ThreadsI.h
index 05764c7ea..4b98a4b3a 100644
--- a/xc/lib/Xt/ThreadsI.h
+++ b/xc/lib/Xt/ThreadsI.h
@@ -49,6 +49,11 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/ThreadsI.h,v 3.4 2001/08/18 11:55:49 tsi Exp $ */
+
+#ifndef _XtThreadsI_h
+#define _XtThreadsI_h
+
#ifdef XTHREADS
typedef struct _LockRec *LockPtr;
@@ -128,3 +133,4 @@ extern void (*_XtInitAppLock)(
#define DPY_TO_APPCON(d)
#endif /* !defined(XTHREADS) */
+#endif /* _XtThreadsI_h */
diff --git a/xc/lib/Xt/VarCreate.c b/xc/lib/Xt/VarCreate.c
index 2d29ba5e3..f9643c614 100644
--- a/xc/lib/Xt/VarCreate.c
+++ b/xc/lib/Xt/VarCreate.c
@@ -48,6 +48,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/VarCreate.c,v 3.5 2001/07/29 05:01:12 tsi Exp $ */
#include "IntrinsicI.h"
#include "StringDefs.h"
@@ -87,21 +88,12 @@ _XtVaCreateWidget(name, widget_class, parent, var, count)
}
-#if NeedVarargsPrototypes
Widget
XtVaCreateWidget(
_Xconst char* name,
WidgetClass widget_class,
Widget parent,
...)
-#else
-/*VARARGS3*/
-Widget XtVaCreateWidget(name, widget_class, parent, va_alist)
- String name;
- WidgetClass widget_class;
- Widget parent;
- va_dcl
-#endif
{
va_list var;
register Widget widget;
@@ -109,11 +101,11 @@ Widget XtVaCreateWidget(name, widget_class, parent, va_alist)
WIDGET_TO_APPCON(parent);
LOCK_APP(app);
- Va_start(var,parent);
+ va_start(var,parent);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var,parent);
+ va_start(var,parent);
widget = _XtVaCreateWidget(name, widget_class, parent, var, total_count);
va_end(var);
UNLOCK_APP(app);
@@ -121,21 +113,12 @@ Widget XtVaCreateWidget(name, widget_class, parent, va_alist)
}
-#if NeedVarargsPrototypes
Widget
XtVaCreateManagedWidget(
_Xconst char* name,
WidgetClass widget_class,
Widget parent,
...)
-#else
-/*VARARGS3*/
-Widget XtVaCreateManagedWidget(name, widget_class, parent, va_alist)
- String name;
- WidgetClass widget_class;
- Widget parent;
- va_dcl
-#endif
{
va_list var;
register Widget widget;
@@ -143,11 +126,11 @@ Widget XtVaCreateManagedWidget(name, widget_class, parent, va_alist)
WIDGET_TO_APPCON(parent);
LOCK_APP(app);
- Va_start(var,parent);
+ va_start(var,parent);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var,parent);
+ va_start(var,parent);
widget = _XtVaCreateWidget(name, widget_class, parent, var, total_count);
XtManageChild(widget);
va_end(var);
@@ -156,7 +139,6 @@ Widget XtVaCreateManagedWidget(name, widget_class, parent, va_alist)
}
-#if NeedVarargsPrototypes
Widget
XtVaAppCreateShell(
_Xconst char* name,
@@ -164,15 +146,6 @@ XtVaAppCreateShell(
WidgetClass widget_class,
Display* display,
...)
-#else
-/*VARARGS4*/
-Widget XtVaAppCreateShell(name, class, widget_class, display, va_alist)
- String name;
- String class;
- WidgetClass widget_class;
- Display* display;
- va_dcl
-#endif
{
va_list var;
register Widget widget;
@@ -182,11 +155,11 @@ Widget XtVaAppCreateShell(name, class, widget_class, display, va_alist)
DPY_TO_APPCON(display);
LOCK_APP(app);
- Va_start(var,display);
+ va_start(var,display);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var,display);
+ va_start(var,display);
_XtVaToTypedArgList(var, total_count, &typed_args, &num_args);
widget = _XtAppCreateShell(name, class, widget_class, display,
@@ -201,21 +174,12 @@ Widget XtVaAppCreateShell(name, class, widget_class, display, va_alist)
}
-#if NeedVarargsPrototypes
Widget
XtVaCreatePopupShell(
_Xconst char* name,
WidgetClass widget_class,
Widget parent,
...)
-#else
-/*VARARGS3*/
-Widget XtVaCreatePopupShell(name, widget_class, parent, va_alist)
- String name;
- WidgetClass widget_class;
- Widget parent;
- va_dcl
-#endif
{
va_list var;
register Widget widget;
@@ -225,11 +189,11 @@ Widget XtVaCreatePopupShell(name, widget_class, parent, va_alist)
WIDGET_TO_APPCON(parent);
LOCK_APP(app);
- Va_start(var,parent);
+ va_start(var,parent);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var,parent);
+ va_start(var,parent);
_XtVaToTypedArgList(var, total_count, &typed_args, &num_args);
widget = _XtCreatePopupShell(name, widget_class, parent,
@@ -243,15 +207,8 @@ Widget XtVaCreatePopupShell(name, widget_class, parent, va_alist)
return widget;
}
-#if NeedVarargsPrototypes
void
XtVaSetValues(Widget widget, ...)
-#else
-/*VARARGS1*/
-void XtVaSetValues(widget, va_alist)
- Widget widget;
- va_dcl
-#endif
{
va_list var;
ArgList args = NULL;
@@ -260,11 +217,11 @@ void XtVaSetValues(widget, va_alist)
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- Va_start(var,widget);
+ va_start(var,widget);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var,widget);
+ va_start(var,widget);
_XtVaToArgList(widget, var, total_count, &args, &num_args);
XtSetValues(widget, args, num_args);
@@ -275,24 +232,15 @@ void XtVaSetValues(widget, va_alist)
}
-#if NeedVarargsPrototypes
void
XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ...)
-#else
-/*VARARGS3*/
-void XtVaSetSubvalues(base, resources, num_resources, va_alist)
- XtPointer base;
- XtResourceList resources;
- Cardinal num_resources;
- va_dcl
-#endif
{
va_list var;
ArgList args;
Cardinal num_args;
int total_count, typed_count;
- Va_start(var, num_resources);
+ va_start(var, num_resources);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
@@ -300,7 +248,7 @@ void XtVaSetSubvalues(base, resources, num_resources, va_alist)
XtWarning("XtVaTypedArg is not valid in XtVaSetSubvalues()\n");
}
- Va_start(var, num_resources);
+ va_start(var, num_resources);
_XtVaToArgList((Widget)NULL, var, total_count, &args, &num_args);
XtSetSubvalues(base, resources, num_resources, args, num_args);
@@ -312,7 +260,6 @@ void XtVaSetSubvalues(base, resources, num_resources, va_alist)
va_end(var);
}
-#if NeedVarargsPrototypes
Widget
_XtVaOpenApplication(
XtAppContext *app_context_return,
@@ -324,21 +271,6 @@ _XtVaOpenApplication(
String *fallback_resources,
WidgetClass widget_class,
va_list var_args)
-#else
-/*VARARGS8*/
-Widget _XtVaOpenApplication(app_context_return, application_class, options,
- num_options, argc_in_out, argv_in_out,
- fallback_resources, widget_class, var_args)
- XtAppContext *app_context_return;
- char *application_class;
- XrmOptionDescList options;
- Cardinal num_options;
- int *argc_in_out;
- String *argv_in_out;
- String *fallback_resources;
- WidgetClass widget_class;
- va_list var_args;
-#endif
{
XtAppContext app_con;
Display * dpy;
@@ -393,7 +325,6 @@ Widget _XtVaOpenApplication(app_context_return, application_class, options,
return(root);
}
-#if NeedVarargsPrototypes
Widget
_XtVaAppInitialize(
XtAppContext *app_context_return,
@@ -404,20 +335,6 @@ _XtVaAppInitialize(
String *argv_in_out,
String *fallback_resources,
va_list var_args)
-#else
-/*VARARGS7*/
-Widget _XtVaAppInitialize(app_context_return, application_class, options,
- num_options, argc_in_out, argv_in_out,
- fallback_resources, var_args)
- XtAppContext *app_context_return;
- char *application_class;
- XrmOptionDescList options;
- Cardinal num_options;
- int *argc_in_out;
- String *argv_in_out;
- String *fallback_resources;
- va_list var_args;
-#endif
{
return _XtVaOpenApplication(app_context_return, application_class,
options, num_options,
@@ -432,7 +349,6 @@ Widget _XtVaAppInitialize(app_context_return, application_class, options,
* _XtVaOpenApplication and to _XtVaAppInitialize.
*/
-#if NeedVarargsPrototypes
Widget
XtVaOpenApplication(
XtAppContext *app_context_return,
@@ -444,30 +360,15 @@ XtVaOpenApplication(
String *fallback_resources,
WidgetClass widget_class,
...)
-#else
-Widget XtVaOpenApplication(app_context_return, application_class, options,
- num_options, argc_in_out, argv_in_out,
- fallback_resources, widget_class, va_alist)
- XtAppContext *app_context_return;
- String application_class;
- XrmOptionDescList options;
- Cardinal num_options;
- int *argc_in_out;
- String *argv_in_out;
- String *fallback_resources;
- WidgetClass widget_class;
- va_dcl
-#endif
{
va_list var;
- Va_start(var, widget_class);
+ va_start(var, widget_class);
return _XtVaOpenApplication(app_context_return, (String)application_class,
options, num_options, argc_in_out, argv_in_out,
fallback_resources, widget_class, var);
}
-#if NeedVarargsPrototypes
Widget
XtVaAppInitialize(
XtAppContext *app_context_return,
@@ -478,23 +379,10 @@ XtVaAppInitialize(
String *argv_in_out,
String *fallback_resources,
...)
-#else
-Widget XtVaAppInitialize(app_context_return, application_class, options,
- num_options, argc_in_out, argv_in_out,
- fallback_resources, va_alist)
- XtAppContext *app_context_return;
- String application_class;
- XrmOptionDescList options;
- Cardinal num_options;
- int *argc_in_out;
- String *argv_in_out;
- String *fallback_resources;
- va_dcl
-#endif
{
va_list var;
- Va_start(var, fallback_resources);
+ va_start(var, fallback_resources);
return _XtVaOpenApplication(app_context_return, (String)application_class,
options, num_options, argc_in_out, argv_in_out,
fallback_resources,
diff --git a/xc/lib/Xt/VarGet.c b/xc/lib/Xt/VarGet.c
index 69a9700aa..4913097c3 100644
--- a/xc/lib/Xt/VarGet.c
+++ b/xc/lib/Xt/VarGet.c
@@ -47,6 +47,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/VarGet.c,v 1.7 2001/07/29 05:01:12 tsi Exp $ */
#include "IntrinsicI.h"
#include "VarargsI.h"
@@ -54,7 +55,6 @@ in this Software without prior written authorization from The Open Group.
static String XtNxtGetTypedArg = "xtGetTypedArg";
-#if NeedVarargsPrototypes
void
XtVaGetSubresources(
Widget widget,
@@ -64,17 +64,6 @@ XtVaGetSubresources(
XtResourceList resources,
Cardinal num_resources,
...)
-#else
-/*VARARGS6*/
-void XtVaGetSubresources(widget, base, name, class, resources, num_resources, va_alist)
- Widget widget;
- XtPointer base;
- String name;
- String class;
- XtResourceList resources;
- Cardinal num_resources;
- va_dcl
-#endif
{
va_list var;
XtTypedArgList args;
@@ -83,11 +72,11 @@ void XtVaGetSubresources(widget, base, name, class, resources, num_resources, va
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- Va_start(var, num_resources);
+ va_start(var, num_resources);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var, num_resources);
+ va_start(var, num_resources);
_XtVaToTypedArgList(var, total_count, &args, &num_args);
@@ -103,18 +92,8 @@ void XtVaGetSubresources(widget, base, name, class, resources, num_resources, va
}
-#if NeedVarargsPrototypes
void
XtVaGetApplicationResources(Widget widget, XtPointer base, XtResourceList resources, Cardinal num_resources, ...)
-#else
-/*VARARGS4*/
-void XtVaGetApplicationResources(widget, base, resources, num_resources, va_alist)
- Widget widget;
- XtPointer base;
- XtResourceList resources;
- Cardinal num_resources;
- va_dcl
-#endif
{
va_list var;
XtTypedArgList args;
@@ -123,11 +102,11 @@ void XtVaGetApplicationResources(widget, base, resources, num_resources, va_alis
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- Va_start(var,num_resources);
+ va_start(var,num_resources);
_XtCountVaList(var, &total_count, &typed_count);
va_end(var);
- Va_start(var,num_resources);
+ va_start(var,num_resources);
_XtVaToTypedArgList(var, total_count, &args, &num_args);
@@ -238,15 +217,8 @@ GetNestedArg(widget, avlist, args, resources, num_resources)
return(count);
}
-#if NeedVarargsPrototypes
void
XtVaGetValues(Widget widget, ...)
-#else
-/*VARARGS1*/
-void XtVaGetValues(widget, va_alist)
- Widget widget;
- va_dcl
-#endif
{
va_list var;
String attr;
@@ -258,7 +230,7 @@ void XtVaGetValues(widget, va_alist)
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
- Va_start(var,widget);
+ va_start(var,widget);
_XtCountVaList(var, &total_count, &typed_count);
@@ -269,7 +241,7 @@ void XtVaGetValues(widget, va_alist)
else args = NULL; /* for lint; really unused */
va_end(var);
- Va_start(var,widget);
+ va_start(var,widget);
for(attr = va_arg(var, String), count = 0 ; attr != NULL;
attr = va_arg(var, String)) {
if (strcmp(attr, XtVaTypedArg) == 0) {
@@ -309,24 +281,15 @@ void XtVaGetValues(widget, va_alist)
UNLOCK_APP(app);
}
-#if NeedVarargsPrototypes
void
XtVaGetSubvalues(XtPointer base,XtResourceList resources, Cardinal num_resources, ...)
-#else
-/*VARARGS3*/
-void XtVaGetSubvalues(base, resources, num_resources, va_alist)
- XtPointer base;
- XtResourceList resources;
- Cardinal num_resources;
- va_dcl
-#endif
{
va_list var;
ArgList args;
Cardinal num_args;
int total_count, typed_count;
- Va_start(var,num_resources);
+ va_start(var,num_resources);
_XtCountVaList(var, &total_count, &typed_count);
@@ -335,7 +298,7 @@ void XtVaGetSubvalues(base, resources, num_resources, va_alist)
}
va_end(var);
- Va_start(var,num_resources);
+ va_start(var,num_resources);
_XtVaToArgList((Widget)NULL, var, total_count, &args, &num_args);
va_end(var);
diff --git a/xc/lib/Xt/Varargs.c b/xc/lib/Xt/Varargs.c
index 78bc46094..77729fef7 100644
--- a/xc/lib/Xt/Varargs.c
+++ b/xc/lib/Xt/Varargs.c
@@ -21,6 +21,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/Varargs.c,v 3.8 2001/07/29 05:01:12 tsi Exp $ */
#include "IntrinsicI.h"
#include "VarargsI.h"
@@ -100,16 +101,8 @@ _XtCountVaList(var, total_count, typed_count)
* constructs an attribute-value list of type XtTypedArgList and
* returns the list.
*/
-#if NeedVarargsPrototypes
XtVarArgsList
XtVaCreateArgsList(XtPointer unused, ...)
-#else
-/*ARGSUSED*/
-/*VARARGS1*/
-XtVarArgsList XtVaCreateArgsList(unused, va_alist)
- XtPointer unused;
- va_dcl
-#endif
{
va_list var;
XtTypedArgList avlist;
@@ -121,7 +114,7 @@ XtVarArgsList XtVaCreateArgsList(unused, va_alist)
* Note: The count is required only to allocate enough space to store
* the list. Therefore nested lists are not counted recursively.
*/
- Va_start(var,unused);
+ va_start(var,unused);
for(attr = va_arg(var, String) ; attr != NULL;
attr = va_arg(var, String)) {
++count;
@@ -136,7 +129,7 @@ XtVarArgsList XtVaCreateArgsList(unused, va_alist)
}
va_end(var);
- Va_start(var,unused);
+ va_start(var,unused);
avlist = _XtVaCreateTypedArgList(var, count);
va_end(var);
return (XtVarArgsList)avlist;
diff --git a/xc/lib/Xt/VarargsI.h b/xc/lib/Xt/VarargsI.h
index 0c6eb1677..a40b160dd 100644
--- a/xc/lib/Xt/VarargsI.h
+++ b/xc/lib/Xt/VarargsI.h
@@ -21,17 +21,12 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xt/VarargsI.h,v 3.5 2001/07/29 05:01:12 tsi Exp $ */
#ifndef _VarargsI_h_
#define _VarargsI_h_
-#if NeedVarargsPrototypes
-# include <stdarg.h>
-# define Va_start(a,b) va_start(a,b)
-#else
-# include <varargs.h>
-# define Va_start(a,b) va_start(a)
-#endif
+#include <stdarg.h>
/* private routines */
diff --git a/xc/lib/Xt/Xtos.h b/xc/lib/Xt/Xtos.h
index d08d1f647..c94762e3b 100644
--- a/xc/lib/Xt/Xtos.h
+++ b/xc/lib/Xt/Xtos.h
@@ -44,7 +44,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xt/Xtos.h,v 3.5 2001/01/17 19:43:13 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/Xtos.h,v 3.6 2001/07/24 08:32:54 alanh Exp $ */
#ifndef _Xtos_h
#define _Xtos_h
@@ -58,7 +58,8 @@ SOFTWARE.
#endif
#if defined(__alpha) || defined(__alpha__) || \
- defined(__ia64__) || defined(ia64)
+ defined(__ia64__) || defined(ia64) || \
+ defined(__s390x__)
#define LONG64
#endif
diff --git a/xc/lib/Xt/sharedlib.c b/xc/lib/Xt/sharedlib.c
index 2f3396d3a..02035ba17 100644
--- a/xc/lib/Xt/sharedlib.c
+++ b/xc/lib/Xt/sharedlib.c
@@ -21,7 +21,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.3 2001/01/17 19:43:13 dawes Exp $ */
+/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.4 2001/07/25 15:04:52 dawes Exp $ */
#if (defined(SUNSHLIB) || defined(AIXSHLIB)) && !defined(SHAREDCODE)
#include "IntrinsicI.h"
@@ -135,7 +135,6 @@ ArgList args_in;
fallback_resources, args_in, num_args_in);
}
-#if NeedVarargsPrototypes
Widget
XtVaAppInitialize(
XtAppContext *app_context_return,
@@ -146,25 +145,12 @@ XtVaAppInitialize(
String *argv_in_out,
String *fallback_resources,
...)
-#else
-Widget XtVaAppInitialize(app_context_return, application_class, options,
- num_options, argc_in_out, argv_in_out,
- fallback_resources, va_alist)
- XtAppContext *app_context_return;
- String application_class;
- XrmOptionDescList options;
- Cardinal num_options;
- int *argc_in_out;
- String *argv_in_out;
- String *fallback_resources;
- va_dcl
-#endif
{
va_list var;
extern Widget _XtVaAppInitialize();
VENDORINIT
- Va_start(var, fallback_resources);
+ va_start(var, fallback_resources);
return _XtVaAppInitialize(app_context_return, application_class, options,
num_options, argc_in_out, argv_in_out,
fallback_resources, var);
@@ -207,7 +193,6 @@ ArgList args_in;
args_in, num_args_in);
}
-#if NeedVarargsPrototypes
Widget
XtVaOpenApplication(
XtAppContext *app_context_return,
@@ -219,26 +204,12 @@ XtVaOpenApplication(
String *fallback_resources,
WidgetClass widget_class,
...)
-#else
-Widget XtVaOpenApplication(app_context_return, application_class, options,
- num_options, argc_in_out, argv_in_out,
- fallback_resources, widget_class, va_alist)
- XtAppContext *app_context_return;
- String application_class;
- XrmOptionDescList options;
- Cardinal num_options;
- int *argc_in_out;
- String *argv_in_out;
- String *fallback_resources;
- WidgetClass widget_class;
- va_dcl
-#endif
{
va_list var;
extern Widget _XtVaOpenApplication();
VENDORINIT
- Va_start(var, widget_class);
+ va_start(var, widget_class);
return _XtVaOpenApplication(app_context_return, application_class, options,
num_options, argc_in_out, argv_in_out,
fallback_resources, widget_class, var);
diff --git a/xc/lib/Xt/util/Shell.ht b/xc/lib/Xt/util/Shell.ht
index 304e1dd11..d338a1fc7 100644
--- a/xc/lib/Xt/util/Shell.ht
+++ b/xc/lib/Xt/util/Shell.ht
@@ -42,6 +42,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xt/util/Shell.ht,v 3.4 2001/07/29 05:01:12 tsi Exp $ */
#ifndef _XtShell_h
#define _XtShell_h
@@ -59,11 +60,7 @@ SOFTWARE.
*/
#ifndef XTSTRINGDEFINES
-#ifdef __STDC__
#define _XtShell_h_Const const
-#else
-#define _XtShell_h_Const /**/
-#endif
#endif
<<<STRING_TABLE_GOES_HERE>>>
diff --git a/xc/lib/Xt/util/StrDefs.ct b/xc/lib/Xt/util/StrDefs.ct
index b2244363c..c8296986d 100644
--- a/xc/lib/Xt/util/StrDefs.ct
+++ b/xc/lib/Xt/util/StrDefs.ct
@@ -42,12 +42,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xt/util/StrDefs.ct,v 3.4 2001/07/29 05:01:12 tsi Exp $ */
-#ifdef __STDC__
#define Const const
-#else
-#define Const /**/
-#endif
<<<STRING_TABLE_GOES_HERE>>>
diff --git a/xc/lib/Xt/util/StrDefs.ht b/xc/lib/Xt/util/StrDefs.ht
index 5c24108db..4f94cd79a 100644
--- a/xc/lib/Xt/util/StrDefs.ht
+++ b/xc/lib/Xt/util/StrDefs.ht
@@ -42,16 +42,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/Xt/util/StrDefs.ht,v 3.4 2001/07/29 05:01:12 tsi Exp $ */
#ifndef _XtStringDefs_h_
#define _XtStringDefs_h_
#ifndef XTSTRINGDEFINES
-#ifdef __STDC__
#define _XtStringDefs_h_Const const
-#else
-#define _XtStringDefs_h_Const /**/
-#endif
#endif
<<<STRING_TABLE_GOES_HERE>>>