From 1aa739e3c3d1ce25cdebe285847c3c493756d5d6 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 3 Oct 2020 22:45:27 -0400 Subject: lua misc tweaks and cleanup checks button_status in rockev strpbrk_n custom implementation allows setting max search len in source string add some branch prediction where appropriate fix formatting in splash_scroller script Change-Id: Id5d8e9d83f4b3e361ccb67b403af8f9a8a31b8f0 --- apps/plugins/lua/strpbrk.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'apps/plugins/lua/strpbrk.c') diff --git a/apps/plugins/lua/strpbrk.c b/apps/plugins/lua/strpbrk.c index 1e0491f779..efa9cbd2bb 100644 --- a/apps/plugins/lua/strpbrk.c +++ b/apps/plugins/lua/strpbrk.c @@ -1,11 +1,17 @@ #include "rocklibc.h" #undef strpbrk -char *strpbrk(const char *s, const char *accept) { - register int i,l=strlen(accept); - for (; *s; s++) - for (i=0; i