[xorg-commit-diffs] xc/programs/Xserver/hw/darwin Imakefile,
1.1.4.1.6.1, 1.1.4.1.6.1.6.1 XDarwin.man, 1.1.10.1,
1.1.10.1.6.1 darwin.c, 1.1.4.2.4.1,
1.1.4.2.4.1.6.1 darwinEvents.c, 1.1.4.1.6.2,
1.1.4.1.6.2.2.1 darwinKeyboard.c, 1.1.4.1.6.2, 1.1.4.1.6.2.2.1
Roland Mainz
xorg-commit at pdx.freedesktop.org
Sat Apr 10 02:04:23 PDT 2004
Committed by: gisburn
Update of /cvs/xorg/xc/programs/Xserver/hw/darwin
In directory pdx:/tmp/cvs-serv7662/xc/programs/Xserver/hw/darwin
Modified Files:
Tag: XPRINT
Imakefile XDarwin.man darwin.c darwinEvents.c darwinKeyboard.c
Log Message:
Resync to 2004-04-10 XORG-RELEASE-1 branch
Index: Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/darwin/Imakefile,v
retrieving revision 1.1.4.1.6.1
retrieving revision 1.1.4.1.6.1.6.1
diff -u -d -r1.1.4.1.6.1 -r1.1.4.1.6.1.6.1
--- a/Imakefile 4 Mar 2004 17:47:29 -0000 1.1.4.1.6.1
+++ b/Imakefile 10 Apr 2004 09:04:19 -0000 1.1.4.1.6.1.6.1
@@ -3,7 +3,7 @@
#include <Server.tmpl>
#define IHaveSubdirs
-LinkSourceFile(XFree86.man,../xfree86)
+LinkSourceFile(Xorg.man,../xfree86)
SRCS = darwin.c \
darwinEvents.c \
@@ -29,6 +29,20 @@
BUILDERSTRING = BuilderString
BUILDERMSG = -DBUILDERSTRING='$(BUILDERSTRING)'
#endif
+XORGREL = XOrgReleaseString
+XORGREL_DEF = -DXORG_RELEASE="\"$(XORGREL)\""
+
+#if defined(BuildDate)
+ BUILD_DATE = BuildDate
+#else
+ BUILD_DATE = 0
+#endif
+
+#if defined(ChangelogDate)
+ CLOG_DATE = ChangelogDate
+#else
+ CLOG_DATE = 0
+#endif
#if OSMajorVersion >= 6
CLUTDEF = -DUSE_NEW_CLUT
@@ -45,17 +59,17 @@
SUBDIRS = iokit utils
#endif
-DEFINES = $(QUARTZDEF)
+DEFINES = $(QUARTZDEF) $(VENDORSUPPORTDEFS)
EXTRAMANDEFS = $(QUARTZDEF) -D__logdir__=$(LOGDIRECTORY)
SpecialCObjectRule(darwin,$(ICONFIGFILES),$(OSNAMEDEF) $(BUILDERMSG) \
- $(CUSTOMVERDEF) $(CLUTDEF))
+ $(CUSTOMVERDEF) $(XORGREL_DEF) $(CLUTDEF))
NormalLibraryObjectRule()
NormalLibraryTarget(darwin,$(OBJS))
InstallManPage(XDarwin,$(MANDIR))
-InstallManPage(XFree86,$(MANDIR))
+InstallManPage(Xorg,$(MANDIR))
DependTarget()
Index: XDarwin.man
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/darwin/XDarwin.man,v
retrieving revision 1.1.10.1
retrieving revision 1.1.10.1.6.1
diff -u -d -r1.1.10.1 -r1.1.10.1.6.1
--- a/XDarwin.man 4 Mar 2004 17:47:29 -0000 1.1.10.1
+++ b/XDarwin.man 10 Apr 2004 09:04:19 -0000 1.1.10.1.6.1
@@ -10,7 +10,7 @@
#ifdef DARWIN_WITH_QUARTZ
.I XDarwin
is the X window server for Mac OS X and the Darwin operating system
-provided by the XFree86 Project.
+provided by the X.Org Foundation.
.I XDarwin
can run in three different modes. On Mac OS X,
.I XDarwin
@@ -51,7 +51,7 @@
#else
.I XDarwin
is the X window server for Mac OS X and the Darwin operating system
-provided by the XFree86 Project. This version of
+provided by the X.Org Foundation. This version of
.I XDarwin
can only be started from the Darwin text console. The Mac OS X Aqua GUI, if
present, must be shut down.
@@ -147,7 +147,7 @@
Same as \fB\-showconfig\fP.
.SH "SEE ALSO"
.PP
-X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1)
+X(__miscmansuffix__), Xorg(1), Xserver(1), xdm(1), xinit(1)
.SH BUGS
.I XDarwin
and this man page still have many limitations. Some of the more obvious
Index: darwin.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/darwin/darwin.c,v
retrieving revision 1.1.4.2.4.1
retrieving revision 1.1.4.2.4.1.6.1
diff -u -d -r1.1.4.2.4.1 -r1.1.4.2.4.1.6.1
--- a/darwin.c 4 Mar 2004 17:47:29 -0000 1.1.4.2.4.1
+++ b/darwin.c 10 Apr 2004 09:04:19 -0000 1.1.4.2.4.1.6.1
@@ -5,7 +5,7 @@
*
**************************************************************/
/*
- * Copyright (c) 2001-2003 Torrey T. Lyons. All Rights Reserved.
+ * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -44,7 +44,7 @@
#include "fb.h" // fb framebuffer code
#include "site.h"
#include "globals.h"
-#include "xf86Version.h"
+#include "xorgVersion.h"
#include "xf86Date.h"
#include "dix.h"
@@ -55,6 +55,9 @@
#include <fcntl.h>
#include <unistd.h>
+#define HAS_UTSNAME 1
+#include <sys/utsname.h>
+
#define NO_CFPLUGIN
#include <IOKit/IOKitLib.h>
#include <IOKit/hidsystem/IOHIDLib.h>
@@ -110,7 +113,7 @@
#define OSVENDOR ""
#endif
#ifndef PRE_RELEASE
-#define PRE_RELEASE XF86_VERSION_SNAP
+#define PRE_RELEASE XORG_VERSION_SNAP
#endif
void
@@ -118,37 +121,74 @@
{
#if PRE_RELEASE
ErrorF("\n"
- "This is a pre-release version of XFree86, and is not supported in any\n"
- "way. Bugs may be reported to XFree86 at XFree86.Org and patches submitted\n"
- "to fixes at XFree86.Org. Before reporting bugs in pre-release versions,\n"
- "please check the latest version in the XFree86 CVS repository\n"
- "(http://www.XFree86.Org/cvs)\n");
+ "This is a pre-release version of the " XVENDORNAME " X11.\n"
+ "Portions of this release are based on XFree86 4.4RC2 and selected\n"
+ "files from XFree86 4.4RC3. It is not supported in any way.\n"
+ "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
+ "Select the \"xorg\" product for bugs you find in this release.\n"
+ "Before reporting bugs in pre-release versions please check the\n"
+ "latest version in the " XVENDORNAME " \"monolithic tree\" CVS\n"
+ "repository hosted at http://www.freedesktop.org/Software/xorg/");
#endif
- ErrorF("\nXFree86 Version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR,
- XF86_VERSION_PATCH);
-#if XF86_VERSION_SNAP > 0
+#if XORG_VERSION_SNAP > 0
ErrorF(".%d", XF86_VERSION_SNAP);
#endif
-#if XF86_VERSION_SNAP >= 900
- ErrorF(" (%d.%d.0 RC %d)", XF86_VERSION_MAJOR, XF86_VERSION_MINOR + 1,
- XF86_VERSION_SNAP - 900);
+#if XORG_VERSION_SNAP >= 900
+ ErrorF(" (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1,
+ XORG_VERSION_SNAP - 900);
#endif
-#ifdef XF86_CUSTOM_VERSION
+#ifdef XORG_CUSTOM_VERSION
ErrorF(" (%s)", XF86_CUSTOM_VERSION);
#endif
- ErrorF(" / X Window System\n");
- ErrorF("(protocol Version %d, revision %d, vendor release %d)\n",
- X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE );
- ErrorF("Release Date: %s\n", XF86_DATE);
- ErrorF("\tIf the server is older than 6-12 months, or if your hardware is\n"
- "\tnewer than the above date, look for a newer version before\n"
- "\treporting problems. (See http://www.XFree86.Org/FAQ)\n");
- ErrorF("Operating System:%s%s\n", OSNAME, OSVENDOR);
+ ErrorF("\nRelease Date: %s\n", XF86_DATE);
+ ErrorF("X Protocol Version %d, Revision %d, %s\n",
+ X_PROTOCOL, X_PROTOCOL_REVISION, XORG_RELEASE );
+ ErrorF("Build Operating System:%s%s\n", OSNAME, OSVENDOR);
+#ifdef HAS_UTSNAME
+ {
+ struct utsname name;
+
+ if (uname(&name) == 0) {
+ ErrorF("Current Operating System: %s %s %s %s %s\n",
+ name.sysname, name.nodename, name.release, name.version, name.machine);
+ }
+ }
+#endif
+#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
+ {
+ struct tm t;
+ char buf[100];
+
+ bzero(&t, sizeof(t));
+ bzero(buf, sizeof(buf));
+ t.tm_mday = BUILD_DATE % 100;
+ t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
+ t.tm_year = BUILD_DATE / 10000 - 1900;
+ if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
+ ErrorF("Build Date: %s\n", buf);
+ }
+#endif
+#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
+ {
+ struct tm t;
+ char buf[100];
+
+ bzero(&t, sizeof(t));
+ bzero(buf, sizeof(buf));
+ t.tm_mday = CLOG_DATE % 100;
+ t.tm_mon = (CLOG_DATE / 100) % 100 - 1;
+ t.tm_year = CLOG_DATE / 10000 - 1900;
+ if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
+ ErrorF("Changelog Date: %s\n", buf);
+ }
+#endif
#if defined(BUILDERSTRING)
ErrorF("%s \n",BUILDERSTRING);
#endif
+ ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n"
+ "\tto make sure that you have the latest version.\n");
}
Index: darwinEvents.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/darwin/darwinEvents.c,v
retrieving revision 1.1.4.1.6.2
retrieving revision 1.1.4.1.6.2.2.1
diff -u -d -r1.1.4.1.6.2 -r1.1.4.1.6.2.2.1
--- a/darwinEvents.c 19 Mar 2004 21:49:09 -0000 1.1.4.1.6.2
+++ b/darwinEvents.c 10 Apr 2004 09:04:19 -0000 1.1.4.1.6.2.2.1
@@ -94,6 +94,29 @@
}
}
+#ifdef NX_DEVICELCTLKEYMASK
+#define CONTROL_MASK(flags) (flags & (NX_DEVICELCTLKEYMASK|NX_DEVICERCTLKEYMASK))
+#else
+#define CONTROL_MASK(flags) (NX_CONTROLMASK)
+#endif /* NX_DEVICELCTLKEYMASK */
+
+#ifdef NX_DEVICELSHIFTKEYMASK
+#define SHIFT_MASK(flags) (flags & (NX_DEVICELSHIFTKEYMASK|NX_DEVICERSHIFTKEYMASK))
+#else
+#define SHIFT_MASK(flags) (NX_SHIFTMASK)
+#endif /* NX_DEVICELSHIFTKEYMASK */
+
+#ifdef NX_DEVICELCMDKEYMASK
+#define COMMAND_MASK(flags) (flags & (NX_DEVICELCMDKEYMASK|NX_DEVICERCMDKEYMASK))
+#else
+#define COMMAND_MASK(flags) (NX_COMMANDMASK)
+#endif /* NX_DEVICELCMDKEYMASK */
+
+#ifdef NX_DEVICELALTKEYMASK
+#define ALTERNATE_MASK(flags) (flags & (NX_DEVICELALTKEYMASK|NX_DEVICERALTKEYMASK))
+#else
+#define ALTERNATE_MASK(flags) (NX_ALTERNATEMASK)
+#endif /* NX_DEVICELALTKEYMASK */
/*
* DarwinUpdateModifiers
@@ -109,20 +132,16 @@
DarwinPressModifierMask(xe, NX_ALPHASHIFTMASK);
}
if (flags & NX_COMMANDMASK) {
- DarwinPressModifierMask(xe,
- flags & (NX_DEVICELCMDKEYMASK|NX_DEVICERCMDKEYMASK));
+ DarwinPressModifierMask(xe, COMMAND_MASK(flags));
}
if (flags & NX_CONTROLMASK) {
- DarwinPressModifierMask(xe,
- flags & (NX_DEVICELCTLKEYMASK|NX_DEVICERCTLKEYMASK));
+ DarwinPressModifierMask(xe, CONTROL_MASK(flags));
}
if (flags & NX_ALTERNATEMASK) {
- DarwinPressModifierMask(xe,
- flags & (NX_DEVICELALTKEYMASK|NX_DEVICERALTKEYMASK));
+ DarwinPressModifierMask(xe, ALTERNATE_MASK(flags));
}
if (flags & NX_SHIFTMASK) {
- DarwinPressModifierMask(xe,
- flags & (NX_DEVICELSHIFTKEYMASK|NX_DEVICERSHIFTKEYMASK));
+ DarwinPressModifierMask(xe, SHIFT_MASK(flags));
}
if (flags & NX_SECONDARYFNMASK) {
DarwinPressModifierMask(xe, NX_SECONDARYFNMASK);
Index: darwinKeyboard.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v
retrieving revision 1.1.4.1.6.2
retrieving revision 1.1.4.1.6.2.2.1
diff -u -d -r1.1.4.1.6.2 -r1.1.4.1.6.2.2.1
--- a/darwinKeyboard.c 19 Mar 2004 21:49:09 -0000 1.1.4.1.6.2
+++ b/darwinKeyboard.c 10 Apr 2004 09:04:19 -0000 1.1.4.1.6.2.2.1
@@ -657,7 +657,6 @@
return TRUE;
}
-
/*
* DarwinBuildModifierMaps
* Use the keyMap field of keyboard info structure to populate
@@ -685,7 +684,11 @@
break;
case XK_Shift_R:
+#ifdef NX_MODIFIERKEY_RSHIFT
info->modifierKeycodes[NX_MODIFIERKEY_RSHIFT][0] = i;
+#else
+ info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i;
+#endif
info->modMap[MIN_KEYCODE + i] = ShiftMask;
break;
@@ -695,7 +698,11 @@
break;
case XK_Control_R:
+#ifdef NX_MODIFIERKEY_RCONTROL
info->modifierKeycodes[NX_MODIFIERKEY_RCONTROL][0] = i;
+#else
+ info->modifierKeycodes[NX_MODIFIERKEY_CONTROL][0] = i;
+#endif
info->modMap[MIN_KEYCODE + i] = ControlMask;
break;
@@ -710,7 +717,11 @@
break;
case XK_Alt_R:
+#ifdef NX_MODIFIERKEY_RALTERNATE
info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i;
+#else
+ info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i;
+#endif
info->modMap[MIN_KEYCODE + i] = Mod1Mask;
break;
@@ -724,7 +735,11 @@
break;
case XK_Meta_R:
+#ifdef NX_MODIFIERKEY_RCOMMAND
info->modifierKeycodes[NX_MODIFIERKEY_RCOMMAND][0] = i;
+#else
+ info->modifierKeycodes[NX_MODIFIERKEY_COMMAND][0] = i;
+#endif
info->modMap[MIN_KEYCODE + i] = Mod2Mask;
break;
@@ -842,17 +857,25 @@
switch (mask) {
case NX_ALPHASHIFTMASK: return NX_MODIFIERKEY_ALPHALOCK;
case NX_SHIFTMASK: return NX_MODIFIERKEY_SHIFT;
+#ifdef NX_DEVICELSHIFTKEYMASK
case NX_DEVICELSHIFTKEYMASK: return NX_MODIFIERKEY_SHIFT;
case NX_DEVICERSHIFTKEYMASK: return NX_MODIFIERKEY_RSHIFT;
+#endif
case NX_CONTROLMASK: return NX_MODIFIERKEY_CONTROL;
+#ifdef NX_DEVICELCTLKEYMASK
case NX_DEVICELCTLKEYMASK: return NX_MODIFIERKEY_CONTROL;
case NX_DEVICERCTLKEYMASK: return NX_MODIFIERKEY_RCONTROL;
+#endif
case NX_ALTERNATEMASK: return NX_MODIFIERKEY_ALTERNATE;
+#ifdef NX_DEVICELALTKEYMASK
case NX_DEVICELALTKEYMASK: return NX_MODIFIERKEY_ALTERNATE;
case NX_DEVICERALTKEYMASK: return NX_MODIFIERKEY_RALTERNATE;
+#endif
case NX_COMMANDMASK: return NX_MODIFIERKEY_COMMAND;
+#ifdef NX_DEVICELCMDKEYMASK
case NX_DEVICELCMDKEYMASK: return NX_MODIFIERKEY_COMMAND;
case NX_DEVICERCMDKEYMASK: return NX_MODIFIERKEY_RCOMMAND;
+#endif
case NX_NUMERICPADMASK: return NX_MODIFIERKEY_NUMERICPAD;
case NX_HELPMASK: return NX_MODIFIERKEY_HELP;
case NX_SECONDARYFNMASK: return NX_MODIFIERKEY_SECONDARYFN;
@@ -869,13 +892,21 @@
switch (key) {
case NX_MODIFIERKEY_ALPHALOCK: return NX_ALPHASHIFTMASK;
case NX_MODIFIERKEY_SHIFT: return NX_SHIFTMASK;
+#ifdef NX_MODIFIERKEY_RSHIFT
case NX_MODIFIERKEY_RSHIFT: return NX_SHIFTMASK;
+#endif
case NX_MODIFIERKEY_CONTROL: return NX_CONTROLMASK;
+#ifdef NX_MODIFIERKEY_RCONTROL
case NX_MODIFIERKEY_RCONTROL: return NX_CONTROLMASK;
+#endif
case NX_MODIFIERKEY_ALTERNATE: return NX_ALTERNATEMASK;
+#ifdef NX_MODIFIERKEY_RALTERNATE
case NX_MODIFIERKEY_RALTERNATE: return NX_ALTERNATEMASK;
+#endif
case NX_MODIFIERKEY_COMMAND: return NX_COMMANDMASK;
+#ifdef NX_MODIFIERKEY_RCOMMAND
case NX_MODIFIERKEY_RCOMMAND: return NX_COMMANDMASK;
+#endif
case NX_MODIFIERKEY_NUMERICPAD: return NX_NUMERICPADMASK;
case NX_MODIFIERKEY_HELP: return NX_HELPMASK;
case NX_MODIFIERKEY_SECONDARYFN: return NX_SECONDARYFNMASK;
More information about the xorg-commit-diffs
mailing list