diff options
author | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-06-28 18:59:05 -0400 |
---|---|---|
committer | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-06-28 18:59:05 -0400 |
commit | f7f3fe7fe7233a2ffc43106c48f44cbbd82b7c19 (patch) | |
tree | 84ca56dbddf11442a1acfeeee6ac69afd0701f9e /hw/xfree86/utils | |
parent | 8a06ff9ffa4816d192e58e43e7fe569b97b4dd7c (diff) |
Remove the remnants of OS/2 support.
This has never worked in any modular server release, and as far as I know
was never tested in 6.7 through 6.9.
Diffstat (limited to 'hw/xfree86/utils')
-rw-r--r-- | hw/xfree86/utils/xorgcfg/config.h | 27 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgcfg/mouse-cfg.c | 3 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgcfg/stubs.c | 4 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgcfg/text-mode.c | 17 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgconfig/cards.c | 20 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgconfig/xorgconfig.c | 87 |
6 files changed, 4 insertions, 154 deletions
diff --git a/hw/xfree86/utils/xorgcfg/config.h b/hw/xfree86/utils/xorgcfg/config.h index 62187b0d4..b5baba465 100644 --- a/hw/xfree86/utils/xorgcfg/config.h +++ b/hw/xfree86/utils/xorgcfg/config.h @@ -49,12 +49,6 @@ #include <stdarg.h> -#ifdef __UNIXOS2__ -#define strcasecmp stricmp -#define setenv putenv -#define PATH_MAX 260 -#endif - /* Get PATH_MAX */ #ifndef PATH_MAX # if defined(_POSIX_SOURCE) @@ -103,7 +97,6 @@ #define CONFIG_ACCESSX 3 extern int config_mode; -#ifndef __UNIXOS2__ #define CONFPATH "%A," "%R," \ "/etc/X11/%R," "%P/etc/X11/%R," \ "%E," "%F," \ @@ -120,26 +113,6 @@ extern int config_mode; "%P/etc/X11/%X," \ "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ "%P/lib/X11/%X" -#else -#define CONFPATH "%&"XF86CONFIGDIR"/%R," "%&"XF86CONFIGDIR"/%X," \ - "%A," "%R," \ - "/etc/X11/%R," "%P/etc/X11/%R," \ - "%E," "%F," \ - "/etc/X11/%F," "%P/etc/X11/%F," \ - "%D/%X," \ - "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ - "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ - "%P/etc/X11/%X," \ - "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ - "%P/lib/X11/%X" -#define USER_CONFPATH "%&"XF86CONFIGDIR"/%X," "%&"XF86CONFIGDIR"/%X," \ - "/etc/X11/%S," "%P/etc/X11/%S," \ - "/etc/X11/%G," "%P/etc/X11/%G," \ - "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ - "%P/etc/X11/%X," \ - "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ - "%P/lib/X11/%X" -#endif /* * Types diff --git a/hw/xfree86/utils/xorgcfg/mouse-cfg.c b/hw/xfree86/utils/xorgcfg/mouse-cfg.c index 5bae6d326..24aec6ae4 100644 --- a/hw/xfree86/utils/xorgcfg/mouse-cfg.c +++ b/hw/xfree86/utils/xorgcfg/mouse-cfg.c @@ -54,9 +54,6 @@ static struct MouseProtocol { char *name; int type; } protocols[] = { -#ifdef __UNIXOS2__ - {"OS2Mouse", MTYPE_AUTOMOUSE}, -#endif #ifdef __SCO__ {"OsMouse", MTYPE_AUTOMOUSE}, #endif diff --git a/hw/xfree86/utils/xorgcfg/stubs.c b/hw/xfree86/utils/xorgcfg/stubs.c index 47b2c2d5a..fdc840a7e 100644 --- a/hw/xfree86/utils/xorgcfg/stubs.c +++ b/hw/xfree86/utils/xorgcfg/stubs.c @@ -36,10 +36,6 @@ * Implementation */ -#ifdef __UNIXOS2__ -static char dummy; -#endif - #if !defined(USE_MODULES) /* these are defined in libdummy.a */ int diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c index 8800c29d7..0b6e65482 100644 --- a/hw/xfree86/utils/xorgcfg/text-mode.c +++ b/hw/xfree86/utils/xorgcfg/text-mode.c @@ -53,11 +53,7 @@ #endif #ifndef XKB_RULES_DIR -#ifndef __UNIXOS2__ #define XKB_RULES_DIR PROJECT_ROOT "/share/X11/xkb/rules" -#else -#define XKB_RULES_DIR XF86CONFIGDIR "/xkb/rules" -#endif #endif #define CONTROL_A 1 @@ -212,11 +208,7 @@ TextMode(void) "The "__XCONFIGFILE__" file usually resides in /etc. A " "sample "__XCONFIGFILE__" file is supplied with " #else -#ifndef __UNIXOS2__ "The "__XCONFIGFILE__" file usually resides in " PROJECT_ROOT "/etc/X11 " -#else - "The "__XCONFIGFILE__" file usually resides in "XF86CONFIGDIR" " -#endif "or /etc/X11. A sample "__XCONFIGFILE__" file is supplied with " #endif __XSERVERNAME__"; it is configured for a standard VGA card and " @@ -306,11 +298,7 @@ WriteXF86Config(void) refresh(); xf86config = DialogInput("Write "__XCONFIGFILE__, "Write configuration to file:", 10, 60, XF86Config_path ? XF86Config_path : -#ifndef __UNIXOS2__ "/etc/X11/"__XCONFIGFILE__, " Ok ", " Cancel ", 0); -#else - XF86CONFIGDIR"/"__XCONFIGFILE__, " Ok ", " Cancel ", 0); -#endif if (xf86config == NULL) return (-1); @@ -355,9 +343,6 @@ WriteXF86Config(void) } static char *protocols[] = { -#ifdef __UNIXOS2__ - "OS2Mouse", -#endif #ifdef __SCO__ "OsMouse", #endif @@ -549,8 +534,6 @@ MouseConfig(void) str = "/dev/wsmouse"; #elif defined(__FreeBSD__) || defined(__DragonFly__) str = "/dev/sysmouse"; -#elif defined(__UNIXOS2__) - str = "mouse$"; #elif defined(__linux__) str = "/dev/input/mice"; #else diff --git a/hw/xfree86/utils/xorgconfig/cards.c b/hw/xfree86/utils/xorgconfig/cards.c index f903d7f9c..8116f0a03 100644 --- a/hw/xfree86/utils/xorgconfig/cards.c +++ b/hw/xfree86/utils/xorgconfig/cards.c @@ -1,10 +1,3 @@ -/* $XConsortium: cards.c /main/9 1996/10/19 18:15:32 kaleb $ */ - - - - - - /* * Functions to manipulate card database. */ @@ -66,15 +59,6 @@ getnextline(FILE *f, char *l) { if (fgets(l, 128, f) == NULL) return -1; -#ifdef __UNIXOS2__ - { - char *p = strchr(l,'\r'); - if (p) { - *p = '\n'; - *(p+1) = '\0'; - } - } -#endif return 0; } @@ -119,11 +103,7 @@ int parse_database() { int i, lineno; char filename[128]; -#ifndef __UNIXOS2__ strcpy(filename, CARD_DATABASE_FILE); -#else - strcpy(filename, (char*)__XOS2RedirRoot(CARD_DATABASE_FILE)); -#endif f = fopen(filename, "r"); if (f == NULL) return -1; diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c index 3e60fdabb..56897899c 100644 --- a/hw/xfree86/utils/xorgconfig/xorgconfig.c +++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c @@ -1,4 +1,3 @@ - /* * This is a configuration program that will create a base XF86Config * file based on menu choices. Its main feature is that clueless users @@ -107,13 +106,6 @@ #include <sys/types.h> #include <sys/stat.h> -/* hv: fix a few EMX problems, will disappear with real UnixOS/2 */ -#ifdef __UNIXOS2__ -#define sync() /*nothing*/ -static int getuid() { return 0; } -#endif - - #include <X11/Xlib.h> #include <X11/extensions/XKBstr.h> #include <X11/extensions/XKBrules.h> @@ -172,11 +164,7 @@ static int getuid() { return 0; } #endif #define MODULEPATH TREEROOT "/lib/modules" -#ifndef __UNIXOS2__ #define XSERVERNAME_FOR_PROBE "X" -#else -#define XSERVERNAME_FOR_PROBE PROJECTROOT"/bin/"__XSERVERNAME__ -#endif #ifndef XCONFIGFILE #define XCONFIGFILE "xorg.conf" @@ -378,10 +366,6 @@ getstring(char *s) /* * Mouse configuration. - * - * (hv) OS/2 (__UNIXOS2__) only has an OS supported mouse, so user has no options - * the server will enable a third button automatically if there is one - * We also do the same for QNX4, since we use the OS mouse drivers. */ int M_OSMOUSE, M_WSMOUSE, M_AUTO, @@ -398,7 +382,7 @@ struct { int *ident; char *desc; } mouse_info[] = { -#if defined(__UNIXOS2__) || defined(QNX4) +#if defined(QNX4) #define DEF_PROTO_STRING "OSMOUSE" {"OSMOUSE", &M_OSMOUSE, "OSMOUSE" @@ -498,7 +482,6 @@ struct { # define DEF_MOUSEDEV "/dev/mouse"; #endif -#ifndef __UNIXOS2__ static char *mouseintro_text = "First specify a mouse protocol type. Choose one from the following list:\n" "\n"; @@ -549,12 +532,10 @@ static char *mousemancomment_text = "You have selected a Logitech MouseMan type mouse. You might want to enable\n" "ChordMiddle which could cause the third button to work.\n"; -#endif /* !__UNIXOS2__ */ - static void mouse_configuration(void) { -#if !defined(__UNIXOS2__) && !defined(QNX4) +#if !defined(QNX4) int i, j; char s[80]; char *def_mousedev = DEF_MOUSEDEV; @@ -670,18 +651,14 @@ mouse_configuration(void) { } printf("\n"); -#else /* __UNIXOS2__ */ +#else /* set some reasonable defaults for OS/2 */ config_mousetype = M_OSMOUSE; config_chordmiddle = 0; config_cleardtrrts = 0; config_emulate3buttons = 0; -#if !defined(QNX4) - config_pointerdevice = "OS2MOUSE"; -#else config_pointerdevice = "QNXMOUSE"; #endif -#endif /* __UNIXOS2__ */ } @@ -1351,36 +1328,9 @@ static char *modestring[NU_MODESTRINGS] = { #endif }; -#ifdef __EMX__ -/* yet another instance of this code, sigh! */ -char * -__XOS2RedirRoot(char *path, char sep) -{ - static char pn[300]; - char *root; - int i,l; - if ((isalpha(path[0]) && path[1]==':') || path[0] != '/') - return path; - - root = getenv("X11ROOT"); - if (!root) root = ""; - sprintf(pn,"%s%s",root,path); - if (sep=='\\') { - l = strlen(pn); - for (i=0; i<l; i++) - if (pn[i]=='/') pn[i]='\\'; - } - return pn; -} -#endif - -/* (hv) to avoid the UNIXISM to try to open a dir to check for existance */ static int exists_dir(char *name) { struct stat sbuf; -#ifdef __EMX__ - name = __XOS2RedirRoot(name,'/'); -#endif /* is it there ? */ if (stat(name,&sbuf) == -1) return 0; @@ -1691,22 +1641,10 @@ skipramdacselection: sprintf(d3name, "%s%s", temp_dir, DUMBCONFIG3); printf("Running X -probeonly -pn -xf86config %s.\n", fname); write_XF86Config(fname); -#ifndef __EMX__ sync(); -#endif /* compose a line with the real path */ -#ifndef __EMX__ sprintf(syscmdline, "X -probeonly -pn -xf86config %s 2> %s", fname, d2name); -#else - /* OS/2 does not have symlinks, so "X" does not exist, - * call the real X server - */ - sprintf(syscmdline,"%s/"__XSERVERNAME__" -probeonly -pn -xf86config " - TEMPORARY_XF86CONFIG_FILENAME " 2>" DUMBCONFIG2, - __XOS2RedirRoot("/"__XSERVERNAME__"/bin",'\\'), - card[card_selected].server); -#endif if (system(syscmdline)) { printf("X -probeonly call failed.\n"); @@ -2548,10 +2486,8 @@ write_XF86Config(char *filename) f = fopen(filename, "w"); if (f == NULL) { printf("Failed to open filename for writing.\n"); -#ifndef __EMX__ if (getuid() != 0) printf("Maybe you need to be root to write to the specified directory?\n"); -#endif return(1); } @@ -2606,7 +2542,7 @@ write_XF86Config(char *filename) fprintf(f, " Option \"Protocol\" \"%s\"\t# %s\n", mouse_info[config_mousetype].name, mouse_info[config_mousetype].desc); -#if !defined(__UNIXOS2__) && !defined(QNX4) +#if !defined(QNX4) fprintf(f, " Option \"Device\" \"%s\"\n", config_pointerdevice); #endif fprintf(f, "%s", pointersection_text2); @@ -2780,7 +2716,6 @@ ask_XF86Config_location(void) { "I am going to write the " CONFIGNAME " file now. Make sure you don't accidently\n" "overwrite a previously configured one.\n\n"); -#ifndef __EMX__ if (getuid() == 0) { #ifdef PREFER_XF86CONFIG_IN_ETC filename = Strdup("/etc/X11/" XCONFIGFILE); @@ -2814,16 +2749,6 @@ ask_XF86Config_location(void) { if (answerisyes(s)) return filename; #endif -#else /* __EMX__ */ - { - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Shall I write it to the default location, drive:/"__XSERVERNAME__"/lib/X11/XConfig? "); - getstring(s); - printf("\n"); - if (answerisyes(s)) { - return __XOS2RedirRoot("/"__XSERVERNAME__"/lib/X11/XConfig",'/'); - } -#endif /* __EMX__ */ } if (filename) @@ -2862,7 +2787,6 @@ __XSERVERNAME__" distribution for your OS.\n" "libraries, configuration files and a server that you want to use.\n" "\n"; -#ifndef __UNIXOS2__ static char *oldxfree86_text = "The directory '/usr/X386/bin' exists. You probably have a very old version of\n" "XFree86 installed, but this program was built to configure "__XSERVERNAME__" "XVERSIONSTRING"\n" @@ -2882,7 +2806,6 @@ static char *pathnote_text = "link is '/usr/bin/X11'.\n" "\n" "Make sure the path is OK before continuing.\n"; -#endif static void path_check(void) { @@ -2899,7 +2822,6 @@ path_check(void) { printf("\n"); } -#ifndef __UNIXOS2__ ok = exists_dir("/usr/X386/bin"); if (!ok) return; @@ -2909,7 +2831,6 @@ path_check(void) { getenv("PATH")); printf("%s", pathnote_text); keypress(); -#endif } |