diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2000-11-20 15:44:19 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2000-11-20 15:44:19 +0000 |
| commit | a45a6308d0a0d5db68f9fa5103cb91de4a5ef52c (patch) | |
| tree | a74874c525c2763fc775954348b5132eb4e0aa7a /fluid | |
| parent | 0c6010abea726c977e7d6384fe5bbf0b7e1accb2 (diff) | |
strcasecmp() for FLUID under AIX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/factory.cxx | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/fluid/factory.cxx b/fluid/factory.cxx index 1c2ffc1f4..4f5177b85 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -1,5 +1,5 @@ // -// "$Id: factory.cxx,v 1.4.2.6 2000/06/05 21:20:42 mike Exp $" +// "$Id: factory.cxx,v 1.4.2.7 2000/11/20 15:44:18 easysw Exp $" // // Widget factory code for the Fast Light Tool Kit (FLTK). // @@ -43,6 +43,34 @@ #include "Fl_Widget_Type.h" +#if !HAVE_STRCASECMP +# include <ctype.h> + +// +// 'strcasecmp()' - Do a case-insensitive compare... +// + +static int +strcasecmp(const char *s, const char *t) { + while (*s != '\0' && *t != '\0') { + if (tolower(*s) < tolower(*t)) + return (-1); + else if (tolower(*s) > tolower(*t)) + return (1); + + s ++; + t ++; + } + + if (*s == '\0' && *t == '\0') + return (0); + else if (*s != '\0') + return (1); + else + return (-1); +} +#endif // !HAVE_STRCASECMP + //////////////////////////////////////////////////////////////// #include <FL/Fl_Box.H> @@ -693,5 +721,5 @@ int lookup_symbol(const char *name, int &v, int numberok) { } // -// End of "$Id: factory.cxx,v 1.4.2.6 2000/06/05 21:20:42 mike Exp $". +// End of "$Id: factory.cxx,v 1.4.2.7 2000/11/20 15:44:18 easysw Exp $". // |
