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3
+OPDC[33]:4
+OPDC[34]:5
+OPDC[35]:6
+OPDC[36]:7
+OPDC[37]:8
+OPDC[38]:9
+OPDC[39]:0
Error - 117: operand is too many
-'01234567890123456789012345678901234567'
+'1234567890123456789012345678901234567890'
OPDC:1
-OPDC[0]:'01234567890123456789012345678901234567'
+OPDC[0]:'1234567890123456789012345678901234567890'
-'012345678901234567890123456789012345678'
+'12345678901234567890123456789012345678901'
OPDC:0
-Error - 118: '012345678901234567890123456789012345678': operand length is too long
+Error - 118: '12345678901234567890123456789012345678901': operand length is too long
char *str[] = {
"", "GR0,GR1", "GR0,A", "GR1,12", "GR0,0,GR1",
"\'aaa\',0", "\'aaa\',\'bbb\'", "\'aaa\'\',\'\'bbb\'", "\'aaa,bbb\'",
- "0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9",
- "0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0",
- "\'01234567890123456789012345678901234567\'",
- "\'012345678901234567890123456789012345678\'"
+ "1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0",
+ "1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1",
+ "\'1234567890123456789012345678901234567890\'",
+ "\'12345678901234567890123456789012345678901\'",
};
- for(i = 0; i < sizeof str / sizeof str[0]; i++) {
+ for(i = 0; i < ARRAYSIZE(str); i++) {
printf("%s\n", str[i]);
opd = opdtok(str[i]);
printf("OPDC:%d\n", opd->opdc);
printf("Error - %d: %s\n", cerrno, cerrmsg);
freecerr();
}
- printf("\n");
+ printf("\n");
}
return 0;
}