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

warning: declaration of 'index' shadows a global declaration

This commit is contained in:
psyc://psyced.org/~lynX 2011-04-25 21:28:24 +02:00
parent 8d47fdee40
commit 1399123132

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)))