filepos, rctx->expected_return);
} else if (!strncmp(line, "output sort", strlen("output sort"))) {
+ sort_len = atoi(line + strlen("output sort"));
+ if (sort_len==0)
+ sort_len=SORT_LEN_DEFAULT;
rctx->output_sort = 1;
VERB1("[%s] (sort output of next command)", filepos);
DEBUG2("Compare strings '%s' and '%s'", s1, s2);
- int res = strncmp(s1, s2, 19);
+ int res = strncmp(s1, s2, sort_len);
if (res == 0)
return p1>p2;
return res;
xbt_dynar_free(&a);
/* If an empty line moved in first position, move it back to the end */
if (rctx->output_got->data[0]=='\n') {
- fprintf(stderr,"XXX");
memmove(rctx->output_got->data,rctx->output_got->data+1,rctx->output_got->used-1);
rctx->output_got->data[rctx->output_got->used-1] = '\n';
}