utils: accept mistypings and common separators between line and column
It is easy to type beside the comma key and hit instead "m" or ".", so accept also these as a separator between line and column number. And when being generous anyway, also accept space, slash and semicolon. This fulfills https://savannah.gnu.org/bugs/?48305. Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>master
parent
ccfb1eb0f1
commit
9c7940b599
|
@ -83,7 +83,12 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
|||
{
|
||||
bool retval;
|
||||
char *firstpart;
|
||||
const char *comma = strchr(str, ',');
|
||||
const char *comma;
|
||||
|
||||
while (*str == ' ')
|
||||
str++;
|
||||
|
||||
comma = strpbrk(str, "m,. /;");
|
||||
|
||||
if (comma == NULL)
|
||||
return parse_num(str, line);
|
||||
|
|
Loading…
Reference in New Issue