From: Dale Weiler Date: Sun, 2 Jun 2013 05:32:37 +0000 (+0000) Subject: Some static X-Git-Tag: v0.3.0~151^2~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec7bf4767aa30808b0b64be00d7455f3bcecde4b;p=xonotic%2Fgmqcc.git Some static --- diff --git a/util.c b/util.c index ae95df5..3dcf873 100644 --- a/util.c +++ b/util.c @@ -182,24 +182,24 @@ typedef struct { typedef size_entry_t **size_table_t; -size_table_t util_st_new() { +static size_table_t util_st_new() { return (size_table_t)memset( mem_a(sizeof(size_entry_t*) * ST_SIZE), 0, ST_SIZE * sizeof(size_entry_t*) ); } -void util_st_del(size_table_t table) { +static void util_st_del(size_table_t table) { size_t i = 0; for (; i < ST_SIZE; i++) if(table[i]) mem_d(table[i]); mem_d(table); } -size_entry_t *util_st_get(size_table_t table, size_t key) { +static size_entry_t *util_st_get(size_table_t table, size_t key) { size_t hash = (key % ST_SIZE); while (table[hash] && table[hash]->key != key) hash = (hash + 1) % ST_SIZE; return table[hash]; } -void util_st_put(size_table_t table, size_t key, size_t value) { +static void util_st_put(size_table_t table, size_t key, size_t value) { size_t hash = (key % ST_SIZE); while (table[hash] && table[hash]->key != key) hash = (hash + 1) % ST_SIZE;