From: Christophe CURIS <christophe.cu...@free.fr>

---
 util/fontconv.c                 |   10 +++++-----
 util/getstyle.c                 |    6 +++---
 util/setstyle.c                 |    8 ++++----
 util/wmgenmenu.c                |    4 ++--
 util/wmmenugen.c                |    4 ++--
 util/wmmenugen_parse_wmconfig.c |    8 ++++----
 util/wmsetbg.c                  |   12 ++++++------
 util/wxpaste.c                  |    2 +-
 8 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/util/fontconv.c b/util/fontconv.c
index 9104ae5..962fb39 100644
--- a/util/fontconv.c
+++ b/util/fontconv.c
@@ -30,7 +30,7 @@ enum {
        CHARSET_ENCODING
 };
 
-static int countChar(char *str, char c)
+static int countChar(const char *str, char c)
 {
        int count = 0;
 
@@ -47,17 +47,17 @@ static int countChar(char *str, char c)
 }
 
 typedef struct str {
-       char *str;
+       const char *str;
        int len;
 } str;
 
 #define XLFD_TOKENS 14
 
-static str *getXLFDTokens(char *xlfd)
+static str *getXLFDTokens(const char *xlfd)
 {
        static str tokens[XLFD_TOKENS];
        int i, len, size;
-       char *ptr;
+       const char *ptr;
 
        /* XXX: why does this assume there can't ever be XFNextPrefix? */
        if (!xlfd || *xlfd != '-' || countChar(xlfd, '-') != XLFD_TOKENS)
@@ -135,7 +135,7 @@ static char *mapSlantToName(str * slant)
        }
 }
 
-char *xlfdToFc(char *xlfd, char *useFamily, Bool keepXLFD)
+char *xlfdToFc(const char *xlfd, const char *useFamily, Bool keepXLFD)
 {
        str *tokens, *family, *weight, *slant;
        char *name, buf[64];
diff --git a/util/getstyle.c b/util/getstyle.c
index 46c9792..b0679a6 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -152,7 +152,7 @@ void print_help(int print_usage, int exitval)
        exit(exitval);
 }
 
-static Bool isFontOption(char *option)
+static Bool isFontOption(const char *option)
 {
        int i;
 
@@ -165,7 +165,7 @@ static Bool isFontOption(char *option)
        return False;
 }
 
-void findCopyFile(char *dir, char *file)
+void findCopyFile(const char *dir, const char *file)
 {
        char *fullPath;
 
@@ -179,7 +179,7 @@ void findCopyFile(char *dir, char *file)
        free(fullPath);
 }
 
