1 // Copyright (c) 1994 James Clark 2 // See the file COPYING for copying permission. 3 #pragma ident "%Z%%M% %I% %E% SMI" 4 5 #ifndef Priority_INCLUDED 6 #define Priority_INCLUDED 1 7 8 #include <limits.h> 9 #include "Boolean.h" 10 11 #ifdef SP_NAMESPACE 12 namespace SP_NAMESPACE { 13 #endif 14 15 class Priority { 16 public: 17 typedef unsigned char Type; 18 enum { 19 data = 0, 20 dataDelim = 1, 21 function = 2, 22 delim = UCHAR_MAX 23 }; blank(int n)24 static inline Type blank(int n) { 25 // `Priority::' works round gcc 2.5.5 bug 26 return Priority::Type(n + function); 27 } isBlank(Type t)28 static inline Boolean isBlank(Type t) { 29 return function < t && t < delim; 30 } 31 }; 32 33 #ifdef SP_NAMESPACE 34 } 35 #endif 36 37 #endif /* not Priority_INCLUDED */ 38