summaryrefslogtreecommitdiff
path: root/dseg.h
blob: bceaac487fd857afe7cf3c842e82a5583acf4716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef DSEG_H
#define DSEG_H

#include "hashmap.h"
#include <stdio.h>

struct dseg_entry {
    enum {
        ENT_STRING,
    } type;
    union {
        const char* string;
    } key;
    char* symbol;
};

void dseg_init(struct hash_map* dseg);
void dseg_destroy(struct hash_map* dseg);
const char* dseg_put(struct hash_map* dseg, struct dseg_entry entry);
void emit_dseg(FILE* outfile, const struct hash_map* dseg);

#endif