]> git.pld-linux.org Git - packages/XFree86.git/blob - XFree86-xf-4_0_2-branch-2001-02-10.patch
- fixed path to xterm
[packages/XFree86.git] / XFree86-xf-4_0_2-branch-2001-02-10.patch
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
4 @@ -59,6 +59,12 @@
5  #define HasNCurses             YES
6  #define HasVarRun              YES
7  #define HasVarDb               YES
8 +
9 +#if (OSMajorVersion > 1)
10 +#define InstallXloadSetGID     NO
11 +#else
12 +#define InstallXloadSetGID     YES
13 +#endif
14  
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
20 @@ -1217,7 +1217,7 @@
21  InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX))                   @@\
22                                                                         @@\
23  install.man::                                                          @@\
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; \                                 @@\
29 @@ -1258,7 +1258,7 @@
30  InstallHtmlManPageAliases(file,aliases,suffix)                         @@\
31                                                                         @@\
32  install.man::                                                          @@\
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
41 @@ -71,6 +71,8 @@
42  
43  #define HasVarRun              YES
44  #define HasVarDb               YES
45 +
46 +#define InstallXloadSetGID     NO
47  
48  /* Defines for using the GNU pth thread library -- experimental */
49  
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
53 @@ -71,6 +71,8 @@
54  
55  #define HasVarRun              YES
56  #define HasVarDb               YES
57 +
58 +#define InstallXloadSetGID     NO
59  
60  #ifndef HasLibPthread
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
65 @@ -339,6 +339,9 @@
66  #ifndef InstallXtermSetUID
67  #define InstallXtermSetUID     YES     /* xterm needs to be set uid */
68  #endif
69 +#ifndef InstallXloadSetGID
70 +#define InstallXloadSetGID     YES     /* xload often needs set gid kmem */
71 +#endif
72  #ifndef InstallXinitConfig
73  #define InstallXinitConfig     NO      /* install sample xinit config */
74  #endif
75 @@ -358,6 +361,12 @@
76  #ifndef InstallAppDefFiles
77  #define InstallAppDefFiles     YES     /* install application defaults */
78  #endif
79 +#ifndef UseConfDirForAppDefaults
80 +#define UseConfDirForAppDefaults YES
81 +#endif
82 +#ifndef UseConfDirForXkb
83 +#define UseConfDirForXkb       YES
84 +#endif
85  #ifndef CompressAllFonts
86  #define CompressAllFonts       NO
87  #endif
88 @@ -2347,6 +2356,7 @@
89   * if the InstallAppDefFiles configuration parameter is set.
90   */
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)
104 +#else
105 +#define InstallAppDefaultsLong(file,class)                             @@\
106 +InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
107 +#endif /* InstallAppDefFiles */
108 +#endif /* UseConfDirForAppDefaults */
109  #endif /* InstallAppDefaultsLong */
110  
111  /*
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
115 @@ -215,6 +215,10 @@
116  # ifndef HasLibCrypt
117  #  define HasLibCrypt          NO
118  # endif
119 +#endif
120 +
121 +#ifndef InstallXloadSetGID
122 +#define InstallXloadSetGID     NO
123  #endif
124  
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
129 @@ -35,6 +35,9 @@
130  #define ShLibDir               /usr/shlib
131  #define SharedLibPex           NO  /* losing, no shared -lm */
132  #endif
133 +
134 +#define InstallXloadSetGID     NO
135 +
136  #define ThreadedX              ModernOSF1
137  
138  #if ThreadedX
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
142 @@ -14,6 +14,18 @@
143  LN=LNCMD
144  MV=MVCMD
145  
146 +XCOMM Security: if $tmp exists exit immediately
147 +rm -f ${TMP}
148 +if [ -e ${TMP} ] ; then
149 +    echo "$0: ${TMP} exists already, exit." 1>&2
150 +    exit 1;
151 +fi
152 +#if defined(HAS_MKTEMP)
153 +if [ -n "`type -p mktemp`" ] ; then
154 +    TMP="`mktemp ${TMP}.XXXXXX`" || exit 1
155 +fi
156 +#endif
157 +
158  trap "$RM ${TMP}*; exit 1" 1 2 15
159  trap "$RM ${TMP}*; exit 0" 1 2 13
160  
161 @@ -33,7 +45,7 @@
162             -D*|-I*)
163                 args="$args '$1'"
164                 ;;
165 -           -g|-O*)
166 +           -g|-O)
167                 ;;
168             *)
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 @@
174  {
175    char *p0;
176    static char *nonhref = "\">'";
177 +  static char *punct = ".,:;)]}?!";
178  
179    while (*p==' ') p++;
180    if (strincmp(p,"http",4)==0) {
181         href="%s"; manrefname = p;
182         p+=4;
183         while (*p && !isspace(*p) && !strchr(nonhref,*p)) p++;
184 +       while (strchr(punct, *(p - 1))) p--;
185    } else {
186         href = manRef;
187  
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;
193                 fdopen_mode = "w";
194             }
195 -           else
196 +           else {
197  /* O_NOFOLLOW is a FreeBSD & Linux extension */
198  #ifdef O_NOFOLLOW
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 */
203                 fdopen_mode = "r+";
204 +           }
205             break;
206         default:
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
211 @@ -582,6 +582,11 @@
212         always_resize_children =
213             ChangeFormGeometry((Widget)fw, False, maxx, maxy, NULL, NULL);
214  
215 +#ifdef OLDXAW
216 +       fw->form.old_width  = fw->core.width;
217 +       fw->form.old_height = fw->core.height;
218 +#endif
219 +
220         if (force_relayout)
221             ret_val = True;
222         else
223 @@ -656,7 +661,6 @@
224  static void
225  LayoutChild(Widget w)
226  {
227 -    FormWidget fw = (FormWidget)XtParent(w);
228      FormConstraints form = (FormConstraints)w->core.constraints;
229      Widget ref;
230  
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;
235 -       Dimension width;
236  
237         LayoutChild(ref);
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);
243      }
244      if ((ref = form->form.vert_base) != NULL) {
245         FormConstraints ref_form = (FormConstraints)ref->core.constraints;
246 -       Dimension height;
247  
248         LayoutChild(ref);
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);
254      }
255  
256 @@ -891,8 +889,6 @@
257                  * The window will be updated when no_refigure is set back
258                  * to False
259                  */
260 -               form->form.virtual_width = XtWidth(w);
261 -               form->form.virtual_height = XtHeight(w);
262                 form->form.deferred_resize = True;
263                 ret_val = XtGeometryDone;
264             }
265 @@ -902,6 +898,8 @@
266             /*
267              * Resets everything.
268              */
269 +           fw->form.old_width = XtWidth(fw);
270 +           fw->form.old_height = XtHeight(fw);
271             for (childP = children; childP - children < num_children; childP++) {
272                 Widget nw = *childP;
273  
274 @@ -916,8 +914,6 @@
275                     nform->form.virtual_height = XtHeight(nw);
276                 }
277             }
278 -           fw->form.old_width = XtWidth(fw);
279 -           fw->form.old_height = XtHeight(fw);
280         }
281         else {
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);
286  
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;
292 -            childP++) {
293 -           child = *childP;
294 -           if (!XtIsManaged(child))
295 -               continue;
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;
301 +        childP++) {
302 +       child = *childP;
303 +       if (!XtIsManaged(child))
304 +           continue;
305 +       form = (FormConstraints)child->core.constraints;
306  #ifndef OLDXAW
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);
311  #endif
312 -           form->form.virtual_width = XtWidth(child);
313 -           form->form.virtual_height = XtHeight(child);
314 -       }
315 +       form->form.virtual_width = XtWidth(child);
316 +       form->form.virtual_height = XtHeight(child);
317      }
318  }
319  
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
323 @@ -67,6 +67,10 @@
324  #include "XawI18n.h"
325  #include "Private.h"
326  
327 +#include <sys/types.h>
328 +#include <sys/stat.h>
329 +#include <fcntl.h>
330 +
331  #define MAGIC_VALUE    ((XawTextPosition)-1)
332  #define streq(a, b)    (strcmp((a), (b)) == 0)
333  
334 @@ -1158,7 +1162,9 @@
335  static FILE *
336  InitStringOrFile(MultiSrcObject src, Bool newString)
337  {
338 -    char *open_mode = NULL;
339 +    mode_t open_mode;
340 +    const char *fdopen_mode = NULL;
341 +    int fd;
342      FILE *file;
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.",
348                            NULL, 0);
349 -           open_mode = "r";
350 +           open_mode = O_RDONLY;
351 +           fdopen_mode = "r";
352             break;
353         case XawtextAppend:
354         case XawtextEdit:
355 @@ -1218,10 +1225,18 @@
356  
357                 (void)tmpnam((char *)src->multi_src.string);
358                 src->multi_src.is_tempfile = True;
359 -               open_mode = "w";
360 +               open_mode = O_WRONLY | O_CREAT | O_EXCL;
361 +               fdopen_mode = "w";
362 +           }
363 +           else {
364 +/* O_NOFOLLOW is a BSD & Linux extension */
365 +#ifdef O_NOFOLLOW
366 +               open_mode = O_RDWR | O_NOFOLLOW;
367 +#else
368 +               open_mode = O_RDWR; /* unsafe; subject to race conditions */
369 +#endif
370 +               fdopen_mode = "r+";
371             }
372 -           else
373 -               open_mode = "r+";
374             break;
375         default:
376             XtErrorMsg("badMode", "multiSourceCreate", "XawError",
377 @@ -1243,12 +1258,14 @@
378      }
379      
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);
384 -           return 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);
389 +               return(file);
390 +           }
391         }
392 -       else {
393 +       {
394             String params[2];
395             Cardinal num_params = 2;
396             
397 @@ -1258,7 +1275,7 @@
398                             "openError", "multiSourceCreate", "XawWarning",
399                             "Cannot open file %s; %s", params, &num_params);
400         }
401 -    } 
402 +    }
403      src->multi_src.length = 0;
404      return (NULL);
405  }
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
409 @@ -437,7 +437,7 @@
410    cache = (XawCache **)bsearch(screen, xaw->elems,
411                                xaw->num_elems, sizeof(XtPointer),
412                                bcmp_long);
413 -  if (!cache)
414 +  if (!cache || !(*cache)->num_elems)
415      return (NULL);
416    if (flags == FIND_SCREEN)
417      return (*cache);
418 @@ -446,7 +446,7 @@
419    cache = (XawCache **)bsearch((void *)colormap, (*cache)->elems,
420                                (*cache)->num_elems, sizeof(XtPointer),
421                                bcmp_long);
422 -  if (!cache)
423 +  if (!cache || !(*cache)->num_elems)
424      return (NULL);
425    if (flags == FIND_COLORMAP)
426      return (*cache);
427 @@ -456,7 +456,7 @@
428                                (*cache)->num_elems, sizeof(XtPointer),
429                                bcmp_long);
430  
431 -  if (!cache)
432 +  if (!cache || !(*cache)->num_elems)
433      return (NULL);
434    return (*cache);
435  }
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
439 @@ -805,6 +805,7 @@
440         XtRealizeWidget(vbar);
441         XtMapWidget(vbar);
442      }
443 +    XtSetKeyboardFocus(vbar, (Widget)ctx);
444  }
445  
446  /*
447 @@ -863,6 +864,7 @@
448         XtRealizeWidget(hbar);
449         XtMapWidget(hbar);
450      }
451 +    XtSetKeyboardFocus(hbar, (Widget)ctx);
452  }
453  
454  /*
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);
460  }
461  
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.
468 + */
469 +struct _focus { Display *display; Widget widget; };
470 +static struct _focus *focus;
471 +static Cardinal num_focus;
472  /*ARGSUSED*/
473  static void
474  TextFocusIn(Widget w, XEvent *event, String *p, Cardinal *n)
475  {
476      TextWidget ctx = (TextWidget)w;
477      Bool display_caret = ctx->text.display_caret;
478 +    int i;
479  
480      if (event->xfocus.detail == NotifyPointer)
481         return;
482 @@ -2853,6 +2864,25 @@
483      ctx->text.hasfocus = TRUE;
484      if (display_caret)
485         EndAction(ctx);
486 +
487 +    for (i = 0; i < num_focus; i++)
488 +       if (focus[i].display == XtDisplay(w))
489 +           break;
490 +    if (i >= num_focus) {
491 +       focus = (struct _focus*)
492 +           XtRealloc((XtPointer)focus, sizeof(struct _focus) * (num_focus + 1));
493 +       i = num_focus;
494 +       focus[i].widget = w;
495 +       focus[i].display = XtDisplay(w);
496 +       num_focus++;
497 +    }
498 +    if (focus[i].widget != w) {
499 +       Widget old = focus[i].widget;
500 +
501 +       focus[i].widget = w;
502 +       if (old != NULL)
503 +           TextFocusOut(old, event, p, n);
504 +    }
505  }
506  
507  /*ARGSUSED*/
508 @@ -2861,8 +2891,24 @@
509  {
510      TextWidget ctx = (TextWidget)w;
511      Bool display_caret = ctx->text.display_caret;
512 +    Widget shell;
513 +    Window window;
514 +    int i, revert;
515 +
516 +    shell = w;
517 +    while (shell) {
518 +       if (XtIsShell(shell))
519 +          break;
520 +       shell = XtParent(shell);
521 +    }
522  
523 -    if (event->xfocus.detail == NotifyPointer)
524 +    for (i = 0; i < num_focus; i++)
525 +       if (focus[i].display == XtDisplay(w))
526 +           break;
527 +    XGetInputFocus(XtDisplay(w), &window, &revert);
528 +    if ((XtWindow(shell) == window &&
529 +        (i < num_focus && focus[i].widget == w))
530 +        || event->xfocus.detail == NotifyPointer)
531         return;
532  
533      /* Let the input method know focus has left.*/
534 @@ -3110,6 +3156,8 @@
535         FD_ZERO(&fds);
536         FD_SET(ConnectionNumber(XtDisplay(w)), &fds);
537         (void)select(FD_SETSIZE, &fds, NULL, NULL, &tmval);
538 +       if (tmval.tv_usec != 500000)
539 +           usleep(40000);
540  
541         StartAction(ctx, NULL);
542  #ifndef OLDXAW
543 @@ -3342,8 +3390,9 @@
544             return;
545         }
546         else {
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);
552         }
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
558 @@ -837,7 +837,7 @@
559  static Bool
560  DoSearch(struct SearchAndReplace *search)
561  {
562 -    char msg[BUFSIZ];
563 +    char msg[37];
564      Widget tw = XtParent(search->search_popup);
565      XawTextPosition pos;
566      XawTextScanDirection dir;
567 @@ -875,11 +875,27 @@
568       GetString to get a tame version */
569  
570      if (pos == XawTextSearchError) {
571 -       (void)XmuSnprintf(msg, sizeof(msg),
572 -                         "Could not find string ``%s''.",
573 -                         GetString(search->search_text));
574 +       char *ptr;
575 +       int len;
576 +
577 +       ptr = GetString(search->search_text);
578 +       len = strlen(ptr);
579 +       (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr);
580 +
581 +       ptr = strchr(msg, '\n');
582 +       if (ptr != NULL || sizeof(msg) - 1 < len) {
583 +           if (ptr != NULL)
584 +               len = ptr - msg + 4;
585 +           else
586 +               len = strlen(msg);
587 +
588 +           if (len < 4)
589 +               strcpy(msg, "...");
590 +           else
591 +               strcpy(msg + len - 4, "...");
592 +       }
593         XawTextUnsetSelection(tw);
594 -       SetSearchLabels(search, msg, "", True);
595 +       SetSearchLabels(search, "Could not find string", msg, True);
596  
597         return (False);
598      }
599 @@ -1019,15 +1035,26 @@
600  
601             if (new_pos == XawTextSearchError) {
602                 if (count == 0) {
603 -                   char msg[BUFSIZ];
604 -
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 */
607 -
608 -                   (void)XmuSnprintf(msg, sizeof(msg),
609 -                                     "Error: Could not find string ``%s''",
610 -                                     GetString(search->search_text));
611 -                   SetSearchLabels(search, msg, "", True);
612 +                   char msg[37];
613 +                   char *ptr;
614 +                   int len;
615 +
616 +                   ptr = GetString(search->search_text);
617 +                   len = strlen(ptr);
618 +                   (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr);
619 +                   ptr = strchr(msg, '\n');
620 +                   if (ptr != NULL || sizeof(msg) - 1 < len) {
621 +                       if (ptr != NULL)
622 +                           len = ptr - msg + 4;
623 +                       else
624 +                           len = strlen(msg);
625 +
626 +                       if (len < 4)
627 +                           strcpy(msg, "...");
628 +                       else
629 +                           strcpy(msg + len - 4, "...");
630 +                   }
631 +                   SetSearchLabels(search, "Could not find string", msg, True);
632  
633                     if (redisplay) {
634                         XawTextSetInsertionPoint(tw, ipos);
635 @@ -1047,7 +1074,7 @@
636             XawTextGetSelectionPos(tw, &pos, &end_pos);
637  
638             if (search->selection_changed) {
639 -               SetSearchLabels(search, "Selection has been modified, aborting.",
640 +               SetSearchLabels(search, "Selection modified, aborting.",
641                                 "", True);
642                 if (redisplay) {
643                     XawTextSetInsertionPoint(tw, ipos);
644 @@ -1067,11 +1094,7 @@
645         }
646  
647         if (XawTextReplace(tw, pos, end_pos, &replace) != XawEditDone) {
648 -           char msg[BUFSIZ];
649 -
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);
654             if (redisplay) {
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) {
664 +                           eprev = NULL;
665                             anchor = XawTextSourceRemoveAnchor(w, anchor);
666                             entity = anchor ? anchor->entities : NULL;
667 -                           eprev = NULL;
668                         }
669                         else
670                             eprev = entity = enext;
671 @@ -1053,6 +1053,7 @@
672                     XtFree((XtPointer)entity);
673                     anchor->cache = NULL;
674                     if (entity == anchor->entities) {
675 +                       eprev = NULL;
676                         if ((anchor->entities = enext) == NULL) {
677                             if (i == 0)
678                                 ++i;
679 @@ -1069,7 +1070,6 @@
680                                 break;
681                             }
682                             anchor = src->textSrc.anchors[i];
683 -                           eprev = NULL;
684                             entity = anchor->entities;
685                             continue;
686                         }
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 @@
691      if (deactivateGrab)
692          (*keybd->DeactivateGrab)(keybd);
693  }
694 +
695 +#ifdef XKB
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.
699 +*/
700 +void
701 +FixKeyState (xE, keybd)
702 +    register xEvent *xE;
703 +    register DeviceIntPtr keybd;
704 +{
705 +    int             key, bit;
706 +    register BYTE   *kptr;
707 +    register KeyClassPtr keyc = keybd->key;
708 +
709 +    key = xE->u.u.detail;
710 +    kptr = &keyc->down[key >> 3];
711 +    bit = 1 << (key & 7);
712 +#ifdef DEBUG
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"));
717 +    }
718 +#endif
719 +    switch (xE->u.u.type)
720 +    {
721 +       case KeyPress: 
722 +           *kptr |= bit;
723 +           break;
724 +       case KeyRelease: 
725 +           *kptr &= ~bit;
726 +           break;
727 +       default: 
728 +           FatalError("Impossible keyboard event");
729 +    }
730 +}
731 +#endif
732  
733  void
734  #ifdef XKB
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
738 @@ -1,3 +1,40 @@
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
742 +      (Alan Hourihane).
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.
775 +
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
782 @@ -1,4 +1,4 @@
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 $ */
785  /*
786   * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
787   */
788 @@ -443,7 +443,8 @@
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)
797                 break;
798 @@ -469,7 +470,8 @@
799      int i;
800    
801      /* We might not use AddDevtoEntity */
802 -    if (!xf86Entities[entityIndex]->devices[0])
803 +    if ( (!xf86Entities[entityIndex]->devices) ||
804 +         (!xf86Entities[entityIndex]->devices[0]) ) 
805         return NULL;
806  
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;
813         p->active = active;
814         p->inUse = FALSE;
815 -        xf86AddDevToEntity(num, dev);
816 +       if (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
824 @@ -5,7 +5,7 @@
825  
826  VERSION:
827  
828 -4.0.1a
829 +4.0.2
830  
831  VIDEO DRIVER:
832  
833 @@ -54,4 +54,4 @@
834  
835  
836  
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.
845  
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.
858  
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 @@
862  
863            DriverRec ZZZ = {
864                VERSION,
865 -              "unaccelerated driver for ZZZ Zzzzzy cards",
866 +              ZZZ_DRIVER_NAME,
867                ZZZIdentify,
868                ZZZProbe,
869                ZZZAvailableOptions,
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
873 @@ -517,8 +517,8 @@
874      &s.code;InitOutput()&e.code;.  &s.code;xf86AddDriver()&e.code; adds
875      it to the global &s.code;xf86DriverList[]&e.code; array.
876  
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 @@
885      <code>
886  DriverRec ZZZ = {
887      VERSION,
888 -    "unaccelerated driver for ZZZ Zzzzzy cards",
889 +    ZZZ_DRIVER_NAME,
890      ZZZIdentify,
891      ZZZProbe,
892      ZZZAvailableOptions,
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
896 @@ -31,8 +31,22 @@
897  <sect>What is XFree86 &relvers;?
898  <p>
899  
900 -XFree86 &relvers; is the third full release in the <![ %earlyrel; [new]]>
901 -XFree86 4 series.
902 +<![ %updaterel [
903 +XFree86 &relvers; is the &whichupdaterel; update to &fullrelvers;,
904 +the &whichfullrel; full release in the <![ %earlyrel; [new]]> XFree86
905 +4 series.
906 +
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
911 +stability.
912 +]]>
913 +
914 +<![ %fullrel [
915 +XFree86 &relvers; is the &whichfullrel; full release in the <![ %earlyrel;
916 +[new]]> XFree86 4 series.
917 +]]>
918  
919  <p>
920  XFree86 release 4 is a major re-design of the basic architectural
921 @@ -47,9 +61,10 @@
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
929 -bug fixes.
930 +bug fixes.]]>
931  
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.
936  ]]>
937  
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
941 +<![ %updaterel; [
942 +The source for version &relvers; is available as a patch relative to
943 +&prevrelvers;.
944 +The patch file is <tt>&prevrelvers;-&relvers;.diff.gz</tt>.
945 +
946 +The patch
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:
950 +
951 +<tscreen><verb>
952 +gzip -d &lt; &prevrelvers;-&relvers;.diff.gz | patch -p0 -E
953 +</verb></tscreen>
954 +
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">.
958 +.
959 +]]>
960 +
961 +<![ %fullrel [
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.
969  
970  <![ %onediff; [
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>.
975  <![ %difftar; [
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>.
979  ]]>
980  The patch
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:
985  
986  <tscreen><verb>
987 -gzip -d &lt; &prevrelvers;-&relvers;.diff.gz | patch -p0 -E
988 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff.gz | patch -p0 -E
989  </verb></tscreen>
990  <![ %difftar; [
991  <tscreen><verb>
992 -gzip -d &lt; &relvers;.tgz | tar vxf -
993 +gzip -d &lt; &fullrelvers;.tgz | tar vxf -
994  </verb></tscreen>
995  ]]>
996  ]]>
997  
998  <![ %twodiffs; [
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>.
1006  <![ %difftar; [
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>.
1010  ]]>
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
1015  running:
1016  
1017  <tscreen><verb>
1018 -gzip -d &lt; &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
1019 -gzip -d &lt; &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
1020 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
1021 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
1022  </verb></tscreen>
1023  <![ %difftar; [
1024  <tscreen><verb>
1025 -gzip -d &lt; &relvers;.tgz | tar vxf -
1026 +gzip -d &lt; &fullrelvers;.tgz | tar vxf -
1027  </verb></tscreen>
1028  ]]>
1029  ]]>
1030  
1031  <![ %threediffs; [
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>.
1041  <![ %difftar; [
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>.
1045  ]]>
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
1050  running:
1051  
1052  <tscreen><verb>
1053 -gzip -d &lt; &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
1054 -gzip -d &lt; &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
1055 -gzip -d &lt; &prevrelvers;-&relvers;.diff3.gz | patch -p0 -E
1056 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
1057 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
1058 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff3.gz | patch -p0 -E
1059  </verb></tscreen>
1060  <![ %difftar; [
1061  <tscreen><verb>
1062 -gzip -d &lt; &relvers;.tgz | tar vxf -
1063 +gzip -d &lt; &fullrelvers;.tgz | tar vxf -
1064  </verb></tscreen>
1065  ]]>
1066  ]]>
1067  
1068  <![ %fourdiffs; [
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>.
1080  <![ %difftar; [
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>.
1084  ]]>
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
1089  running:
1090  
1091  <tscreen><verb>
1092 -gzip -d &lt; &prevrelvers;-&relvers;.diff1.gz | patch -p0 -E
1093 -gzip -d &lt; &prevrelvers;-&relvers;.diff2.gz | patch -p0 -E
1094 -gzip -d &lt; &prevrelvers;-&relvers;.diff3.gz | patch -p0 -E
1095 -gzip -d &lt; &prevrelvers;-&relvers;.diff4.gz | patch -p0 -E
1096 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff1.gz | patch -p0 -E
1097 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff2.gz | patch -p0 -E
1098 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff3.gz | patch -p0 -E
1099 +gzip -d &lt; &prevfullrelvers;-&fullrelvers;.diff4.gz | patch -p0 -E
1100  </verb></tscreen>
1101  <![ %difftar; [
1102  <tscreen><verb>
1103 -gzip -d &lt; &relvers;.tgz | tar vxf -
1104 +gzip -d &lt; &fullrelvers;.tgz | tar vxf -
1105  </verb></tscreen>
1106  ]]>
1107  ]]>
1108 @@ -311,6 +347,7 @@
1109  
1110  To format the XFree86 documentation use the latest version of our doctools
1111  package available as <tt>doctools-&doctoolsvers;.tgz</tt>.
1112 +]]>  <!-- fullrel -->
1113  
1114  <sect>Reporting Bugs
1115  <p>
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
1119 @@ -112,7 +112,7 @@
1120  
1121  DriverRec CYRIX = {
1122      VERSION,
1123 -    "accelerated driver for Cyrix integrated processors",
1124 +    CYRIX_DRIVER_NAME,
1125      CYRIXIdentify,
1126      CYRIXProbe,
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
1131 @@ -92,7 +92,7 @@
1132  
1133  DriverRec I810 = {
1134     I810_VERSION,
1135 -   "Accelerated driver for Intel i810 cards",
1136 +   I810_DRIVER_NAME,
1137     I810Identify,
1138     I810Probe,
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
1143 @@ -337,8 +337,8 @@
1144      NEOACLPtr nAcl = NEOACLPTR(pScrn);
1145  
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)) {
1151             
1152             int srcX1 = srcX + 64;
1153             int dstX1 = dstX + 64;
1154 @@ -368,9 +368,9 @@
1155             OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
1156         }
1157      } else {
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)) {
1163             int srcX1, dstX1;
1164             
1165             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
1169 @@ -1,7 +1,7 @@
1170  S3 ViRGE 4.0 devel notes
1171  
1172  rev: 
1173 -27 Nov 2000 KJB
1174 +3 Jan 2001 KJB
1175  
1176  
1177  Function               Implemented
1178 @@ -23,6 +23,11 @@
1179  
1180  Status
1181  ------
1182 +1/03/01 KJB
1183 +Ver 1.6.0
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.
1186 +
1187  11/27/00 KJB
1188  Ver 1.5.0
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
1193 @@ -116,9 +116,9 @@
1194   
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 */
1213              new->CR67 = 0x10;
1214 @@ -3110,7 +3110,39 @@
1215           }
1216        S3VCommonCalcClock(dclk, 1, 1, 31, 0, 3, 
1217         135000, 270000, &new->SR13, &new->SR12);
1218 -      }
1219 +   } /* end DXGX if() */
1220 +   else {           /* Everything else ... (only ViRGE) */
1221 +      if (pScrn->bitsPerPixel == 8) {
1222 +         if(dclk > 80000) {                     /* We need pixmux */
1223 +            new->CR67 = 0x10;
1224 +            new->SR15 |= 0x10;                   /* Set DCLK/2 bit */
1225 +            new->SR18 = 0x80;                   /* Enable pixmux */
1226 +            }
1227 +         }
1228 +      else if ((pScrn->bitsPerPixel == 16) && (pScrn->weight.green == 5)) {
1229 +         new->CR67 = 0x30;                       /* 15bpp */
1230 +         }
1231 +      else if (pScrn->bitsPerPixel == 16) {
1232 +         new->CR67 = 0x50;
1233 +         }
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 */
1240 +         }
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 */
1247 +         }
1248 +      S3VCommonCalcClock(dclk, 1, 1, 31, 0, 3, 
1249 +       135000, 270000, &new->SR13, &new->SR12);
1250 +      } /* end great big if()... */
1251 +
1252  
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
1258 @@ -106,9 +106,9 @@
1259         (pScrn->bitsPerPixel == 16)
1260         ) 
1261         &&
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) */
1267         )
1268         && !ps3v->NoAccel
1269         )
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
1273 @@ -117,7 +117,7 @@
1274  
1275  DriverRec SIS = {
1276      SIS_CURRENT_VERSION,
1277 -    "accelerated driver for SiS chipsets",
1278 +    SIS_DRIVER_NAME,
1279      SISIdentify,
1280      SISProbe,
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
1285 @@ -266,8 +266,7 @@
1286  #define HAS_DST_TRANS  ((pTrident->Chipset == PROVIDIA9682) || \
1287                          (pTrident->Chipset == PROVIDIA9685))
1288  
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
1298 @@ -158,7 +158,8 @@
1299      infoPtr->SubsequentScreenToScreenCopy =            
1300                                 TridentSubsequentScreenToScreenCopy;
1301  
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;
1308 @@ -282,7 +283,8 @@
1309  
1310      REPLICATE(transparency_color);
1311      if (transparency_color != -1) {
1312 -       if (pTrident->Chipset == PROVIDIA9685) {
1313 +       if (pTrident->Chipset == PROVIDIA9685 ||
1314 +           pTrident->Chipset == CYBER9388) {
1315             dst |= 1<<16;
1316         } else {
1317             TGUI_OPERMODE(pTrident->EngineOperation | DST_ENABLE);
1318 @@ -294,7 +296,8 @@
1319         if ((pTrident->Chipset == PROVIDIA9682) || 
1320             (pTrident->Chipset == TGUI9680))
1321                 dst |= FASTMODE;
1322 -       if (pTrident->Chipset == PROVIDIA9685) 
1323 +       if (pTrident->Chipset == PROVIDIA9685 ||
1324 +           pTrident->Chipset == CYBER9388)
1325                 dst |= 1<<21;
1326      }
1327  
1328 @@ -332,7 +335,8 @@
1329      pTrident->BltScanDirection = 0;
1330      REPLICATE(color);
1331      TGUI_FMIX(XAAPatternROP[rop]);
1332 -    if (pTrident->Chipset == PROVIDIA9685) {
1333 +    if (pTrident->Chipset == PROVIDIA9685 ||
1334 +        pTrident->Chipset == CYBER9388) {
1335         TGUI_FPATCOL(color);
1336         if (rop == GXcopy) 
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;
1346      REPLICATE(fg);
1347 -    if (pTrident->Chipset == PROVIDIA9685) {
1348 +    if (pTrident->Chipset == PROVIDIA9685 ||
1349 +        pTrident->Chipset == CYBER9388) {
1350         TGUI_FPATCOL(fg);
1351         if (bg == -1) {
1352             pTrident->BltScanDirection |= 1<<12;
1353 @@ -463,7 +469,8 @@
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);
1362      } else {
1363 @@ -522,26 +529,30 @@
1364      int drawflag = 0;
1365  
1366      REPLICATE(fg);
1367 -    if (pTrident->Chipset == PROVIDIA9685)
1368 +    if (pTrident->Chipset == PROVIDIA9685 ||
1369 +        pTrident->Chipset == CYBER9388)
1370         TGUI_FPATCOL(fg);
1371      else
1372         TGUI_FCOLOUR(fg);
1373  
1374      if (bg == -1) {
1375         drawflag |= 1<<12;
1376 -       if (pTrident->Chipset == PROVIDIA9685)
1377 +       if (pTrident->Chipset == PROVIDIA9685 ||
1378 +            pTrident->Chipset == CYBER9388) 
1379             TGUI_BPATCOL(~fg);
1380         else
1381             TGUI_BCOLOUR(~fg);
1382      } else {
1383         REPLICATE(bg);
1384 -       if (pTrident->Chipset == PROVIDIA9685)
1385 +       if (pTrident->Chipset == PROVIDIA9685 ||
1386 +            pTrident->Chipset == CYBER9388) 
1387             TGUI_BPATCOL(bg);
1388         else
1389             TGUI_BCOLOUR(bg);
1390      }
1391  
1392 -    if (pTrident->Chipset == PROVIDIA9685) {
1393 +    if (pTrident->Chipset == PROVIDIA9685 ||
1394 +        pTrident->Chipset == CYBER9388) {
1395         drawflag |= 7<<18;
1396          if (rop == GXcopy) drawflag |= 1<<21;
1397      }
1398 @@ -584,7 +595,8 @@
1399  
1400      REPLICATE(transparency_color);
1401      if (transparency_color != -1) {
1402 -       if (pTrident->Chipset == PROVIDIA9685) {
1403 +       if (pTrident->Chipset == PROVIDIA9685 ||
1404 +            pTrident->Chipset == CYBER9388) {
1405             drawflag |= 1<<16;
1406         } else {
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
1411 @@ -333,7 +333,6 @@
1412         case CYBER9525DVD:
1413         case CYBER9397DVD:
1414         case CYBER9397:
1415 -       case CYBER9388:
1416         case IMAGE975:
1417         case IMAGE985:
1418             if (pScrn->bitsPerPixel >= 8)
1419 @@ -344,9 +343,12 @@
1420                 pReg->tridentRegs3x4[PreEndFetch] = 0xFF;
1421             /* Fall Through */
1422         case PROVIDIA9685:
1423 +       case CYBER9388:
1424 +       case CYBER9385:
1425             pReg->tridentRegs3x4[Enhancement0] = 0x40;
1426             /* Fall Through */
1427         case PROVIDIA9682:
1428 +       case CYBER9382:
1429             if (pTrident->UsePCIRetry) 
1430                 pReg->tridentRegs3x4[PCIRetry] = 0xDF;
1431             else
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
1435 @@ -418,6 +418,7 @@
1436      "XAACreateInfoRec",
1437      "XAAHelpPatternROP",
1438      "XAAHelpSolidROP",
1439 +    "XAAFillSolidRects",
1440      "XAACopyROP",
1441      "XAAPatternROP",
1442      "XAAInit",
1443 @@ -1635,9 +1636,9 @@
1444         case CYBERBLADEI7:
1445             pTrident->ddc1Read = Tridentddc1Read;
1446             ramtype = "SDRAM";
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;
1454             break;
1455 @@ -2579,13 +2580,10 @@
1456      pScrn->fbOffset = 0;
1457  
1458  #ifdef XvExtension
1459 -    if (pTrident->Chipset >= CYBER9397)
1460 +    if ((pTrident->Chipset >= CYBER9397) && (!pTrident->NoAccel))
1461         TRIDENTInitVideo(pScreen);
1462  #endif
1463  
1464 -    if(pTrident->BlockHandler)
1465 -       pScreen->BlockHandler = pTrident->BlockHandler;
1466 -
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;
1474 +
1475 +    if(pTrident->BlockHandler)
1476 +       pScreen->BlockHandler = pTrident->BlockHandler;
1477      
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
1483 @@ -46,8 +46,7 @@
1484         int freq, ffreq;
1485         int m, n, k;
1486         int p, q, r, s; 
1487 -       int startn, endn;
1488 -       int endm, endk;
1489 +       int endn, endm, endk, startk;
1490  
1491         p = q = r = s = 0;
1492  
1493 @@ -55,23 +54,25 @@
1494  
1495         if (pTrident->NewClockCode)
1496         {
1497 -               startn = 64;
1498                 endn = 255;
1499                 endm = 63;
1500 -               endk = 3;
1501 +               endk = 2;
1502 +               if (clock >= 100000) startk = 0;
1503 +               if (clock < 100000) startk = 1;
1504 +               if (clock < 50000) startk = 2;
1505         }
1506         else
1507         {
1508 -               startn = 0;
1509                 endn = 121;
1510                 endm = 31;
1511                 endk = 1;
1512 +               startk = 0;
1513         }
1514  
1515         freq = clock;
1516  
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++)
1522             {
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
1527 @@ -37,7 +37,7 @@
1528  
1529  DriverRec V4L = {
1530          40000,
1531 -        "Xv driver for video4linux",
1532 +        "v4l",
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
1539 @@ -21,5 +21,6 @@
1540  
1541  #define InstallHardcopyDocs    YES
1542  #define HardcopyDocDirs                RX XIE XKB XPRINT
1543 +#define InstallMiscManPages    YES
1544  
1545  
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
1549 @@ -434,7 +434,7 @@
1550                                                 break;
1551                                         case DASH:
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;
1557                                                 break;
1558 @@ -468,7 +468,7 @@
1559                                                 break;
1560                                         case DASH:
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;
1566                                                 break;
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
1570 @@ -96,7 +96,7 @@
1571  #endif
1572  
1573  DEFINES        = -DXF86CONFIG=\"XConfigFile\" $(MODULEDEFINES) \
1574 -                $(CURSESDEFINES)
1575 +                $(CURSESDEFINES) -DPROJECT_ROOT=\"ProjectRoot\"
1576  
1577  #if HasDlopen
1578  DLLIB = DlLibrary
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>
1584  
1585  
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 @@
1601                                      XtNstate,
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);
1608  
1609      apply = XtCreateManagedWidget("apply", commandWidgetClass, accessx, NULL, 0);
1610      XtAddCallback(apply, XtNcallback, ApplyCallback, NULL);
1611  
1612      form = XtCreateManagedWidget("Accessx", formWidgetClass, accessx, NULL, 0);
1613 -    XtAddCallback(enable, XtNcallback, EnableCallback, (XtPointer)form);
1614      timeoutToggle = XtVaCreateManagedWidget("timeoutToggle", toggleWidgetClass,
1615                                             form, XtNstate,
1616                                             xkb_info->xkb->ctrls->ax_timeout > 60
1617 @@ -450,7 +447,6 @@
1618  
1619      XtSetArg(args[0], XtNstate, &state);
1620      XtGetValues(enable, args, 1);
1621 -    EnableCallback(enable, (XtPointer)form, (XtPointer)(long)state);
1622  }
1623  
1624  void
1625 @@ -471,7 +467,7 @@
1626  static void
1627  EnableCallback(Widget w, XtPointer user_data, XtPointer call_data)
1628  {
1629 -    XtSetSensitive(user_data, (long)call_data);
1630 +    XtSetSensitive((Widget)user_data, (long)call_data);
1631  }
1632  
1633  /*ARGSUSED*/
1634 @@ -534,162 +530,148 @@
1635      XtSetArg(args[0], XtNstate, &state);
1636      XtGetValues(enable, args, 1);
1637      if (state) {
1638 -       xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask;
1639         xkb_info->config.initial_ctrls |= XkbAccessXKeysMask;
1640 +       xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask;
1641 +    }
1642 +    else {
1643 +       xkb_info->config.initial_ctrls &= ~XkbAccessXKeysMask;
1644 +       xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbAccessXKeysMask;
1645 +    }
1646 +
1647 +    /* Timeout */
1648 +    XtSetArg(args[0], XtNstate, &state);
1649 +    XtGetValues(timeoutToggle, args, 1);
1650 +    if (state)
1651 +       xkb_info->config.ax_timeout =
1652 +       xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60;
1653 +    else
1654 +       xkb_info->config.ax_timeout =
1655 +       xkb_info->xkb->ctrls->ax_timeout = 65535;
1656 +
1657 +    /* Enable StickyKeys */
1658 +    XtSetArg(args[0], XtNstate, &state);
1659 +    XtGetValues(sticky, args, 1);
1660 +    if (state) {
1661 +       xkb_info->config.initial_ctrls |= XkbStickyKeysMask;
1662 +       xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask;
1663 +    }
1664 +    else {
1665 +       xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask;
1666 +       xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
1667 +    }
1668 +    XtSetArg(args[0], XtNstate, &state);
1669 +    XtGetValues(stickyAuto, args, 1);
1670 +    if (state) {
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;
1675 +    }
1676 +    else {
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;
1681 +    }
1682 +    XtSetArg(args[0], XtNstate, &state);
1683 +    XtGetValues(stickyBeep, args, 1);
1684 +    if (state) {
1685 +       xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask;
1686 +       xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask;
1687 +    }
1688 +    else {
1689 +       xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask;
1690 +       xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask;
1691 +    }
1692 +
1693 +    /* Enable MouseKeys */
1694 +    XtSetArg(args[0], XtNstate, &state);
1695 +    XtGetValues(mouse, args, 1);
1696 +    if (state) {
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;
1711 +    }
1712 +    else {
1713 +       xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask |
1714 +                                           XkbMouseKeysAccelMask);
1715 +       xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask |
1716 +                                                XkbMouseKeysAccelMask);
1717 +    }
1718 +
1719 +    /* Enable RepeatKeys */
1720 +    XtSetArg(args[0], XtNstate, &state);
1721 +    XtGetValues(repeat, args, 1);
1722 +    if (state) {
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;
1729 +    }
1730 +    else {
1731 +       xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask;
1732 +       xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask;
1733 +    }
1734  
1735 -       /* Timeout */
1736 -       XtSetArg(args[0], XtNstate, &state);
1737 -       XtGetValues(timeoutToggle, args, 1);
1738 -       if (state)
1739 -           xkb_info->config.ax_timeout =
1740 -           xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60;
1741 -       else
1742 -           xkb_info->config.ax_timeout =
1743 -           xkb_info->xkb->ctrls->ax_timeout = 65535;
1744 -
1745 -       /* Enable StickyKeys */
1746 -       XtSetArg(args[0], XtNstate, &state);
1747 -       XtGetValues(sticky, args, 1);
1748 -       if (state) {
1749 -           xkb_info->config.initial_ctrls |= XkbStickyKeysMask;
1750 -           xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask;
1751 -       }
1752 -       else {
1753 -           xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask;
1754 -           xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask;
1755 -       }
1756 -       XtSetArg(args[0], XtNstate, &state);
1757 -       XtGetValues(stickyAuto, args, 1);
1758 -       if (state) {
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;
1763 -       }
1764 -       else {
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;
1769 -       }
1770 -       XtSetArg(args[0], XtNstate, &state);
1771 -       XtGetValues(stickyBeep, args, 1);
1772 -       if (state) {
1773 -           xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask;
1774 -           xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask;
1775 -       }
1776 -       else {
1777 -           xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask;
1778 -           xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask;
1779 -       }
1780 -
1781 -       /* Enable MouseKeys */
1782 -       XtSetArg(args[0], XtNstate, &state);
1783 -       XtGetValues(mouse, args, 1);
1784 -       if (state) {
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;
1800 -       }
1801 -       else {
1802 -           xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask |
1803 -                                                  XkbMouseKeysAccelMask);
1804 -           xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask |
1805 -                                                    XkbMouseKeysAccelMask);
1806 -       }
1807 -
1808 -       /* Enable RepeatKeys */
1809 -       XtSetArg(args[0], XtNstate, &state);
1810 -       XtGetValues(repeat, args, 1);
1811 -       if (state) {
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;
1818 -       }
1819 -       else {
1820 -           xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask;
1821 -           xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask;
1822 -       }
1823 -
1824 -       /* Enable SlowKeys */
1825 -       XtSetArg(args[0], XtNstate, &state);
1826 -       XtGetValues(slowToggle, args, 1);
1827 -       if (state) {
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;
1832 -       }
1833 -       else {
1834 -           xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask;
1835 -           xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask;
1836 -       }
1837 -       XtSetArg(args[0], XtNstate, &state);
1838 -       XtGetValues(slowPressed, args, 1);
1839 -       if (state) {
1840 -           xkb_info->config.initial_opts |= XkbAX_SKPressFBMask;
1841 -           xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask;
1842 -       }
1843 -       else {
1844 -           xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask;
1845 -           xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask;
1846 -       }
1847 -       XtSetArg(args[0], XtNstate, &state);
1848 -       XtGetValues(slowAccepted, args, 1);
1849 -       if (state) {
1850 -           xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask;
1851 -           xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask;
1852 -       }
1853 -       else {
1854 -           xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask;
1855 -           xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask;
1856 -       }
1857 -
1858 -       /* Enable BounceKeys */
1859 -       XtSetArg(args[0], XtNstate, &state);
1860 -       XtGetValues(bounceToggle, args, 1);
1861 -       if (state) {
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;
1866 -       }
1867 -       else {
1868 -           xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask;
1869 -           xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask;
1870 -       }
1871 -    }
1872 -    else {
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);
1880 -
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);
1891 +    if (state) {
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;
1896 +    }
1897 +    else {
1898 +       xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask;
1899 +       xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask;
1900 +    }
1901 +    XtSetArg(args[0], XtNstate, &state);
1902 +    XtGetValues(slowPressed, args, 1);
1903 +    if (state) {
1904 +       xkb_info->config.initial_opts |= XkbAX_SKPressFBMask;
1905 +       xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask;
1906 +    }
1907 +    else {
1908 +       xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask;
1909 +       xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask;
1910 +    }
1911 +    XtSetArg(args[0], XtNstate, &state);
1912 +    XtGetValues(slowAccepted, args, 1);
1913 +    if (state) {
1914 +       xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask;
1915 +       xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask;
1916 +    }
1917 +    else {
1918 +       xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask;
1919 +       xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask;
1920 +    }
1921 +
1922 +    /* Enable BounceKeys */
1923 +    XtSetArg(args[0], XtNstate, &state);
1924 +    XtGetValues(bounceToggle, args, 1);
1925 +    if (state) {
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;
1930 +    }
1931 +    else {
1932 +       xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask;
1933 +       xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask;
1934      }
1935  
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);
1943      node = node->next;
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));
1949  
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
1953 @@ -61,7 +61,11 @@
1954  #include "stubs.h"
1955  
1956  #define randomize()            srand((unsigned)time((time_t*)NULL))
1957 +#ifdef PROJECT_ROOT
1958 +#define DefaultXFree86Dir      PROJECT_ROOT
1959 +#else
1960  #define DefaultXFree86Dir      "/usr/X11R6"
1961 +#endif
1962  
1963  /*
1964   * Prototypes
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
1968 @@ -275,6 +275,7 @@
1969             range[i].lo = range[i].hi = val;
1970             if (++i >= nrange || *str == '\0')
1971                 break;
1972 +           continue;
1973         }
1974         else if (*str != '-')
1975             return (0);
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
1979 @@ -67,6 +67,8 @@
1980  LinkSourceFile(XKBAlloc.c,$(XLIBSRC))
1981  LinkSourceFile(XKBGAlloc.c,$(XLIBSRC))
1982  
1983 +#if UseConfDirForXkb
1984  LinkConfDirectory(xkb,.,xkb,.)
1985 +#endif
1986  
1987  DependTarget()
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 @@
1992         }
1993         else CoreProcessPointerEvent(xE,dev,count);
1994      }
1995 +    else if (keyEvent)
1996 +       FixKeyState(xE,dev);
1997 +
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
2004 @@ -383,7 +383,7 @@
2005                     rtmp = MAX(rtmp, pright);
2006                 }
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;
2012                         count = 0;
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 @@
2017  static void
2018  IspellSetRepeated(Bool state)
2019  {
2020 +    static char *mispelled, *repeated;
2021 +    Arg args[1];
2022 +
2023 +    if (mispelled == NULL) {
2024 +       XtSetArg(args[0], XtNlabel, &mispelled);
2025 +       XtGetValues(ispell.mispelled, args, 1);
2026 +       mispelled = XtNewString(mispelled);
2027 +    }
2028 +    if (repeated == NULL) {
2029 +       XtSetArg(args[0], XtNlabel, &repeated);
2030 +       XtGetValues(ispell.repeated, args, 1);
2031 +       repeated = XtNewString(repeated);
2032 +    }
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);
2041 +    if (!state) {
2042 +       XtSetArg(args[0], XtNlabel, mispelled);
2043 +       XtSetValues(ispell.mispelled, args, 1);
2044 +    }
2045 +    else {
2046 +       XtSetArg(args[0], XtNlabel, repeated);
2047 +       XtSetValues(ispell.mispelled, args, 1);
2048 +    }
2049  }
2050  
2051  static void
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
2055 @@ -38,6 +38,7 @@
2056    ca           Canadian
2057    cs           Czechoslovakian
2058    dk           Danish
2059 +  dvorak       Dvorak
2060    ee           Estonian
2061    fi           Finnish
2062    fr           French
2063 @@ -64,7 +65,7 @@
2064    es           Spanish
2065    se           Swedish
2066    th           Thai
2067 -  uk           Ukrainian 
2068 +  ua           Ukrainian 
2069    gb           United Kingdom
2070    vn           Vietnamese
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
2075 @@ -27,7 +27,7 @@
2076  AllTarget(ProgramTargetName(xload))
2077  NormalProgramTarget(xload,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),NullParameter)
2078  
2079 -#if defined(OSF1Architecture) || defined(NetBSDArchitecture) || (defined(FreeBSDArchitecture) && OSMajorVersion > 1) || defined(OpenBSDArchitecture)
2080 +#if !InstallXloadSetGID
2081  InstallProgram(xload,$(BINDIR))
2082  #else
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
2087 @@ -11,10 +11,13 @@
2088  #endif
2089  MANPATHS = $(SYSMANPATH) $(LOCALMANPATH)
2090  HELPFILE = -DHELPFILE=\"$(LIBDIR)$(PATHSEP)xman.help\"
2091 +#if HasMkstemp
2092 +MKSTEMP = -DHAS_MKSTEMP
2093 +#endif
2094  
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
2105 @@ -45,8 +45,18 @@
2106  #include <X11/Shell.h>
2107  
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, 
2113 +                              char * output);
2114 +static Boolean UncompressUnformatted(ManpageGlobals * man_globals, 
2115 +                                    char * entry, char * filename);
2116 +#else
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, 
2121 +                                    FILE **file);
2122 +#endif
2123  
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];
2128    FILE * file;
2129  
2130 +#ifndef HAS_MKSTEMP
2131    if ( !UncompressNamed(man_globals, filename, tmp_file) )
2132      return(NULL);
2133  
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);
2141    }
2142 +#else
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);
2147 +      return(NULL);
2148 +  }
2149 +#endif
2150  
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.
2155   */
2156  
2157 +#ifndef HAS_MKSTEMP
2158  static Boolean
2159  UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output)
2160 +#else
2161 +static Boolean
2162 +UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
2163 +               FILE ** output_fd)
2164 +#endif
2165  {
2166    char tmp[BUFSIZ], cmdbuf[BUFSIZ], error_buf[BUFSIZ];
2167    struct stat junk;
2168 +#ifdef HAS_MKSTEMP
2169 +  int fd;
2170 +#endif
2171  
2172    if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
2173      if (errno != ENOENT) {
2174 @@ -323,7 +351,16 @@
2175   */
2176  
2177    strcpy(tmp, MANTEMP);                /* get a temp file. */
2178 +#ifndef HAS_MKSTEMP
2179    (void) mktemp(tmp);
2180 +#else
2181 +  fd = mkstemp(tmp);
2182 +  if (fd < 0) {
2183 +      PopupWarning(man_globals, "Error creating a temp file");
2184 +      return FALSE;
2185 +  }
2186 +  *output_fd = fdopen(fd, "r");
2187 +#endif
2188    strcpy(output, tmp);
2189  
2190  #ifdef GZIP_EXTENSION
2191 @@ -357,6 +394,9 @@
2192  Format(ManpageGlobals * man_globals, char * entry)
2193  {
2194    FILE * file;
2195 +#ifdef HAS_MKSTEMP
2196 +  int fd;
2197 +#endif
2198    Widget manpage = man_globals->manpagewidgets.manpage;
2199    char cmdbuf[BUFSIZ], tmp[BUFSIZ], filename[BUFSIZ], error_buf[BUFSIZ];
2200    char path[BUFSIZ];
2201 @@ -364,7 +404,11 @@
2202    Position x,y;                        /* location to pop up the
2203                                    "would you like to save" widget. */
2204  
2205 +#ifndef HAS_MKSTEMP
2206    if ( !UncompressUnformatted(man_globals, entry, filename) ) {
2207 +#else
2208 +  if ( !UncompressUnformatted(man_globals, entry, filename, &file) ) {
2209 +#endif
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 @@
2214      return(NULL);
2215    }
2216  
2217 +#ifndef HAS_MKSTEMP
2218    if ((file = fopen(filename, "r")) != NULL) {
2219 +#else
2220 +  if (file != NULL) {
2221 +#endif
2222      char line[BUFSIZ];
2223  
2224      if (fgets(line, sizeof(line), file) != NULL) {
2225 @@ -408,13 +456,23 @@
2226    XFlush(XtDisplay(man_globals->standby));
2227  
2228    strcpy(tmp,MANTEMP);                   /* Get a temp file. */
2229 +#ifndef HAS_MKSTEMP
2230    (void) mktemp(tmp);
2231 +#else
2232 +  fd = mkstemp(tmp);
2233 +  file = fdopen(fd, "r");
2234 +#endif
2235    strcpy(man_globals->tempfile, tmp);
2236  
2237    ParseEntry(entry, path, NULL, NULL);
2238  
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");
2242 +#else
2243 +  sprintf(cmdbuf,"cd %s ; %s %s %s >> %s %s", path, TBL,
2244 +         filename, FORMAT, man_globals->tempfile, "2> /dev/null");
2245 +#endif  
2246  
2247    if(system(cmdbuf) != 0) {    /* execute search. */
2248      sprintf(error_buf,
2249 @@ -423,12 +481,14 @@
2250      file = NULL;
2251    }
2252    else {
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);
2258      }
2259      else {
2260 +#endif
2261  
2262        XtPopdown( XtParent(man_globals->standby) );
2263    
2264 @@ -460,7 +520,9 @@
2265         else 
2266           unlink(man_globals->tempfile);
2267        }
2268 +#ifndef HAS_MKSTEMP
2269      }
2270 +#endif
2271    }
2272  
2273    if (man_globals->compress || man_globals->gzip)    /* If the original
2274 @@ -481,7 +543,13 @@
2275   */
2276  
2277  static Boolean
2278 -UncompressUnformatted(ManpageGlobals * man_globals, char * entry, char * filename)
2279 +#ifndef HAS_MKSTEMP
2280 +UncompressUnformatted(ManpageGlobals * man_globals, char * entry, 
2281 +                     char * filename)
2282 +#else
2283 +UncompressUnformatted(ManpageGlobals * man_globals, char * entry, 
2284 +                     char * filename, FILE **file)
2285 +#endif
2286  {
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.
2291    */
2292    sprintf(input, "%s.%s", filename, COMPRESSION_EXTENSION);
2293 +#ifndef HAS_MKSTEMP
2294    if ( UncompressNamed(man_globals, input, filename) ) {
2295 +#else
2296 +  if ( UncompressNamed(man_globals, input, filename, file) ) {
2297 +#endif
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
2303    else {
2304      sprintf(input, "%s.%s", filename, GZIP_EXTENSION);
2305 +#ifndef HAS_MKSTEMP
2306      if ( UncompressNamed(man_globals, input, filename) ) {
2307 +#else
2308 +    if ( UncompressNamed(man_globals, input, filename, file) ) {
2309 +#endif
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 @@
2314   */
2315  
2316    sprintf(input, "%s.%s", filename, COMPRESSION_EXTENSION);
2317 +#ifndef HAS_MKSTEMP
2318    if ( UncompressNamed(man_globals, input, filename) ) {
2319 +#else
2320 +  if ( UncompressNamed(man_globals, input, filename, file) ) {
2321 +#endif
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
2327    else {
2328      sprintf(input, "%s.%s", filename, GZIP_EXTENSION);
2329 +#ifndef HAS_MKSTEMP
2330      if ( UncompressNamed(man_globals, input, filename) ) {
2331 +#else
2332 +    if ( UncompressNamed(man_globals, input, filename, file) ) {
2333 +#endif 
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 @@
2338  
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) ) {
2343 +#else
2344 +  if ( UncompressNamed(man_globals, input, filename, file) ) {
2345 +#endif
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 @@
2353  FILE *
2354  DoSearch(ManpageGlobals * man_globals, int type)
2355  {
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);
2361    FILE * file;
2362 +#ifdef HAS_MKSTEMP
2363 +  int fd;
2364 +#endif
2365    int count;
2366    Boolean flag;
2367  
2368 @@ -171,13 +174,37 @@
2369      return(NULL);
2370    }
2371  
2372 -  strcpy(tmp, MANTEMP);                /* get a temp file. */
2373 -  (void) mktemp(tmp);
2374 -  mantmp = tmp;
2375 -
2376    if (type == APROPOS) {
2377      char label[BUFSIZ];
2378  
2379 +    strcpy(tmp, MANTEMP);              /* get a temp file. */
2380 +#ifdef HAS_MKSTEMP
2381 +    fd = mkstemp(tmp);
2382 +    if (fd < 0) {
2383 +      PopupWarning(man_globals, "Cant create temp file");
2384 +      return NULL;
2385 +    }
2386 +#else
2387 +    (void)mktemp(tmp);
2388 +#endif
2389 +    mantmp = tmp;
2390 +
2391 +    manpath=getenv("MANPATH");
2392 +    if (manpath == NULL || streq(manpath,"") ) {
2393 +#ifdef MANCONF
2394 +      if (!ReadManConfig(path))
2395 +#endif
2396 +      {
2397 +       strcpy(path,SYSMANPATH);
2398 +#ifdef LOCALMANPATH
2399 +       strcat(path,":");
2400 +       strcat(path,LOCALMANPATH);
2401 +#endif
2402 +      }
2403 +    } else {
2404 +      strcpy(path,manpath);
2405 +    }
2406 +
2407      sprintf(label,"Results of apropos search on: %s", search_string);
2408  
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);
2412      }
2413  
2414 +#ifdef HAS_MKSTEMP
2415 +    if ((file = fdopen(fd, "r")) == NULL) 
2416 +#else
2417      if((file = fopen(mantmp,"r")) == NULL)
2418 +#endif
2419        PrintError("lost temp file? out of temp space?");
2420  
2421  /* 
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
2427  #    else
2428  #      define COMPRESSION_EXTENSION "Z"
2429 -#      define UNCOMPRESS_FORMAT     "zcat < %s > %s"
2430 +#      ifndef HAS_MKSTEMP
2431 +#        define UNCOMPRESS_FORMAT     "zcat < %s > %s"
2432 +#      else
2433 +#        define UNCOMPRESS_FORMAT     "zcat < %s >> %s"
2434 +#      endif
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"
2440 +#      else
2441 +#        define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
2442 +#      endif
2443  #      define GZIP_COMPRESS "gzip"
2444  #    endif /* ISC */
2445  #  endif /* UTEK */
2446 @@ -154,10 +162,19 @@
2447  #  define NO_MANPATH_SUPPORT
2448  #endif
2449  
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")
2455 +#  else
2456 +#    define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
2457 +#  endif
2458  #else
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")
2463 +#  else
2464 +#    define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
2465 +#  endif
2466  #endif
2467  
2468  #ifdef ultrix
This page took 1.054104 seconds and 3 git commands to generate.