summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2017-06-13 18:24:42 +0200
committerBardur Arantsson <bardur@scientician.net>2017-06-13 18:24:42 +0200
commit7a98afaeee09141ab36607e898d0e00072d9d930 (patch)
tree3c123a657e71830b19b8a8b31ce1bad702ce08f5
parentdd900258b2c67562dc58840722b0223f68769b3c (diff)
Remove loadsave:do_string()
-rw-r--r--src/loadsave.cc49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/loadsave.cc b/src/loadsave.cc
index 8413086d..fc473e0c 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -196,55 +196,6 @@ static void do_s32b(s32b *ip, ls_flag_t flag)
do_u32b((u32b *)ip, flag);
}
-static void save_string(const char *str)
-{
- while (*str)
- {
- do_byte((byte*)str, ls_flag_t::SAVE);
- str++;
- }
- do_byte((byte*)str, ls_flag_t::SAVE);
-}
-
-static void load_string(char *str, int max)
-{
- int i;
-
- /* Read the string */
- for (i = 0; TRUE; i++)
- {
- byte tmp8u;
-
- /* Read a byte */
- do_byte(&tmp8u, ls_flag_t::LOAD);
-
- /* Collect string while legal */
- if (i < max) str[i] = tmp8u;
-
- /* End of string */
- if (!tmp8u) break;
- }
- /* Terminate */
- str[max - 1] = '\0';
-}
-
-static void do_string(char *str, int max, ls_flag_t flag)
-/* Max is ignored for writing */
-{
- switch(flag) {
- case ls_flag_t::LOAD:
- {
- load_string(str, max);
- return;
- }
- case ls_flag_t::SAVE:
- {
- save_string(str);
- return;
- }
- }
-}
-
static void save_std_string(std::string const *s)
{
// Length prefix.