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
Rishabh Dave 2016-07-05 00:57:53 +05:30 committed by Benno Schulenberg
parent ccfb1eb0f1
commit 9c7940b599
1 changed files with 6 additions and 1 deletions

View File

@ -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);