From b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Thu, 8 Nov 2007 14:08:32 +0000 Subject: * Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include. * Fixed gm_account_db not being deallocated in login-converter.c. * Refactoring names and documentation in db.h/db.c: - changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*' - changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*' - changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS - removed some @see links and corrected small typos in the documentation git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/guild.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/map/guild.c') diff --git a/src/map/guild.c b/src/map/guild.c index c2738dc91..40449baf0 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -29,11 +29,11 @@ #include -static DB guild_db; -static DB castle_db; -static DB guild_expcache_db; -static DB guild_infoevent_db; -static DB guild_castleinfoevent_db; +static DBMap* guild_db; // int guild_id -> struct guild* +static DBMap* castle_db; // int castle_id -> struct guild_castle* +static DBMap* guild_expcache_db; // int char_id -> struct guild_expcache* +static DBMap* guild_infoevent_db; // int guild_id -> struct eventlist* +static DBMap* guild_castleinfoevent_db; // int castle_id_index -> struct eventlist* struct eventlist { char name[50]; @@ -204,12 +204,12 @@ static int guild_read_castledb(void) // void do_init_guild(void) { - guild_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int)); - castle_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int)); - guild_expcache_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int)); - guild_infoevent_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int)); + guild_db=idb_alloc(DB_OPT_RELEASE_DATA); + castle_db=idb_alloc(DB_OPT_RELEASE_DATA); + guild_expcache_db=idb_alloc(DB_OPT_BASE); + guild_infoevent_db=idb_alloc(DB_OPT_BASE); expcache_ers = ers_new(sizeof(struct guild_expcache)); - guild_castleinfoevent_db=db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int)); + guild_castleinfoevent_db=idb_alloc(DB_OPT_BASE); guild_read_castledb(); -- cgit v1.2.3-60-g2f50