xkb: remove XkbAtomGetString, replace with NameForAtom.
XKB really XKBdoes not XKBneed its own XKBdefines for XKBeverything. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
		
							parent
							
								
									f37799c971
								
							
						
					
					
						commit
						c8bba14a39
					
				| 
						 | 
					@ -990,6 +990,4 @@ extern _X_EXPORT XkbDescPtr XkbCompileKeymap(
 | 
				
			||||||
        XkbRMLVOSet *   /* rmlvo */
 | 
					        XkbRMLVOSet *   /* rmlvo */
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define	XkbAtomGetString(s)	NameForAtom(s)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* _XKBSRV_H_ */
 | 
					#endif /* _XKBSRV_H_ */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -240,7 +240,7 @@ unsigned	wantNames,wantConfig,wantDflts;
 | 
				
			||||||
    if ((xkb!=NULL) && (old_names!=NULL)) {
 | 
					    if ((xkb!=NULL) && (old_names!=NULL)) {
 | 
				
			||||||
	if (wantNames&XkmTypesMask) {
 | 
						if (wantNames&XkmTypesMask) {
 | 
				
			||||||
	    if (old_names->types!=None) {
 | 
						    if (old_names->types!=None) {
 | 
				
			||||||
		tmp= XkbAtomGetString(old_names->types);
 | 
							tmp= NameForAtom(old_names->types);
 | 
				
			||||||
		names->types= _XkbDupString(tmp);
 | 
							names->types= _XkbDupString(tmp);
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
	    else {
 | 
						    else {
 | 
				
			||||||
| 
						 | 
					@ -250,7 +250,7 @@ unsigned	wantNames,wantConfig,wantDflts;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (wantNames&XkmCompatMapMask) {
 | 
						if (wantNames&XkmCompatMapMask) {
 | 
				
			||||||
	    if (old_names->compat!=None) {
 | 
						    if (old_names->compat!=None) {
 | 
				
			||||||
		tmp= XkbAtomGetString(old_names->compat);
 | 
							tmp= NameForAtom(old_names->compat);
 | 
				
			||||||
		names->compat= _XkbDupString(tmp);
 | 
							names->compat= _XkbDupString(tmp);
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
	    else wantDflts|= XkmCompatMapMask;
 | 
						    else wantDflts|= XkmCompatMapMask;
 | 
				
			||||||
| 
						 | 
					@ -259,13 +259,13 @@ unsigned	wantNames,wantConfig,wantDflts;
 | 
				
			||||||
	if (wantNames&XkmSymbolsMask) {
 | 
						if (wantNames&XkmSymbolsMask) {
 | 
				
			||||||
	    if (old_names->symbols==None)
 | 
						    if (old_names->symbols==None)
 | 
				
			||||||
		return False;
 | 
							return False;
 | 
				
			||||||
	    tmp= XkbAtomGetString(old_names->symbols);
 | 
						    tmp= NameForAtom(old_names->symbols);
 | 
				
			||||||
	    names->symbols= _XkbDupString(tmp);
 | 
						    names->symbols= _XkbDupString(tmp);
 | 
				
			||||||
	    complete|= XkmSymbolsMask; 
 | 
						    complete|= XkmSymbolsMask; 
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (wantNames&XkmKeyNamesMask) {
 | 
						if (wantNames&XkmKeyNamesMask) {
 | 
				
			||||||
	   if (old_names->keycodes!=None) {
 | 
						   if (old_names->keycodes!=None) {
 | 
				
			||||||
		tmp= XkbAtomGetString(old_names->keycodes);
 | 
							tmp= NameForAtom(old_names->keycodes);
 | 
				
			||||||
		names->keycodes= _XkbDupString(tmp);
 | 
							names->keycodes= _XkbDupString(tmp);
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
	    else wantDflts|= XkmKeyNamesMask;
 | 
						    else wantDflts|= XkmKeyNamesMask;
 | 
				
			||||||
| 
						 | 
					@ -274,7 +274,7 @@ unsigned	wantNames,wantConfig,wantDflts;
 | 
				
			||||||
	if (wantNames&XkmGeometryMask) {
 | 
						if (wantNames&XkmGeometryMask) {
 | 
				
			||||||
	    if (old_names->geometry==None)
 | 
						    if (old_names->geometry==None)
 | 
				
			||||||
		return False;
 | 
							return False;
 | 
				
			||||||
	    tmp= XkbAtomGetString(old_names->geometry);
 | 
						    tmp= NameForAtom(old_names->geometry);
 | 
				
			||||||
	    names->geometry= _XkbDupString(tmp);
 | 
						    names->geometry= _XkbDupString(tmp);
 | 
				
			||||||
	    complete|= XkmGeometryMask; 
 | 
						    complete|= XkmGeometryMask; 
 | 
				
			||||||
	    wantNames&= ~XkmGeometryMask;
 | 
						    wantNames&= ~XkmGeometryMask;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -233,7 +233,7 @@ WriteXKBIndicatorMap(	FILE *			file,
 | 
				
			||||||
			void *			priv)
 | 
								void *			priv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fprintf(file,"    indicator \"%s\" {\n",XkbAtomGetString(name));
 | 
					    fprintf(file,"    indicator \"%s\" {\n",NameForAtom(name));
 | 
				
			||||||
    if (led->flags&XkbIM_NoExplicit)
 | 
					    if (led->flags&XkbIM_NoExplicit)
 | 
				
			||||||
	fprintf(file,"        !allowExplicit;\n");
 | 
						fprintf(file,"        !allowExplicit;\n");
 | 
				
			||||||
    if (led->flags&XkbIM_LEDDrivesKB)
 | 
					    if (led->flags&XkbIM_LEDDrivesKB)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -74,7 +74,7 @@ XkbAtomText(Atom atm,unsigned format)
 | 
				
			||||||
const char	*atmstr;
 | 
					const char	*atmstr;
 | 
				
			||||||
char	*rtrn,*tmp;
 | 
					char	*rtrn,*tmp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    atmstr = XkbAtomGetString(atm);
 | 
					    atmstr = NameForAtom(atm);
 | 
				
			||||||
    if (atmstr != NULL) {
 | 
					    if (atmstr != NULL) {
 | 
				
			||||||
	int	len;
 | 
						int	len;
 | 
				
			||||||
	len= strlen(atmstr)+1;
 | 
						len= strlen(atmstr)+1;
 | 
				
			||||||
| 
						 | 
					@ -118,7 +118,7 @@ char  numBuf[20];
 | 
				
			||||||
    if (ndx>=XkbNumVirtualMods)
 | 
					    if (ndx>=XkbNumVirtualMods)
 | 
				
			||||||
	 tmp= "illegal";
 | 
						 tmp= "illegal";
 | 
				
			||||||
    else if (vmodNames&&(vmodNames[ndx]!=None))
 | 
					    else if (vmodNames&&(vmodNames[ndx]!=None))
 | 
				
			||||||
	 tmp= XkbAtomGetString(vmodNames[ndx]);
 | 
						 tmp= NameForAtom(vmodNames[ndx]);
 | 
				
			||||||
    if (tmp==NULL) {
 | 
					    if (tmp==NULL) {
 | 
				
			||||||
	sprintf(numBuf,"%d",ndx);
 | 
						sprintf(numBuf,"%d",ndx);
 | 
				
			||||||
	tmp = numBuf;
 | 
						tmp = numBuf;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue