1 diff -Naur -x CVS xc.orig/config/cf/FreeBSD.cf xc/config/cf/FreeBSD.cf
2 --- XFree86-4.0.2.orig/xc/config/cf/FreeBSD.cf Mon Dec 4 13:49:09 2000
3 +++ XFree86-4.0.2/xc/config/cf/FreeBSD.cf Mon Jan 22 14:49:12 2001
9 +#if (OSMajorVersion > 1)
10 +#define InstallXloadSetGID NO
12 +#define InstallXloadSetGID YES
15 #define AvoidNullMakeCommand YES
16 #define StripInstalledPrograms YES
17 diff -Naur -x CVS xc.orig/config/cf/Imake.rules xc/config/cf/Imake.rules
18 --- XFree86-4.0.2.orig/xc/config/cf/Imake.rules Sat Dec 16 12:32:59 2000
19 +++ XFree86-4.0.2/xc/config/cf/Imake.rules Sat Jan 27 15:08:17 2001
21 InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
24 - @(TMP=/tmp/tmp.$$$$; \ @@\
25 + @(TMP=#tmp.$$$$; \ @@\
26 RemoveFile($${TMP}); \ @@\
27 echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\
28 for i in aliases; do (set -x; \ @@\
30 InstallHtmlManPageAliases(file,aliases,suffix) @@\
33 - @(TMP=/tmp/tmp.$$$$; \ @@\
34 + @(TMP=#tmp.$$$$; \ @@\
35 RemoveFile($${TMP}); \ @@\
36 echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\
37 for i in aliases; do (set -x; \ @@\
38 diff -Naur -x CVS xc.orig/config/cf/NetBSD.cf xc/config/cf/NetBSD.cf
39 --- XFree86-4.0.2.orig/xc/config/cf/NetBSD.cf Sun Dec 3 11:14:08 2000
40 +++ XFree86-4.0.2/xc/config/cf/NetBSD.cf Mon Jan 22 14:49:14 2001
46 +#define InstallXloadSetGID NO
48 /* Defines for using the GNU pth thread library -- experimental */
50 diff -Naur -x CVS xc.orig/config/cf/OpenBSD.cf xc/config/cf/OpenBSD.cf
51 --- XFree86-4.0.2.orig/xc/config/cf/OpenBSD.cf Sat Dec 2 15:15:03 2000
52 +++ XFree86-4.0.2/xc/config/cf/OpenBSD.cf Mon Jan 22 14:49:15 2001
58 +#define InstallXloadSetGID NO
61 #define HasLibPthread NO
62 diff -Naur -x CVS xc.orig/config/cf/X11.tmpl xc/config/cf/X11.tmpl
63 --- XFree86-4.0.2.orig/xc/config/cf/X11.tmpl Sat Dec 16 12:33:01 2000
64 +++ XFree86-4.0.2/xc/config/cf/X11.tmpl Mon Jan 22 14:49:17 2001
66 #ifndef InstallXtermSetUID
67 #define InstallXtermSetUID YES /* xterm needs to be set uid */
69 +#ifndef InstallXloadSetGID
70 +#define InstallXloadSetGID YES /* xload often needs set gid kmem */
72 #ifndef InstallXinitConfig
73 #define InstallXinitConfig NO /* install sample xinit config */
76 #ifndef InstallAppDefFiles
77 #define InstallAppDefFiles YES /* install application defaults */
79 +#ifndef UseConfDirForAppDefaults
80 +#define UseConfDirForAppDefaults YES
82 +#ifndef UseConfDirForXkb
83 +#define UseConfDirForXkb YES
85 #ifndef CompressAllFonts
86 #define CompressAllFonts NO
89 * if the InstallAppDefFiles configuration parameter is set.
91 #ifndef InstallAppDefaultsLong
92 +#if UseConfDirForAppDefaults
93 #if InstallAppDefFiles
94 #define InstallAppDefaultsLong(file,class) @@\
95 LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
96 @@ -2356,6 +2366,15 @@
97 LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
98 InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
99 #endif /* InstallAppDefFiles */
100 +#else /* UseConfDirForAppDefaults */
101 +#if InstallAppDefFiles
102 +#define InstallAppDefaultsLong(file,class) @@\
103 +InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
105 +#define InstallAppDefaultsLong(file,class) @@\
106 +InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
107 +#endif /* InstallAppDefFiles */
108 +#endif /* UseConfDirForAppDefaults */
109 #endif /* InstallAppDefaultsLong */
112 diff -Naur -x CVS xc.orig/config/cf/linux.cf xc/config/cf/linux.cf
113 --- XFree86-4.0.2.orig/xc/config/cf/linux.cf Sat Dec 16 12:33:00 2000
114 +++ XFree86-4.0.2/xc/config/cf/linux.cf Mon Jan 22 14:49:19 2001
117 # define HasLibCrypt NO
121 +#ifndef InstallXloadSetGID
122 +#define InstallXloadSetGID NO
125 /* <linux/input.h> support mainly for USB support */
126 diff -Naur -x CVS xc.orig/config/cf/osf1.cf xc/config/cf/osf1.cf
127 --- XFree86-4.0.2.orig/xc/config/cf/osf1.cf Wed Jun 11 08:24:18 1997
128 +++ XFree86-4.0.2/xc/config/cf/osf1.cf Mon Jan 22 14:49:23 2001
130 #define ShLibDir /usr/shlib
131 #define SharedLibPex NO /* losing, no shared -lm */
134 +#define InstallXloadSetGID NO
136 #define ThreadedX ModernOSF1
139 diff -Naur -x CVS xc.orig/config/util/gccmdep.cpp xc/config/util/gccmdep.cpp
140 --- XFree86-4.0.2.orig/xc/config/util/gccmdep.cpp Tue Nov 14 16:59:21 2000
141 +++ XFree86-4.0.2/xc/config/util/gccmdep.cpp Sat Jan 27 15:07:33 2001
146 +XCOMM Security: if $tmp exists exit immediately
148 +if [ -e ${TMP} ] ; then
149 + echo "$0: ${TMP} exists already, exit." 1>&2
152 +#if defined(HAS_MKTEMP)
153 +if [ -n "`type -p mktemp`" ] ; then
154 + TMP="`mktemp ${TMP}.XXXXXX`" || exit 1
158 trap "$RM ${TMP}*; exit 1" 1 2 15
159 trap "$RM ${TMP}*; exit 0" 1 2 13
169 if [ "$endmarker"x = x ]; then
170 diff -Naur -x CVS xc.orig/extras/rman/rman.c xc/extras/rman/rman.c
171 --- XFree86-4.0.2.orig/xc/extras/rman/rman.c Fri Dec 1 13:48:08 2000
172 +++ XFree86-4.0.2/xc/extras/rman/rman.c Thu Dec 21 14:01:07 2000
173 @@ -474,12 +474,14 @@
176 static char *nonhref = "\">'";
177 + static char *punct = ".,:;)]}?!";
180 if (strincmp(p,"http",4)==0) {
181 href="%s"; manrefname = p;
183 while (*p && !isspace(*p) && !strchr(nonhref,*p)) p++;
184 + while (strchr(punct, *(p - 1))) p--;
188 diff -Naur -x CVS xc.orig/lib/Xaw/AsciiSrc.c xc/lib/Xaw/AsciiSrc.c
189 --- XFree86-4.0.2.orig/xc/lib/Xaw/AsciiSrc.c Tue Nov 28 12:25:09 2000
190 +++ XFree86-4.0.2/xc/lib/Xaw/AsciiSrc.c Sat Jan 27 15:06:11 2001
191 @@ -1456,7 +1456,7 @@
192 open_mode = O_WRONLY | O_CREAT | O_EXCL;
197 /* O_NOFOLLOW is a FreeBSD & Linux extension */
199 open_mode = O_RDWR | O_NOFOLLOW;
200 @@ -1464,6 +1464,7 @@
201 open_mode = O_RDWR; /* unsafe; subject to race conditions */
202 #endif /* O_NOFOLLOW */
207 XtErrorMsg("badMode", "asciiSourceCreate", "XawError",
208 diff -Naur -x CVS xc.orig/lib/Xaw/Form.c xc/lib/Xaw/Form.c
209 --- XFree86-4.0.2.orig/xc/lib/Xaw/Form.c Thu Oct 26 13:57:49 2000
210 +++ XFree86-4.0.2/xc/lib/Xaw/Form.c Fri Feb 9 21:33:13 2001
212 always_resize_children =
213 ChangeFormGeometry((Widget)fw, False, maxx, maxy, NULL, NULL);
216 + fw->form.old_width = fw->core.width;
217 + fw->form.old_height = fw->core.height;
225 LayoutChild(Widget w)
227 - FormWidget fw = (FormWidget)XtParent(w);
228 FormConstraints form = (FormConstraints)w->core.constraints;
231 @@ -684,22 +688,16 @@
232 form->form.new_y = form->form.dy;
233 if ((ref = form->form.horiz_base) != NULL) {
234 FormConstraints ref_form = (FormConstraints)ref->core.constraints;
238 - width = fw->form.old_width ?
239 - ref_form->form.virtual_width : XtWidth(ref);
240 - form->form.new_x += ref_form->form.new_x + width +
241 + form->form.new_x += ref_form->form.new_x + XtWidth(ref) +
242 (XtBorderWidth(ref) << 1);
244 if ((ref = form->form.vert_base) != NULL) {
245 FormConstraints ref_form = (FormConstraints)ref->core.constraints;
249 - height = fw->form.old_height ?
250 - ref_form->form.virtual_height : XtHeight(ref);
251 - form->form.new_y += ref_form->form.new_y + height +
252 + form->form.new_y += ref_form->form.new_y + XtHeight(ref) +
253 (XtBorderWidth(ref) << 1);
257 * The window will be updated when no_refigure is set back
260 - form->form.virtual_width = XtWidth(w);
261 - form->form.virtual_height = XtHeight(w);
262 form->form.deferred_resize = True;
263 ret_val = XtGeometryDone;
269 + fw->form.old_width = XtWidth(fw);
270 + fw->form.old_height = XtHeight(fw);
271 for (childP = children; childP - children < num_children; childP++) {
275 nform->form.virtual_height = XtHeight(nw);
278 - fw->form.old_width = XtWidth(fw);
279 - fw->form.old_height = XtHeight(fw);
282 XtWidth(w) = old_width;
283 @@ -1022,23 +1018,21 @@
284 (*((FormWidgetClass)w->core.widget_class)->form_class.layout)
285 (fw, XtWidth(w), XtHeight(w), True);
287 - if (!fw->form.old_width || !fw->form.old_height) {
288 - fw->form.old_width = XtWidth(w);
289 - fw->form.old_height = XtHeight(w);
290 - for (children = childP = fw->composite.children;
291 - childP - children < num_children;
294 - if (!XtIsManaged(child))
296 - form = (FormConstraints)child->core.constraints;
297 + fw->form.old_width = XtWidth(w);
298 + fw->form.old_height = XtHeight(w);
299 + for (children = childP = fw->composite.children;
300 + childP - children < num_children;
303 + if (!XtIsManaged(child))
305 + form = (FormConstraints)child->core.constraints;
307 - form->form.virtual_x = XtX(child);
308 - form->form.virtual_y = XtY(child);
309 + form->form.virtual_x = XtX(child);
310 + form->form.virtual_y = XtY(child);
312 - form->form.virtual_width = XtWidth(child);
313 - form->form.virtual_height = XtHeight(child);
315 + form->form.virtual_width = XtWidth(child);
316 + form->form.virtual_height = XtHeight(child);
320 diff -Naur -x CVS xc.orig/lib/Xaw/MultiSrc.c xc/lib/Xaw/MultiSrc.c
321 --- XFree86-4.0.2.orig/xc/lib/Xaw/MultiSrc.c Mon Jul 19 09:36:02 1999
322 +++ XFree86-4.0.2/xc/lib/Xaw/MultiSrc.c Sat Jan 27 15:06:56 2001
327 +#include <sys/types.h>
328 +#include <sys/stat.h>
331 #define MAGIC_VALUE ((XawTextPosition)-1)
332 #define streq(a, b) (strcmp((a), (b)) == 0)
334 @@ -1158,7 +1162,9 @@
336 InitStringOrFile(MultiSrcObject src, Bool newString)
338 - char *open_mode = NULL;
340 + const char *fdopen_mode = NULL;
343 char fileName[TMPSIZ];
344 Display *d = XtDisplayOfObject((Widget)src);
345 @@ -1208,7 +1214,8 @@
346 XtErrorMsg("NoFile", "multiSourceCreate", "XawError",
347 "Creating a read only disk widget and no file specified.",
350 + open_mode = O_RDONLY;
355 @@ -1218,10 +1225,18 @@
357 (void)tmpnam((char *)src->multi_src.string);
358 src->multi_src.is_tempfile = True;
360 + open_mode = O_WRONLY | O_CREAT | O_EXCL;
364 +/* O_NOFOLLOW is a BSD & Linux extension */
366 + open_mode = O_RDWR | O_NOFOLLOW;
368 + open_mode = O_RDWR; /* unsafe; subject to race conditions */
370 + fdopen_mode = "r+";
376 XtErrorMsg("badMode", "multiSourceCreate", "XawError",
377 @@ -1243,12 +1258,14 @@
380 if (!src->multi_src.is_tempfile) {
381 - if ((file = fopen((char *)src->multi_src.string, open_mode)) != NULL) {
382 - (void)fseek(file, 0, 2);
383 - src->multi_src.length = ftell(file);
385 + if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != 0) {
386 + if ((file = fdopen(fd, fdopen_mode)) != NULL) {
387 + (void)fseek(file, 0, SEEK_END);
388 + src->multi_src.length = (XawTextPosition)ftell(file);
395 Cardinal num_params = 2;
397 @@ -1258,7 +1275,7 @@
398 "openError", "multiSourceCreate", "XawWarning",
399 "Cannot open file %s; %s", params, &num_params);
403 src->multi_src.length = 0;
406 diff -Naur -x CVS xc.orig/lib/Xaw/Pixmap.c xc/lib/Xaw/Pixmap.c
407 --- XFree86-4.0.2.orig/xc/lib/Xaw/Pixmap.c Tue Sep 26 11:56:54 2000
408 +++ XFree86-4.0.2/xc/lib/Xaw/Pixmap.c Fri Feb 9 21:33:13 2001
410 cache = (XawCache **)bsearch(screen, xaw->elems,
411 xaw->num_elems, sizeof(XtPointer),
414 + if (!cache || !(*cache)->num_elems)
416 if (flags == FIND_SCREEN)
419 cache = (XawCache **)bsearch((void *)colormap, (*cache)->elems,
420 (*cache)->num_elems, sizeof(XtPointer),
423 + if (!cache || !(*cache)->num_elems)
425 if (flags == FIND_COLORMAP)
428 (*cache)->num_elems, sizeof(XtPointer),
432 + if (!cache || !(*cache)->num_elems)
436 diff -Naur -x CVS xc.orig/lib/Xaw/Text.c xc/lib/Xaw/Text.c
437 --- XFree86-4.0.2.orig/xc/lib/Xaw/Text.c Thu Dec 7 15:26:12 2000
438 +++ XFree86-4.0.2/xc/lib/Xaw/Text.c Fri Feb 9 21:33:13 2001
440 XtRealizeWidget(vbar);
443 + XtSetKeyboardFocus(vbar, (Widget)ctx);
448 XtRealizeWidget(hbar);
451 + XtSetKeyboardFocus(hbar, (Widget)ctx);
455 diff -Naur -x CVS xc.orig/lib/Xaw/TextAction.c xc/lib/Xaw/TextAction.c
456 --- XFree86-4.0.2.orig/xc/lib/Xaw/TextAction.c Thu Dec 7 15:26:12 2000
457 +++ XFree86-4.0.2/xc/lib/Xaw/TextAction.c Fri Feb 9 21:33:13 2001
458 @@ -2835,12 +2835,23 @@
459 EndAction((TextWidget)w);
462 +/* This is kind of a hack, but, only one text widget can have focus at
463 + * a time on one display. There is a problem in the implementation of the
464 + * text widget, the scrollbars can not be adressed via editres, since they
465 + * are not children of a subclass of composite.
466 + * The focus variable is required to make sure only one text window will
467 + * show a block cursor at one time.
469 +struct _focus { Display *display; Widget widget; };
470 +static struct _focus *focus;
471 +static Cardinal num_focus;
474 TextFocusIn(Widget w, XEvent *event, String *p, Cardinal *n)
476 TextWidget ctx = (TextWidget)w;
477 Bool display_caret = ctx->text.display_caret;
480 if (event->xfocus.detail == NotifyPointer)
482 @@ -2853,6 +2864,25 @@
483 ctx->text.hasfocus = TRUE;
487 + for (i = 0; i < num_focus; i++)
488 + if (focus[i].display == XtDisplay(w))
490 + if (i >= num_focus) {
491 + focus = (struct _focus*)
492 + XtRealloc((XtPointer)focus, sizeof(struct _focus) * (num_focus + 1));
494 + focus[i].widget = w;
495 + focus[i].display = XtDisplay(w);
498 + if (focus[i].widget != w) {
499 + Widget old = focus[i].widget;
501 + focus[i].widget = w;
503 + TextFocusOut(old, event, p, n);
508 @@ -2861,8 +2891,24 @@
510 TextWidget ctx = (TextWidget)w;
511 Bool display_caret = ctx->text.display_caret;
518 + if (XtIsShell(shell))
520 + shell = XtParent(shell);
523 - if (event->xfocus.detail == NotifyPointer)
524 + for (i = 0; i < num_focus; i++)
525 + if (focus[i].display == XtDisplay(w))
527 + XGetInputFocus(XtDisplay(w), &window, &revert);
528 + if ((XtWindow(shell) == window &&
529 + (i < num_focus && focus[i].widget == w))
530 + || event->xfocus.detail == NotifyPointer)
533 /* Let the input method know focus has left.*/
534 @@ -3110,6 +3156,8 @@
536 FD_SET(ConnectionNumber(XtDisplay(w)), &fds);
537 (void)select(FD_SETSIZE, &fds, NULL, NULL, &tmval);
538 + if (tmval.tv_usec != 500000)
541 StartAction(ctx, NULL);
543 @@ -3342,8 +3390,9 @@
547 - mult = mult * 10 + params[0][0] - '0';
548 - ctx->text.mult = ctx->text.mult * 10 + params[0][0] - '0';
549 + mult = mult * 10 + (params[0][0] - '0') * (mult < 0 ? -1 : 1);
550 + ctx->text.mult = ctx->text.mult * 10 + (params[0][0] - '0') *
551 + (mult < 0 ? -1 : 1);
553 if (mult != ctx->text.mult || mult >= 32767) { /* checks for overflow */
554 XBell(XtDisplay(w), 0);
555 diff -Naur -x CVS xc.orig/lib/Xaw/TextPop.c xc/lib/Xaw/TextPop.c
556 --- XFree86-4.0.2.orig/xc/lib/Xaw/TextPop.c Thu May 18 12:29:52 2000
557 +++ XFree86-4.0.2/xc/lib/Xaw/TextPop.c Fri Feb 9 21:33:13 2001
560 DoSearch(struct SearchAndReplace *search)
564 Widget tw = XtParent(search->search_popup);
566 XawTextScanDirection dir;
567 @@ -875,11 +875,27 @@
568 GetString to get a tame version */
570 if (pos == XawTextSearchError) {
571 - (void)XmuSnprintf(msg, sizeof(msg),
572 - "Could not find string ``%s''.",
573 - GetString(search->search_text));
577 + ptr = GetString(search->search_text);
579 + (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr);
581 + ptr = strchr(msg, '\n');
582 + if (ptr != NULL || sizeof(msg) - 1 < len) {
584 + len = ptr - msg + 4;
589 + strcpy(msg, "...");
591 + strcpy(msg + len - 4, "...");
593 XawTextUnsetSelection(tw);
594 - SetSearchLabels(search, msg, "", True);
595 + SetSearchLabels(search, "Could not find string", msg, True);
599 @@ -1019,15 +1035,26 @@
601 if (new_pos == XawTextSearchError) {
605 - /* The Raw string in find.ptr may be WC I can't use here,
606 - so I call GetString to get a tame version */
608 - (void)XmuSnprintf(msg, sizeof(msg),
609 - "Error: Could not find string ``%s''",
610 - GetString(search->search_text));
611 - SetSearchLabels(search, msg, "", True);
616 + ptr = GetString(search->search_text);
618 + (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr);
619 + ptr = strchr(msg, '\n');
620 + if (ptr != NULL || sizeof(msg) - 1 < len) {
622 + len = ptr - msg + 4;
627 + strcpy(msg, "...");
629 + strcpy(msg + len - 4, "...");
631 + SetSearchLabels(search, "Could not find string", msg, True);
634 XawTextSetInsertionPoint(tw, ipos);
635 @@ -1047,7 +1074,7 @@
636 XawTextGetSelectionPos(tw, &pos, &end_pos);
638 if (search->selection_changed) {
639 - SetSearchLabels(search, "Selection has been modified, aborting.",
640 + SetSearchLabels(search, "Selection modified, aborting.",
643 XawTextSetInsertionPoint(tw, ipos);
644 @@ -1067,11 +1094,7 @@
647 if (XawTextReplace(tw, pos, end_pos, &replace) != XawEditDone) {
650 - (void)XmuSnprintf(msg, sizeof(msg),
651 - "'%s' with '%s'", find.ptr, replace.ptr);
652 - SetSearchLabels(search, "Error while replacing", msg, True);
653 + SetSearchLabels(search, "Error while replacing.", "", True);
655 XawTextSetInsertionPoint(tw, ipos);
656 XawTextEnableRedisplay(tw);
657 diff -Naur -x CVS xc.orig/lib/Xaw/TextSrc.c xc/lib/Xaw/TextSrc.c
658 --- XFree86-4.0.2.orig/xc/lib/Xaw/TextSrc.c Tue Sep 26 11:56:55 2000
659 +++ XFree86-4.0.2/xc/lib/Xaw/TextSrc.c Fri Feb 9 21:33:13 2001
660 @@ -1022,9 +1022,9 @@
661 XtFree((XtPointer)entity);
662 if (entity == anchor->entities) {
663 if ((anchor->entities = enext) == NULL) {
665 anchor = XawTextSourceRemoveAnchor(w, anchor);
666 entity = anchor ? anchor->entities : NULL;
670 eprev = entity = enext;
671 @@ -1053,6 +1053,7 @@
672 XtFree((XtPointer)entity);
673 anchor->cache = NULL;
674 if (entity == anchor->entities) {
676 if ((anchor->entities = enext) == NULL) {
679 @@ -1069,7 +1070,6 @@
682 anchor = src->textSrc.anchors[i];
684 entity = anchor->entities;
687 diff -Naur -x CVS xc.orig/programs/Xserver/dix/events.c xc/programs/Xserver/dix/events.c
688 --- XFree86-4.0.2.orig/xc/programs/Xserver/dix/events.c Sun Oct 22 17:12:09 2000
689 +++ XFree86-4.0.2/xc/programs/Xserver/dix/events.c Fri Feb 9 21:33:13 2001
690 @@ -2783,6 +2783,44 @@
692 (*keybd->DeactivateGrab)(keybd);
696 +/* This function is used to set the key pressed or key released state -
697 + this is only used when the pressing of keys does not cause
698 + CoreProcessKeyEvent to be called, as in for example Mouse Keys.
701 +FixKeyState (xE, keybd)
702 + register xEvent *xE;
703 + register DeviceIntPtr keybd;
706 + register BYTE *kptr;
707 + register KeyClassPtr keyc = keybd->key;
709 + key = xE->u.u.detail;
710 + kptr = &keyc->down[key >> 3];
711 + bit = 1 << (key & 7);
713 + if ((xkbDebugFlags&0x4)&&
714 + ((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
715 + ErrorF("FixKeyState: Key %d %s\n",key,
716 + (xE->u.u.type==KeyPress?"down":"up"));
719 + switch (xE->u.u.type)
728 + FatalError("Impossible keyboard event");
735 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/CHANGELOG xc/programs/Xserver/hw/xfree86/CHANGELOG
736 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/CHANGELOG Tue Dec 19 08:12:29 2000
737 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/CHANGELOG Sat Feb 10 09:37:49 2001
739 +XFree86 4.0.2a (?? February 2001)
740 +1224. Make acceleration work on the Trident Cyber9388 (Alan Hourihane).
741 +1223. Make some changes to the clock selection for trident driver
743 +1222. Ensure Video is unavailable when no acceleration available in the
744 + trident driver (Alan Hourihane).
745 +1221. Allow xf86ClaimPciSlot to be called with a NULL GDevPtr, as it was
746 + previously (Alan Hourihane).
747 +1220. Correct some problems with xedit c-mode. Fix geometry management
748 + incompatibilites with Xaw 6 in the Form widget.
749 + Fix problem in libxf86config when comparing float and double and
750 + small fix to xf86cfg when converting a HorizSync or VertRefresh
751 + specification string to format used internally by libxf86config.
752 + Adds dvorak keyboard and fixes Ukranian in rules/xfree86.lst.
753 + Fix problems in the xkb interface of xf86cfg and fix autorepeat with
754 + MouseKeys, based on patches and suggestion of Stephen Montgomery-Smith
755 + (Paulo César Pereira de Andrade).
756 +1219. Undo s3virge changes in 4.0.2 for Xv support on ViRGE chipsets since
757 + they caused problems with plain ViRGE cards. Xv is still supported
758 + for the ViRGE DX (#4414, 4430, Kevin Brosius).
759 +1218. Fix incorrect driverName fields in the cyrix, i810 and sis drivers.
760 + This was causing 'XFree86 -configure' to get the driver name wrong.
761 + Also fix the documentation of this field in the DESIGN doc (David Dawes).
762 +1217. [SECURITY] Fix temp files vulnerabilites in xman on systems with
763 + mkstemp(). (Matthieu Herrb).
764 +1216. [SECURITY] Fix temp vulnerabilities in Xaw/MultiSrc.c using the technique
765 + in patch #4279 (Branden Robinson). Fix temp file vulnerability in
766 + gccmakedep based on report from Alan Cox. Fix temp file vulnerability
767 + in Imake.rules, InstallManPageAliases (Matthieu Herrb).
768 +1215. Fix Neomagic 2200 screen corruption (Egbert Eich).
769 +1214. Add an imake control for determining when xload should be installed
770 + set-gid (David Dawes).
771 +1213. Add some imake controls for installing Xkb and app-defaults files
772 + in the traditional location rather than under /etc/X11 (Red Hat does
773 + that) (David Dawes).
774 +1212. Misc bindist updates.
776 XFree86 4.0.2 (18 December 2000)
777 1211. Fix a problem introduced recently when using the "ps/2" protocol for
778 mice on FreeBSD (David Dawes).
779 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/common/xf86Bus.c xc/programs/Xserver/hw/xfree86/common/xf86Bus.c
780 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c Wed Dec 6 10:35:07 2000
781 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86Bus.c Sat Feb 10 09:37:49 2001
783 -/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.56 2000/12/06 15:35:07 eich Exp $ */
784 +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.56.2.1 2001/02/10 10:23:53 alanh Exp $ */
786 * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
789 pEnt->chipset = xf86Entities[entityIndex]->chipset;
790 pEnt->resources = xf86Entities[entityIndex]->resources;
791 pEnt->driver = xf86Entities[entityIndex]->driver;
792 - if (xf86Entities[entityIndex]->devices[0]) {
793 + if ( (xf86Entities[entityIndex]->devices) &&
794 + (xf86Entities[entityIndex]->devices[0]) ) {
795 for (i = 0; i < xf86Entities[entityIndex]->numInstances; i++)
796 if (xf86Entities[entityIndex]->devices[i]->screen == 0)
801 /* We might not use AddDevtoEntity */
802 - if (!xf86Entities[entityIndex]->devices[0])
803 + if ( (!xf86Entities[entityIndex]->devices) ||
804 + (!xf86Entities[entityIndex]->devices[0]) )
807 if (entityIndex >= xf86NumEntities ||
808 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/common/xf86pciBus.c xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
809 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c Fri Dec 8 15:13:35 2000
810 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c Sat Feb 10 09:37:49 2001
811 @@ -2343,7 +2343,8 @@
812 p->pciBusId.func = func;
815 - xf86AddDevToEntity(num, dev);
817 + xf86AddDevToEntity(num, dev);
818 /* Here we initialize the access structure */
819 p->access = xnfcalloc(1,sizeof(EntityAccessRec));
820 while (ppaccp && *ppaccp) {
821 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/BugReport xc/programs/Xserver/hw/xfree86/doc/BugReport
822 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/BugReport Thu Aug 3 08:24:02 2000
823 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/BugReport Tue Dec 19 13:13:35 2000
837 -$XFree86: xc/programs/Xserver/hw/xfree86/doc/BugReport,v 1.3 2000/08/03 12:24:02 dawes Exp $
838 +$XFree86: xc/programs/Xserver/hw/xfree86/doc/BugReport,v 1.3.2.1 2000/12/19 18:13:35 dawes Exp $
839 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/DESIGN xc/programs/Xserver/hw/xfree86/doc/DESIGN
840 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/DESIGN Mon Dec 4 14:47:21 2000
841 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/DESIGN Fri Feb 9 21:33:14 2001
842 @@ -408,12 +408,12 @@
843 points required during the early phase of InitOutput(). xf86AddDriver() adds
844 it to the global xf86DriverList[] array.
846 -The DriverRec contains the driver's version, a short descriptive message, the
847 -Identify(), Probe() and AvailableOptions() function entry points as well as a
848 -pointer to the driver's module (as returned from the loader when the driver
849 -was loaded) and a reference count which keeps track of how many screens are
850 -using the driver. The entry driver entry points are those required prior to
851 -the driver allocating and filling in its ScrnInfoRec.
852 +The DriverRec contains the driver canonical name, the Identify(), Probe() and
853 +AvailableOptions() function entry points as well as a pointer to the driver's
854 +module (as returned from the loader when the driver was loaded) and a refer-
855 +ence count which keeps track of how many screens are using the driver. The
856 +entry driver entry points are those required prior to the driver allocating
857 +and filling in its ScrnInfoRec.
859 For a static server, the xf86DriverList[] array is initialised at build time,
860 and the loading of modules is not done.
861 @@ -5368,7 +5368,7 @@
865 - "unaccelerated driver for ZZZ Zzzzzy cards",
870 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml
871 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml Mon Dec 4 13:49:54 2000
872 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml Fri Feb 9 21:33:14 2001
874 &s.code;InitOutput()&e.code;. &s.code;xf86AddDriver()&e.code; adds
875 it to the global &s.code;xf86DriverList[]&e.code; array.
877 - The &s.code;DriverRec&e.code; contains the driver's version, a short
878 - descriptive message, the &s.code;Identify()&e.code;,
879 + The &s.code;DriverRec&e.code; contains the driver canonical name,
880 + the &s.code;Identify()&e.code;,
881 &s.code;Probe()&e.code; and &s.code;AvailableOptions()&e.code;
882 function entry points as well as a pointer
883 to the driver's module (as returned from the loader when the driver
884 @@ -6336,7 +6336,7 @@
888 - "unaccelerated driver for ZZZ Zzzzzy cards",
893 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/doc/sgml/README.sgml xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml
894 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml Sat Dec 16 12:33:01 2000
895 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/doc/sgml/README.sgml Fri Feb 9 21:33:14 2001
897 <sect>What is XFree86 &relvers;?
900 -XFree86 &relvers; is the third full release in the <![ %earlyrel; [new]]>
903 +XFree86 &relvers; is the &whichupdaterel; update to &fullrelvers;,
904 +the &whichfullrel; full release in the <![ %earlyrel; [new]]> XFree86
907 +Update releases are taken from a stable/maintenance branch. They are
908 +designed to be installed on top of the full release that they are
909 +updating. They contain fixes for serious problems, most commonly
910 +fixes for security issues, fixes for driver bugs, and fixes that improve
915 +XFree86 &relvers; is the &whichfullrel; full release in the <![ %earlyrel;
916 +[new]]> XFree86 4 series.
920 XFree86 release 4 is a major re-design of the basic architectural
922 The road to XFree86 release 4 began as an architectural concept in mid
923 1997, with the serious framework being implemented in code the beginning
924 of 1998. There were several snapshots on the road to 4.0 which are now
925 -part of the 4.0 base release. The &relvers; version is an upgrade to
926 +part of the 4.0 base release.
927 +<![ %fullrel [The &relvers; version is an upgrade to
928 &prevrelvers;, which include more hardware ports, code enhancements and
932 Release 4 also included the long-awaited integration of the DRI (Direct
933 Rendering Infrastructure). This upgrade into the code base gives
934 @@ -195,113 +210,134 @@
935 obtaining the release in source form is given below.
938 -The source for version &relvers; is split into three tarballs:
939 -<tt>X&srcvers;src-1.tgz</tt>, <tt>X&srcvers;src-2.tgz</tt>,
940 -<tt>X&srcvers;src-3.tgz</tt>. The first contains everything except the
942 +The source for version &relvers; is available as a patch relative to
944 +The patch file is <tt>&prevrelvers;-&relvers;.diff.gz</tt>.
947 +should be applied to a clean &prevrelvers; source tree, working from
948 +the directory containing the <tt>xc/</tt> directory. The patch should
949 +be applied by running:
952 +gzip -d < &prevrelvers;-&relvers;.diff.gz | patch -p0 -E
955 +Information about getting the source for &prevrelvers can be found in the
956 +README file for that version, which can be found on the
957 +<url name="XFree86 web site" url="http://www.xfree86.org/pub/XFree86/&prevrelvers;/README.html">.
962 +The source for version &fullrelvers; is split into three tarballs:
963 +<tt>X&fullsrcvers;src-1.tgz</tt>, <tt>X&fullsrcvers;src-2.tgz</tt>,
964 +<tt>X&fullsrcvers;src-3.tgz</tt>. The first contains everything except the
965 fonts and general X11 documentation. It is sufficient for building
966 XFree86 is you already have a set of fonts. The second contains the
967 fonts and the source for the general X11 documentation. The third
968 contains the general X11 documentation in hardcopy format.
971 -A source patch relative to version &prevrelvers; is also available.
972 -The patch file is <tt>&prevrelvers;-&relvers;.diff.gz</tt>.
973 +A source patch relative to version &prevfullrelvers; is also available.
974 +The patch file is <tt>&prevfullrelvers;-&fullrelvers;.diff.gz</tt>.
976 There is also a tarball that contains some files that have components that
977 -can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
978 +can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
981 -should be applied to a clean &prevrelvers; source tree, working from
982 +should be applied to a clean &prevfullrelvers; source tree, working from
983 the directory containing the <tt>xc/</tt> directory. The patch should
984 be applied by running:
987 -gzip -d < &prevrelvers;-&relvers;.diff.gz | patch -p0 -E
988 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff.gz | patch -p0 -E
992 -gzip -d < &relvers;.tgz | tar vxf -
993 +gzip -d < &fullrelvers;.tgz | tar vxf -
999 -A source patch relative to version &prevrelvers; is also available.
1000 +A source patch relative to version &prevfullrelvers; is also available.
1001 Because of its size, it is split into two parts.
1002 -The patch files are <tt>&prevrelvers;-&relvers;.diff1.gz</tt> and
1003 -<tt>&prevrelvers;-&relvers;.diff2.gz</tt>.
1004 +The patch files are <tt>&prevfullrelvers;-&fullrelvers;.diff1.gz</tt> and
1005 +<tt>&prevfullrelvers;-&fullrelvers;.diff2.gz</tt>.
1007 There is also a tarball that contains some files that have components that
1008 -can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
1009 +can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
1011 These patches should
1012 -be applied to a clean &prevrelvers; source tree, working from the directory
1013 +be applied to a clean &prevfullrelvers; source tree, working from the directory
1014 containing the <tt>xc/</tt> directory. The patches should be applied by
1018 -gzip -d < &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
1019 -gzip -d < &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
1020 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
1021 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
1025 -gzip -d < &relvers;.tgz | tar vxf -
1026 +gzip -d < &fullrelvers;.tgz | tar vxf -
1032 -A source patch relative to version &prevrelvers; is also available.
1033 +A source patch relative to version &prevfullrelvers; is also available.
1034 Because of its size, it is split into three parts.
1035 -The patch files are <tt>&prevrelvers;-&relvers;.diff1.gz</tt>,
1036 -<tt>&prevrelvers;-&relvers;.diff2.gz</tt> and
1037 -<tt>&prevrelvers;-&relvers;.diff3.gz</tt>.
1038 +The patch files are <tt>&prevfullrelvers;-&fullrelvers;.diff1.gz</tt>,
1039 +<tt>&prevfullrelvers;-&fullrelvers;.diff2.gz</tt> and
1040 +<tt>&prevfullrelvers;-&fullrelvers;.diff3.gz</tt>.
1042 There is also a tarball that contains some files that have components that
1043 -can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
1044 +can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
1046 These patches should
1047 -be applied to a clean &prevrelvers; source tree, working from the directory
1048 +be applied to a clean &prevfullrelvers; source tree, working from the directory
1049 containing the <tt>xc/</tt> directory. The patches should be applied by
1053 -gzip -d < &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
1054 -gzip -d < &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
1055 -gzip -d < &prevrelvers;-&relvers;.diff3.gz | patch -p0 -E
1056 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
1057 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
1058 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff3.gz | patch -p0 -E
1062 -gzip -d < &relvers;.tgz | tar vxf -
1063 +gzip -d < &fullrelvers;.tgz | tar vxf -
1069 -A source patch relative to version &prevrelvers; is also available.
1070 +A source patch relative to version &prevfullrelvers; is also available.
1071 Because of its size, it is split into four parts.
1072 -The patch files are <tt>&prevrelvers;-&relvers;.diff1.gz</tt>,
1073 -<tt>&prevrelvers;-&relvers;.diff2.gz</tt>,
1074 -<tt>&prevrelvers;-&relvers;.diff3.gz</tt> and
1075 -<tt>&prevrelvers;-&relvers;.diff4.gz</tt>.
1076 +The patch files are <tt>&prevfullrelvers;-&fullrelvers;.diff1.gz</tt>,
1077 +<tt>&prevfullrelvers;-&fullrelvers;.diff2.gz</tt>,
1078 +<tt>&prevfullrelvers;-&fullrelvers;.diff3.gz</tt> and
1079 +<tt>&prevfullrelvers;-&fullrelvers;.diff4.gz</tt>.
1081 There is also a tarball that contains some files that have components that
1082 -can't be included in a diff. It is <tt>&relvers;.tgz</tt>.
1083 +can't be included in a diff. It is <tt>&fullrelvers;.tgz</tt>.
1085 These patches should
1086 -be applied to a clean &prevrelvers; source tree, working from the directory
1087 +be applied to a clean &prevfullrelvers; source tree, working from the directory
1088 containing the <tt>xc/</tt> directory. The patches should be applied by
1092 -gzip -d < &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
1093 -gzip -d < &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
1094 -gzip -d < &prevrelvers;-&relvers;.diff3.gz | patch -p0 -E
1095 -gzip -d < &prevrelvers;-&relvers;.diff4.gz | patch -p0 -E
1096 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
1097 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
1098 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff3.gz | patch -p0 -E
1099 +gzip -d < &prevfullrelvers;-&fullrelvers;.diff4.gz | patch -p0 -E
1103 -gzip -d < &relvers;.tgz | tar vxf -
1104 +gzip -d < &fullrelvers;.tgz | tar vxf -
1110 To format the XFree86 documentation use the latest version of our doctools
1111 package available as <tt>doctools-&doctoolsvers;.tgz</tt>.
1112 +]]> <!-- fullrel -->
1114 <sect>Reporting Bugs
1116 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c
1117 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c Sat Dec 2 10:30:37 2000
1118 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/cyrix/cyrix_driver.c Fri Feb 9 21:33:14 2001
1123 - "accelerated driver for Cyrix integrated processors",
1124 + CYRIX_DRIVER_NAME,
1127 CYRIXAvailableOptions,
1128 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
1129 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Sat Dec 2 10:30:42 2000
1130 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Fri Feb 9 21:33:14 2001
1135 - "Accelerated driver for Intel i810 cards",
1139 I810AvailableOptions,
1140 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c
1141 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c Tue Oct 17 17:36:15 2000
1142 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c Mon Jan 22 14:59:11 2001
1144 NEOACLPtr nAcl = NEOACLPTR(pScrn);
1146 if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
1147 - if (((dstX < 64) && ((srcX + w) == pScrn->displayWidth)) ||
1148 - ((dstX == 0) && (w > (pScrn->displayWidth - 64)))) {
1149 + if ((((dstX < 64) && ((srcX + w) == pScrn->displayWidth)) ||
1150 + ((dstX == 0) && (w > (pScrn->displayWidth - 64)))) && (w > 64)) {
1152 int srcX1 = srcX + 64;
1153 int dstX1 = dstX + 64;
1155 OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
1158 - if ((((dstX + w) > (pScrn->displayWidth - 64)) && (srcX == 0))
1159 + if (((((dstX + w) > (pScrn->displayWidth - 64)) && (srcX == 0))
1160 || (((dstX + w) == pScrn->displayWidth)
1161 - && (w > (pScrn->displayWidth - 64)))) {
1162 + && (w > (pScrn->displayWidth - 64)))) && (w > 64)) {
1166 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES
1167 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES Tue Nov 28 15:59:17 2000
1168 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES Fri Feb 9 21:33:14 2001
1170 S3 ViRGE 4.0 devel notes
1177 Function Implemented
1184 +Revert ViRGE to pre-Xv changes. ViRGE DX still supports Xv, but changes
1185 +added for Xv and ViRGE caused problems with normal display.
1189 Clean up, bump version for 4.0.2 submission.
1190 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c
1191 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c Sat Dec 16 12:33:00 2000
1192 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c Fri Feb 9 21:33:14 2001
1195 #define S3VIRGE_NAME "S3VIRGE"
1196 #define S3VIRGE_DRIVER_NAME "s3virge"
1197 -#define S3VIRGE_VERSION_NAME "1.5.0"
1198 +#define S3VIRGE_VERSION_NAME "1.6.0"
1199 #define S3VIRGE_VERSION_MAJOR 1
1200 -#define S3VIRGE_VERSION_MINOR 5
1201 +#define S3VIRGE_VERSION_MINOR 6
1202 #define S3VIRGE_PATCHLEVEL 0
1203 #define S3VIRGE_DRIVER_VERSION ((S3VIRGE_VERSION_MAJOR << 24) | \
1204 (S3VIRGE_VERSION_MINOR << 16) | \
1205 @@ -3073,7 +3073,7 @@
1206 S3VCommonCalcClock(dclk, 1, 1, 31, 0, 4,
1207 230000, 460000, &new->SR13, &new->SR12);
1208 } /* end TRIO_3D if() */
1209 - else { /* Is this correct for DX/GX as well? */
1210 + else if(ps3v->Chipset == S3_ViRGE_DXGX) {
1211 if (pScrn->bitsPerPixel == 8) {
1212 if(dclk > 80000) { /* We need pixmux */
1214 @@ -3110,7 +3110,39 @@
1216 S3VCommonCalcClock(dclk, 1, 1, 31, 0, 3,
1217 135000, 270000, &new->SR13, &new->SR12);
1219 + } /* end DXGX if() */
1220 + else { /* Everything else ... (only ViRGE) */
1221 + if (pScrn->bitsPerPixel == 8) {
1222 + if(dclk > 80000) { /* We need pixmux */
1224 + new->SR15 |= 0x10; /* Set DCLK/2 bit */
1225 + new->SR18 = 0x80; /* Enable pixmux */
1228 + else if ((pScrn->bitsPerPixel == 16) && (pScrn->weight.green == 5)) {
1229 + new->CR67 = 0x30; /* 15bpp */
1231 + else if (pScrn->bitsPerPixel == 16) {
1234 + else if (pScrn->bitsPerPixel == 24) {
1235 + new->CR67 = 0xd0 | 0x0c;
1236 + /* Flag STREAMS proc. required */
1237 + ps3v->NeedSTREAMS = TRUE;
1238 + S3VInitSTREAMS(pScrn, new->STREAMS, mode);
1239 + new->MMPR0 = 0xc000; /* Adjust FIFO slots */
1241 + else if (pScrn->bitsPerPixel == 32) {
1242 + new->CR67 = 0xd0 | 0x0c;
1243 + /* Flag STREAMS proc. required */
1244 + ps3v->NeedSTREAMS = TRUE;
1245 + S3VInitSTREAMS(pScrn, new->STREAMS, mode);
1246 + new->MMPR0 = 0x10000; /* Still more FIFO slots */
1248 + S3VCommonCalcClock(dclk, 1, 1, 31, 0, 3,
1249 + 135000, 270000, &new->SR13, &new->SR12);
1250 + } /* end great big if()... */
1253 /* Now adjust the value of the FIFO based upon options specified */
1254 if( ps3v->fifo_moderate ) {
1255 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c
1256 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c Tue Nov 28 15:59:18 2000
1257 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_xv.c Fri Feb 9 21:33:14 2001
1259 (pScrn->bitsPerPixel == 16)
1262 - ((ps3v->Chipset == S3_ViRGE_DXGX) ||
1263 + ((ps3v->Chipset == S3_ViRGE_DXGX) /* || */
1264 /* S3_ViRGE_GX2_SERIES(ps3v->Chipset) || */
1265 - (ps3v->Chipset == S3_ViRGE)
1266 + /* (ps3v->Chipset == S3_ViRGE) */
1270 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c
1271 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c Sat Dec 2 10:30:51 2000
1272 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c Fri Feb 9 21:33:14 2001
1276 SIS_CURRENT_VERSION,
1277 - "accelerated driver for SiS chipsets",
1281 SISAvailableOptions,
1282 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident.h xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h
1283 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h Fri Dec 8 04:05:16 2000
1284 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h Sat Feb 10 09:37:50 2001
1286 #define HAS_DST_TRANS ((pTrident->Chipset == PROVIDIA9682) || \
1287 (pTrident->Chipset == PROVIDIA9685))
1289 -#define Is3Dchip ((pTrident->Chipset == CYBER9388) || \
1290 - (pTrident->Chipset == CYBER9397) || \
1291 +#define Is3Dchip ((pTrident->Chipset == CYBER9397) || \
1292 (pTrident->Chipset == CYBER9397DVD) || \
1293 (pTrident->Chipset == CYBER9520) || \
1294 (pTrident->Chipset == CYBER9525DVD) || \
1295 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c
1296 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c Thu Dec 7 11:48:04 2000
1297 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c Sat Feb 10 09:37:50 2001
1299 infoPtr->SubsequentScreenToScreenCopy =
1300 TridentSubsequentScreenToScreenCopy;
1302 - if (!(pTrident->Chipset == PROVIDIA9685 && pScrn->bitsPerPixel > 8)) {
1303 + if (!((pTrident->Chipset == PROVIDIA9685 ||
1304 + pTrident->Chipset == CYBER9388) && pScrn->bitsPerPixel > 8)) {
1305 infoPtr->Mono8x8PatternFillFlags = NO_PLANEMASK |
1306 HARDWARE_PATTERN_SCREEN_ORIGIN |
1307 BIT_ORDER_IN_BYTE_MSBFIRST;
1310 REPLICATE(transparency_color);
1311 if (transparency_color != -1) {
1312 - if (pTrident->Chipset == PROVIDIA9685) {
1313 + if (pTrident->Chipset == PROVIDIA9685 ||
1314 + pTrident->Chipset == CYBER9388) {
1317 TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
1319 if ((pTrident->Chipset == PROVIDIA9682) ||
1320 (pTrident->Chipset == TGUI9680))
1322 - if (pTrident->Chipset == PROVIDIA9685)
1323 + if (pTrident->Chipset == PROVIDIA9685 ||
1324 + pTrident->Chipset == CYBER9388)
1329 pTrident->BltScanDirection = 0;
1331 TGUI_FMIX(XAAPatternROP[rop]);
1332 - if (pTrident->Chipset == PROVIDIA9685) {
1333 + if (pTrident->Chipset == PROVIDIA9685 ||
1334 + pTrident->Chipset == CYBER9388) {
1335 TGUI_FPATCOL(color);
1337 pTrident->BltScanDirection |= 1<<21;
1338 @@ -404,10 +408,12 @@
1339 if ((pTrident->Chipset == PROVIDIA9682 ||
1340 pTrident->Chipset == TGUI9680) && rop == GXcopy)
1341 pTrident->BltScanDirection |= FASTMODE;
1342 - if (pTrident->Chipset == PROVIDIA9685 && rop == GXcopy)
1343 + if ((pTrident->Chipset == PROVIDIA9685 ||
1344 + pTrident->Chipset == CYBER9388) && rop == GXcopy)
1345 pTrident->BltScanDirection |= 1<<21;
1347 - if (pTrident->Chipset == PROVIDIA9685) {
1348 + if (pTrident->Chipset == PROVIDIA9685 ||
1349 + pTrident->Chipset == CYBER9388) {
1352 pTrident->BltScanDirection |= 1<<12;
1354 TGUI_FMIX(XAAPatternROP[rop]);
1355 if ((pTrident->Chipset == PROVIDIA9682 ||
1356 pTrident->Chipset == TGUI9680) && rop == GXcopy) drawflag = FASTMODE;
1357 - if (pTrident->Chipset == PROVIDIA9685) {
1358 + if (pTrident->Chipset == PROVIDIA9685 ||
1359 + pTrident->Chipset == CYBER9388) {
1360 if (rop == GXcopy) drawflag |= 1<<21;
1361 TGUI_FPATCOL(color);
1363 @@ -522,26 +529,30 @@
1367 - if (pTrident->Chipset == PROVIDIA9685)
1368 + if (pTrident->Chipset == PROVIDIA9685 ||
1369 + pTrident->Chipset == CYBER9388)
1376 - if (pTrident->Chipset == PROVIDIA9685)
1377 + if (pTrident->Chipset == PROVIDIA9685 ||
1378 + pTrident->Chipset == CYBER9388)
1384 - if (pTrident->Chipset == PROVIDIA9685)
1385 + if (pTrident->Chipset == PROVIDIA9685 ||
1386 + pTrident->Chipset == CYBER9388)
1392 - if (pTrident->Chipset == PROVIDIA9685) {
1393 + if (pTrident->Chipset == PROVIDIA9685 ||
1394 + pTrident->Chipset == CYBER9388) {
1396 if (rop == GXcopy) drawflag |= 1<<21;
1400 REPLICATE(transparency_color);
1401 if (transparency_color != -1) {
1402 - if (pTrident->Chipset == PROVIDIA9685) {
1403 + if (pTrident->Chipset == PROVIDIA9685 ||
1404 + pTrident->Chipset == CYBER9388) {
1407 TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
1408 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c
1409 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c Sat Dec 16 12:33:00 2000
1410 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c Sat Feb 10 09:37:50 2001
1418 if (pScrn->bitsPerPixel >= 8)
1419 @@ -344,9 +343,12 @@
1420 pReg->tridentRegs3x4[PreEndFetch] = 0xFF;
1425 pReg->tridentRegs3x4[Enhancement0] = 0x40;
1429 if (pTrident->UsePCIRetry)
1430 pReg->tridentRegs3x4[PCIRetry] = 0xDF;
1432 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c
1433 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c Fri Dec 8 04:05:16 2000
1434 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c Sat Feb 10 09:37:50 2001
1437 "XAAHelpPatternROP",
1439 + "XAAFillSolidRects",
1443 @@ -1635,9 +1636,9 @@
1445 pTrident->ddc1Read = Tridentddc1Read;
1447 - pTrident->IsCyber = TRUE;
1448 + /* pTrident->IsCyber = TRUE; VIA MVP4 integrated Desktop version */
1449 Support24bpp = TRUE;
1450 - chipset = "CyberBlade/i7";
1451 + chipset = "CyberBlade/i7/VIA MVP4";
1452 pTrident->NewClockCode = TRUE;
1453 pTrident->frequency = NTSC;
1455 @@ -2579,13 +2580,10 @@
1456 pScrn->fbOffset = 0;
1459 - if (pTrident->Chipset >= CYBER9397)
1460 + if ((pTrident->Chipset >= CYBER9397) && (!pTrident->NoAccel))
1461 TRIDENTInitVideo(pScreen);
1464 - if(pTrident->BlockHandler)
1465 - pScreen->BlockHandler = pTrident->BlockHandler;
1467 pTrident->CloseScreen = pScreen->CloseScreen;
1468 pScreen->CloseScreen = TRIDENTCloseScreen;
1469 pScreen->SaveScreen = TRIDENTSaveScreen;
1470 @@ -2744,6 +2742,9 @@
1471 if (pTrident->DGAModes)
1472 xfree(pTrident->DGAModes);
1473 pScrn->vtSema = FALSE;
1475 + if(pTrident->BlockHandler)
1476 + pScreen->BlockHandler = pTrident->BlockHandler;
1478 pScreen->CloseScreen = pTrident->CloseScreen;
1479 return (*pScreen->CloseScreen)(scrnIndex, pScreen);
1480 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c
1481 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c Sat Dec 16 12:33:00 2000
1482 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c Sat Feb 10 09:37:50 2001
1489 + int endn, endm, endk, startk;
1495 if (pTrident->NewClockCode)
1502 + if (clock >= 100000) startk = 0;
1503 + if (clock < 100000) startk = 1;
1504 + if (clock < 50000) startk = 2;
1517 - for (k=endk;k>=0;k--)
1518 - for (n=startn;n<=endn;n++)
1519 + for (k=startk;k<=endk;k++)
1520 + for (n=0;n<=endn;n++)
1521 for (m=1;m<=endm;m++)
1523 ffreq = ( ( ((n + 8) * pTrident->frequency) / ((m + 2) * powerup[k]) ) * 1000);
1524 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c
1525 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c Mon Jun 12 22:28:34 2000
1526 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c Fri Feb 9 21:33:14 2001
1531 - "Xv driver for video4linux",
1533 V4LIdentify, /* Identify*/
1534 V4LProbe, /* Probe */
1535 V4LAvailableOptions,
1536 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/etc/bindist/common/host.def xc/programs/Xserver/hw/xfree86/etc/bindist/common/host.def
1537 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/etc/bindist/common/host.def Sat Dec 16 12:36:43 2000
1538 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/etc/bindist/common/host.def Tue Dec 19 13:13:36 2000
1541 #define InstallHardcopyDocs YES
1542 #define HardcopyDocDirs RX XIE XKB XPRINT
1543 +#define InstallMiscManPages YES
1546 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/parser/Monitor.c xc/programs/Xserver/hw/xfree86/parser/Monitor.c
1547 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/parser/Monitor.c Tue Dec 5 14:06:53 2000
1548 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/parser/Monitor.c Fri Feb 9 21:33:15 2001
1552 if (xf86getToken (NULL) != NUMBER ||
1553 - val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)
1554 + (float)val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)
1555 Error (HORIZSYNC_MSG, NULL);
1556 ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum;
1561 if (xf86getToken (NULL) != NUMBER ||
1562 - val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
1563 + (float)val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
1564 Error (VERTREFRESH_MSG, NULL);
1565 ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum;
1567 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/Imakefile xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile
1568 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile Sat Dec 16 12:33:00 2000
1569 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/Imakefile Fri Feb 9 21:33:15 2001
1573 DEFINES = -DXF86CONFIG=\"XConfigFile\" $(MODULEDEFINES) \
1575 + $(CURSESDEFINES) -DPROJECT_ROOT=\"ProjectRoot\"
1579 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad
1580 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad Thu Nov 30 15:55:16 2000
1581 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad Fri Feb 9 21:39:41 2001
1582 @@ -1338,7 +1338,7 @@
1583 <tt><b>Apply changes</b></tt> button there is no way to undo your changes.</font>
1586 -*Expert.geometry: 800x600
1587 +*Expert.geometry: 640x460
1588 *Expert*vpane.min: 64
1589 *Expert*vpane.max: 64
1590 *Expert*vpane.showGrip: False
1591 @@ -1767,3 +1767,4 @@
1592 *expert*tree*buffers.flagsL.fromVert: size
1593 *expert*tree*buffers.flags.fromVert: size
1594 *expert*tree*buffers.flags.fromHoriz: flagsL
1595 +*Expert*close.label: Close
1596 \ No newline at end of file
1597 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/accessx.c xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c
1598 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c Fri Oct 20 10:59:05 2000
1599 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/accessx.c Fri Feb 9 21:39:41 2001
1600 @@ -179,15 +179,12 @@
1602 (xkb_info->xkb->ctrls->enabled_ctrls &
1603 (XkbAccessXKeysMask | XkbStickyKeysMask |
1604 - XkbMouseKeysMask | XkbMouseKeysAccelMask |
1605 - XkbRepeatKeysMask | XkbSlowKeysMask |
1606 - XkbBounceKeysMask)) != 0, NULL, 0);
1607 + XkbSlowKeysMask | XkbBounceKeysMask)) != 0, NULL, 0);
1609 apply = XtCreateManagedWidget("apply", commandWidgetClass, accessx, NULL, 0);
1610 XtAddCallback(apply, XtNcallback, ApplyCallback, NULL);
1612 form = XtCreateManagedWidget("Accessx", formWidgetClass, accessx, NULL, 0);
1613 - XtAddCallback(enable, XtNcallback, EnableCallback, (XtPointer)form);
1614 timeoutToggle = XtVaCreateManagedWidget("timeoutToggle", toggleWidgetClass,
1616 xkb_info->xkb->ctrls->ax_timeout > 60
1619 XtSetArg(args[0], XtNstate, &state);
1620 XtGetValues(enable, args, 1);
1621 - EnableCallback(enable, (XtPointer)form, (XtPointer)(long)state);
1627 EnableCallback(Widget w, XtPointer user_data, XtPointer call_data)
1629 - XtSetSensitive(user_data, (long)call_data);
1630 + XtSetSensitive((Widget)user_data, (long)call_data);
1634 @@ -534,162 +530,148 @@
1635 XtSetArg(args[0], XtNstate, &state);
1636 XtGetValues(enable, args, 1);
1638 - xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask;
1639 xkb_info->config.initial_ctrls |= XkbAccessXKeysMask;
1640 + xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask;
1643 + xkb_info->config.initial_ctrls &= ~XkbAccessXKeysMask;
1644 + xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbAccessXKeysMask;
1648 + XtSetArg(args[0], XtNstate, &state);
1649 + XtGetValues(timeoutToggle, args, 1);
1651 + xkb_info->config.ax_timeout =
1652 + xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60;
1654 + xkb_info->config.ax_timeout =
1655 + xkb_info->xkb->ctrls->ax_timeout = 65535;
1657 + /* Enable StickyKeys */
1658 + XtSetArg(args[0], XtNstate, &state);
1659 + XtGetValues(sticky, args, 1);
1661 + xkb_info->config.initial_ctrls |= XkbStickyKeysMask;
1662 + xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask;
1665 + xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask;
1666 + xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
1668 + XtSetArg(args[0], XtNstate, &state);
1669 + XtGetValues(stickyAuto, args, 1);
1671 + xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
1672 + xkb_info->config.initial_opts &= ~XkbAX_LatchToLockMask;
1673 + xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
1674 + xkb_info->xkb->ctrls->ax_options &= ~XkbAX_LatchToLockMask;
1677 + xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
1678 + xkb_info->config.initial_opts |= XkbAX_LatchToLockMask;
1679 + xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
1680 + xkb_info->xkb->ctrls->ax_options |= XkbAX_LatchToLockMask;
1682 + XtSetArg(args[0], XtNstate, &state);
1683 + XtGetValues(stickyBeep, args, 1);
1685 + xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask;
1686 + xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask;
1689 + xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask;
1690 + xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask;
1693 + /* Enable MouseKeys */
1694 + XtSetArg(args[0], XtNstate, &state);
1695 + XtGetValues(mouse, args, 1);
1697 + xkb_info->config.initial_ctrls |= XkbMouseKeysAccelMask;
1698 + xkb_info->xkb->ctrls->enabled_ctrls |= XkbMouseKeysMask |
1699 + XkbMouseKeysAccelMask;
1700 + xkb_info->config.mk_delay =
1701 + xkb_info->xkb->ctrls->mk_delay = mouseDelay->value * 100;
1702 + xkb_info->config.mk_interval =
1703 + xkb_info->xkb->ctrls->mk_interval = 40;
1704 + xkb_info->config.mk_time_to_max =
1705 + xkb_info->xkb->ctrls->mk_time_to_max =
1706 + (mouseTime->value * 1000) / xkb_info->xkb->ctrls->mk_interval;
1707 + xkb_info->config.mk_max_speed =
1708 + xkb_info->xkb->ctrls->mk_max_speed =
1709 + mouseSpeed->value * mouseTime->value;
1710 + xkb_info->config.mk_curve = xkb_info->xkb->ctrls->mk_curve = 0;
1713 + xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask |
1714 + XkbMouseKeysAccelMask);
1715 + xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask |
1716 + XkbMouseKeysAccelMask);
1719 + /* Enable RepeatKeys */
1720 + XtSetArg(args[0], XtNstate, &state);
1721 + XtGetValues(repeat, args, 1);
1723 + xkb_info->config.initial_ctrls |= XkbRepeatKeysMask;
1724 + xkb_info->xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask;
1725 + xkb_info->config.repeat_interval =
1726 + xkb_info->xkb->ctrls->repeat_interval = repeatRate->value * 1000;
1727 + xkb_info->config.repeat_delay =
1728 + xkb_info->xkb->ctrls->repeat_delay = repeatDelay->value * 1000;
1731 + xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask;
1732 + xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask;
1736 - XtSetArg(args[0], XtNstate, &state);
1737 - XtGetValues(timeoutToggle, args, 1);
1739 - xkb_info->config.ax_timeout =
1740 - xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60;
1742 - xkb_info->config.ax_timeout =
1743 - xkb_info->xkb->ctrls->ax_timeout = 65535;
1745 - /* Enable StickyKeys */
1746 - XtSetArg(args[0], XtNstate, &state);
1747 - XtGetValues(sticky, args, 1);
1749 - xkb_info->config.initial_ctrls |= XkbStickyKeysMask;
1750 - xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask;
1753 - xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask;
1754 - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
1756 - XtSetArg(args[0], XtNstate, &state);
1757 - XtGetValues(stickyAuto, args, 1);
1759 - xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
1760 - xkb_info->config.initial_opts &= ~XkbAX_LatchToLockMask;
1761 - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
1762 - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_LatchToLockMask;
1765 - xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask;
1766 - xkb_info->config.initial_opts |= XkbAX_LatchToLockMask;
1767 - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask;
1768 - xkb_info->xkb->ctrls->ax_options |= XkbAX_LatchToLockMask;
1770 - XtSetArg(args[0], XtNstate, &state);
1771 - XtGetValues(stickyBeep, args, 1);
1773 - xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask;
1774 - xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask;
1777 - xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask;
1778 - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask;
1781 - /* Enable MouseKeys */
1782 - XtSetArg(args[0], XtNstate, &state);
1783 - XtGetValues(mouse, args, 1);
1785 - xkb_info->config.initial_ctrls |= XkbMouseKeysMask |
1786 - XkbMouseKeysAccelMask;
1787 - xkb_info->xkb->ctrls->enabled_ctrls |= XkbMouseKeysMask |
1788 - XkbMouseKeysAccelMask;
1789 - xkb_info->config.mk_delay =
1790 - xkb_info->xkb->ctrls->mk_delay = mouseDelay->value * 100;
1791 - xkb_info->config.mk_interval =
1792 - xkb_info->xkb->ctrls->mk_interval = 40;
1793 - xkb_info->config.mk_time_to_max =
1794 - xkb_info->xkb->ctrls->mk_time_to_max =
1795 - (mouseTime->value * 1000) / xkb_info->xkb->ctrls->mk_interval;
1796 - xkb_info->config.mk_max_speed =
1797 - xkb_info->xkb->ctrls->mk_max_speed =
1798 - mouseSpeed->value * mouseTime->value;
1799 - xkb_info->config.mk_curve = xkb_info->xkb->ctrls->mk_curve = 0;
1802 - xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask |
1803 - XkbMouseKeysAccelMask);
1804 - xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask |
1805 - XkbMouseKeysAccelMask);
1808 - /* Enable RepeatKeys */
1809 - XtSetArg(args[0], XtNstate, &state);
1810 - XtGetValues(repeat, args, 1);
1812 - xkb_info->config.initial_ctrls |= XkbRepeatKeysMask;
1813 - xkb_info->xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask;
1814 - xkb_info->config.repeat_interval =
1815 - xkb_info->xkb->ctrls->repeat_interval = repeatRate->value * 1000;
1816 - xkb_info->config.repeat_delay =
1817 - xkb_info->xkb->ctrls->repeat_delay = repeatDelay->value * 1000;
1820 - xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask;
1821 - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask;
1824 - /* Enable SlowKeys */
1825 - XtSetArg(args[0], XtNstate, &state);
1826 - XtGetValues(slowToggle, args, 1);
1828 - xkb_info->config.initial_ctrls |= XkbSlowKeysMask;
1829 - xkb_info->xkb->ctrls->enabled_ctrls |= XkbSlowKeysMask;
1830 - xkb_info->config.slow_keys_delay =
1831 - xkb_info->xkb->ctrls->slow_keys_delay = slow->value * 1000;
1834 - xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask;
1835 - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask;
1837 - XtSetArg(args[0], XtNstate, &state);
1838 - XtGetValues(slowPressed, args, 1);
1840 - xkb_info->config.initial_opts |= XkbAX_SKPressFBMask;
1841 - xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask;
1844 - xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask;
1845 - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask;
1847 - XtSetArg(args[0], XtNstate, &state);
1848 - XtGetValues(slowAccepted, args, 1);
1850 - xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask;
1851 - xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask;
1854 - xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask;
1855 - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask;
1858 - /* Enable BounceKeys */
1859 - XtSetArg(args[0], XtNstate, &state);
1860 - XtGetValues(bounceToggle, args, 1);
1862 - xkb_info->config.initial_ctrls |= XkbBounceKeysMask;
1863 - xkb_info->xkb->ctrls->enabled_ctrls |= XkbBounceKeysMask;
1864 - xkb_info->config.debounce_delay =
1865 - xkb_info->xkb->ctrls->debounce_delay = bounce->value * 1000;
1868 - xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask;
1869 - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask;
1873 - xkb_info->config.initial_ctrls &=
1874 - ~(XkbAccessXKeysMask | XkbStickyKeysMask | XkbMouseKeysMask |
1875 - XkbMouseKeysAccelMask | XkbRepeatKeysMask | XkbSlowKeysMask |
1876 - XkbBounceKeysMask);
1877 - xkb_info->config.initial_opts &=
1878 - ~(XkbAX_TwoKeysMask | XkbAX_LatchToLockMask | XkbAX_StickyKeysFBMask |
1879 - XkbAX_SKPressFBMask | XkbAX_SKAcceptFBMask);
1881 - xkb_info->xkb->ctrls->enabled_ctrls &=
1882 - ~(XkbAccessXKeysMask | XkbStickyKeysMask | XkbMouseKeysMask |
1883 - XkbMouseKeysAccelMask | XkbRepeatKeysMask | XkbSlowKeysMask |
1884 - XkbBounceKeysMask);
1885 - xkb_info->xkb->ctrls->ax_options &=
1886 - ~(XkbAX_TwoKeysMask | XkbAX_LatchToLockMask | XkbAX_StickyKeysFBMask |
1887 - XkbAX_SKPressFBMask | XkbAX_SKAcceptFBMask);
1888 + /* Enable SlowKeys */
1889 + XtSetArg(args[0], XtNstate, &state);
1890 + XtGetValues(slowToggle, args, 1);
1892 + xkb_info->config.initial_ctrls |= XkbSlowKeysMask;
1893 + xkb_info->xkb->ctrls->enabled_ctrls |= XkbSlowKeysMask;
1894 + xkb_info->config.slow_keys_delay =
1895 + xkb_info->xkb->ctrls->slow_keys_delay = slow->value * 1000;
1898 + xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask;
1899 + xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask;
1901 + XtSetArg(args[0], XtNstate, &state);
1902 + XtGetValues(slowPressed, args, 1);
1904 + xkb_info->config.initial_opts |= XkbAX_SKPressFBMask;
1905 + xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask;
1908 + xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask;
1909 + xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask;
1911 + XtSetArg(args[0], XtNstate, &state);
1912 + XtGetValues(slowAccepted, args, 1);
1914 + xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask;
1915 + xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask;
1918 + xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask;
1919 + xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask;
1922 + /* Enable BounceKeys */
1923 + XtSetArg(args[0], XtNstate, &state);
1924 + XtGetValues(bounceToggle, args, 1);
1926 + xkb_info->config.initial_ctrls |= XkbBounceKeysMask;
1927 + xkb_info->xkb->ctrls->enabled_ctrls |= XkbBounceKeysMask;
1928 + xkb_info->config.debounce_delay =
1929 + xkb_info->xkb->ctrls->debounce_delay = bounce->value * 1000;
1932 + xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask;
1933 + xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask;
1936 XkbSetControls(DPY, XkbAllControlsMask, xkb_info->xkb);
1937 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/expert.c xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c
1938 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c Sat Dec 2 10:31:02 2000
1939 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c Fri Feb 9 21:39:42 2001
1940 @@ -4615,6 +4615,9 @@
1941 XtNtreeParent, config, NULL, 0);
1942 node->next = NewNode(mainNode, flags, NULL, config, NULL);
1944 + if (XF86Config->conf_flags == NULL)
1945 + XF86Config->conf_flags = (XF86ConfFlagsPtr)
1946 + XtCalloc(1, sizeof(XF86ConfFlagsRec));
1947 XtAddCallback(flags, XtNcallback, OptionsCallback,
1948 (XtPointer)&(XF86Config->conf_flags->flg_option_lst));
1950 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/interface.c xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c
1951 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c Fri Dec 8 21:23:26 2000
1952 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/interface.c Fri Feb 9 21:39:42 2001
1956 #define randomize() srand((unsigned)time((time_t*)NULL))
1957 +#ifdef PROJECT_ROOT
1958 +#define DefaultXFree86Dir PROJECT_ROOT
1960 #define DefaultXFree86Dir "/usr/X11R6"
1965 diff -Naur -x CVS xc.orig/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c
1966 --- XFree86-4.0.2.orig/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c Thu Nov 30 15:55:18 2000
1967 +++ XFree86-4.0.2/xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c Fri Feb 9 21:39:42 2001
1969 range[i].lo = range[i].hi = val;
1970 if (++i >= nrange || *str == '\0')
1974 else if (*str != '-')
1976 diff -Naur -x CVS xc.orig/programs/Xserver/xkb/Imakefile xc/programs/Xserver/xkb/Imakefile
1977 --- XFree86-4.0.2.orig/xc/programs/Xserver/xkb/Imakefile Fri Oct 20 10:59:09 2000
1978 +++ XFree86-4.0.2/xc/programs/Xserver/xkb/Imakefile Mon Jan 22 14:49:33 2001
1980 LinkSourceFile(XKBAlloc.c,$(XLIBSRC))
1981 LinkSourceFile(XKBGAlloc.c,$(XLIBSRC))
1983 +#if UseConfDirForXkb
1984 LinkConfDirectory(xkb,.,xkb,.)
1988 diff -Naur -x CVS xc.orig/programs/Xserver/xkb/xkbActions.c xc/programs/Xserver/xkb/xkbActions.c
1989 --- XFree86-4.0.2.orig/xc/programs/Xserver/xkb/xkbActions.c Tue Apr 4 15:25:23 2000
1990 +++ XFree86-4.0.2/xc/programs/Xserver/xkb/xkbActions.c Fri Feb 9 21:39:42 2001
1991 @@ -1318,6 +1318,9 @@
1993 else CoreProcessPointerEvent(xE,dev,count);
1995 + else if (keyEvent)
1996 + FixKeyState(xE,dev);
1998 xkbi->prev_state= oldState;
1999 XkbComputeDerivedState(xkbi);
2000 keyc->prev_state= keyc->state;
2001 diff -Naur -x CVS xc.orig/programs/xedit/c-mode.c xc/programs/xedit/c-mode.c
2002 --- XFree86-4.0.2.orig/xc/programs/xedit/c-mode.c Mon Sep 27 02:30:08 1999
2003 +++ XFree86-4.0.2/xc/programs/xedit/c-mode.c Fri Feb 9 21:39:43 2001
2005 rtmp = MAX(rtmp, pright);
2007 right = anchor->position + entity->offset;
2008 - while (entity && ++count < 3) {
2009 + while (entity && count++ < 3) {
2010 if (entity->property == Qerror) {
2011 right = anchor->position + entity->offset + entity->length;
2013 diff -Naur -x CVS xc.orig/programs/xedit/ispell.c xc/programs/xedit/ispell.c
2014 --- XFree86-4.0.2.orig/xc/programs/xedit/ispell.c Tue Sep 26 11:57:24 2000
2015 +++ XFree86-4.0.2/xc/programs/xedit/ispell.c Fri Feb 9 21:39:43 2001
2016 @@ -339,14 +339,31 @@
2018 IspellSetRepeated(Bool state)
2020 + static char *mispelled, *repeated;
2023 + if (mispelled == NULL) {
2024 + XtSetArg(args[0], XtNlabel, &mispelled);
2025 + XtGetValues(ispell.mispelled, args, 1);
2026 + mispelled = XtNewString(mispelled);
2028 + if (repeated == NULL) {
2029 + XtSetArg(args[0], XtNlabel, &repeated);
2030 + XtGetValues(ispell.repeated, args, 1);
2031 + repeated = XtNewString(repeated);
2033 XtSetSensitive(ispell.replaceAll, !state);
2034 XtSetSensitive(ispell.ignoreAll, !state);
2035 XtSetSensitive(ispell.add, !state);
2036 XtSetSensitive(ispell.addUncap, !state);
2037 - if (state && XtIsManaged(ispell.mispelled))
2038 - XtChangeManagedSet(&ispell.mispelled, 1, NULL, NULL, &ispell.repeated, 1);
2039 - else if (!state && XtIsManaged(ispell.repeated))
2040 - XtChangeManagedSet(&ispell.repeated, 1, NULL, NULL, &ispell.mispelled, 1);
2042 + XtSetArg(args[0], XtNlabel, mispelled);
2043 + XtSetValues(ispell.mispelled, args, 1);
2046 + XtSetArg(args[0], XtNlabel, repeated);
2047 + XtSetValues(ispell.mispelled, args, 1);
2052 diff -Naur -x CVS xc.orig/programs/xkbcomp/rules/xfree86.lst xc/programs/xkbcomp/rules/xfree86.lst
2053 --- XFree86-4.0.2.orig/xc/programs/xkbcomp/rules/xfree86.lst Wed Dec 6 15:18:08 2000
2054 +++ XFree86-4.0.2/xc/programs/xkbcomp/rules/xfree86.lst Fri Feb 9 21:39:43 2001
2071 nec/jp PC-98xx Series
2072 diff -Naur -x CVS xc.orig/programs/xload/Imakefile xc/programs/xload/Imakefile
2073 --- XFree86-4.0.2.orig/xc/programs/xload/Imakefile Tue Nov 14 13:20:39 2000
2074 +++ XFree86-4.0.2/xc/programs/xload/Imakefile Mon Jan 22 14:49:35 2001
2076 AllTarget(ProgramTargetName(xload))
2077 NormalProgramTarget(xload,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),NullParameter)
2079 -#if defined(OSF1Architecture) || defined(NetBSDArchitecture) || (defined(FreeBSDArchitecture) && OSMajorVersion > 1) || defined(OpenBSDArchitecture)
2080 +#if !InstallXloadSetGID
2081 InstallProgram(xload,$(BINDIR))
2083 InstallProgramWithFlags(xload,$(BINDIR),$(INSTKMEMFLAGS))
2084 diff -Naur -x CVS xc.orig/programs/xman/Imakefile xc/programs/xman/Imakefile
2085 --- XFree86-4.0.2.orig/xc/programs/xman/Imakefile Fri Feb 11 22:55:14 2000
2086 +++ XFree86-4.0.2/xc/programs/xman/Imakefile Sat Jan 27 15:09:05 2001
2089 MANPATHS = $(SYSMANPATH) $(LOCALMANPATH)
2090 HELPFILE = -DHELPFILE=\"$(LIBDIR)$(PATHSEP)xman.help\"
2092 +MKSTEMP = -DHAS_MKSTEMP
2095 OSMAJORVERSION = OSMajorVersion
2096 OSMINORVERSION = OSMinorVersion
2097 - DEFINES = -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) $(HELPFILE) $(MANPATHS)
2098 + DEFINES = -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) $(HELPFILE) $(MANPATHS) $(MKSTEMP)
2099 DEPLIBS = XawClientDepLibs
2100 LOCAL_LIBRARIES = XawClientLibs
2101 SRCS = ScrollByL.c handler.c man.c buttons.c help.c \
2102 diff -Naur -x CVS xc.orig/programs/xman/misc.c xc/programs/xman/misc.c
2103 --- XFree86-4.0.2.orig/xc/programs/xman/misc.c Tue Jun 13 19:15:53 2000
2104 +++ XFree86-4.0.2/xc/programs/xman/misc.c Sat Jan 27 15:09:06 2001
2106 #include <X11/Shell.h>
2108 static FILE * Uncompress(ManpageGlobals * man_globals, char * filename);
2109 -static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output);
2110 -static Boolean UncompressUnformatted(ManpageGlobals * man_globals, char * entry, char * filename);
2111 +#ifndef HAS_MKSTEMP
2112 +static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename,
2114 +static Boolean UncompressUnformatted(ManpageGlobals * man_globals,
2115 + char * entry, char * filename);
2117 +static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename,
2118 + char * output, FILE ** output_fd);
2119 +static Boolean UncompressUnformatted(ManpageGlobals * man_globals,
2120 + char * entry, char * filename,
2124 #if defined(ISC) || defined(SCO)
2125 static char *uncompress_format = NULL;
2126 @@ -279,14 +289,23 @@
2127 char tmp_file[BUFSIZ], error_buf[BUFSIZ];
2130 +#ifndef HAS_MKSTEMP
2131 if ( !UncompressNamed(man_globals, filename, tmp_file) )
2134 else if ((file = fopen(tmp_file, "r")) == NULL) {
2135 - sprintf(error_buf, "Something went wrong in retrieving the %s",
2136 - "uncompressed manual page try cleaning up /tmp.");
2137 - PopupWarning(man_globals, error_buf);
2138 + sprintf(error_buf, "Something went wrong in retrieving the %s",
2139 + "uncompressed manual page try cleaning up /tmp.");
2140 + PopupWarning(man_globals, error_buf);
2143 + if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
2144 + sprintf(error_buf, "Something went wrong in retrieving the %s",
2145 + "uncompressed manual page try cleaning up /tmp.");
2146 + PopupWarning(man_globals, error_buf);
2151 unlink(tmp_file); /* remove name in tree, it will remain
2152 until we close the fd, however. */
2153 @@ -302,11 +321,20 @@
2154 * Returns:; TRUE if the file was found.
2157 +#ifndef HAS_MKSTEMP
2159 UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output)
2162 +UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
2163 + FILE ** output_fd)
2166 char tmp[BUFSIZ], cmdbuf[BUFSIZ], error_buf[BUFSIZ];
2172 if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
2173 if (errno != ENOENT) {
2174 @@ -323,7 +351,16 @@
2177 strcpy(tmp, MANTEMP); /* get a temp file. */
2178 +#ifndef HAS_MKSTEMP
2181 + fd = mkstemp(tmp);
2183 + PopupWarning(man_globals, "Error creating a temp file");
2186 + *output_fd = fdopen(fd, "r");
2188 strcpy(output, tmp);
2190 #ifdef GZIP_EXTENSION
2192 Format(ManpageGlobals * man_globals, char * entry)
2198 Widget manpage = man_globals->manpagewidgets.manpage;
2199 char cmdbuf[BUFSIZ], tmp[BUFSIZ], filename[BUFSIZ], error_buf[BUFSIZ];
2201 @@ -364,7 +404,11 @@
2202 Position x,y; /* location to pop up the
2203 "would you like to save" widget. */
2205 +#ifndef HAS_MKSTEMP
2206 if ( !UncompressUnformatted(man_globals, entry, filename) ) {
2208 + if ( !UncompressUnformatted(man_globals, entry, filename, &file) ) {
2210 /* We Really could not find it, this should never happen, yea right. */
2211 sprintf(error_buf, "Could not open manual page, %s", entry);
2212 PopupWarning(man_globals, error_buf);
2213 @@ -372,7 +416,11 @@
2217 +#ifndef HAS_MKSTEMP
2218 if ((file = fopen(filename, "r")) != NULL) {
2220 + if (file != NULL) {
2224 if (fgets(line, sizeof(line), file) != NULL) {
2225 @@ -408,13 +456,23 @@
2226 XFlush(XtDisplay(man_globals->standby));
2228 strcpy(tmp,MANTEMP); /* Get a temp file. */
2229 +#ifndef HAS_MKSTEMP
2232 + fd = mkstemp(tmp);
2233 + file = fdopen(fd, "r");
2235 strcpy(man_globals->tempfile, tmp);
2237 ParseEntry(entry, path, NULL, NULL);
2239 +#ifndef HAS_MKSTEMP
2240 sprintf(cmdbuf,"cd %s ; %s %s %s > %s %s", path, TBL,
2241 filename, FORMAT, man_globals->tempfile, "2> /dev/null");
2243 + sprintf(cmdbuf,"cd %s ; %s %s %s >> %s %s", path, TBL,
2244 + filename, FORMAT, man_globals->tempfile, "2> /dev/null");
2247 if(system(cmdbuf) != 0) { /* execute search. */
2249 @@ -423,12 +481,14 @@
2253 +#ifndef HAS_MKSTEMP
2254 if ((file = fopen(man_globals->tempfile,"r")) == NULL) {
2255 sprintf(error_buf, "Something went wrong in retrieving the %s",
2256 "temp file, try cleaning up /tmp");
2257 PopupWarning(man_globals, error_buf);
2262 XtPopdown( XtParent(man_globals->standby) );
2266 unlink(man_globals->tempfile);
2268 +#ifndef HAS_MKSTEMP
2273 if (man_globals->compress || man_globals->gzip) /* If the original
2274 @@ -481,7 +543,13 @@
2278 -UncompressUnformatted(ManpageGlobals * man_globals, char * entry, char * filename)
2279 +#ifndef HAS_MKSTEMP
2280 +UncompressUnformatted(ManpageGlobals * man_globals, char * entry,
2283 +UncompressUnformatted(ManpageGlobals * man_globals, char * entry,
2284 + char * filename, FILE **file)
2287 char path[BUFSIZ], page[BUFSIZ], section[BUFSIZ], input[BUFSIZ];
2288 int len_cat = strlen(CAT), len_man = strlen(MAN);
2289 @@ -505,7 +573,11 @@
2290 * Then for compressed files in an uncompressed directory.
2292 sprintf(input, "%s.%s", filename, COMPRESSION_EXTENSION);
2293 +#ifndef HAS_MKSTEMP
2294 if ( UncompressNamed(man_globals, input, filename) ) {
2296 + if ( UncompressNamed(man_globals, input, filename, file) ) {
2298 man_globals->compress = TRUE;
2299 sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
2300 CAT, section + len_cat, page, COMPRESSION_EXTENSION);
2301 @@ -514,7 +586,11 @@
2302 #ifdef GZIP_EXTENSION
2304 sprintf(input, "%s.%s", filename, GZIP_EXTENSION);
2305 +#ifndef HAS_MKSTEMP
2306 if ( UncompressNamed(man_globals, input, filename) ) {
2308 + if ( UncompressNamed(man_globals, input, filename, file) ) {
2310 man_globals->compress = TRUE;
2311 man_globals->gzip = TRUE;
2312 sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
2313 @@ -542,7 +618,11 @@
2316 sprintf(input, "%s.%s", filename, COMPRESSION_EXTENSION);
2317 +#ifndef HAS_MKSTEMP
2318 if ( UncompressNamed(man_globals, input, filename) ) {
2320 + if ( UncompressNamed(man_globals, input, filename, file) ) {
2322 man_globals->compress = TRUE;
2323 sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
2324 CAT, section + len_cat, page, COMPRESSION_EXTENSION);
2325 @@ -551,7 +631,11 @@
2326 #ifdef GZIP_EXTENSION
2328 sprintf(input, "%s.%s", filename, GZIP_EXTENSION);
2329 +#ifndef HAS_MKSTEMP
2330 if ( UncompressNamed(man_globals, input, filename) ) {
2332 + if ( UncompressNamed(man_globals, input, filename, file) ) {
2334 man_globals->compress = TRUE;
2335 man_globals->gzip = TRUE;
2336 sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
2337 @@ -566,7 +650,11 @@
2339 sprintf(input, "%s/%s%s.%s/%s", path,
2340 MAN, section + len_man, COMPRESSION_EXTENSION, page);
2341 +#ifndef HAS_MKSTEMP
2342 if ( UncompressNamed(man_globals, input, filename) ) {
2344 + if ( UncompressNamed(man_globals, input, filename, file) ) {
2346 man_globals->compress = TRUE;
2347 sprintf(man_globals->save_file, "%s/%s%s.%s/%s", path,
2348 CAT, section + len_cat, COMPRESSION_EXTENSION, page);
2349 diff -Naur -x CVS xc.orig/programs/xman/search.c xc/programs/xman/search.c
2350 --- XFree86-4.0.2.orig/xc/programs/xman/search.c Tue Jun 13 19:15:53 2000
2351 +++ XFree86-4.0.2/xc/programs/xman/search.c Sat Jan 27 15:09:06 2001
2352 @@ -149,11 +149,14 @@
2354 DoSearch(ManpageGlobals * man_globals, int type)
2356 - char cmdbuf[BUFSIZ],*mantmp;
2357 + char cmdbuf[BUFSIZ],*mantmp, *manpath;
2358 char tmp[BUFSIZ],path[BUFSIZ];
2359 char string_buf[BUFSIZ], cmp_str[BUFSIZ], error_buf[BUFSIZ];
2360 char * search_string = SearchString(man_globals);
2368 @@ -171,13 +174,37 @@
2372 - strcpy(tmp, MANTEMP); /* get a temp file. */
2373 - (void) mktemp(tmp);
2376 if (type == APROPOS) {
2379 + strcpy(tmp, MANTEMP); /* get a temp file. */
2381 + fd = mkstemp(tmp);
2383 + PopupWarning(man_globals, "Cant create temp file");
2387 + (void)mktemp(tmp);
2391 + manpath=getenv("MANPATH");
2392 + if (manpath == NULL || streq(manpath,"") ) {
2394 + if (!ReadManConfig(path))
2397 + strcpy(path,SYSMANPATH);
2398 +#ifdef LOCALMANPATH
2400 + strcat(path,LOCALMANPATH);
2404 + strcpy(path,manpath);
2407 sprintf(label,"Results of apropos search on: %s", search_string);
2409 #ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
2410 @@ -191,7 +218,11 @@
2411 PopupWarning(man_globals, error_buf);
2415 + if ((file = fdopen(fd, "r")) == NULL)
2417 if((file = fopen(mantmp,"r")) == NULL)
2419 PrintError("lost temp file? out of temp space?");
2422 diff -Naur -x CVS xc.orig/programs/xman/vendor.h xc/programs/xman/vendor.h
2423 --- XFree86-4.0.2.orig/xc/programs/xman/vendor.h Tue Aug 1 14:53:07 2000
2424 +++ XFree86-4.0.2/xc/programs/xman/vendor.h Sat Jan 27 15:09:07 2001
2425 @@ -135,10 +135,18 @@
2426 # define NO_COMPRESS
2428 # define COMPRESSION_EXTENSION "Z"
2429 -# define UNCOMPRESS_FORMAT "zcat < %s > %s"
2430 +# ifndef HAS_MKSTEMP
2431 +# define UNCOMPRESS_FORMAT "zcat < %s > %s"
2433 +# define UNCOMPRESS_FORMAT "zcat < %s >> %s"
2435 # define COMPRESS "compress"
2436 # define GZIP_EXTENSION "gz"
2437 -# define GUNZIP_FORMAT "gzip -c -d < %s > %s"
2438 +# ifndef HAS_MKSTEMP
2439 +# define GUNZIP_FORMAT "gzip -c -d < %s > %s"
2441 +# define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
2443 # define GZIP_COMPRESS "gzip"
2446 @@ -154,10 +162,19 @@
2447 # define NO_MANPATH_SUPPORT
2450 -#ifdef NO_MANPATH_SUPPORT
2451 -# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
2452 +#ifndef HAS_MKSTEMP
2453 +# ifdef NO_MANPATH_SUPPORT
2454 +# define APROPOS_FORMAT ("man -k %s | pr -h Apropos > %s")
2456 +# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
2459 -# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
2460 +/* with mkstemp the temp output file is already created */
2461 +# ifdef NO_MANPATH_SUPPORT
2462 +# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
2464 +# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")