2024-01-15 12:29:21 -06:00
|
|
|
#ifndef NOTA_H
|
|
|
|
#define NOTA_H
|
|
|
|
|
2024-01-16 07:29:27 -06:00
|
|
|
#define NOTA_BLOB 0x00
|
|
|
|
#define NOTA_TEXT 0x10
|
|
|
|
#define NOTA_ARR 0x20
|
|
|
|
#define NOTA_REC 0x30
|
|
|
|
#define NOTA_FLOAT 0x40
|
|
|
|
#define NOTA_INT 0x60
|
|
|
|
#define NOTA_SYM 0x70
|
|
|
|
|
2024-01-31 02:42:15 -06:00
|
|
|
#define NOTA_FALSE 0x00
|
|
|
|
#define NOTA_TRUE 0x01
|
|
|
|
#define NOTA_PRIVATE 0x08
|
|
|
|
#define NOTA_SYSTEM 0x09
|
|
|
|
#define NOTA_NULL 0x02
|
|
|
|
|
2024-01-23 10:56:34 -06:00
|
|
|
typedef struct NOTA {
|
|
|
|
char *head;
|
|
|
|
} NOTA;
|
|
|
|
|
2024-01-16 07:29:27 -06:00
|
|
|
int nota_type(char *nota);
|
2024-01-16 19:04:52 -06:00
|
|
|
|
|
|
|
char *nota_read_blob(long long *len, char *nota);
|
2024-01-23 10:56:34 -06:00
|
|
|
char *nota_read_text(char **text, char *nota);
|
2024-01-16 19:04:52 -06:00
|
|
|
char *nota_read_array(long long *len, char *nota);
|
|
|
|
char *nota_read_record(long long *len, char *nota);
|
|
|
|
char *nota_read_float(double *d, char *nota);
|
|
|
|
char *nota_read_int(long long *l, char *nota);
|
2024-01-31 02:42:15 -06:00
|
|
|
char *nota_read_sym(int *sym, char *nota);
|
2024-01-16 19:04:52 -06:00
|
|
|
|
2024-01-23 10:56:34 -06:00
|
|
|
void print_nota_hex(char *nota);
|
2024-01-16 19:04:52 -06:00
|
|
|
|
|
|
|
char *nota_write_blob(unsigned long long n, char *nota);
|
|
|
|
char *nota_write_text(char *s, char *nota);
|
|
|
|
char *nota_write_array(unsigned long long n, char *nota);
|
|
|
|
char *nota_write_record(unsigned long long n, char *nota);
|
|
|
|
char *nota_write_float(double n, char *nota);
|
|
|
|
char *nota_write_int(long long n, char *nota);
|
2024-01-31 02:42:15 -06:00
|
|
|
char *nota_write_sym(int sym, char *nota);
|
2024-01-15 12:29:21 -06:00
|
|
|
|
|
|
|
#endif
|