change is_word() return type from char to bool.

Saves 52 bytes.
This commit is contained in:
René van Dorst
2026-05-17 21:12:57 +02:00
parent 3904daced7
commit b46cc2087f
+4 -4
View File
@@ -116,7 +116,7 @@ char strcmp(__xdata uint8_t *c, __code uint8_t * __xdata d)
} }
char is_word(__xdata uint8_t *xdata_str_p, __code uint8_t * __xdata code_str_p) bool is_word(__xdata uint8_t *xdata_str_p, __code uint8_t * __xdata code_str_p)
{ {
uint8_t u, c; uint8_t u, c;
@@ -126,12 +126,12 @@ char is_word(__xdata uint8_t *xdata_str_p, __code uint8_t * __xdata code_str_p)
if (c == '\0') { if (c == '\0') {
if (u != '\0' && u != ' ' && u != '\t' && u != ':' && u != '?' && u != '=' && u != '\n' && u != '\r') if (u != '\0' && u != ' ' && u != '\t' && u != ':' && u != '?' && u != '=' && u != '\n' && u != '\r')
return 0; return false;
return 1; return true;
} }
if (c != u) { if (c != u) {
return 0; return false;
} }
} }
} }