summaryrefslogtreecommitdiff
path: root/str_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'str_start.c')
-rw-r--r--str_start.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/str_start.c b/str_start.c
new file mode 100644
index 0000000..2750af8
--- /dev/null
+++ b/str_start.c
@@ -0,0 +1,15 @@
+#include "str.h"
+
+int str_start(s,t)
+register char *s;
+register char *t;
+{
+ register char x;
+
+ for (;;) {
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ }
+}