]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/format/Token.h
1 #ifndef _SQUID_FORMAT_TOKEN_H
2 #define _SQUID_FORMAT_TOKEN_H
4 //#include "format/TokenTableEntry.h"
5 #include "format/ByteCode.h"
8 * Squid configuration allows users to define custom formats in
11 * - external ACL input
14 * These enumerations and classes define the API for parsing of
15 * format directives to define these patterns. Along with output
16 * functionality to produce formatted buffers.
22 class TokenTableEntry
;
24 #define LOG_BUF_SZ (MAX_URL<<2)
26 // XXX: inherit from linked list
33 /// Initialize the format token registrations
36 /** parses a single token. Returns the token length in characters,
37 * and fills in this item with the token information.
38 * def is for sure null-terminated.
40 int parse(const char *def
, enum Quoting
*quote
);
53 int widthMin
; ///< minimum field width
54 int widthMax
; ///< maximum field width
59 int divisor
; // class invariant: MUST NOT be zero.
60 Token
*next
; /* todo: move from linked list to array */
63 const char *scanForToken(TokenTableEntry
const table
[], const char *cur
);
68 #endif /* _SQUID_FORMAT_TOKEN_H */