projects
/
my-code
/
arm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added default logo font (taken from linux kernel source:
[my-code/arm.git]
/
betty
/
functions.c
diff --git
a/betty/functions.c
b/betty/functions.c
index
43dfebc
..
cc03941
100644
(file)
--- a/
betty/functions.c
+++ b/
betty/functions.c
@@
-11,16
+11,20
@@
* functions
*/
* 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) {
}
int strncmp(char *a,char *b,int n) {