diff options
Diffstat (limited to 'index.h')
-rw-r--r-- | index.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#ifndef INDEX_H +#define INDEX_H + +#include <stdint.h> + +typedef struct index index; + +struct index { + uint8_t type; /* Index type. (0 = Named index, 1 = Numbered index) */ + union { + char *name; /* Named index. */ + uint64_t num; /* Numbered index. */ + }; + index *next; /* Next index. */ +}; + +extern int is_valid_index(index *idx); +extern char *make_index_path(const char *root, index *idx, int path_type); + +#endif |