diff options
Diffstat (limited to 'libXt')
-rw-r--r-- | libXt/config.h | 85 | ||||
-rw-r--r-- | libXt/include/X11/.gitignore | 2 | ||||
-rw-r--r-- | libXt/include/X11/ShellP.h | 2 | ||||
-rw-r--r-- | libXt/src/.gitignore | 1 | ||||
-rw-r--r-- | libXt/src/Converters.c | 2 | ||||
-rw-r--r-- | libXt/src/Error.c | 1 | ||||
-rw-r--r-- | libXt/src/Initialize.c | 39 | ||||
-rw-r--r-- | libXt/src/Intrinsic.c | 2 | ||||
-rw-r--r-- | libXt/src/Selection.c | 1 | ||||
-rw-r--r-- | libXt/src/Shell.c | 11 | ||||
-rw-r--r-- | libXt/src/Vendor.c | 4 | ||||
-rw-r--r-- | libXt/src/makefile | 76 | ||||
-rw-r--r-- | libXt/util/Shell.ht | 2 | ||||
-rw-r--r-- | libXt/util/makefile | 4 |
14 files changed, 219 insertions, 13 deletions
diff --git a/libXt/config.h b/libXt/config.h new file mode 100644 index 000000000..5de127910 --- /dev/null +++ b/libXt/config.h @@ -0,0 +1,85 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* 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 `ws2_32' library (-lws2_32). */ +#undef HAVE_LIBWS2_32 + +/* 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 Xalloca.h should include <alloca.h> */ +#undef INCLUDE_ALLOCA_H + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* 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 + +/* Define to 1 if you have the "poll" function. */ +#undef USE_POLL + +/* Define to 1 if you have the "snprintf" function. */ +#undef USE_SNPRINTF + +/* Version number of package */ +#undef VERSION + +/* Define to 1 to use XKB for keysym resolution. */ +#define XKB 1 + +/* app default data directory */ +#undef appdefaultdir diff --git a/libXt/include/X11/.gitignore b/libXt/include/X11/.gitignore new file mode 100644 index 000000000..e482dd956 --- /dev/null +++ b/libXt/include/X11/.gitignore @@ -0,0 +1,2 @@ +Shell.h
+StringDefs.h
\ No newline at end of file diff --git a/libXt/include/X11/ShellP.h b/libXt/include/X11/ShellP.h index 07d96669b..58ce1b405 100644 --- a/libXt/include/X11/ShellP.h +++ b/libXt/include/X11/ShellP.h @@ -375,7 +375,9 @@ typedef struct _XtSaveYourselfRec *XtSaveYourself; /* implementation-private */ /* New fields for the session shell widget */ typedef struct { +#ifndef XT_NO_SM SmcConn connection; +#endif String session_id; String* restart_command; String* clone_command; diff --git a/libXt/src/.gitignore b/libXt/src/.gitignore new file mode 100644 index 000000000..3f48856d3 --- /dev/null +++ b/libXt/src/.gitignore @@ -0,0 +1 @@ +StringDefs.c
\ No newline at end of file diff --git a/libXt/src/Converters.c b/libXt/src/Converters.c index 6574ce05b..a19ca673a 100644 --- a/libXt/src/Converters.c +++ b/libXt/src/Converters.c @@ -1616,6 +1616,7 @@ Boolean XtCvtStringToRestartStyle( "String to RestartStyle conversion needs no extra arguments", (String *)NULL, (Cardinal *)NULL); +#ifndef XT_NO_SM if (CompareISOLatin1(str, "RestartIfRunning") == 0) donestr(unsigned char, SmRestartIfRunning, XtRRestartStyle); if (CompareISOLatin1(str, "RestartAnyway") == 0) @@ -1624,6 +1625,7 @@ Boolean XtCvtStringToRestartStyle( donestr(unsigned char, SmRestartImmediately, XtRRestartStyle); if (CompareISOLatin1(str, "RestartNever") == 0) donestr(unsigned char, SmRestartNever, XtRRestartStyle); +#endif XtDisplayStringConversionWarning(dpy, str, XtRRestartStyle); return False; } diff --git a/libXt/src/Error.c b/libXt/src/Error.c index fc9b11a84..1d6f158d8 100644 --- a/libXt/src/Error.c +++ b/libXt/src/Error.c @@ -74,6 +74,7 @@ in this Software without prior written authorization from The Open Group. #include "IntrinsicI.h" #include <stdio.h> #include <stdlib.h> +#include <unistd.h> /* The error handlers in the application context aren't used since we can't come up with a uniform way of using them. If you can, define diff --git a/libXt/src/Initialize.c b/libXt/src/Initialize.c index e9543dab1..fe13b58b5 100644 --- a/libXt/src/Initialize.c +++ b/libXt/src/Initialize.c @@ -196,7 +196,7 @@ void _XtInherit(void) #endif -#if defined (WIN32) || defined(__CYGWIN__) +#if (defined (WIN32) || defined(__CYGWIN__)) && !defined(_MSC_VER) /* * The Symbol _XtInherit is used in two different manners. * First it could be used as a generic function and second @@ -384,22 +384,26 @@ static void CombineAppUserDefaults( Boolean deallocate = False; if (!(path = getenv("XUSERFILESEARCHPATH"))) { + char *old_path=NULL; + char homedir[PATH_MAX]="."; #if !defined(WIN32) || !defined(__MINGW32__) - char *old_path; - char homedir[PATH_MAX]; GetRootDirName(homedir, PATH_MAX); - if (!(old_path = getenv("XAPPLRESDIR"))) { + if (!(old_path = getenv("XAPPLRESDIR"))) +#endif + { XtAsprintf(&path, "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N", - homedir, homedir, homedir, homedir, homedir, homedir); - } else { + homedir, homedir, homedir, homedir, homedir, homedir ); + } +#if !defined(WIN32) || !defined(__MINGW32__) + else + { XtAsprintf(&path, "%s/%%L/%%N%%C:%s/%%l/%%N%%C:%s/%%N%%C:%s/%%N%%C:%s/%%L/%%N:%s/%%l/%%N:%s/%%N:%s/%%N", - old_path, old_path, old_path, homedir, - old_path, old_path, old_path, homedir); + old_path, old_path, old_path, homedir ); } - deallocate = True; #endif + deallocate = True; } filename = XtResolvePathname(dpy, NULL, NULL, NULL, path, NULL, 0, NULL); @@ -416,20 +420,28 @@ static void CombineUserDefaults( Display *dpy, XrmDatabase *pdb) { +#ifdef _MSC_VER + char *slashDotXdefaults = ".Xdefaults"; +#else #ifdef __MINGW32__ char *slashDotXdefaults = "/Xdefaults"; #else char *slashDotXdefaults = "/.Xdefaults"; #endif +#endif char *dpy_defaults = XResourceManagerString(dpy); if (dpy_defaults) { XrmCombineDatabase(XrmGetStringDatabase(dpy_defaults), pdb, False); } else { char filename[PATH_MAX]; +#ifndef _MSC_VER (void) GetRootDirName(filename, PATH_MAX - strlen (slashDotXdefaults) - 1); (void) strcat(filename, slashDotXdefaults); +#else + strcpy(filename, slashDotXdefaults); +#endif (void)XrmCombineFileDatabase(filename, pdb, False); } } @@ -558,15 +570,24 @@ XrmDatabase XtScreenDatabase( if (!(filename = getenv("XENVIRONMENT"))) { int len; +#ifdef _MSC_VER + char *slashDotXdefaultsDash = "Xdefaults-"; +#else #ifdef __MINGW32__ char *slashDotXdefaultsDash = "/Xdefaults-"; #else char *slashDotXdefaultsDash = "/.Xdefaults-"; #endif +#endif +#ifndef _MSC_VER (void) GetRootDirName(filename = filenamebuf, PATH_MAX - strlen (slashDotXdefaultsDash) - 1); (void) strcat(filename, slashDotXdefaultsDash); +#else + filename = filenamebuf; + strcpy(filename, slashDotXdefaultsDash); +#endif len = strlen(filename); GetHostname (filename+len, PATH_MAX-len); } diff --git a/libXt/src/Intrinsic.c b/libXt/src/Intrinsic.c index 684bda252..8d9e8608c 100644 --- a/libXt/src/Intrinsic.c +++ b/libXt/src/Intrinsic.c @@ -1324,7 +1324,7 @@ static void FillInLangSubs( static char *implementation_default_path(void) { #if defined(WIN32) - static char xfilesearchpath[] = ""; + static char xfilesearchpath[] = ":"; return xfilesearchpath; #elif defined(__UNIXOS2__) diff --git a/libXt/src/Selection.c b/libXt/src/Selection.c index 101ea6aaa..5dff73e4a 100644 --- a/libXt/src/Selection.c +++ b/libXt/src/Selection.c @@ -76,6 +76,7 @@ in this Software without prior written authorization from The Open Group. #include "SelectionI.h" #include <X11/Xatom.h> #include <stdio.h> +#include <unistd.h> void _XtSetDefaultSelectionTimeout( unsigned long *timeout) diff --git a/libXt/src/Shell.c b/libXt/src/Shell.c index 8a44651d1..b78b62af6 100644 --- a/libXt/src/Shell.c +++ b/libXt/src/Shell.c @@ -84,9 +84,12 @@ in this Software without prior written authorization from The Open Group. #include "VendorP.h" #include <X11/Xatom.h> #include <X11/Xlocale.h> +#ifndef _MSC_VER #include <X11/ICE/ICElib.h> +#endif #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #ifdef EDITRES #include <X11/Xmu/Editres.h> @@ -718,9 +721,11 @@ static XtResource sessionResources[]= Offset(session.current_dir), XtRString, (XtPointer) NULL}, {XtNprogramPath, XtCProgramPath, XtRString, sizeof(String), Offset(session.program_path), XtRString, (XtPointer) NULL}, +#ifndef XT_NO_SM {XtNrestartStyle, XtCRestartStyle, XtRRestartStyle, sizeof(unsigned char), Offset(session.restart_style), XtRImmediate, (XtPointer) SmRestartIfRunning}, +#endif {XtNjoinSession, XtCJoinSession, XtRBoolean, sizeof(Boolean), Offset(session.join_session), XtRImmediate, (XtPointer) True}, {XtNsaveCallback, XtCCallback, XtRCallback, sizeof(XtPointer), @@ -1103,7 +1108,9 @@ static void ApplicationInitialize( static void JoinSession(SessionShellWidget); static void SetSessionProperties(SessionShellWidget, Boolean, unsigned long, unsigned long); +#ifndef XT_NO_SM static void StopManagingSession(SessionShellWidget, SmcConn); +#endif typedef struct _XtSaveYourselfRec { XtSaveYourself next; @@ -2655,7 +2662,6 @@ static Boolean SessionSetValues( if ((cw->session.join_session && !nw->session.join_session) || (cw->session.connection && !nw->session.connection)) StopManagingSession(nw, nw->session.connection); -#endif /* !XT_NO_SM */ if (cw->wm.client_leader != nw->wm.client_leader || cw->session.session_id != nw->session.session_id) { @@ -2678,6 +2684,7 @@ static Boolean SessionSetValues( strlen(nw->session.session_id)); } } +#endif /* !XT_NO_SM */ return False; } @@ -2764,10 +2771,12 @@ static String *EditCommand(String, String *, String *); static Boolean ExamineToken(XtPointer); static void GetIceEvent(XtPointer, int *, XtInputId *); static XtCheckpointToken GetToken(Widget, int); +#ifndef XT_NO_SM static void XtCallCancelCallbacks(SmcConn, SmPointer); static void XtCallDieCallbacks(SmcConn, SmPointer); static void XtCallSaveCallbacks(SmcConn, SmPointer, int, Bool, int, Bool); static void XtCallSaveCompleteCallbacks(SmcConn, SmPointer); +#endif /* !XT_NO_SM */ #ifndef XT_NO_SM static void StopManagingSession( diff --git a/libXt/src/Vendor.c b/libXt/src/Vendor.c index e4fd24fa5..e4b350867 100644 --- a/libXt/src/Vendor.c +++ b/libXt/src/Vendor.c @@ -64,7 +64,7 @@ SOFTWARE. * ***************************************************************************/ -#if defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) && !defined(_MSC_VER) /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; @@ -150,7 +150,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { } }; -#if !defined(AIXSHLIB) || !defined(SHAREDCODE) +#if (!defined(AIXSHLIB) || !defined(SHAREDCODE)) && !defined(_MSC_VER) externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); #endif diff --git a/libXt/src/makefile b/libXt/src/makefile new file mode 100644 index 000000000..a129f418b --- /dev/null +++ b/libXt/src/makefile @@ -0,0 +1,76 @@ +LIBRARY = libXt + +INCLUDES := .. ../include ../include/X11 $(INCLUDES) + +DEFINES += XT_NO_SM ERRORDB="""XtErrorDB""" + +CSRCS = \ + ActionHook.c \ + Alloc.c \ + ArgList.c \ + Callback.c \ + ClickTime.c \ + Composite.c \ + Constraint.c \ + Convert.c \ + Converters.c \ + Core.c \ + Create.c \ + Destroy.c \ + Display.c \ + Error.c \ + Event.c \ + EventUtil.c \ + Functions.c \ + GCManager.c \ + Geometry.c \ + GetActKey.c \ + GetResList.c \ + GetValues.c \ + HookObj.c \ + Hooks.c \ + Initialize.c \ + Intrinsic.c \ + Keyboard.c \ + Manage.c \ + NextEvent.c \ + Object.c \ + PassivGrab.c \ + Pointer.c \ + Popup.c \ + PopupCB.c \ + RectObj.c \ + ResConfig.c \ + Resources.c \ + Selection.c \ + SetSens.c \ + SetValues.c \ + SetWMCW.c \ + Shell.c \ + TMaction.c \ + TMgrab.c \ + TMkey.c \ + TMparse.c \ + TMprint.c \ + TMstate.c \ + Threads.c \ + VarCreate.c \ + VarGet.c \ + Varargs.c \ + Vendor.c \ + StringDefs.c + +BUILT_SOURCE = StringDefs.c +BUILT_HEADER = ../include/X11/StringDefs.h ../include/X11/Shell.h +BUILT_FILES = $(BUILT_SOURCE) $(BUILT_HEADER) + +STRING_LIST = ../util/string.list + +$(BUILT_HEADER): $(BUILT_SOURCE) + +load_makefile ../util/makefile DEBUG=$(DEBUG) MAKESERVER=0 + +$(BUILT_SOURCE) $(BUILT_HEADER) : ../util/$(OBJDIR)/makestrs.exe $(STRING_LIST) ../util/StrDefs.ht ../util/StrDefs.ct ../util/Shell.ht + ../util/$(OBJDIR)/makestrs -i .. $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c + move StringDefs.h ..\include\X11 + move Shell.h ..\include\X11 diff --git a/libXt/util/Shell.ht b/libXt/util/Shell.ht index fc78678f3..c6e25b0fd 100644 --- a/libXt/util/Shell.ht +++ b/libXt/util/Shell.ht @@ -48,7 +48,9 @@ SOFTWARE. #ifndef _XtShell_h #define _XtShell_h +#ifndef XT_NO_SM #include <X11/SM/SMlib.h> +#endif #include <X11/Intrinsic.h> /*********************************************************************** diff --git a/libXt/util/makefile b/libXt/util/makefile new file mode 100644 index 000000000..52ce89702 --- /dev/null +++ b/libXt/util/makefile @@ -0,0 +1,4 @@ +TTYAPP = makestrs + +CSRCS = makestrs.c + |