]> www.hackdaworld.org Git - my-code/arm.git/blobdiff - betty/functions.c
some more bullshit, hopefully this will work out even ...
[my-code/arm.git] / betty / functions.c
index 43dfebc16b2856d2e81cd143520946720867e10c..cc03941f26a9dacb68581b63f061a50b1d6f3960 100644 (file)
  * functions
  */
 
-int strlen(char *string) {
+#define modulo(d,x,y)  (d)=(x); \
+                       while((d)>=(y)) \
+                               (d)-=(y);
 
-       int cnt;
+int strlen(char *s) {
 
-       cnt=0;
+       int n;
 
-       while(string[cnt])
-               cnt++;
+       n=0;
 
-       return cnt;
+       while(s[n])
+               n++;
+
+       return n;
 }
 
 int strncmp(char *a,char *b,int n) {