interpret/src/scan_score.h

34 lines
851 B
C

#include "pair.h" /* pair */
#include "journal.h" /* date32, line64 */
struct score { struct pair key, name; union date32 day; unsigned node; };
#define ARRAY_NAME scorelist
#define ARRAY_TYPE struct score
#define ARRAY_HEAD
#include "../src/array.h"
#include <stddef.h> /* size_t */
#include <stdint.h> /* uint32_t */
/* fixme: map is from pair -> size_t, nothing to do with score. Compress. */
#define TABLE_NAME scoremap
#define TABLE_KEY struct pair
#define TABLE_UINT uint32_t
#define TABLE_VALUE size_t
#define TABLE_HEAD
#include "../src/table.h"
#define TREE_NAME score
#define TREE_KEY union line64
#define TREE_VALUE size_t
#define TREE_HEAD
#include "../src/tree.h"
struct scores {
struct scorelist_array list;
struct scoremap_table map;
struct score_tree dates;
};
int scan_score(union date32, const char *, struct score_tree *);