aboutsummaryrefslogtreecommitdiff
path: root/lpcap.h
diff options
context:
space:
mode:
Diffstat (limited to 'lpcap.h')
-rw-r--r--lpcap.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/lpcap.h b/lpcap.h
index e72d913..7cf8c24 100644
--- a/lpcap.h
+++ b/lpcap.h
@@ -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)
36typedef uint Index_t;
37#endif
38
39#define MAXINDT (~(Index_t)0)
40
41
30typedef struct Capture { 42typedef 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) */