[PATCH 23/31] XKB: Geom: Remove unused code

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 6 14:52:17 PST 2011


On Fri, Dec 02, 2011 at 11:31:29AM +0000, Daniel Stone wrote:
> These codepaths were never called by anyone.  Shame there weren't more
> of them.
> 
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>


> ---
>  xkb/XKBGAlloc.c |  128 -------------------------------------------------------
>  xkb/xkbgeom.h   |   17 -------
>  2 files changed, 0 insertions(+), 145 deletions(-)
> 
> diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
> index dd2b046..1802a12 100644
> --- a/xkb/XKBGAlloc.c
> +++ b/xkb/XKBGAlloc.c
> @@ -260,50 +260,6 @@ XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll)
>  
>  /***====================================================================***/
>  
> -static void
> -_XkbClearOverlayRow(char *row_in)
> -{
> -XkbOverlayRowPtr	row= (XkbOverlayRowPtr)row_in;
> -
> -    if (row->keys!=NULL)
> -	XkbFreeGeomOverlayKeys(row,0,row->num_keys,TRUE);
> -    return;
> -}
> -
> -void
> -XkbFreeGeomOverlayRows(XkbOverlayPtr overlay,int first,int count,Bool freeAll)
> -{
> -    _XkbFreeGeomNonLeafElems(freeAll,first,count,
> -				&overlay->num_rows,&overlay->sz_rows,
> -				(char **)&overlay->rows,
> -				sizeof(XkbOverlayRowRec),_XkbClearOverlayRow);
> -    return;
> -}
> -
> -/***====================================================================***/
> -
> -static void
> -_XkbClearOverlay(char *overlay_in)
> -{
> -XkbOverlayPtr	overlay= (XkbOverlayPtr)overlay_in;
> -
> -    if (overlay->rows!=NULL)
> -	XkbFreeGeomOverlayRows(overlay,0,overlay->num_rows,TRUE);
> -    return;
> -}
> -
> -void
> -XkbFreeGeomOverlays(XkbSectionPtr section,int first,int	count,Bool freeAll)
> -{
> -    _XkbFreeGeomNonLeafElems(freeAll,first,count,
> -				&section->num_overlays,&section->sz_overlays,
> -				(char **)&section->overlays,
> -				sizeof(XkbOverlayRec),_XkbClearOverlay);
> -    return;
> -}
> -
> -/***====================================================================***/
> -
>  void
>  XkbFreeGeomKeys(XkbRowPtr row,int first,int count,Bool freeAll)
>  {
> @@ -554,90 +510,6 @@ _XkbGeomAlloc(	void **		old,
>  #define	_XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\
>  				&(r)->num_keys,&(r)->sz_keys,\
>  				(n),sizeof(XkbOverlayKeyRec))
> -    
> -Status
> -XkbAllocGeomProps(XkbGeometryPtr geom,int nProps)
> -{
> -    return _XkbAllocProps(geom,nProps);
> -}
> -
> -Status
> -XkbAllocGeomColors(XkbGeometryPtr geom,int nColors)
> -{
> -    return _XkbAllocColors(geom,nColors);
> -}
> -
> -Status
> -XkbAllocGeomKeyAliases(XkbGeometryPtr geom,int nKeyAliases)
> -{
> -    return _XkbAllocKeyAliases(geom,nKeyAliases);
> -}
> -
> -Status
> -XkbAllocGeomShapes(XkbGeometryPtr geom,int nShapes)
> -{
> -    return _XkbAllocShapes(geom,nShapes);
> -}
> -
> -Status
> -XkbAllocGeomSections(XkbGeometryPtr geom,int nSections)
> -{
> -    return _XkbAllocSections(geom,nSections);
> -}
> -
> -Status
> -XkbAllocGeomOverlays(XkbSectionPtr section,int nOverlays)
> -{
> -    return _XkbAllocOverlays(section,nOverlays);
> -}
> -
> -Status
> -XkbAllocGeomOverlayRows(XkbOverlayPtr overlay,int nRows)
> -{
> -    return _XkbAllocOverlayRows(overlay,nRows);
> -}
> -
> -Status
> -XkbAllocGeomOverlayKeys(XkbOverlayRowPtr row,int nKeys)
> -{
> -    return _XkbAllocOverlayKeys(row,nKeys);
> -}
> -
> -Status
> -XkbAllocGeomDoodads(XkbGeometryPtr geom,int nDoodads)
> -{
> -    return _XkbAllocDoodads(geom,nDoodads);
> -}
> -
> -Status
> -XkbAllocGeomSectionDoodads(XkbSectionPtr section,int nDoodads)
> -{
> -    return _XkbAllocDoodads(section,nDoodads);
> -}
> -
> -Status
> -XkbAllocGeomOutlines(XkbShapePtr shape,int nOL)
> -{
> -    return _XkbAllocOutlines(shape,nOL);
> -}
> -
> -Status
> -XkbAllocGeomRows(XkbSectionPtr section,int nRows)
> -{
> -    return _XkbAllocRows(section,nRows);
> -}
> -
> -Status
> -XkbAllocGeomPoints(XkbOutlinePtr ol,int nPts)
> -{
> -    return _XkbAllocPoints(ol,nPts);
> -}
> -
> -Status
> -XkbAllocGeomKeys(XkbRowPtr row,int nKeys)
> -{
> -    return _XkbAllocKeys(row,nKeys);
> -}
>  
>  Status
>  XkbAllocGeometry(XkbDescPtr xkb,XkbGeometrySizesPtr sizes)
> diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h
> index d10b956..d4a5234 100644
> --- a/xkb/xkbgeom.h
> +++ b/xkb/xkbgeom.h
> @@ -41,28 +41,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #define XkbAddGeomRow			SrvXkbAddGeomRow
>  #define XkbAddGeomSection		SrvXkbAddGeomSection
>  #define XkbAddGeomShape			SrvXkbAddGeomShape
> -#define XkbAllocGeomKeyAliases		SrvXkbAllocGeomKeyAliases
> -#define XkbAllocGeomColors		SrvXkbAllocGeomColors
> -#define XkbAllocGeomDoodads		SrvXkbAllocGeomDoodads
> -#define XkbAllocGeomKeys		SrvXkbAllocGeomKeys
> -#define XkbAllocGeomOutlines		SrvXkbAllocGeomOutlines
> -#define XkbAllocGeomPoints		SrvXkbAllocGeomPoints
> -#define XkbAllocGeomProps		SrvXkbAllocGeomProps
> -#define XkbAllocGeomRows		SrvXkbAllocGeomRows
> -#define XkbAllocGeomSectionDoodads	SrvXkbAllocGeomSectionDoodads
> -#define XkbAllocGeomSections		SrvXkbAllocGeomSections
> -#define	XkbAllocGeomOverlays		SrvXkbAllocGeomOverlays
> -#define	XkbAllocGeomOverlayRows		SrvXkbAllocGeomOverlayRows
> -#define	XkbAllocGeomOverlayKeys		SrvXkbAllocGeomOverlayKeys
> -#define XkbAllocGeomShapes		SrvXkbAllocGeomShapes
>  #define XkbAllocGeometry		SrvXkbAllocGeometry
>  #define XkbFreeGeomKeyAliases		SrvXkbFreeGeomKeyAliases
>  #define XkbFreeGeomColors		SrvXkbFreeGeomColors
>  #define XkbFreeGeomDoodads		SrvXkbFreeGeomDoodads
>  #define XkbFreeGeomProperties		SrvXkbFreeGeomProperties
> -#define	XkbFreeGeomOverlayKeys		SrvXkbFreeGeomOverlayKeys
> -#define	XkbFreeGeomOverlayRows		SrvXkbFreeGeomOverlayRows
> -#define	XkbFreeGeomOverlays		SrvXkbFreeGeomOverlays
>  #define	XkbFreeGeomKeys			SrvXkbFreeGeomKeys
>  #define	XkbFreeGeomRows			SrvXkbFreeGeomRows
>  #define XkbFreeGeomSections		SrvXkbFreeGeomSections
> -- 
> 1.7.7.3
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 
Cheers,
  Peter


More information about the xorg-devel mailing list