diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-04 18:31:59 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-04 21:12:12 +0900 |
commit | 1e4fe94fcf03e933af64681bbda8aba22724679d (patch) | |
tree | c6d5c47248d87408706e520231258f3e6af3db7e /src/onecanvas.c | |
parent | 36afce6e3c868cf3b7d348b0a6f251898888d931 (diff) | |
download | libr-r14.1.4.tar.gz libr-r14.1.4.zip |
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 090b467fe2ab0274cee1e20b46fc1eec05f40bb8)
Diffstat (limited to 'src/onecanvas.c')
-rw-r--r-- | src/onecanvas.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/onecanvas.c b/src/onecanvas.c index e53ece7..ba80175 100644 --- a/src/onecanvas.c +++ b/src/onecanvas.c @@ -28,11 +28,9 @@ #include <string.h> #include <math.h> #include <stdlib.h> +#include <stdbool.h> #include <time.h> -#define FALSE 0 -#define TRUE 1 - typedef struct { double x; double y; @@ -115,7 +113,7 @@ static inline char *xml_getTagName(char *c) static inline char *xml_getTagAttributePtr(char *c, char *attrname) { char *end, *name; - int found; + bool found = false; if(++c == NULL) return NULL; @@ -138,7 +136,7 @@ static inline char *xml_getTagAttributePtr(char *c, char *attrname) continue; if(strncasecmp(attrname, name, name_len) == 0) { - found = TRUE; + found = true; break; } } @@ -212,15 +210,15 @@ static inline char *xml_idMatchStart(char *stream_pos, char *layer_name) * Match the entirety of an XML tag by "id" (preferred) or Inkscape's * label (undesireable but acceptable). */ -static inline int xml_idMatch(char *stream_pos, char *layer_name) +static inline bool xml_idMatch(char *stream_pos, char *layer_name) { char *id_acceptable = xml_getTagAttribute(stream_pos, "inkscape:label"); char *id_preferred = xml_getTagAttribute(stream_pos, "id"); - int ret = FALSE; + bool ret = false; if((id_preferred && strcasecmp(id_preferred, layer_name) == 0) || (id_acceptable && strcasecmp(id_acceptable, layer_name) == 0)) - ret = TRUE; + ret = true; free(id_acceptable); free(id_preferred); return ret; @@ -443,4 +441,4 @@ char *onecanvas_geticon_bysize(char *icon_data, int requested_size) free(info.iconlist[i]); free(info.iconlist); return ret; -}
\ No newline at end of file +} |