Module Name:    xsrc
Committed By:   christos
Date:           Tue Sep 22 18:33:41 UTC 2015

Modified Files:
        xsrc/external/mit/twm/dist/src: util.c util.h

Log Message:
constify to fix build (with minimal changes)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/twm/dist/src/util.c
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/twm/dist/src/util.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/twm/dist/src/util.c
diff -u xsrc/external/mit/twm/dist/src/util.c:1.2 xsrc/external/mit/twm/dist/src/util.c:1.3
--- xsrc/external/mit/twm/dist/src/util.c:1.2	Wed Oct  1 05:56:39 2014
+++ xsrc/external/mit/twm/dist/src/util.c	Tue Sep 22 14:33:41 2015
@@ -256,11 +256,11 @@ Zoom(Window wf, Window wt)
  *  \param name  the filename to expand
  */
 char *
-ExpandFilename(char *name)
+ExpandFilename(const char *name)
 {
     char *newname;
 
-    if (name[0] != '~') return name;
+    if (name[0] != '~') return strdup(name);
 
     newname = malloc (HomeLen + strlen(name) + 2);
     if (!newname) {

Index: xsrc/external/mit/twm/dist/src/util.h
diff -u xsrc/external/mit/twm/dist/src/util.h:1.1.1.4 xsrc/external/mit/twm/dist/src/util.h:1.2
--- xsrc/external/mit/twm/dist/src/util.h:1.1.1.4	Mon Mar 17 04:48:43 2014
+++ xsrc/external/mit/twm/dist/src/util.h	Tue Sep 22 14:33:41 2015
@@ -64,7 +64,7 @@ in this Software without prior written a
 extern void MoveOutline ( Window root, int x, int y, int width, int height,
 			  int bw, int th );
 extern void Zoom ( Window wf, Window wt );
-extern char * ExpandFilename ( char *name );
+extern char * ExpandFilename ( const char *name );
 extern void GetUnknownIcon ( const char *name );
 extern Pixmap FindBitmap ( const char *name, unsigned int *widthp,
 			   unsigned int *heightp );

Reply via email to