mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 21:19:24 +00:00
No need any more to NUL terminate keys.
This commit is contained in:
@@ -213,7 +213,7 @@ Key_List::set_output_types (void)
|
|||||||
/* Extracts a key from an input line and creates a new List_Node for it. */
|
/* Extracts a key from an input line and creates a new List_Node for it. */
|
||||||
|
|
||||||
static List_Node *
|
static List_Node *
|
||||||
parse_line (char *line, const char *delimiters)
|
parse_line (const char *line, const char *delimiters)
|
||||||
{
|
{
|
||||||
if (*line == '"')
|
if (*line == '"')
|
||||||
{
|
{
|
||||||
@@ -342,12 +342,8 @@ parse_line (char *line, const char *delimiters)
|
|||||||
if (line[len] == '\0')
|
if (line[len] == '\0')
|
||||||
rest = "";
|
rest = "";
|
||||||
else
|
else
|
||||||
{
|
/* Skip the first delimiter. */
|
||||||
/* Quick hack to separate the key from the rest, killing the first
|
rest = &line[len + 1];
|
||||||
delimiter. */
|
|
||||||
line[len] = '\0';
|
|
||||||
rest = &line[len + 1];
|
|
||||||
}
|
|
||||||
return new List_Node (line, len, option[TYPE] ? rest : "");
|
return new List_Node (line, len, option[TYPE] ? rest : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user