nostrdb: add supporting files for the bolt11 parser

A lot of this was pulled from core-lightning. Not sure what is actually
needed or not.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2023-12-22 16:48:50 -08:00
committed by Daniel D’Aquino
parent 389c2c9695
commit cc75a8450a
46 changed files with 7665 additions and 438 deletions

View File

@@ -3,15 +3,13 @@
#define JB55_CURSOR_H
#include "typedefs.h"
#include "bolt11/likely.h"
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#define unlikely(x) __builtin_expect((x),0)
#define likely(x) __builtin_expect((x),1)
struct cursor {
unsigned char *start;
unsigned char *p;