Changeset 1842 for trunk/src/kmk/make.h


Ignore:
Timestamp:
Oct 11, 2008, 10:53:51 PM (17 years ago)
Author:
bird
Message:

kmk: more hacking, makde isblank work skip ctype everywhere instead of just windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/make.h

    r1840 r1842  
    178178#  define MY_PREDICT_TRUE(expr)  (expr)
    179179#  define MY_PREDICT_FALSE(expr) (expr)
     180# endif
     181#endif
     182
     183#ifdef KMK
     184# include <ctype.h>
     185# if 1 /* See if this speeds things up (Windows is doing this anyway, so,
     186          we might as well try be consistent in speed + features).  */
     187#  if 1
     188#   define MY_IS_BLANK(ch)          ((ch) == ' ' || (ch) == '\t')
     189#   define MY_IS_BLANK_OR_EOS(ch)   ((ch) == ' ' || (ch) == '\t' || (ch) == '\0')
     190#  else
     191#   define MY_IS_BLANK(ch)          (((ch) == ' ') | ((ch) == '\t'))
     192#   define MY_IS_BLANK_OR_EOS(ch)   (((ch) == ' ') | ((ch) == '\t') | ((ch) == '\0'))
     193#  endif
     194#  undef isblank
     195#  define isblank(ch)               MY_IS_BLANK(ch)
     196# else
     197#  define MY_IS_BLANK(ch)           isblank ((unsigned char)(ch))
     198#  define MY_IS_BLANK_OR_EOS(ch)    (isblank ((unsigned char)(ch)) || (ch) == '\0')
    180199# endif
    181200#endif
Note: See TracChangeset for help on using the changeset viewer.