diff options
author | Michael Jennings <mej@kainx.org> | 2002-07-30 21:36:03 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2002-07-30 21:36:03 +0000 |
commit | 7add5e9b1c939dbfe88f08867a4d4ef602726860 (patch) | |
tree | 53e574d46b49c6b6b3f6dfa7e85053026a21423e /src/str.c | |
parent | 8915f0dbcd6f7f06861d59a46d1448e07bcce981 (diff) | |
download | libast-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.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; } |