Commit 3dcf8dc5 authored by jkvis's avatar jkvis

gesa library up to date with first version

parent a8ea503a
......@@ -39,13 +39,38 @@ int GESA_create(GESA* const gesa,
GESA_char_t const* const string,
size_t const length);
// All created GESAs should be destroyed. Normally, the GESA does not
// have ownership of the strings. In case it does (e.g., creation via
// deserialization) supply the GESA_DESTROY_STRINGS flag.
void GESA_destroy(GESA* const gesa,
int const destroy_strings);
// Merges two GESAs into one
// On success it returns 0
int GESA_merge(GESA* const gesa,
GESA const* const gesa_0,
GESA const* const gesa_1);
// WARNING: (de-)serialization is *NOT* portable across architectures
// Serializes a GESA including a copy of the strings
void GESA_serialize(GESA const* const gesa,
FILE* stream);
// Deserizalizes a GESA including newly allocated strings that should be
// freed explicitly, e.g., supply the GESA_DESTROY_STRINGS flag to the
// GESA_destroy function.
// On success it returns 0
int GESA_deserialize(GESA* const gesa,
FILE* stream);
// Calculates the longest common substring
GESA_index_t GESA_lcs(GESA_index_t* document,
GESA_index_t* index,
GESA const* const gesa);
// Prints a GESA for debug purposes
void GESA_print(GESA const* const gesa,
FILE* stream);
#if defined(__cplusplus)
} // extern "C"
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment