|
@@ -55,7 +55,8 @@ int convert_init(void)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
lineno = count = 0;
|
|
lineno = count = 0;
|
|
- while(fgets(line, 65535, fp)){
|
|
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset(&char_dat, 0, sizeof(char_dat));
|
|
memset(&char_dat, 0, sizeof(char_dat));
|
|
ret=mmo_char_fromstr(line, &char_dat.status, char_dat.global, &char_dat.global_num);
|
|
ret=mmo_char_fromstr(line, &char_dat.status, char_dat.global, &char_dat.global_num);
|
|
@@ -82,8 +83,9 @@ int convert_init(void)
|
|
ShowError("Unable to open file %s!", accreg_txt);
|
|
ShowError("Unable to open file %s!", accreg_txt);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line, sizeof(line), fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset (®, 0, sizeof(struct accreg));
|
|
memset (®, 0, sizeof(struct accreg));
|
|
if(inter_accreg_fromstr(line, ®) == 0 && reg.account_id > 0) {
|
|
if(inter_accreg_fromstr(line, ®) == 0 && reg.account_id > 0) {
|
|
@@ -110,8 +112,9 @@ int convert_init(void)
|
|
ShowError("can't read : %s\n",storage_txt);
|
|
ShowError("can't read : %s\n",storage_txt);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line,65535,fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
set=sscanf(line,"%d,%d",&tmp_int[0],&tmp_int[1]);
|
|
set=sscanf(line,"%d,%d",&tmp_int[0],&tmp_int[1]);
|
|
if(set==2) {
|
|
if(set==2) {
|
|
@@ -142,8 +145,9 @@ int convert_init(void)
|
|
ShowError("Unable to open file %s!", pet_txt);
|
|
ShowError("Unable to open file %s!", pet_txt);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line, sizeof(line), fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset (&p, 0, sizeof(struct s_pet));
|
|
memset (&p, 0, sizeof(struct s_pet));
|
|
if(inter_pet_fromstr(line, &p)==0 && p.pet_id>0){
|
|
if(inter_pet_fromstr(line, &p)==0 && p.pet_id>0){
|
|
@@ -170,8 +174,9 @@ int convert_init(void)
|
|
ShowError("Unable to open file %s!", party_txt);
|
|
ShowError("Unable to open file %s!", party_txt);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line, sizeof(line), fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset (&p, 0, sizeof(struct party));
|
|
memset (&p, 0, sizeof(struct party));
|
|
if(inter_party_fromstr(line, &p) == 0 &&
|
|
if(inter_party_fromstr(line, &p) == 0 &&
|
|
@@ -200,8 +205,9 @@ int convert_init(void)
|
|
ShowError("Unable to open file %s!", guild_txt);
|
|
ShowError("Unable to open file %s!", guild_txt);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line, sizeof(line), fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset (&g, 0, sizeof(struct guild));
|
|
memset (&g, 0, sizeof(struct guild));
|
|
if (inter_guild_fromstr(line, &g) == 0 &&
|
|
if (inter_guild_fromstr(line, &g) == 0 &&
|
|
@@ -219,8 +225,9 @@ int convert_init(void)
|
|
ShowError("Unable to open file %s!", castle_txt);
|
|
ShowError("Unable to open file %s!", castle_txt);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line, sizeof(line), fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset (&gc, 0, sizeof(struct guild_castle));
|
|
memset (&gc, 0, sizeof(struct guild_castle));
|
|
if (inter_guildcastle_fromstr(line, &gc) == 0) {
|
|
if (inter_guildcastle_fromstr(line, &gc) == 0) {
|
|
@@ -247,8 +254,9 @@ int convert_init(void)
|
|
ShowError("can't read : %s\n",guild_storage_txt);
|
|
ShowError("can't read : %s\n",guild_storage_txt);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
- lineno=count=0;
|
|
|
|
- while(fgets(line,65535,fp)){
|
|
|
|
|
|
+ lineno = count = 0;
|
|
|
|
+ while(fgets(line, sizeof(line), fp))
|
|
|
|
+ {
|
|
lineno++;
|
|
lineno++;
|
|
memset(&storage_, 0, sizeof(struct guild_storage));
|
|
memset(&storage_, 0, sizeof(struct guild_storage));
|
|
if (sscanf(line,"%d",&storage_.guild_id) == 1 &&
|
|
if (sscanf(line,"%d",&storage_.guild_id) == 1 &&
|