w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 972766ca9d0c37f20708766d906249478a83a2bb
parent dfe51e46ef34c64cf1372e34a51fb4e8529ba930
Author: ukai <ukai>
Date:   Mon, 10 Dec 2001 15:27:58 +0000

[w3m-dev 02648] rewrite strCmp() with strcmp()
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 5+++++
Mindep.c | 9+--------
2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2001-12-11 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 02648] rewrite strCmp() with strcmp() + * indep.c (strCmp): use strcmp() + 2001-12-11 Kiyokazu SUTO <suto@ks-and-ks.ne.jp> * [w3m-dev 02441] A patch against functions *_(un)?quote() diff --git a/indep.c b/indep.c @@ -33,14 +33,7 @@ allocStr(const char *s, int len) int strCmp(const void *s1, const void *s2) { - unsigned char *p1 = *(unsigned char **)s1; - unsigned char *p2 = *(unsigned char **)s2; - - while ((*p1 != '\0') && (*p1 == *p2)) { - p1++; - p2++; - } - return (*p1 - *p2); + return strcmp(*(const char **)s1, *(const char **)s2); } char *