Beispiel #1
0
struct utf_query_result query_utf_nofail(FILE *infile, const long offset, const struct utf_query *query)
{
    const struct utf_query_result result = query_utf(infile, offset, query);

    CHECK_ERROR (!result.valid, "didn't find valid @UTF table where one was expected");
    CHECK_ERROR (query && !result.found, "key not found");

    return result;
}
Beispiel #2
0
static struct utf_query_result query_utf_nofail(STREAMFILE *infile, const long offset, const struct utf_query *query, int *error)
{
    const struct utf_query_result result = query_utf(infile, offset, query);

    if (error)
    {
        *error = 0;
        if (!result.valid) *error = 1;
        if (query && !result.found) *error = 1;
    }

    return result;
}