From e439f6e7163e3259f11f3363fa319e8a29085a92 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Wed, 1 May 2013 10:39:38 +0200 Subject: Added 'const' attribute to all filename arguments in the API The filename is always a read-only argument, so it is a good idea to let the caller now about it. This patch does not change active code; the place where the attribute is added will not break source-level compatibility because it adds no restriction on caller side, just adds information; because the lib code behaved the same way it will not break the binary interface either. Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith --- include/X11/xpm.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/X11/xpm.h b/include/X11/xpm.h index 38c62d8..f108f1f 100644 --- a/include/X11/xpm.h +++ b/include/X11/xpm.h @@ -304,13 +304,13 @@ _XFUNCPROTOBEGIN FUNC(XpmReadFileToPixmap, int, (Display *display, Drawable d, - char *filename, + const char *filename, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmWriteFileFromPixmap, int, (Display *display, - char *filename, + const char *filename, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); @@ -329,13 +329,13 @@ _XFUNCPROTOBEGIN XpmAttributes *attributes)); FUNC(XpmReadFileToImage, int, (Display *display, - char *filename, + const char *filename, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)); FUNC(XpmWriteFileFromImage, int, (Display *display, - char *filename, + const char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); @@ -365,11 +365,11 @@ _XFUNCPROTOBEGIN Pixmap shapemask, XpmAttributes *attributes)); #endif - FUNC(XpmReadFileToBuffer, int, (char *filename, char **buffer_return)); - FUNC(XpmWriteFileFromBuffer, int, (char *filename, char *buffer)); + FUNC(XpmReadFileToBuffer, int, (const char *filename, char **buffer_return)); + FUNC(XpmWriteFileFromBuffer, int, (const char *filename, char *buffer)); - FUNC(XpmReadFileToData, int, (char *filename, char ***data_return)); - FUNC(XpmWriteFileFromData, int, (char *filename, char **data)); + FUNC(XpmReadFileToData, int, (const char *filename, char ***data_return)); + FUNC(XpmWriteFileFromData, int, (const char *filename, char **data)); FUNC(XpmAttributesSize, int, (void)); FUNC(XpmFreeAttributes, void, (XpmAttributes *attributes)); @@ -382,11 +382,11 @@ _XFUNCPROTOBEGIN FUNC(XpmLibraryVersion, int, (void)); /* XpmImage functions */ - FUNC(XpmReadFileToXpmImage, int, (char *filename, + FUNC(XpmReadFileToXpmImage, int, (const char *filename, XpmImage *image, XpmInfo *info)); - FUNC(XpmWriteFileFromXpmImage, int, (char *filename, + FUNC(XpmWriteFileFromXpmImage, int, (const char *filename, XpmImage *image, XpmInfo *info)); #if !defined(FOR_MSW) && !defined(AMIGA) -- cgit v1.2.3