summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/lib/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/firmware/lib/index.c')
-rw-r--r--src/target/firmware/lib/index.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/target/firmware/lib/index.c b/src/target/firmware/lib/index.c
new file mode 100644
index 00000000..bb304c04
--- /dev/null
+++ b/src/target/firmware/lib/index.c
@@ -0,0 +1,12 @@
+char *
+index(p, ch)
+ register char *p, ch;
+{
+ for (;; ++p) {
+ if (*p == ch)
+ return(p);
+ if (!*p)
+ return((char *)0);
+ }
+ /* NOTREACHED */
+}