From 730e5dde39333cb2f63c72a7d7152bee5c4dbb05 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 8 Feb 2014 15:09:25 -0800 Subject: Implement AString --- src/char/inter.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/char/inter.cpp') diff --git a/src/char/inter.cpp b/src/char/inter.cpp index 19ba254..192ffd5 100644 --- a/src/char/inter.cpp +++ b/src/char/inter.cpp @@ -7,7 +7,7 @@ #include #include "../strings/mstring.hpp" -#include "../strings/fstring.hpp" +#include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" @@ -29,7 +29,7 @@ #include "../poison.hpp" static -FString accreg_txt = "save/accreg.txt"; +AString accreg_txt = "save/accreg.txt"; struct accreg { @@ -60,13 +60,13 @@ int inter_recv_packet_length[] = // アカウント変数を文字列へ変換 static -FString inter_accreg_tostr(struct accreg *reg) +AString inter_accreg_tostr(struct accreg *reg) { MString str; str += STRPRINTF("%d\t", reg->account_id); for (int j = 0; j < reg->reg_num; j++) str += STRPRINTF("%s,%d ", reg->reg[j].str, reg->reg[j].value); - return FString(str); + return AString(str); } // アカウント変数を文字列から変換 @@ -98,7 +98,7 @@ void inter_accreg_init(void) io::ReadFile in(accreg_txt); if (!in.is_open()) return; - FString line; + AString line; while (in.getline(line)) { struct accreg reg {}; @@ -121,7 +121,7 @@ void inter_accreg_save_sub(struct accreg *reg, io::WriteFile& fp) { if (reg->reg_num > 0) { - FString line = inter_accreg_tostr(reg); + AString line = inter_accreg_tostr(reg); fp.put_line(line); } } @@ -282,7 +282,7 @@ void mapif_parse_GMmessage(Session *s) { size_t msg_len = RFIFOW(s, 2); size_t str_len = msg_len - 4; - FString buf = RFIFO_STRING(s, 4, str_len); + AString buf = RFIFO_STRING(s, 4, str_len); mapif_GMmessage(buf); } @@ -328,7 +328,7 @@ void mapif_parse_WisRequest(Session *sms) { size_t len = RFIFOW(sms, 2) - 52; Session *tms = server_for(mcs); // for to - FString msg = RFIFO_STRING(sms, 52, len); + AString msg = RFIFO_STRING(sms, 52, len); if (tms) { mapif_wis_message(tms, from, to, msg); -- cgit v1.2.3-70-g09d2