Example #1
0
static doc_style_f _get_doc_style_f(doc_ptr doc, cptr name)
{
    doc_style_f *pf = str_map_find(doc->styles, name);
    if (pf)
        return *pf;
    return NULL;
}
Example #2
0
spell_stats_ptr spell_stats_aux(cptr name)
{
    str_map_ptr     map = _spell_stats_map();
    spell_stats_ptr result = str_map_find(map, name);

    if (!result)
    {
        result = malloc(sizeof(spell_stats_t));
        memset(result, 0, sizeof(spell_stats_t));
        str_map_add(map, name, result);
    }
    return result;
}
Example #3
0
static _skill_info_ptr _innate_info(cptr name)
{
    _skill_info_ptr result = (_skill_info_ptr)str_map_find(_innate_map(), name);
    return result;
}