diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-08-27 15:34:16 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-08-27 15:34:16 +0000 |
commit | 2bac4d23b683a1a41618861374616f39a5103d33 (patch) | |
tree | 8198cf480f0ffed77106e7fae798996f1b38a058 /lib/libX11/src/xkb | |
parent | 9056f0e1d193894344a87feaca366d3f4c797d8d (diff) |
Update to libX11 1.4.4. Tested by ajacoutot@, shadchin@.
Diffstat (limited to 'lib/libX11/src/xkb')
-rw-r--r-- | lib/libX11/src/xkb/Makefile.in | 1 | ||||
-rw-r--r-- | lib/libX11/src/xkb/XKBGAlloc.c | 13 | ||||
-rw-r--r-- | lib/libX11/src/xkb/XKBGeom.c | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/lib/libX11/src/xkb/Makefile.in b/lib/libX11/src/xkb/Makefile.in index 881d24d39..3e166b1ac 100644 --- a/lib/libX11/src/xkb/Makefile.in +++ b/lib/libX11/src/xkb/Makefile.in @@ -184,6 +184,7 @@ RAWCPPFLAGS = @RAWCPPFLAGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ THRSTUBS_FALSE = @THRSTUBS_FALSE@ diff --git a/lib/libX11/src/xkb/XKBGAlloc.c b/lib/libX11/src/xkb/XKBGAlloc.c index 90ec2f9cf..7679496e3 100644 --- a/lib/libX11/src/xkb/XKBGAlloc.c +++ b/lib/libX11/src/xkb/XKBGAlloc.c @@ -684,9 +684,7 @@ register XkbPropertyPtr prop; if ((prop->name)&&(strcmp(name,prop->name)==0)) { if (prop->value) _XkbFree(prop->value); - prop->value= (char *)_XkbAlloc(strlen(value)+1); - if (prop->value) - strcpy(prop->value,value); + prop->value= strdup(value); return prop; } } @@ -695,17 +693,15 @@ register XkbPropertyPtr prop; return NULL; } prop= &geom->properties[geom->num_properties]; - prop->name= (char *)_XkbAlloc(strlen(name)+1); + prop->name= strdup(name); if (!prop->name) return NULL; - strcpy(prop->name,name); - prop->value= (char *)_XkbAlloc(strlen(value)+1); + prop->value= strdup(value); if (!prop->value) { _XkbFree(prop->name); prop->name= NULL; return NULL; } - strcpy(prop->value,value); geom->num_properties++; return prop; } @@ -757,10 +753,9 @@ register XkbColorPtr color; } color= &geom->colors[geom->num_colors]; color->pixel= pixel; - color->spec= (char *)_XkbAlloc(strlen(spec)+1); + color->spec= strdup(spec); if (!color->spec) return NULL; - strcpy(color->spec,spec); geom->num_colors++; return color; } diff --git a/lib/libX11/src/xkb/XKBGeom.c b/lib/libX11/src/xkb/XKBGeom.c index e9e36d0cb..7594a3de4 100644 --- a/lib/libX11/src/xkb/XKBGeom.c +++ b/lib/libX11/src/xkb/XKBGeom.c @@ -112,7 +112,6 @@ XkbBoundsPtr bounds,sbounds; if ((!geom)||(!section)||(!row)) return False; - pos= 0; bounds= &row->bounds; bzero(bounds,sizeof(XkbBoundsRec)); for (key=row->keys,pos=k=0;k<row->num_keys;k++,key++) { @@ -147,7 +146,7 @@ register int i; XkbShapePtr shape; XkbRowPtr row; XkbDoodadPtr doodad; -XkbBoundsPtr bounds,rbounds=NULL; +XkbBoundsPtr bounds,rbounds; if ((!geom)||(!section)) return False; @@ -186,6 +185,7 @@ XkbBoundsPtr bounds,rbounds=NULL; default: tbounds.x1= tbounds.x2= doodad->any.left; tbounds.y1= tbounds.y2= doodad->any.top; + rbounds= &tbounds; break; } _XkbCheckBounds(bounds,rbounds->x1,rbounds->y1); |