diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-21 03:03:58 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-21 03:03:58 +0100 |
commit | 4f93f935dc7a981ca073a322425c3f5929ffb644 (patch) | |
tree | 4460586408ec7fdfcecf3ba4584f0435067125a6 /vendor/librune/include/rune.h | |
parent | 72ea25a4d73e3e026366d4165f5bc4ec9e7418cb (diff) |
Support line- & column-based match locations
Diffstat (limited to 'vendor/librune/include/rune.h')
-rw-r--r-- | vendor/librune/include/rune.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/librune/include/rune.h b/vendor/librune/include/rune.h new file mode 100644 index 0000000..31ed2e2 --- /dev/null +++ b/vendor/librune/include/rune.h @@ -0,0 +1,38 @@ +#ifndef RUNE_RUNE_H +#define RUNE_RUNE_H + +#include <inttypes.h> + +#include "internal/types.h" /* IWYU pragma: export */ + +#define _RUNE_PRIDEF(c) PRI##c##LEAST32 +#define _RUNE_SCNDEF(c) SCN##c##LEAST32 + +#ifdef PRIbLEAST32 +# define PRIbRUNE _RUNE_PRIDEF(b) +#endif +#ifdef PRIBLEAST32 +# define PRIBRUNE _RUNE_PRIDEF(B) +#endif +#define PRIdRUNE _RUNE_PRIDEF(d) +#define PRIiRUNE _RUNE_PRIDEF(i) +#define PRIuRUNE _RUNE_PRIDEF(u) +#define PRIoRUNE _RUNE_PRIDEF(o) +#define PRIxRUNE _RUNE_PRIDEF(x) +#define PRIXRUNE _RUNE_PRIDEF(X) + +#ifdef SCNbLEAST32 +# define SCNbRUNE _RUNE_SCNDEF(b) +#endif +#define SCNdRUNE _RUNE_SCNDEF(d) +#define SCNiRUNE _RUNE_SCNDEF(i) +#define SCNuRUNE _RUNE_SCNDEF(u) +#define SCNoRUNE _RUNE_SCNDEF(o) +#define SCNxRUNE _RUNE_SCNDEF(x) + +#define RUNE_C(x) UINT32_C(x) + +#define RUNE_ERROR ((rune)0xFFFD) +#define RUNE_MAX ((rune)RUNE_C(0x10FFFF)) + +#endif /* !RUNE_RUNE_H */ |