-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathged_ebp_parse.h
More file actions
32 lines (25 loc) · 900 Bytes
/
ged_ebp_parse.h
File metadata and controls
32 lines (25 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* The GEDCOM EVent-Base Parser -- the GEDCOM file to Event toolchain.
*
* This file and all of its contents was authored by Luther Tychonievich
* and has been released into the public domain by its author.
*/
#include <stdlib.h> // for FILE
#pragma once
#include "ged_ebp.h"
#include "ansel2utf8.h"
typedef struct {
DecodingFileReader *reader;
int stage;
int inLevel, lastLevel;
char *anchor;
} GedEventSourceState;
/// allocate and initialize reading state
GedEventSourceState *gedEventSource_create(FILE *in);
/// deallocate reading state
void gedEventSource_free(GedEventSourceState *state);
/// parse the input, returning the next event and advancing the file
/// pointer to past it
GedEvent gedEventSource_get(GedEventSourceState *state);
/// reset internal state so _get will return the first event next
void gedEventSource_rewind(GedEventSourceState *state);