diff options
author | Christophe CURIS <christophe.curis@free.fr> | 2013-05-01 10:39:38 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-05-31 18:10:02 -0700 |
commit | e439f6e7163e3259f11f3363fa319e8a29085a92 (patch) | |
tree | 6e882d910e295d327c1a9824ee62c60ba78cd6dd /src | |
parent | 01ee6b9c500cd9c67f167e68c8383e8c58db5ddf (diff) |
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 <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/RdFToBuf.c | 2 | ||||
-rw-r--r-- | src/RdFToDat.c | 2 | ||||
-rw-r--r-- | src/RdFToI.c | 4 | ||||
-rw-r--r-- | src/RdFToP.c | 2 | ||||
-rw-r--r-- | src/WrFFrBuf.c | 2 | ||||
-rw-r--r-- | src/WrFFrDat.c | 2 | ||||
-rw-r--r-- | src/WrFFrI.c | 4 | ||||
-rw-r--r-- | src/WrFFrP.c | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/src/RdFToBuf.c b/src/RdFToBuf.c index 8501d23..7f8ebee 100644 --- a/src/RdFToBuf.c +++ b/src/RdFToBuf.c @@ -60,7 +60,7 @@ int XpmReadFileToBuffer( - char *filename, + const char *filename, char **buffer_return) { int fd, fcheck; diff --git a/src/RdFToDat.c b/src/RdFToDat.c index 87f7f1e..fa92bd4 100644 --- a/src/RdFToDat.c +++ b/src/RdFToDat.c @@ -39,7 +39,7 @@ int XpmReadFileToData( - char *filename, + const char *filename, char ***data_return) { XpmImage image; diff --git a/src/RdFToI.c b/src/RdFToI.c index 83340a6..bd09611 100644 --- a/src/RdFToI.c +++ b/src/RdFToI.c @@ -61,7 +61,7 @@ FUNC(xpmPipeThrough, FILE*, (int fd, int XpmReadFileToImage( Display *display, - char *filename, + const char *filename, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes) @@ -104,7 +104,7 @@ XpmReadFileToImage( int XpmReadFileToXpmImage( - char *filename, + const char *filename, XpmImage *image, XpmInfo *info) { diff --git a/src/RdFToP.c b/src/RdFToP.c index bacedda..f829757 100644 --- a/src/RdFToP.c +++ b/src/RdFToP.c @@ -41,7 +41,7 @@ int XpmReadFileToPixmap( Display *display, Drawable d, - char *filename, + const char *filename, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes) diff --git a/src/WrFFrBuf.c b/src/WrFFrBuf.c index bd1c45b..b80aa62 100644 --- a/src/WrFFrBuf.c +++ b/src/WrFFrBuf.c @@ -41,7 +41,7 @@ int XpmWriteFileFromBuffer( - char *filename, + const char *filename, char *buffer) { int fcheck, len; diff --git a/src/WrFFrDat.c b/src/WrFFrDat.c index dc738b9..3f40c84 100644 --- a/src/WrFFrDat.c +++ b/src/WrFFrDat.c @@ -39,7 +39,7 @@ int XpmWriteFileFromData( - char *filename, + const char *filename, char **data) { XpmImage image; diff --git a/src/WrFFrI.c b/src/WrFFrI.c index bf47481..4bcaba7 100644 --- a/src/WrFFrI.c +++ b/src/WrFFrI.c @@ -69,7 +69,7 @@ LFUNC(xpmDataClose, void, (xpmData *mdata)); int XpmWriteFileFromImage( Display *display, - char *filename, + const char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes) @@ -99,7 +99,7 @@ XpmWriteFileFromImage( int XpmWriteFileFromXpmImage( - char *filename, + const char *filename, XpmImage *image, XpmInfo *info) { diff --git a/src/WrFFrP.c b/src/WrFFrP.c index 497ba56..078ea2f 100644 --- a/src/WrFFrP.c +++ b/src/WrFFrP.c @@ -40,7 +40,7 @@ int XpmWriteFileFromPixmap( Display *display, - char *filename, + const char *filename, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes) |