return *aLinePtr = linebuf;
bufsize += MAX_LENGTH;
if (!(linebuf = realloc(linebuf, bufsize))) {
+ free(linebuf);
perror("fgetslong: realloc");
exit(1);
}
while (fgetslong(&aLine, stdin)) {
if ((argc = CountArgs(aLine)) == 0) {
+ free(aLine);
printf("ERROR: not enough arguments\n");
}
if ((myargv = (char **) malloc((argc + 1) *
exit(1);
}
if ((argc = CreateArgs(argv[0], aLine, argc, myargv)) < 0) {
+ free(aLine);
+ free(myargv);
printf("ERROR: creating arguments\n");
} else {
int ret = HandleInputLine(argc, myargv, stdout);