diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-10-14 21:22:26 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-10-14 21:22:26 -0700 |
commit | 64eacd3665306283d126d0df7cf63a071e576c38 (patch) | |
tree | ce66de2e26c9a32eb1baf7e6330439191b9804ca | |
parent | ca7bf97b6e83b25e7142b321e5f2325b1e47c2d0 (diff) |
Constify filename string handling
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | Bitmap.c | 20 | ||||
-rw-r--r-- | Bitmap.h | 10 |
2 files changed, 16 insertions, 14 deletions
@@ -644,10 +644,11 @@ BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc, #endif static String -StripFilename(String filename) +StripFilename(_Xconst _XtString filename) { - char *begin = strrchr(filename, '/'); - char *end, *result; + const char *begin = strrchr(filename, '/'); + const char *end; + char *result; int length; if (filename) { @@ -664,7 +665,8 @@ StripFilename(String filename) } static int -XmuWriteBitmapDataToFile(String filename, String basename, +XmuWriteBitmapDataToFile(_Xconst _XtString filename, + _Xconst _XtString basename, int width, int height, char *datap, int x_hot, int y_hot) { @@ -993,7 +995,7 @@ FixMark(BitmapWidget BW) /* ARGSUSED */ int -BWStoreFile(Widget w, String filename, String *basename) +BWStoreFile(Widget w, _Xconst _XtString filename, _Xconst _XtString *basename) { BitmapWidget BW = (BitmapWidget) w; int status; @@ -1032,7 +1034,7 @@ BWUnparseStatus(Widget w) } void -BWChangeFilename(Widget w, String str) +BWChangeFilename(Widget w, _Xconst _XtString str) { BitmapWidget BW = (BitmapWidget) w; @@ -1043,7 +1045,7 @@ BWChangeFilename(Widget w, String str) } void -BWChangeBasename(Widget w, String str) +BWChangeBasename(Widget w, _Xconst _XtString str) { BitmapWidget BW = (BitmapWidget) w; @@ -1055,7 +1057,7 @@ BWChangeBasename(Widget w, String str) int -BWReadFile(Widget w, String filename, String basename) /* ARGSUSED */ +BWReadFile(Widget w, _Xconst _XtString filename, _Xconst _XtString basename) /* ARGSUSED */ { BitmapWidget BW = (BitmapWidget) w; int status; @@ -1152,7 +1154,7 @@ BWSetImage(Widget w, XImage *image) #endif int -BWWriteFile(Widget w, String filename, String basename) +BWWriteFile(Widget w, _Xconst _XtString filename, _Xconst _XtString basename) { BitmapWidget BW = (BitmapWidget) w; char *data; @@ -224,12 +224,12 @@ extern void BWGrabSelection ( Widget w, Time btime ); extern void BWRequestSelection ( Widget w, Time btime, Boolean wait ); extern void BWSetChanged ( Widget w ); extern Boolean BWQueryChanged ( Widget w ); -extern int BWReadFile ( Widget w, String filename, String basename ); -extern int BWWriteFile ( Widget w, String filename, String basename ); +extern int BWReadFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename ); +extern int BWWriteFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename ); extern String BWUnparseStatus ( Widget w ); extern String BWGetFilename ( Widget w, String *str ); extern String BWGetBasename ( Widget w, String *str ); -extern void BWChangeBasename ( Widget w, String str ); +extern void BWChangeBasename ( Widget w, _Xconst _XtString str ); extern void BWRemoveAllRequests ( Widget w ); extern void BWClearHotSpot ( Widget w ); extern Boolean BWQueryMarked ( Widget w ); @@ -264,10 +264,10 @@ extern Boolean BWQueryDashed ( Widget w ); extern Boolean BWQueryProportional ( Widget w ); extern void BWSwitchProportional ( Widget w ); extern void BWDrawGrid ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y ); -extern void BWChangeFilename ( Widget w, String str ); +extern void BWChangeFilename ( Widget w, _Xconst _XtString str ); extern Boolean BWParseSize ( String size, Dimension *width, Dimension *height ); extern Boolean BWQuerySelection ( Widget w, Time btime ); -extern int BWStoreFile ( Widget w, String filename, String *basename ); +extern int BWStoreFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString *basename ); extern void BWNotify ( Widget w, XtActionProc proc ); extern void BWTMark ( Widget w, XEvent *event, String *params, Cardinal *num_params ); extern void BWTMarkAll ( Widget w, XEvent *event, String *params, Cardinal *num_params ); |