summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-27 06:38:17 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-27 06:38:17 +0000
commit3c8999edce9e1f0d5c0dee3ff8311e781d64c684 (patch)
treed066567a720e5fad02e6f857d55bc165d9a3809a /src/map/itemdb.c
parentea320701794515d4ffa6a8e8ff8f3b8fdfe09860 (diff)
downloadhercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.gz
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.bz2
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.tar.xz
hercules-3c8999edce9e1f0d5c0dee3ff8311e781d64c684.zip
* Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index f4de37cfa..51560f8db 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -209,7 +209,7 @@ static void itemdb_jobid2mapid(unsigned int *bclass, unsigned int jobmask)
}
static void create_dummy_data(void) {
- memset(&dummy_item, 0, sizeof(struct item_data));
+ malloc_set(&dummy_item, 0, sizeof(struct item_data));
dummy_item.nameid=500;
dummy_item.weight=1;
dummy_item.value_sell = 1;
@@ -427,7 +427,7 @@ static int itemdb_read_itemavail (void)
while (fgets(line, sizeof(line) - 1, fp)) {
if (line[0] == '/' && line[1] == '/')
continue;
- memset(str, 0, sizeof(str));
+ malloc_tsetdword(str, 0, sizeof(str));
for (j = 0, p = line; j < 2 && p; j++) {
str[j] = p;
p = strchr(p, ',');
@@ -481,7 +481,7 @@ static void itemdb_read_itemgroup_sub(const char* filename)
continue;
}
}
- memset(str,0,sizeof(str));
+ malloc_tsetdword(str,0,sizeof(str));
for(j=0,p=line;j<3 && p;j++){
str[j]=p;
p=strchr(p,',');
@@ -554,7 +554,7 @@ static void itemdb_read_itemgroup(void)
"Gift Box China",
"Lotto Box",
};
- memset(&itemgroup_db, 0, sizeof(itemgroup_db));
+ malloc_tsetdword(&itemgroup_db, 0, sizeof(itemgroup_db));
snprintf(path, 255, "%s/item_group_db.txt", db_path);
itemdb_read_itemgroup_sub(path);
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","item_group_db.txt");
@@ -732,7 +732,7 @@ static int itemdb_read_noequip(void)
while(fgets(line,1020,fp)){
if(line[0]=='/' && line[1]=='/')
continue;
- memset(str,0,sizeof(str));
+ malloc_tsetdword(str,0,sizeof(str));
for(j=0,p=line;j<2 && p;j++){
str[j]=p;
p=strchr(p,',');
@@ -777,7 +777,7 @@ static int itemdb_read_itemtrade(void)
while (fgets(line, sizeof(line) - 1, fp)) {
if (line[0] == '/' && line[1] == '/')
continue;
- memset(str, 0, sizeof(str));
+ malloc_tsetdword(str, 0, sizeof(str));
for (j = 0, p = line; j < 3 && p; j++) {
str[j] = p;
p = strchr(p, ',');
@@ -1032,7 +1032,7 @@ static int itemdb_readdb(void)
lines++;
if(line[0]=='/' && line[1]=='/')
continue;
- memset(str,0,sizeof(str));
+ malloc_tsetdword(str,0,sizeof(str));
for(j=0,np=p=line;j<19 && p;j++){
str[j]=p;
p=strchr(p,',');