diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-11-08 14:01:58 +0100 |
---|---|---|
committer | Mitch Bradley <wmb@firmworks.com> | 2019-11-08 07:30:53 -1000 |
commit | 345f3c825467697a114da9dd1ad70b6797ba0da8 (patch) | |
tree | ab3d6d99df5f8170af9556411cb839574c0a4450 | |
parent | acf7e90694d9e6b52d1f56af2eeacfe8794bbe2b (diff) | |
download | cforth-345f3c825467697a114da9dd1ad70b6797ba0da8.tar.gz |
arm-xo-1.75: implement strlen()
Fixes build:
Linking cforth.elf ...
arm-none-eabi-ld: tembed.o: in function `complete_word':
/home/lkundrak/src/cforth/build/arm-xo-1.75/../../src/cforth/lineedit.c:307: undefined reference to `strlen'
arm-none-eabi-ld: tembed.o: in function `propose_word':
/home/lkundrak/src/cforth/build/arm-xo-1.75/../../src/cforth/lineedit.c:349: undefined reference to `strlen'
make: *** [../../src/platform/arm-xo-1.75/targets.mk:60: cforth.elf] Error 1
-rw-r--r-- | src/platform/arm-xo-1.75/consoleio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platform/arm-xo-1.75/consoleio.c b/src/platform/arm-xo-1.75/consoleio.c index dee7ad9..7a2845b 100644 --- a/src/platform/arm-xo-1.75/consoleio.c +++ b/src/platform/arm-xo-1.75/consoleio.c @@ -1118,3 +1118,11 @@ void gamekey_handle(int is_timer) sched_debounce(); } } + +int strlen(const char *s) +{ + const char *p; + for (p=s; *p != '\0'; *p++) { + } + return p-s; +} |