-void makeThemePack(WMPropList * style, char *themeName)
+void makeThemePack(WMPropList * style, const char *themeName)
 {
        WMPropList *keys;
        WMPropList *key;
diff --git a/util/setstyle.c b/util/setstyle.c
index 9c6e725..42b42f8 100644
--- a/util/setstyle.c
+++ b/util/setstyle.c
@@ -78,7 +78,7 @@ int ignoreCursors = 0;
 Display *dpy;
 
 
-static Bool isCursorOption(char *option)
+static Bool isCursorOption(const char *option)
 {
        int i;
 
@@ -91,7 +91,7 @@ static Bool isCursorOption(char *option)
        return False;
 }
 
-static Bool isFontOption(char *option)
+static Bool isFontOption(const char *option)
 {
        int i;
 
@@ -110,7 +110,7 @@ static Bool isFontOption(char *option)
  * that qualifies the external references to be absolute, possibly
  * pending further expansion
  */
-void hackPathInTexture(WMPropList * texture, char *prefix)
+void hackPathInTexture(WMPropList * texture, const char *prefix)
 {
        WMPropList *type;
        char *t;
@@ -158,7 +158,7 @@ void hackPathInTexture(WMPropList * texture, char *prefix)
        }
 }
 
-void hackPaths(WMPropList * style, char *prefix)
+void hackPaths(WMPropList * style, const char *prefix)
 {
        WMPropList *keys;
        WMPropList *key;
diff --git a/util/wmgenmenu.c b/util/wmgenmenu.c
index 002e025..0dc5810 100644
--- a/util/wmgenmenu.c
+++ b/util/wmgenmenu.c
@@ -21,7 +21,7 @@
 
 #include "wmgenmenu.h"
 
-static void find_and_write(char *group, char *list[][2], int 
this_is_terminals);
+static void find_and_write(const char *group, char *list[][2], int 
this_is_terminals);
 static void other_window_managers(void);
 static void print_help(int print_usage, int exitval);
 
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
  * - make sure previous menus of these levels are
  *   attached to their parent before calling
  */
-static void find_and_write(char *group, char *list[][2], int this_is_terminals)
+static void find_and_write(const char *group, char *list[][2], int 
this_is_terminals)
 {
        int i, argc;
        char *t, **argv, buf[PATH_MAX];
diff --git a/util/wmmenugen.c b/util/wmmenugen.c
index ac3846b..83d9b34 100644
--- a/util/wmmenugen.c
+++ b/util/wmmenugen.c
@@ -36,7 +36,7 @@ static void assemblePLMenuFunc(WMTreeNode *aNode, void *data);
 static int dirParseFunc(const char *filename, const struct stat *st, int 
tflags, struct FTW *ftw);
 static int menuSortFunc(const void *left, const void *right);
 static int nodeFindSubMenuByNameFunc(const void *item, const void *cdata);
-static WMTreeNode *findPositionInMenu(char *submenu);
+static WMTreeNode *findPositionInMenu(const char *submenu);
 static void (*parse)(const char *file, void 
(*addWMMenuEntryCallback)(WMMenuEntry *aEntry));
 static Bool (*validateFilename)(const char *filename, const struct stat *st, 
int tflags, struct FTW *ftw);
 
@@ -282,7 +282,7 @@ static int menuSortFunc(const void *left, const void *right)
 /* returns the leaf an entry with the submenu spec `submenu' attaches to.
  * creates `submenu' path (anchored to the root) along the way.
  */
-static WMTreeNode *findPositionInMenu(char *submenu)
+static WMTreeNode *findPositionInMenu(const char *submenu)
 {
        char *q;
        WMMenuEntry *wm;
diff --git a/util/wmmenugen_parse_wmconfig.c b/util/wmmenugen_parse_wmconfig.c
index 12fcb14..988e69d 100644
--- a/util/wmmenugen_parse_wmconfig.c
+++ b/util/wmmenugen_parse_wmconfig.c
@@ -44,7 +44,7 @@ typedef struct {
 } WMConfigMenuEntry;
 
 static Bool wmc_to_wm(WMConfigMenuEntry **wmc, WMMenuEntry **wm);
-static void parse_wmconfig_line(char **label, char **key, char **value, char 
*line);
+static void parse_wmconfig_line(char **label, char **key, char **value, const 
char *line);
 static void init_wmconfig_storage(WMConfigMenuEntry **wmc);
 
 void parse_wmconfig(const char *file, void 
(*addWMMenuEntryCallback)(WMMenuEntry *aEntry))
@@ -170,12 +170,12 @@ Bool wmconfig_validate_file(const char *filename, const 
struct stat *st, int tfl
 }
 
 /* get a line allocating label, key and value as necessary */
-static void parse_wmconfig_line(char **label, char **key, char **value, char 
*line)
+static void parse_wmconfig_line(char **label, char **key, char **value, const 
char *line)
 {
-       char *p;
+       const char *p;
        int kstart, kend;
 
-       p = (char *)line;
+       p = line;
        *label = *key = *value = NULL;
        kstart = kend = 0;
 
diff --git a/util/wmsetbg.c b/util/wmsetbg.c
index abbf6ff..31a6dd5 100644
--- a/util/wmsetbg.c
+++ b/util/wmsetbg.c
@@ -140,7 +140,7 @@ void initXinerama()
 #endif                         /* XINERAMA */
 }
 
-RImage *loadImage(RContext * rc, char *file)
+RImage *loadImage(RContext * rc, const char *file)
 {
        char *path;
        RImage *image;
@@ -974,7 +974,7 @@ void helperLoop(RContext * rc)
        }
 }
 
-void updateDomain(char *domain, char *key, char *texture)
+void updateDomain(const char *domain, const char *key, const char *texture)
 {
        char *program = "wdwrite";
 
@@ -986,7 +986,7 @@ void updateDomain(char *domain, char *key, char *texture)
        wwarning("warning could not run \"%s\"", program);
 }
 
-static WMPropList *getValueForKey(char *domain, char *keyName)
+static WMPropList *getValueForKey(const char *domain, const char *keyName)
 {
        char *path;
        WMPropList *key, *val, *d;
@@ -1043,7 +1043,7 @@ static WMPropList *getValueForKey(char *domain, char 
*keyName)
        return val;
 }
 
-char *getPixmapPath(char *domain)
+char *getPixmapPath(const char *domain)
 {
        WMPropList *val;
        char *ptr, *data;
@@ -1094,7 +1094,7 @@ char *getPixmapPath(char *domain)
        return data;
 }
 
-char *getFullPixmapPath(char *file)
+char *getFullPixmapPath(const char *file)
 {
        char *tmp;
 
@@ -1155,7 +1155,7 @@ void print_help()
        puts(" -h, --help                       show this help and exit");
 }
 
-void changeTextureForWorkspace(char *domain, char *texture, int workspace)
+void changeTextureForWorkspace(const char *domain, char *texture, int 
workspace)
 {
        WMPropList *array, *val;
        char *value;
diff --git a/util/wxpaste.c b/util/wxpaste.c
index bb8fe51..4acac0f 100644
--- a/util/wxpaste.c
+++ b/util/wxpaste.c
@@ -81,7 +81,7 @@ Time getTimestamp(Display * dpy, Window win)
        return ev.xproperty.time;
 }
 
-char *fetchSelection(Display * dpy, char *selection, char *progName)
+char *fetchSelection(Display * dpy, const char *selection, const char 
*progName)
 {
        Atom selatom = XInternAtom(dpy, selection, False);
        Atom clipatom = XInternAtom(dpy, "CLIPBOARD", False);
-- 
1.7.10.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to