File: types.h

package info (click to toggle)
opensp 1.5pre5-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,860 kB
  • ctags: 8,918
  • sloc: cpp: 63,719; ansic: 10,494; sh: 7,592; makefile: 605; perl: 557; sed: 98
file content (62 lines) | stat: -rw-r--r-- 1,287 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.

#ifndef types_INCLUDED
#define types_INCLUDED 1

#include <limits.h>
#include <stddef.h>

#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif

#if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
typedef unsigned int Unsigned32;
typedef int Signed32;
#else
typedef unsigned long Unsigned32;
typedef long Signed32;
#endif

// Number holds values between 0 and 99999999 (eight nines).
typedef Unsigned32 Number;
typedef Unsigned32 Offset;
typedef Unsigned32 Index;

#ifdef SP_MULTI_BYTE

typedef Unsigned32 Char;
typedef Signed32 Xchar;

#else /* not SP_MULTI_BYTE */

typedef unsigned char Char;
// This holds any value of type Char plus InputSource:eE (= -1).
typedef int Xchar;

#endif /* not SP_MULTI_BYTE */

typedef Unsigned32 UnivChar;
typedef Unsigned32 WideChar;

// A character in a syntax reference character set.
// We might want to compile with wide syntax reference characters
// (since they're cheap) but not with wide document characters.
typedef Unsigned32 SyntaxChar;

typedef unsigned short CharClassIndex;

typedef unsigned Token;

#ifdef SP_MULTI_BYTE
typedef unsigned short EquivCode;
#else
typedef unsigned char EquivCode;
#endif

#ifdef SP_NAMESPACE
}
#endif

#endif /* not types_INCLUDED */