Update of /cvsroot/blob/blob/include
In directory usw-pr-cvs1:/tmp/cvs-serv6125/include
Modified Files:
util.h
Log Message:
Cleanup: s/MyStrNCmp/strncmp/
Also had to add -fno-builtin to the compiler flags cause strncmp seems to be
a builtin function in gcc-3.0.
Index: util.h
===================================================================
RCS file: /cvsroot/blob/blob/include/util.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- util.h 2001/08/06 22:44:52 1.2
+++ util.h 2001/09/16 15:44:00 1.3
@@ -40,10 +40,15 @@
void MyMemCpy(u32 *dest, const u32 *src, int numWords);
void MyMemCpyChar(char *dest, const char *src, int numBytes);
void MyMemSet(u32 *dest, const u32 wordToWrite, int numWords);
-int MyStrNCmp(const char *s1, const char *s2, int maxlen);
-int MyToUpper(int c);
-int MyToLower(int c);
+int strncmp(const char *s1, const char *s2, int maxlen);
+
+static inline int strcmp(const char *s1, const char *s2)
+{
+ /* 1024 should be long enough for strings in blob */
+ return strncmp(s1, s2, 1024);
+}
+
int strlen(const char *s);
char *strcpy(char *dest, const char *src);
|