aboutsummaryrefslogtreecommitdiff
path: root/libXaw
diff options
context:
space:
mode:
Diffstat (limited to 'libXaw')
-rw-r--r--libXaw/config.h76
-rw-r--r--libXaw/src/AsciiSrc.c2
-rw-r--r--libXaw/src/Label.c2
-rw-r--r--libXaw/src/MultiSrc.c2
-rw-r--r--libXaw/src/Pixmap.c10
-rw-r--r--libXaw/src/Private.h2
-rw-r--r--libXaw/src/TextAction.c4
-rw-r--r--libXaw/src/Vendor.c2
-rw-r--r--libXaw/src/XawI18n.h1
-rw-r--r--libXaw/src/XawIm.c4
-rw-r--r--libXaw/src/makefile53
11 files changed, 149 insertions, 9 deletions
diff --git a/libXaw/config.h b/libXaw/config.h
new file mode 100644
index 000000000..b72e9888a
--- /dev/null
+++ b/libXaw/config.h
@@ -0,0 +1,76 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAS_WCHAR_H
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#undef HAS_WCTYPE_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `iswalnum' function. */
+#undef HAVE_ISWALNUM
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you DO NOT have the <widec.h> header file. */
+#undef NO_WIDEC_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#undef VERSION
diff --git a/libXaw/src/AsciiSrc.c b/libXaw/src/AsciiSrc.c
index a37b6a1ff..bf2c42bc3 100644
--- a/libXaw/src/AsciiSrc.c
+++ b/libXaw/src/AsciiSrc.c
@@ -1486,7 +1486,7 @@ InitStringOrFile(AsciiSrcObject src, Bool newString)
if (!src->ascii_src.is_tempfile) {
if ((fd = open(src->ascii_src.string, open_mode, 0666)) != -1) {
- if ((file = fdopen(fd, fdopen_mode))) {
+ if ((file = _fdopen(fd, fdopen_mode))) {
(void)fseek(file, 0, SEEK_END);
src->ascii_src.length = (XawTextPosition)ftell(file);
return (file);
diff --git a/libXaw/src/Label.c b/libXaw/src/Label.c
index 024d01aa8..664bbc6b5 100644
--- a/libXaw/src/Label.c
+++ b/libXaw/src/Label.c
@@ -616,7 +616,7 @@ _Reposition(LabelWidget lw, unsigned int width, unsigned int height,
*dx = newPos - lw->label.label_x;
lw->label.label_x = newPos;
- newPos = (height - lw->label.label_height) >> 1;
+ newPos = ((int)(height - lw->label.label_height)) >> 1;
*dy = newPos - lw->label.label_y;
lw->label.label_y = newPos;
}
diff --git a/libXaw/src/MultiSrc.c b/libXaw/src/MultiSrc.c
index efa08b081..712b7e068 100644
--- a/libXaw/src/MultiSrc.c
+++ b/libXaw/src/MultiSrc.c
@@ -1258,7 +1258,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString)
if (!src->multi_src.is_tempfile) {
if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != -1) {
- if ((file = fdopen(fd, fdopen_mode)) != NULL) {
+ if ((file = _fdopen(fd, fdopen_mode)) != NULL) {
(void)fseek(file, 0, SEEK_END);
src->multi_src.length = (XawTextPosition)ftell(file);
return(file);
diff --git a/libXaw/src/Pixmap.c b/libXaw/src/Pixmap.c
index d2fa1ef02..0741b052f 100644
--- a/libXaw/src/Pixmap.c
+++ b/libXaw/src/Pixmap.c
@@ -47,7 +47,7 @@
* Types
*/
typedef struct _XawCache {
- long value;
+ intptr_t value;
XtPointer *elems;
unsigned int num_elems;
} XawCache;
@@ -415,7 +415,7 @@ qcmp_string(register _Xconst void *left, register _Xconst void *right)
static int
bcmp_long(register _Xconst void *value, register _Xconst void *cache)
{
- return ((long)value - (long)((*(XawCache **)cache)->value));
+ return ((intptr_t)value - (intptr_t)((*(XawCache **)cache)->value));
}
static int
@@ -492,7 +492,7 @@ _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth)
XtRealloc((char *)xaw->elems,
sizeof(XtPointer) * xaw->num_elems);
}
- pcache->value = (long)screen;
+ pcache->value = (intptr_t)screen;
pcache->elems = NULL;
pcache->num_elems = 0;
xaw->elems[xaw->num_elems - 1] = (XtPointer)pcache;
@@ -745,7 +745,11 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
if (params->name[0] != '/' && params->name[0] != '.')
{
if (!sub[0].substitution)
+ #ifdef _MSC_VER
+ sub[0].substitution = ".";
+ #else
sub[0].substitution = getenv("HOME");
+ #endif
sub[1].substitution = params->name;
if (pixmap_path == NULL)
GetResourcePixmapPath(DisplayOfScreen(screen));
diff --git a/libXaw/src/Private.h b/libXaw/src/Private.h
index ca70d5f30..7ae465a3d 100644
--- a/libXaw/src/Private.h
+++ b/libXaw/src/Private.h
@@ -28,6 +28,8 @@
#ifndef _XawPrivate_h
#define _XawPrivate_h
+#include <unistd.h>
+
#define XawMax(a, b) ((a) > (b) ? (a) : (b))
#define XawMin(a, b) ((a) < (b) ? (a) : (b))
#define XawAbs(a) ((a) < 0 ? -(a) : (a))
diff --git a/libXaw/src/TextAction.c b/libXaw/src/TextAction.c
index 74446d68c..52e0640a3 100644
--- a/libXaw/src/TextAction.c
+++ b/libXaw/src/TextAction.c
@@ -36,6 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xatom.h>
#include <X11/Xfuncs.h>
#include <X11/Xutil.h>
+#include <X11/Xwinsock.h>
#include <X11/Xmu/Atoms.h>
#include <X11/Xmu/Misc.h>
#include <X11/Xmu/StdSel.h>
@@ -64,6 +65,9 @@ in this Software without prior written authorization from The Open Group.
#define XawTextActionMaxHexChars 100
+#ifdef _MSC_VER
+#define usleep(time) Sleep(time)
+#endif
/*
* Prototypes
*/
diff --git a/libXaw/src/Vendor.c b/libXaw/src/Vendor.c
index b8797f59d..a2554daff 100644
--- a/libXaw/src/Vendor.c
+++ b/libXaw/src/Vendor.c
@@ -111,7 +111,7 @@ static XtResource resources[] = {
*
***************************************************************************/
-#if defined(__CYGWIN__) || defined(__MINGW32__)
+#if defined(__CYGWIN__) || defined(__MINGW32__) && !defined(_MSC_VER)
/* to fix the EditRes problem because of wrong linker semantics */
extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */
extern VendorShellClassRec _XawVendorShellClassRec;
diff --git a/libXaw/src/XawI18n.h b/libXaw/src/XawI18n.h
index d50171cfb..132bbb49e 100644
--- a/libXaw/src/XawI18n.h
+++ b/libXaw/src/XawI18n.h
@@ -62,6 +62,7 @@ int _Xaw_iswspace
#endif
#include <stdlib.h>
+#include <unistd.h>
#ifdef USE_XWCHAR_STRING
int _Xwcslen
diff --git a/libXaw/src/XawIm.c b/libXaw/src/XawIm.c
index 7a7152fb6..ee0a09a6e 100644
--- a/libXaw/src/XawIm.c
+++ b/libXaw/src/XawIm.c
@@ -196,7 +196,7 @@ SetExtPart(VendorShellWidget w, XawVendorShellExtWidget vew)
contextData = XtNew(contextDataRec);
contextData->parent = (Widget)w;
contextData->ve = (Widget)vew;
- if (XSaveContext(XtDisplay(w), (Window)w, extContext, (char *)contextData)) {
+ if (XSaveContext(XtDisplay(w), (Window)(((intptr_t)w)&0xffffffff), extContext, (char *)contextData)) {
return(NULL);
}
return(&(vew->vendor_ext));
@@ -208,7 +208,7 @@ GetExtPart(VendorShellWidget w)
contextDataRec *contextData;
XawVendorShellExtWidget vew;
- if (XFindContext(XtDisplay(w), (Window)w, extContext,
+ if (XFindContext(XtDisplay(w), (Window)(((intptr_t)w)& 0xffffffff), extContext,
(XPointer*)&contextData)) {
return(NULL);
}
diff --git a/libXaw/src/makefile b/libXaw/src/makefile
new file mode 100644
index 000000000..b0dde1df9
--- /dev/null
+++ b/libXaw/src/makefile
@@ -0,0 +1,53 @@
+LIBRARY = libXaw
+INCLUDES := .. ../include ../include/X11 $(INCLUDES)
+
+DEFINES += XT_NO_SM
+
+CSRCS = \
+ Actions.c \
+ AllWidgets.c \
+ AsciiSink.c \
+ AsciiSrc.c \
+ AsciiText.c \
+ Box.c \
+ Command.c \
+ Converters.c \
+ Dialog.c \
+ DisplayList.c \
+ Form.c \
+ Grip.c \
+ Label.c \
+ List.c \
+ MenuButton.c \
+ MultiSrc.c \
+ MultiSink.c \
+ OS.c \
+ Paned.c \
+ Panner.c \
+ Pixmap.c \
+ Porthole.c \
+ Repeater.c \
+ Scrollbar.c \
+ Simple.c \
+ SimpleMenu.c \
+ Sme.c \
+ SmeBSB.c \
+ SmeLine.c \
+ StripChart.c \
+ Text.c \
+ TextSink.c \
+ TextSrc.c \
+ TextAction.c \
+ TextPop.c \
+ TextTr.c \
+ Toggle.c \
+ Tree.c \
+ Vendor.c \
+ Viewport.c \
+ XawIm.c \
+ XawInit.c \
+ XawI18n.c \
+ Tip.c
+
+
+DEFINES += XAW7