some more bullshit, hopefully this will work out even ...
[my-code/arm.git] / betty / functions.c
index 43dfebc..cc03941 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) {