summaryrefslogtreecommitdiff
path: root/src/str.c
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2002-07-30 21:36:03 +0000
committerMichael Jennings <mej@kainx.org>2002-07-30 21:36:03 +0000
commit7add5e9b1c939dbfe88f08867a4d4ef602726860 (patch)
tree53e574d46b49c6b6b3f6dfa7e85053026a21423e /src/str.c
parent8915f0dbcd6f7f06861d59a46d1448e07bcce981 (diff)
downloadlibast-7add5e9b1c939dbfe88f08867a4d4ef602726860.tar.gz
Tue Jul 30 17:34:38 2002 Michael Jennings (mej)
Send/receive on the socket works now. Also cleaned up the show method for strings to eliminate the 4K length limit. The current socket test will actually download the HTML for my home page. Uncomment the SPIF_SHOW() call in test_socket() to see it work. SVN revision: 6351
Diffstat (limited to 'src/str.c')
-rw-r--r--src/str.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/str.c b/src/str.c
index da14255..d0b48b9 100644
--- a/src/str.c
+++ b/src/str.c
@@ -505,14 +505,18 @@ spif_str_show(spif_str_t self, spif_charptr_t name, spif_str_t buff, size_t inde
}
memset(tmp, ' ', indent);
- snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_str_t) %s: %8p { \"%s\", len %lu, size %lu }\n",
- name, self, self->s, (unsigned long) self->len, (unsigned long) self->mem);
-
+ snprintf(tmp + indent, sizeof(tmp) - indent, "(spif_str_t) %s: %8p { \"", name, self);
if (SPIF_STR_ISNULL(buff)) {
buff = spif_str_new_from_ptr(tmp);
} else {
spif_str_append_from_ptr(buff, tmp);
}
+
+ spif_str_append(buff, self);
+
+ snprintf(tmp, sizeof(tmp), "\", len %lu, size %lu }\n", (unsigned long) self->len,
+ (unsigned long) self->mem);
+ spif_str_append_from_ptr(buff, tmp);
return buff;
}