ocat: make --limit work for RAW mode

This commit is contained in:
Jan-Piet Mens
2015-08-29 18:55:55 +02:00
parent 9f04507f3f
commit aa4bcfb5de

View File

@@ -506,6 +506,10 @@ static int candidate_line(char *line, void *param)
}
}
if (limit > 0 && otype == RAW) {
printf("%s\n", line);
return (1); /* make it 'count' or tac() will not decrement line counter and continue until EOF */
}
/* Do we have location line? */
if ((bp = strstr(line, "Z\t* ")) == NULL) { /* Not a location line */