added filter to create Xlib wrappers

its nice what you can do with a little bit of regex magic:

mark your Xlib declaration from Xlib.h in vim:

extern int XClearArea(
    Display*            /* display */,
    Window              /* w */,
    int                 /* x */,
    int                 /* y */,
    unsigned int        /* width */,
    unsigned int        /* height */,
    Bool                /* exposures */
);

and do the trick:
:'<,'>!./xwrap

and this is the result:

int XClearArea(Display *display, Window w, int x, int y, unsigned int width, uns
{
	static int (*real_XClearArea)(Display *, Window, int, int, unsigned int,
	if (!real_XClearArea)
		real_XClearArea = dlsym(RTLD_NEXT, "XClearArea");
	fprintf(stderr, "XClearArea\n");
	return real_XClearArea(display, w, x, y, width, height, exposures);
}