1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

Merge branch 'master' of supraverse.net:libpsyc

This commit is contained in:
Gabor Adam Toth 2011-04-25 21:57:09 +02:00
commit b881fe467f

View file

@ -6,7 +6,7 @@
int main(int argc, char** argv)
{
int index, ret;
int indx, ret;
char buffer[2048], oper;
PSYC_String name, value, elem;
PSYC_ParseState state;
@ -15,14 +15,14 @@ int main(int argc, char** argv)
int file = open(argv[1],O_RDONLY);
if(file < 0)
return -1;
index = read(file,(void*)buffer,sizeof(buffer));
indx = read(file,(void*)buffer,sizeof(buffer));
write(1, ">> INPUT\n", 9);
write(1, buffer, index);
write(1, buffer, indx);
write(1, ">> PARSE\n", 9);
PSYC_initParseState(&state);
PSYC_nextParseBuffer(&state, PSYC_newString(buffer, index));
PSYC_nextParseBuffer(&state, PSYC_newString(buffer, indx));
// try parsing that now
while ((ret = PSYC_parse(&state, &oper, &name, &value)))