diff options
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 $". // |
