diff options
Diffstat (limited to 'lpcap.h')
-rw-r--r-- | lpcap.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -27,8 +27,20 @@ typedef enum CapKind { | |||
27 | } CapKind; | 27 | } CapKind; |
28 | 28 | ||
29 | 29 | ||
30 | /* | ||
31 | ** An unsigned integer large enough to index any subject entirely. | ||
32 | ** It can be size_t, but that will double the size of the array | ||
33 | ** of captures in a 64-bit machine. | ||
34 | */ | ||
35 | #if !defined(Index_t) | ||
36 | typedef uint Index_t; | ||
37 | #endif | ||
38 | |||
39 | #define MAXINDT (~(Index_t)0) | ||
40 | |||
41 | |||
30 | typedef struct Capture { | 42 | typedef struct Capture { |
31 | const char *s; /* subject position */ | 43 | Index_t index; /* subject position */ |
32 | unsigned short idx; /* extra info (group name, arg index, etc.) */ | 44 | unsigned short idx; /* extra info (group name, arg index, etc.) */ |
33 | byte kind; /* kind of capture */ | 45 | byte kind; /* kind of capture */ |
34 | byte siz; /* size of full capture + 1 (0 = not a full capture) */ | 46 | byte siz; /* size of full capture + 1 (0 = not a full capture) */ |