summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2008-05-04 12:26:23 +0000
committerpjrm <pjrm@users.sourceforge.net>2008-05-04 12:26:23 +0000
commit01aead01976b89ec9cb822a186473c99dcd8c3ff (patch)
tree7279d612b144195d10a13e22ae40b5afd4bbe1cc
parentnoop: Address string-literal-to-char* warning. (diff)
downloadinkscape-01aead01976b89ec9cb822a186473c99dcd8c3ff.tar.gz
inkscape-01aead01976b89ec9cb822a186473c99dcd8c3ff.zip
Address string-literal-to-char* warning: Make gm_read_error global var point to const char.
(bzr r5597)
-rw-r--r--src/trace/potrace/greymap.cpp10
-rw-r--r--src/trace/potrace/greymap.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/trace/potrace/greymap.cpp b/src/trace/potrace/greymap.cpp
index 53c703aa4..646ecc3a5 100644
--- a/src/trace/potrace/greymap.cpp
+++ b/src/trace/potrace/greymap.cpp
@@ -161,16 +161,16 @@ static int readbit(FILE *f) {
/* ---------------------------------------------------------------------- */
-/* read a PNM stream: P1-P6 format (see pnm(5)), or a BMP stream, and
+char const *gm_read_error = NULL;
+
+/** Read a PNM stream: P1-P6 format (see pnm(5)), or a BMP stream, and
convert the output to a greymap. Return greymap in *gmp. Return 0
on success, -1 on error with errno set, -2 on bad file format (with
error message in gm_read_error), and 1 on premature end of file, -3
on empty file (including files with only whitespace and comments),
-4 if wrong magic number. If the return value is >=0, *gmp is
- valid. */
-
-char *gm_read_error = NULL;
-
+ valid.
+ */
int gm_read(FILE *f, greymap_t **gmp) {
int magic[2];
diff --git a/src/trace/potrace/greymap.h b/src/trace/potrace/greymap.h
index 05e01667d..059fec4e4 100644
--- a/src/trace/potrace/greymap.h
+++ b/src/trace/potrace/greymap.h
@@ -45,7 +45,7 @@ typedef struct greymap_s greymap_t;
#define GM_MODE_POSITIVE 3
#define GM_MODE_NEGATIVE 4
-extern char *gm_read_error;
+extern char const *gm_read_error;
greymap_t *gm_new(int w, int h);
greymap_t *gm_dup(greymap_t *gm);