diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-03-27 11:02:35 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-03-27 11:02:35 +0000 |
commit | ce20021df73a4bcc8d390f93442ffcb8c81dbbdc (patch) | |
tree | 359cea35899c8b3941c0e2c8b0d9c50cba1c2e56 | |
parent | eb189092c761f0ba0485c4cd19477c0a578089f9 (diff) | |
download | netsurf-ce20021df73a4bcc8d390f93442ffcb8c81dbbdc.tar.gz netsurf-ce20021df73a4bcc8d390f93442ffcb8c81dbbdc.tar.bz2 |
Fix colour string matching. Lose unneeded case insensitivity in matching.
svn path=/trunk/netsurf/; revision=13739
-rw-r--r-- | amiga/system_colour.c | 4 | ||||
-rw-r--r-- | atari/system_colour.c | 4 | ||||
-rw-r--r-- | beos/system_colour.cpp | 6 | ||||
-rw-r--r-- | cocoa/system_colour.m | 4 | ||||
-rw-r--r-- | framebuffer/system_colour.c | 4 | ||||
-rw-r--r-- | gtk/system_colour.c | 4 | ||||
-rw-r--r-- | monkey/system_colour.c | 4 | ||||
-rw-r--r-- | riscos/system_colour.c | 4 | ||||
-rw-r--r-- | windows/system_colour.c | 4 |
9 files changed, 10 insertions, 28 deletions
diff --git a/amiga/system_colour.c b/amiga/system_colour.c index 687d0231b..8ea0ab3d3 100644 --- a/amiga/system_colour.c +++ b/amiga/system_colour.c @@ -313,9 +313,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/atari/system_colour.c b/atari/system_colour.c index f1544f735..5f8673371 100644 --- a/atari/system_colour.c +++ b/atari/system_colour.c @@ -261,9 +261,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/beos/system_colour.cpp b/beos/system_colour.cpp index cf47e1eda..921157c84 100644 --- a/beos/system_colour.cpp +++ b/beos/system_colour.cpp @@ -332,10 +332,8 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { - ret = colour_list[ccount].css_colour; + if (strcmp(name, colour_list[ccount].name) == 0) { + ret = colour_list[ccount].colour; break; } } diff --git a/cocoa/system_colour.m b/cocoa/system_colour.m index d528d7388..bd3e87f46 100644 --- a/cocoa/system_colour.m +++ b/cocoa/system_colour.m @@ -256,9 +256,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/framebuffer/system_colour.c b/framebuffer/system_colour.c index 4756be3ec..d4acafc49 100644 --- a/framebuffer/system_colour.c +++ b/framebuffer/system_colour.c @@ -256,9 +256,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/gtk/system_colour.c b/gtk/system_colour.c index 9c58b915e..6c1fd81b5 100644 --- a/gtk/system_colour.c +++ b/gtk/system_colour.c @@ -256,9 +256,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/monkey/system_colour.c b/monkey/system_colour.c index 9c58b915e..6c1fd81b5 100644 --- a/monkey/system_colour.c +++ b/monkey/system_colour.c @@ -256,9 +256,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/riscos/system_colour.c b/riscos/system_colour.c index 3ecc0c7db..104aa3bad 100644 --- a/riscos/system_colour.c +++ b/riscos/system_colour.c @@ -294,9 +294,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } diff --git a/windows/system_colour.c b/windows/system_colour.c index 9c58b915e..6c1fd81b5 100644 --- a/windows/system_colour.c +++ b/windows/system_colour.c @@ -256,9 +256,7 @@ colour gui_system_colour_char(const char *name) unsigned int ccount; for (ccount = 0; ccount < colour_list_len; ccount++) { - if (strncasecmp(name, - colour_list[ccount].name, - colour_list[ccount].length) == 0) { + if (strcmp(name, colour_list[ccount].name) == 0) { ret = colour_list[ccount].colour; break; } |