Introduction
Introduction Statistics Contact Development Disclaimer Help
increase buffer size, separate @username with spaces - tscrape - twitter scraper
git clone git://git.codemadness.org/tscrape
Log
Files
Refs
README
LICENSE
---
commit b4bc9e6b47df5b9eb612f069c20463a924d6a55e
parent f92f2d068c213425f073d830a1dd8b86126168a5
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 11 Aug 2017 15:46:57 +0200
increase buffer size, separate @username with spaces
Diffstat:
M tscrape.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/tscrape.c b/tscrape.c
@@ -38,10 +38,10 @@ size_t strlcat(char *, const char *, size_t);
size_t strlcpy(char *, const char *, size_t);
/* data */
-static char fullname[128];
+static char fullname[1024];
static char timestamp[16];
-static char text[1024];
-static char username[128];
+static char text[4096];
+static char username[1024];
static char classname[256];
static char datatime[16];
@@ -226,12 +226,16 @@ xmlattrentity(XMLParser *x, const char *t, size_t tl, con…
static void
xmldata(XMLParser *x, const char *d, size_t dl)
{
- if (state & Username)
+ if (state & Username) {
+ if (d[0] == '@')
+ strlcat(username, " ", sizeof(username));
strlcat(username, d, sizeof(username));
- else if (state & Fullname)
+ } else if (state & Fullname) {
+ strlcat(fullname, " ", sizeof(fullname));
strlcat(fullname, d, sizeof(fullname));
- else if (state & Text)
+ } else if (state & Text) {
strlcat(text, d, sizeof(text));
+ }
}
static void
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.