summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);