Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / nsgmls / Priority.h
1 /* $XConsortium: Priority.h /main/1 1996/07/29 17:02:03 cde-hp $ */
2 // Copyright (c) 1994 James Clark
3 // See the file COPYING for copying permission.
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     function = 1,
21     delim = UCHAR_MAX
22     };
23   static inline Type blank(int n) {
24     // `Priority::' works round gcc 2.5.5 bug
25     return Priority::Type(n + 1);
26   }
27   static inline Boolean isBlank(Type t) {
28     return function < t && t < delim;
29   }
30 };
31
32 #ifdef SP_NAMESPACE
33 }
34 #endif
35
36 #endif /* not Priority_INCLUDED */