Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/klib/blob/master/knhx.h # klib [Ported from github.com/attractivechaos/klib] added block arena Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `klib / knhx.h` 35 lines ยท 570 bytes Raw Blame History 1 #ifndef KNHX_H_ 2 #define KNHX_H_ 3 4 #define KNERR_MISSING_LEFT 0x01 5 #define KNERR_MISSING_RGHT 0x02 6 #define KNERR_BRACKET 0x04 7 #define KNERR_COLON 0x08 8 9 typedef struct { 10 int parent, n; 11 int *child; 12 char *name; 13 double d; 14 } knhx1_t; 15 16 #ifndef KSTRING_T 17 #define KSTRING_T kstring_t 18 typedef struct __kstring_t { 19 size_t l, m; 20 char *s; 21 } kstring_t; 22 #endif 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 knhx1_t *kn_parse(const char *nhx, int *_n, int *_error); 29 void kn_format(const knhx1_t *node, int root, kstring_t *s); 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif