]> granicus.if.org Git - graphviz/commitdiff
mapbool: take a 'const char*' parameter instead of 'char*'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 10 Jan 2022 00:44:32 +0000 (16:44 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 10 Jan 2022 15:51:35 +0000 (07:51 -0800)
This parameter is not modified internally.

lib/common/utils.c
lib/common/utils.h
lib/gvc/gvrender.c
plugin/gd/gvrender_gd.c

index 59dedf4538183a6db4f9091567c932c729f64ec2..a3ed4e0b0749290a320b84c38d4a4827bbcb27d5 100644 (file)
@@ -460,7 +460,7 @@ bool mapBool(const char *p, bool dflt)
        return dflt;
 }
 
-bool mapbool(char *p)
+bool mapbool(const char *p)
 {
     return mapBool(p, false);
 }
index 24bbd39548120143a0697733689f9cd0c310a651..713af4ab63a8d353a91062f4be446968e44bfa85 100644 (file)
@@ -89,7 +89,7 @@ UTILS_API char *Fgets(FILE *fp);
 UTILS_API const char *safefile(const char *filename);
 
 UTILS_API bool mapBool(const char*, bool);
-UTILS_API bool mapbool(char *);
+UTILS_API bool mapbool(const char*);
 UTILS_API int maptoken(char *, char **, int *);
 
 UTILS_API bool findStopColor(char *colorlist, char *clrs[2], float *frac);
index 6e80b5fd4aed883735074e1a7dc4a4adb6977ce1..e6c057ec6e710c40912359b532e57914e878af5f 100644 (file)
@@ -33,7 +33,7 @@
 
 extern int emit_once(char *str);
 extern shape_desc *find_user_shape(char *name);
-extern bool mapbool(char *s);
+extern bool mapbool(const char *s);
 
 int gvrender_select(GVJ_t * job, const char *str)
 {
index c536b20fb49d3ca82280e145966f34f77b3ae212..b90c7529173c3a84629a2e4456e0cb6cd833c7ca 100644 (file)
@@ -33,7 +33,7 @@ typedef enum {
        FORMAT_XBM,
 } format_type;
 
-extern bool mapbool(char *);
+extern bool mapbool(const char *);
 extern pointf Bezier(pointf * V, int degree, double t, pointf * Left, pointf * Right);
 
 #define BEZIERSUBDIVISION 10