ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/antlr/CharScanner.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/antlr/CharScanner.hpp (file contents):
Revision 2469 by tim, Fri Dec 2 15:38:03 2005 UTC vs.
Revision 2511 by gezelter, Thu Dec 15 14:48:26 2005 UTC

# Line 5 | Line 5
5   * Project led by Terence Parr at http://www.jGuru.com
6   * Software rights: http://www.antlr.org/license.html
7   *
8 < * $Id: CharScanner.hpp,v 1.1 2005-12-02 15:38:02 tim Exp $
8 > * $Id: CharScanner.hpp,v 1.2 2005-12-15 14:48:26 gezelter Exp $
9   */
10  
11   #include <antlr/config.hpp>
# Line 40 | Line 40 | ANTLR_C_USING(tolower)
40  
41   ANTLR_C_USING(tolower)
42  
43 < #ifdef ANTLR_REALLY_NO_STRCASECMP
44 < // Apparently, neither strcasecmp nor stricmp is standard, and Codewarrior
45 < // on the mac has neither...
43 > #if !defined(HAVE_STRCASECMP) && defined(HAVE_STRICMP) && !defined(stricmp)
44 > #define strcasecmp stricmp
45 > #endif
46 > #if !defined(HAVE_STRNCASECMP) && defined(HAVE_STRNICMP) && !defined(strnicmp)
47 > #define strncasecmp strnicmp
48 > #endif
49 >
50 >
51 > #if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)
52   inline int strcasecmp(const char *s1, const char *s2)
53   {
54          while (true)
# Line 54 | Line 60 | inline int strcasecmp(const char *s1, const char *s2)
60                  if (c1 == 0) return 0;
61          }
62   }
57 #else
58 #ifdef NO_STRCASECMP
59 ANTLR_C_USING(stricmp)
60 #else
61 ANTLR_C_USING(strcasecmp)
63   #endif
63 #endif
64  
65   /** Functor for the literals map
66   */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines