mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
change is_word() return type from char to bool.
Saves 52 bytes.
This commit is contained in:
1 parent
3904daced7
commit
b46cc2087f
1 file changed
+4
-4
+4
-4
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user