Patch from Bernhard R Link for const correctness of strings
4 files changed, 10 insertions(+), 9 deletions(-)

M Manager.C
M Manager.h
M Rotated.C
M Rotated.h
M Manager.C +1 -1
@@ 312,7 312,7 @@ void WindowManager::initialiseScreen()
 }
 
 
-unsigned long WindowManager::allocateColour(char *name, char *desc)
+unsigned long WindowManager::allocateColour(const char *name, const char *desc)
 {
     XColor nearest, ideal;
 

          
M Manager.h +1 -1
@@ 40,7 40,7 @@ public:
     void installCursor(RootCursor);
     void installCursorOnWindow(RootCursor, Window);
     void installColormap(Colormap);
-    unsigned long allocateColour(char *, char *);
+    unsigned long allocateColour(const char *, const char *);
 
     void considerFocusChange(Client *, Window, Time timestamp);
     void stopConsideringFocus();

          
M Rotated.C +7 -6
@@ 28,8 28,8 @@ 
 
 int xv_errno;
 
-static char *my_strdup(char *);
-static char *my_strtok(char *, char *);
+static char *my_strdup(const char *);
+static char *my_strtok(char *, const char *);
 
 
 /* ---------------------------------------------------------------------- */  

          
@@ 37,7 37,7 @@ static char *my_strtok(char *, char *);
 
 /* *** Routine to mimic `strdup()' (some machines don't have it) *** */
 
-static char *my_strdup(char *str)
+static char *my_strdup(const char *str)
 {
   char *s;
 

          
@@ 61,7 61,7 @@ static char *my_strdup(char *str)
 /* *** Routine to replace `strtok' : this one returns a zero
        length string if it encounters two consecutive delimiters *** */
 
-static char *my_strtok(char *str1, char *str2)
+static char *my_strtok(char *str1, const char *str2)
 {
   char *ret;
   size_t i, j, stop;

          
@@ 121,7 121,7 @@ float XRotVersion(char *str, int n)
 
 /* *** Load the rotated version of a given font *** */
  
-XRotFontStruct *XRotLoadFont(Display *dpy, char *fontname, float angle)
+XRotFontStruct *XRotLoadFont(Display *dpy, const char *fontname, float angle)
 {
   char val;
   XImage *I1, *I2;

          
@@ 470,7 470,8 @@ void XRotDrawAlignedString(Display *dpy,
   int xp = 0, yp = 0, dir;
   size_t i;
   int nl = 1, max_width = 0, this_width;
-  char *str1, *str2 = "\n\0", *str3;
+  char *str1, *str3;
+  const char *str2 = "\n\0";
 
   if (text == NULL) 
     return;

          
M Rotated.h +1 -1
@@ 58,7 58,7 @@ struct XRotFontStruct {
 
 
 extern float XRotVersion(char *, int);
-extern XRotFontStruct *XRotLoadFont(Display *, char *, float);
+extern XRotFontStruct *XRotLoadFont(Display *, const char *, float);
 extern void XRotUnloadFont(Display *, XRotFontStruct *);
 extern int XRotTextWidth(XRotFontStruct *, char *, int);
 extern void XRotDrawString(Display *, XRotFontStruct *, Drawable, GC,