summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c12
-rw-r--r--src/char_sql/int_guild.c4
-rw-r--r--src/char_sql/inter.c4
-rw-r--r--src/char_sql/itemdb.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 11b6a49..789a7c7 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2586,7 +2586,7 @@ int char_lan_config_read(const char *lancfgName){
FILE *fp;
struct hostent * h = NULL;
- if ((fp = fopen(lancfgName, "r")) == NULL) {
+ if ((fp = fopen_(lancfgName, "r")) == NULL) {
printf("file not found: %s\n", lancfgName);
return 1;
}
@@ -2619,7 +2619,7 @@ int char_lan_config_read(const char *lancfgName){
printf("set subnetmask : %s\n", w2);
}
}
- fclose(fp);
+ fclose_(fp);
printf("End reading of Lan Support configuration file\n");
return 0;
@@ -2667,7 +2667,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
printf("reading configure: %s\n", cfgName);
- if ((fp = fopen(cfgName, "r")) == NULL) {
+ if ((fp = fopen_(cfgName, "r")) == NULL) {
printf("file not found: %s\n", cfgName);
exit(1);
}
@@ -2737,7 +2737,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
printf("set lowest_gm_level : %s\n",w2);
}
}
- fclose(fp);
+ fclose_(fp);
printf("reading configure done.....\n");
}
@@ -2746,7 +2746,7 @@ int char_config_read(const char *cfgName) {
char line[1024], w1[1024], w2[1024];
FILE *fp;
- if ((fp = fopen(cfgName, "r")) == NULL) {
+ if ((fp = fopen_(cfgName, "r")) == NULL) {
printf("Configuration file not found: %s.\n", cfgName);
exit(1);
}
@@ -2849,7 +2849,7 @@ int char_config_read(const char *cfgName) {
char_config_read(w2);
}
}
- fclose(fp);
+ fclose_(fp);
//Read ItemDB
do_init_itemdb();
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 1983896..b9a6e3b 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -566,7 +566,7 @@ int inter_guild_readdb()
char line[1024];
for (i=0;i<100;i++) guild_exp[i]=0;
- fp=fopen("db/exp_guild.txt","r");
+ fp=fopen_("db/exp_guild.txt","r");
if(fp==NULL){
printf("can't read db/exp_guild.txt\n");
return 1;
@@ -578,7 +578,7 @@ int inter_guild_readdb()
guild_exp[i]=atoi(line);
i++;
}
- fclose(fp);
+ fclose_(fp);
return 0;
}
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index c8fa9b4..d1ee194 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -157,7 +157,7 @@ int inter_config_read(const char *cfgName) {
char line[1024], w1[1024], w2[1024];
FILE *fp;
- fp=fopen(cfgName,"r");
+ fp=fopen_(cfgName,"r");
if(fp==NULL){
printf("file not found: %s\n", cfgName);
return 1;
@@ -221,7 +221,7 @@ int inter_config_read(const char *cfgName) {
printf ("set login_server_db : %s\n",w2);
}
}
- fclose(fp);
+ fclose_(fp);
printf ("success reading interserver configuration\n");
diff --git a/src/char_sql/itemdb.c b/src/char_sql/itemdb.c
index 0bed07c..85c4929 100644
--- a/src/char_sql/itemdb.c
+++ b/src/char_sql/itemdb.c
@@ -105,7 +105,7 @@ static int itemdb_readdb(void)
char *str[32],*p,*np;
struct item_data *id;
- fp=fopen("db/item_db.txt","r");
+ fp=fopen_("db/item_db.txt","r");
if(fp==NULL){
printf("can't read db/item_db.txt\n");
exit(1);
@@ -134,7 +134,7 @@ static int itemdb_readdb(void)
id->type=atoi(str[3]);
}
- fclose(fp);
+ fclose_(fp);
printf("read db/item_db.txt done (count=%d)\n",ln);
return 0;
}