suspect some submodule shenanigans

This commit is contained in:
Enno Rehling 2015-08-20 16:26:32 +02:00
parent 853290413f
commit d69bf18e23
10 changed files with 21 additions and 21 deletions

View File

@ -355,7 +355,7 @@ static int tolua_region_get_resource(lua_State * L)
const char *type;
const resource_type *rtype;
int result = 0;
const void * matches;
void * match;
critbit_tree * cb = special_resources();
r = (region *)tolua_tousertype(L, 1, 0);
@ -363,8 +363,8 @@ static int tolua_region_get_resource(lua_State * L)
type = tolua_tostring(L, 2, 0);
LUA_ASSERT(type != NULL, "invalid parameter");
if (cb_find_prefix(cb, type, strlen(type) + 1, &matches, 1, 0)) {
cb_get_kv(matches, &result, sizeof(result));
if (cb_find_prefix(cb, type, strlen(type) + 1, &match, 1, 0)) {
cb_get_kv(match, &result, sizeof(result));
switch (result) {
case 0:
case 1:
@ -399,10 +399,10 @@ static int tolua_region_set_resource(lua_State * L)
const char *type = tolua_tostring(L, 2, 0);
int result, value = (int)tolua_tonumber(L, 3, 0);
critbit_tree * cb = special_resources();
const void * matches;
void * match;
if (cb_find_prefix(cb, type, strlen(type) + 1, &matches, 1, 0)) {
cb_get_kv(matches, &result, sizeof(result));
if (cb_find_prefix(cb, type, strlen(type) + 1, &match, 1, 0)) {
cb_get_kv(match, &result, sizeof(result));
switch (result) {
case 0:
case 1:

View File

@ -688,7 +688,7 @@ param_t findparam(const char *s, const struct locale * lang)
if (str && *str) {
int i;
const void * match;
void * match;
void **tokens = get_translations(lang, UT_PARAMS);
critbit_tree *cb = (critbit_tree *)*tokens;
if (!cb) {

View File

@ -379,11 +379,11 @@ const potion_type *resource2potion(const resource_type * rtype)
resource_type *rt_find(const char *name)
{
const void * matches;
void * match;
resource_type *result = 0;
if (cb_find_prefix(&cb_resources, name, strlen(name) + 1, &matches, 1, 0)) {
cb_get_kv(matches, &result, sizeof(result));
if (cb_find_prefix(&cb_resources, name, strlen(name) + 1, &match, 1, 0)) {
cb_get_kv(match, &result, sizeof(result));
}
return result;
}
@ -1064,7 +1064,7 @@ const resource_type *findresourcetype(const char *name, const struct locale *lan
char buffer[128];
if (transliterate(buffer, sizeof(buffer), name)) {
const void * match;
void * match;
if (!cb->root) {
/* first-time initialization of resource names for this locale */
cb_foreach(&cb_resources, "", 0, add_resourcename_cb, (void *)lang);
@ -1117,7 +1117,7 @@ const item_type *finditemtype(const char *name, const struct locale *lang)
assert(name);
if (transliterate(buffer, sizeof(buffer), name)) {
const void * match;
void * match;
if (!cb->root) {
/* first-time initialization of item names for this locale */
cb_foreach(&cb_resources, "", 0, add_itemname_cb, (void *)lang);

View File

@ -58,7 +58,7 @@ keyword_t get_keyword(const char *s, const struct locale *lang) {
if (str) {
int i;
const void *match;
void *match;
void **tokens = get_translations(lang, UT_KEYWORDS);
critbit_tree *cb = (critbit_tree *)*tokens;
if (cb && cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) {

View File

@ -2966,7 +2966,7 @@ spellbook * get_spellbook(const char * name)
{
char buffer[64];
spellbook * result;
const void * match;
void * match;
if (cb_find_prefix(&cb_spellbooks, name, strlen(name), &match, 1, 0)) {
cb_get_kv(match, &result, sizeof(result));

View File

@ -80,13 +80,13 @@ static void load_inifile(dictionary * d)
str = iniparser_getstring(d, "eressea:locales", "de,en");
make_locales(str);
if (global.inifile) iniparser_free(global.inifile);
if (global.inifile) iniparser_freedict(global.inifile);
global.inifile = d;
}
static void parse_config(const char *filename)
{
dictionary *d = iniparser_new(filename);
dictionary *d = iniparser_load(filename);
if (d) {
load_inifile(d);
log_debug("reading from configuration file %s\n", filename);
@ -318,7 +318,7 @@ int main(int argc, char **argv)
lua_done(L);
log_close();
if (global.inifile) {
iniparser_free(global.inifile);
iniparser_freedict(global.inifile);
}
return 0;
}

View File

@ -97,7 +97,7 @@ skill_t get_skill(const char *s, const struct locale * lang)
char * str = transliterate(buffer, sizeof(buffer) - sizeof(int), s);
if (str) {
int i;
const void * match;
void * match;
void **tokens = get_translations(lang, UT_SKILLS);
struct critbit_tree *cb = (critbit_tree *)*tokens;
if (cb && cb_find_prefix(cb, str, strlen(str), &match, 1, 0)) {

View File

@ -299,7 +299,7 @@ int a_read(struct storage *store, attrib ** attribs, void *owner)
na = a_new(at);
}
else {
const void * kv = 0;
void * kv = 0;
cb_find_prefix(&cb_deprecated, zText, strlen(zText) + 1, &kv, 1, 0);
if (kv) {
cb_get_kv(kv, &reader, sizeof(reader));

View File

@ -30,7 +30,7 @@ static critbit_tree cb_functions;
pf_generic get_function(const char *name)
{
const void * matches;
void * matches;
pf_generic result;
if (cb_find_prefix(&cb_functions, name, strlen(name) + 1, &matches, 1, 0)) {
cb_get_kv(matches, &result, sizeof(result));

View File

@ -168,7 +168,7 @@ void add_function(const char *symbol, evalfun parse)
static evalfun find_function(const char *symbol)
{
const void * matches;
void * matches;
if (cb_find_prefix(&functions, symbol, strlen(symbol) + 1, &matches, 1, 0)) {
evalfun result;
cb_get_kv(matches, &result, sizeof(result));