in parse_line_column(), simplify parsing of the column number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
bf38aad0be
commit
e57bd4993e
|
@ -247,6 +247,8 @@ CVS code -
|
||||||
the text of the spell-checked file into its own function,
|
the text of the spell-checked file into its own function,
|
||||||
replace_buffer(). (DLR)
|
replace_buffer(). (DLR)
|
||||||
- utils.c:
|
- utils.c:
|
||||||
|
parse_line_column()
|
||||||
|
- Simplify parsing of the column number. (DLR)
|
||||||
ngetdelim()
|
ngetdelim()
|
||||||
- Do sanity checks in an assert instead of checking them
|
- Do sanity checks in an assert instead of checking them
|
||||||
manually and returning -1 if they fail. (DLR)
|
manually and returning -1 if they fail. (DLR)
|
||||||
|
|
|
@ -94,7 +94,7 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
||||||
comma = strchr(str, ',');
|
comma = strchr(str, ',');
|
||||||
|
|
||||||
if (comma != NULL && column != NULL) {
|
if (comma != NULL && column != NULL) {
|
||||||
if (!parse_num(str + (comma - str + 1), column))
|
if (!parse_num(comma + 1, column))
|
||||||
retval = FALSE;
|
retval = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue