diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-29 05:05:50 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-29 05:05:50 +0000 |
commit | 7bfe35400c79bf97a5b0bed9f170912c37cf9452 (patch) | |
tree | 5651eae9e5b8e67d4f5476445d5faccb99c72248 /src/char/int_storage.c | |
parent | 1038bc42b33b73eca592b22f2868844b6e64e842 (diff) | |
download | hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.tar.gz hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.tar.bz2 hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.tar.xz hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.zip |
Fixed use of storage variable to conform to ANSI C spec [MouseJstr]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1327 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/int_storage.c')
-rw-r--r-- | src/char/int_storage.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 67b25909b..498004bc0 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -28,11 +28,11 @@ int storage_tostr(char *str,struct storage *p) str_p += sprintf(str_p,"%d,%d\t",p->account_id,p->storage_amount); for(i=0;i<MAX_STORAGE;i++) - if( (p->storage[i].nameid) && (p->storage[i].amount) ){ + if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){ str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d ", - p->storage[i].id,p->storage[i].nameid,p->storage[i].amount,p->storage[i].equip, - p->storage[i].identify,p->storage[i].refine,p->storage[i].attribute, - p->storage[i].card[0],p->storage[i].card[1],p->storage[i].card[2],p->storage[i].card[3]); + p->storage_[i].id,p->storage_[i].nameid,p->storage_[i].amount,p->storage_[i].equip, + p->storage_[i].identify,p->storage_[i].refine,p->storage_[i].attribute, + p->storage_[i].card[0],p->storage_[i].card[1],p->storage_[i].card[2],p->storage_[i].card[3]); f++; } @@ -63,17 +63,17 @@ int storage_fromstr(char *str,struct storage *p) &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5], &tmp_int[6], &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) { - p->storage[i].id = tmp_int[0]; - p->storage[i].nameid = tmp_int[1]; - p->storage[i].amount = tmp_int[2]; - p->storage[i].equip = tmp_int[3]; - p->storage[i].identify = tmp_int[4]; - p->storage[i].refine = tmp_int[5]; - p->storage[i].attribute = tmp_int[6]; - p->storage[i].card[0] = tmp_int[7]; - p->storage[i].card[1] = tmp_int[8]; - p->storage[i].card[2] = tmp_int[9]; - p->storage[i].card[3] = tmp_int[10]; + p->storage_[i].id = tmp_int[0]; + p->storage_[i].nameid = tmp_int[1]; + p->storage_[i].amount = tmp_int[2]; + p->storage_[i].equip = tmp_int[3]; + p->storage_[i].identify = tmp_int[4]; + p->storage_[i].refine = tmp_int[5]; + p->storage_[i].attribute = tmp_int[6]; + p->storage_[i].card[0] = tmp_int[7]; + p->storage_[i].card[1] = tmp_int[8]; + p->storage_[i].card[2] = tmp_int[9]; + p->storage_[i].card[3] = tmp_int[10]; next += len; if (str[next] == ' ') next++; @@ -83,17 +83,17 @@ int storage_fromstr(char *str,struct storage *p) &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5], &tmp_int[6], &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &len) == 11) { - p->storage[i].id = tmp_int[0]; - p->storage[i].nameid = tmp_int[1]; - p->storage[i].amount = tmp_int[2]; - p->storage[i].equip = tmp_int[3]; - p->storage[i].identify = tmp_int[4]; - p->storage[i].refine = tmp_int[5]; - p->storage[i].attribute = tmp_int[6]; - p->storage[i].card[0] = tmp_int[7]; - p->storage[i].card[1] = tmp_int[8]; - p->storage[i].card[2] = tmp_int[9]; - p->storage[i].card[3] = tmp_int[10]; + p->storage_[i].id = tmp_int[0]; + p->storage_[i].nameid = tmp_int[1]; + p->storage_[i].amount = tmp_int[2]; + p->storage_[i].equip = tmp_int[3]; + p->storage_[i].identify = tmp_int[4]; + p->storage_[i].refine = tmp_int[5]; + p->storage_[i].attribute = tmp_int[6]; + p->storage_[i].card[0] = tmp_int[7]; + p->storage_[i].card[1] = tmp_int[8]; + p->storage_[i].card[2] = tmp_int[9]; + p->storage_[i].card[3] = tmp_int[10]; next += len; if (str[next] == ' ') next++; @@ -111,11 +111,11 @@ int guild_storage_tostr(char *str,struct guild_storage *p) str_p+=sprintf(str,"%d,%d\t",p->guild_id,p->storage_amount); for(i=0;i<MAX_GUILD_STORAGE;i++) - if( (p->storage[i].nameid) && (p->storage[i].amount) ){ + if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){ str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d ", - p->storage[i].id,p->storage[i].nameid,p->storage[i].amount,p->storage[i].equip, - p->storage[i].identify,p->storage[i].refine,p->storage[i].attribute, - p->storage[i].card[0],p->storage[i].card[1],p->storage[i].card[2],p->storage[i].card[3]); + p->storage_[i].id,p->storage_[i].nameid,p->storage_[i].amount,p->storage_[i].equip, + p->storage_[i].identify,p->storage_[i].refine,p->storage_[i].attribute, + p->storage_[i].card[0],p->storage_[i].card[1],p->storage_[i].card[2],p->storage_[i].card[3]); f++; } @@ -145,17 +145,17 @@ int guild_storage_fromstr(char *str,struct guild_storage *p) &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5], &tmp_int[6], &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) { - p->storage[i].id = tmp_int[0]; - p->storage[i].nameid = tmp_int[1]; - p->storage[i].amount = tmp_int[2]; - p->storage[i].equip = tmp_int[3]; - p->storage[i].identify = tmp_int[4]; - p->storage[i].refine = tmp_int[5]; - p->storage[i].attribute = tmp_int[6]; - p->storage[i].card[0] = tmp_int[7]; - p->storage[i].card[1] = tmp_int[8]; - p->storage[i].card[2] = tmp_int[9]; - p->storage[i].card[3] = tmp_int[10]; + p->storage_[i].id = tmp_int[0]; + p->storage_[i].nameid = tmp_int[1]; + p->storage_[i].amount = tmp_int[2]; + p->storage_[i].equip = tmp_int[3]; + p->storage_[i].identify = tmp_int[4]; + p->storage_[i].refine = tmp_int[5]; + p->storage_[i].attribute = tmp_int[6]; + p->storage_[i].card[0] = tmp_int[7]; + p->storage_[i].card[1] = tmp_int[8]; + p->storage_[i].card[2] = tmp_int[9]; + p->storage_[i].card[3] = tmp_int[10]; next += len; if (str[next] == ' ') next++; @@ -165,17 +165,17 @@ int guild_storage_fromstr(char *str,struct guild_storage *p) &tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3], &tmp_int[4], &tmp_int[5], &tmp_int[6], &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &len) == 11) { - p->storage[i].id = tmp_int[0]; - p->storage[i].nameid = tmp_int[1]; - p->storage[i].amount = tmp_int[2]; - p->storage[i].equip = tmp_int[3]; - p->storage[i].identify = tmp_int[4]; - p->storage[i].refine = tmp_int[5]; - p->storage[i].attribute = tmp_int[6]; - p->storage[i].card[0] = tmp_int[7]; - p->storage[i].card[1] = tmp_int[8]; - p->storage[i].card[2] = tmp_int[9]; - p->storage[i].card[3] = tmp_int[10]; + p->storage_[i].id = tmp_int[0]; + p->storage_[i].nameid = tmp_int[1]; + p->storage_[i].amount = tmp_int[2]; + p->storage_[i].equip = tmp_int[3]; + p->storage_[i].identify = tmp_int[4]; + p->storage_[i].refine = tmp_int[5]; + p->storage_[i].attribute = tmp_int[6]; + p->storage_[i].card[0] = tmp_int[7]; + p->storage_[i].card[1] = tmp_int[8]; + p->storage_[i].card[2] = tmp_int[9]; + p->storage_[i].card[3] = tmp_int[10]; next += len; if (str[next] == ' ') next++; @@ -368,8 +368,8 @@ int inter_storage_delete(int account_id) if(s) { int i; for(i=0;i<s->storage_amount;i++){ - if(s->storage[i].card[0] == (short)0xff00) - inter_pet_delete(*((long *)(&s->storage[i].card[2]))); + if(s->storage_[i].card[0] == (short)0xff00) + inter_pet_delete(*((long *)(&s->storage_[i].card[2]))); } numdb_erase(storage_db,account_id); aFree(s); @@ -384,8 +384,8 @@ int inter_guild_storage_delete(int guild_id) if(gs) { int i; for(i=0;i<gs->storage_amount;i++){ - if(gs->storage[i].card[0] == (short)0xff00) - inter_pet_delete(*((long *)(&gs->storage[i].card[2]))); + if(gs->storage_[i].card[0] == (short)0xff00) + inter_pet_delete(*((long *)(&gs->storage_[i].card[2]))); } numdb_erase(guild_storage_db,guild_id); aFree(gs); |