You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
Hi Rob, great job on the library, super useful.
Question - how do I retrieve the data stored in my buffer. I have a csv of integers and the output doesn't make much sense to me.
The data looks like this in the csv:
420 | 249
680 | 487
249 | 420
After I open the file I iterate and parse:
while((bytes_read = fread(buf, 1, 1024, knows_input_file)) > 0) {
//printf(" %s %d \n", " Buf: ", buf);
csv_parse(&parser, buf, bytes_read, cb1, NULL, NULL);
}
The callback just prints out the buffer (which I've made global for now)
char buf[1024];
void cb1 (void *s, size_t friend_size, void * friend_id ) {
int i = 0;
while(i < sizeof(buf)/sizeof(char)){
printf(" %s %d \n", "Character: ", buf);
i++;
}
}
The integers returned back doesn't look like the data and I'm trying to make sense of where these characters/integers are being stored
The text was updated successfully, but these errors were encountered: