Magellan Linux

Annotation of /trunk/xorg-server/patches/xorg-server-1.1.1-fix-xrandr-zoom-keys.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 6332 byte(s)
-import

1 niro 153 diff --git a/dix/Makefile.am b/dix/Makefile.am
2     index c9a19f7..414f125 100644
3     --- a/dix/Makefile.am
4     +++ b/dix/Makefile.am
5     @@ -29,7 +29,8 @@ libdix_la_SOURCES = \
6     swaprep.c \
7     swapreq.c \
8     tables.c \
9     - window.c
10     + window.c \
11     + strcasecmp.c
12    
13     libxpstubs_la_SOURCES = \
14     xpstubs.c
15     diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
16     index d1b806a..9023a0c 100644
17     --- a/hw/xfree86/dixmods/Makefile.am
18     +++ b/hw/xfree86/dixmods/Makefile.am
19     @@ -95,6 +95,7 @@ libtype1_la_SOURCES = type1mod.c
20     libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
21    
22     libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
23     +libxorgxkb_la_LIBADD = $(top_builddir)/dix/libdix.la
24    
25     libxtrap_la_LDFLAGS = -avoid-version
26     libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrap.la
27     diff --git a/hw/xfree86/dixmods/xkbPrivate.c b/hw/xfree86/dixmods/xkbPrivate.c
28     index 0479bca..b986432 100644
29     --- a/hw/xfree86/dixmods/xkbPrivate.c
30     +++ b/hw/xfree86/dixmods/xkbPrivate.c
31     @@ -26,13 +26,13 @@ XkbDDXPrivate(DeviceIntPtr dev,KeyCode k
32     if (xf86act->type == XkbSA_XFree86Private) {
33     memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
34     msgbuf[XkbAnyActionDataSize]= '\0';
35     - if (strcmp(msgbuf, "-vmode")==0)
36     + if (strcasecmp(msgbuf, "-vmode")==0)
37     xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
38     - else if (strcmp(msgbuf, "+vmode")==0)
39     + else if (strcasecmp(msgbuf, "+vmode")==0)
40     xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
41     - else if (strcmp(msgbuf, "ungrab")==0)
42     + else if (strcasecmp(msgbuf, "ungrab")==0)
43     xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
44     - else if (strcmp(msgbuf, "clsgrb")==0)
45     + else if (strcasecmp(msgbuf, "clsgrb")==0)
46     xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
47     else
48     xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
49     diff --git a/include/dix.h b/include/dix.h
50     index 0177721..84fc849 100644
51     --- a/include/dix.h
52     +++ b/include/dix.h
53     @@ -820,4 +820,10 @@ typedef struct {
54     SelectionCallbackKind kind;
55     } SelectionInfoRec;
56    
57     +/* strcasecmp.c */
58     +#if NEED_STRCASECMP
59     +#define strcasecmp xstrcasecmp
60     +extern int xstrcasecmp(char *s1, char *s2);
61     +#endif
62     +
63     #endif /* DIX_H */
64     diff --git a/xkb/maprules.c b/xkb/maprules.c
65     index d4e9829..eff02ad 100644
66     --- a/xkb/maprules.c
67     +++ b/xkb/maprules.c
68     @@ -62,12 +62,6 @@ #define PR_DEBUG1(s,a)
69     #define PR_DEBUG2(s,a,b)
70     #endif
71    
72     -#ifdef NEED_STRCASECMP
73     -extern int _XkbStrCaseCmp(char *s1, char *s2);
74     -#else
75     -#define _XkbStrCaseCmp strcasecmp
76     -#endif
77     -
78     /***====================================================================***/
79    
80     #define DFLT_LINE_SIZE 128
81     @@ -1092,20 +1086,20 @@ int len,headingtype,extra_ndx = 0;
82     for ( ; GetInputLine(file,&line,False); line.num_line= 0) {
83     if (line.line[0]=='!') {
84     tok = strtok(&(line.line[1]), " \t");
85     - if (_XkbStrCaseCmp(tolower(tok),"model") == 0)
86     + if (strcasecmp(tok,"model") == 0)
87     headingtype = HEAD_MODEL;
88     - else if (_XkbStrCaseCmp(tok,"layout") == 0)
89     + else if (strcasecmp(tok,"layout") == 0)
90     headingtype = HEAD_LAYOUT;
91     - else if (_XkbStrCaseCmp(tok,"variant") == 0)
92     + else if (strcasecmp(tok,"variant") == 0)
93     headingtype = HEAD_VARIANT;
94     - else if (_XkbStrCaseCmp(tok,"option") == 0)
95     + else if (strcasecmp(tok,"option") == 0)
96     headingtype = HEAD_OPTION;
97     else {
98     int i;
99     headingtype = HEAD_EXTRA;
100     extra_ndx= -1;
101     for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) {
102     - if (!_XkbStrCaseCmp(tok,rules->extra_names[i]))
103     + if (!strcasecmp(tok,rules->extra_names[i]))
104     extra_ndx= i;
105     }
106     if (extra_ndx<0) {
107     diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
108     index 3389ba8..3ed68c2 100644
109     --- a/xkb/xkbfmisc.c
110     +++ b/xkb/xkbfmisc.c
111     @@ -247,19 +247,3 @@ XkbNameMatchesPattern(char *name,char *p
112     /* if we get here, the pattern is exhausted (-:just like me:-) */
113     return (name[0]=='\0');
114     }
115     -
116     -#ifdef NEED_STRCASECMP
117     -_X_HIDDEN int
118     -_XkbStrCaseCmp(char *str1,char *str2)
119     -{
120     - const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
121     -
122     - while (tolower(*us1) == tolower(*us2)) {
123     - if (*us1++ == '\0')
124     - return (0);
125     - us2++;
126     - }
127     -
128     - return (tolower(*us1) - tolower(*us2));
129     -}
130     -#endif
131     diff --git a/dix/strcasecmp.c b/dix/strcasecmp.c
132     new file mode 100644
133     index 0000000..bf3f008
134     --- /dev/null
135     +++ b/dix/strcasecmp.c
136     @@ -0,0 +1,50 @@
137     +/* $Xorg: xkbmisc.c,v 1.4 2000/08/17 19:46:44 cpqbld Exp $ */
138     +/************************************************************
139     + Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
140     +
141     + Permission to use, copy, modify, and distribute this
142     + software and its documentation for any purpose and without
143     + fee is hereby granted, provided that the above copyright
144     + notice appear in all copies and that both that copyright
145     + notice and this permission notice appear in supporting
146     + documentation, and that the name of Silicon Graphics not be
147     + used in advertising or publicity pertaining to distribution
148     + of the software without specific prior written permission.
149     + Silicon Graphics makes no representation about the suitability
150     + of this software for any purpose. It is provided "as is"
151     + without any express or implied warranty.
152     +
153     + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
154     + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
155     + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
156     + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
157     + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
158     + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
159     + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
160     + THE USE OR PERFORMANCE OF THIS SOFTWARE.
161     +
162     + ********************************************************/
163     +/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.7 2003/07/16 02:31:10 dawes Exp $ */
164     +
165     +#ifdef HAVE_DIX_CONFIG_H
166     +#include <dix-config.h>
167     +#endif
168     +
169     +#include <ctype.h>
170     +#include "dix.h"
171     +
172     +#ifdef NEED_STRCASECMP
173     +int
174     +xstrcasecmp(char *str1,char *str2)
175     +{
176     + const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
177     +
178     + while (tolower(*us1) == tolower(*us2)) {
179     + if (*us1++ == '\0')
180     + return (0);
181     + us2++;
182     + }
183     +
184     + return (tolower(*us1) - tolower(*us2));
185     +}
186     +#endif