From af287fb8ebcf33781839220494e60a320e283e2f Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 17 Nov 2001 04:26:08 +0000 Subject: [PATCH] - added strcasecmp() to WINGs (only on systems that don't have it) - removed some redundant includes of ../src/config.h where wconfig.h is also included --- ChangeLog | 1 + WINGs/ChangeLog | 8 ++++++++ WINGs/connection.c | 1 - WINGs/error.c | 2 -- WINGs/findfile.c | 2 -- WINGs/host.c | 2 -- WINGs/string.c | 15 +++++++++++++++ WINGs/userdefaults.c | 2 -- WINGs/wcolorpanel.c | 1 - 9 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3edb53ef..38a5da96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ Changes since version 0.70.0: - SIGTERM is now handled and saves the internal state before exiting (like SIGHUP and SIGINT already do). Now a "kill wmaker_pid" will exit cleanly saving dock/clip/session information on exit. +- added an internal strcasecmp() to WINGs (only on systems where's not present) Changes since version 0.65.1: diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 179d28f0..d275b0ae 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -1,3 +1,11 @@ +Changes since wmaker 0.70.0: +............................ + +- added an internal strcasecmp() (only on systems where is not present) +- removed some redundant includes of ../src/config.h when wconfig.h is + included too + + Changes since wmaker 0.65.0: ............................ diff --git a/WINGs/connection.c b/WINGs/connection.c index e83a72c3..882703bc 100644 --- a/WINGs/connection.c +++ b/WINGs/connection.c @@ -28,7 +28,6 @@ */ -#include "../src/config.h" #include "wconfig.h" #include diff --git a/WINGs/error.c b/WINGs/error.c index cd07fca4..9633cba8 100644 --- a/WINGs/error.c +++ b/WINGs/error.c @@ -19,8 +19,6 @@ */ -#include "../src/config.h" - #include "wconfig.h" #include diff --git a/WINGs/findfile.c b/WINGs/findfile.c index 4eb968fb..6c2e4b51 100644 --- a/WINGs/findfile.c +++ b/WINGs/findfile.c @@ -19,8 +19,6 @@ */ -#include "../src/config.h" - #include "wconfig.h" #include "WUtil.h" diff --git a/WINGs/host.c b/WINGs/host.c index 45c3544f..f464d4bc 100644 --- a/WINGs/host.c +++ b/WINGs/host.c @@ -19,8 +19,6 @@ */ -#include "../src/config.h" - #include "wconfig.h" #include diff --git a/WINGs/string.c b/WINGs/string.c index 83f30faa..d8d10fdd 100644 --- a/WINGs/string.c +++ b/WINGs/string.c @@ -1,4 +1,6 @@ +#include "wconfig.h" + #include #include #include @@ -217,4 +219,17 @@ wstrappend(char *dst, char *src) } +#ifndef HAVE_STRCASECMP +int +strcasecmp(const char *s1, const char *s2) +{ + while (*s1 && *s2 && (tolower(*s1)==tolower(*s2))) { + s1++; + s2++; + } + + return (tolower(*s1) - tolower(*s2)); +} +#endif + diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c index e29c8040..892d7f65 100644 --- a/WINGs/userdefaults.c +++ b/WINGs/userdefaults.c @@ -7,8 +7,6 @@ #include -#include "../src/config.h" - #include "wconfig.h" #include "WINGs.h" diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c index 2870434d..b51f6a52 100644 --- a/WINGs/wcolorpanel.c +++ b/WINGs/wcolorpanel.c @@ -24,7 +24,6 @@ * - Resizing */ -#include "../src/config.h" #include "wconfig.h" #include "WINGsP.h" #include -- 2.11.4.GIT