diff --git a/ChangeLog-1999-07-09 b/ChangeLog-1999-07-09 index 7f81b67e4e629ba3a48b77a039b8e02fe69a39b9..8f8ea9b52de80c95dd8cfb7fabba71f4b269e658 100644 --- a/ChangeLog-1999-07-09 +++ b/ChangeLog-1999-07-09 @@ -1,5 +1,7 @@ 1998-08-06 Miguel de Icaza + * src/parser.y (yylex): Bug fix: allocate the string. + * src/sheet.c (CRowSort): Sort in the other direction my list of cells. (sheet_cell_foreach_range): Iterate over the lists with ->next, diff --git a/ChangeLog-2000-02-23 b/ChangeLog-2000-02-23 index 7f81b67e4e629ba3a48b77a039b8e02fe69a39b9..8f8ea9b52de80c95dd8cfb7fabba71f4b269e658 100644 --- a/ChangeLog-2000-02-23 +++ b/ChangeLog-2000-02-23 @@ -1,5 +1,7 @@ 1998-08-06 Miguel de Icaza + * src/parser.y (yylex): Bug fix: allocate the string. + * src/sheet.c (CRowSort): Sort in the other direction my list of cells. (sheet_cell_foreach_range): Iterate over the lists with ->next, diff --git a/OChangeLog-1999-07-09 b/OChangeLog-1999-07-09 index 7f81b67e4e629ba3a48b77a039b8e02fe69a39b9..8f8ea9b52de80c95dd8cfb7fabba71f4b269e658 100644 --- a/OChangeLog-1999-07-09 +++ b/OChangeLog-1999-07-09 @@ -1,5 +1,7 @@ 1998-08-06 Miguel de Icaza + * src/parser.y (yylex): Bug fix: allocate the string. + * src/sheet.c (CRowSort): Sort in the other direction my list of cells. (sheet_cell_foreach_range): Iterate over the lists with ->next, diff --git a/OChangeLog-2000-02-23 b/OChangeLog-2000-02-23 index 7f81b67e4e629ba3a48b77a039b8e02fe69a39b9..8f8ea9b52de80c95dd8cfb7fabba71f4b269e658 100644 --- a/OChangeLog-2000-02-23 +++ b/OChangeLog-2000-02-23 @@ -1,5 +1,7 @@ 1998-08-06 Miguel de Icaza + * src/parser.y (yylex): Bug fix: allocate the string. + * src/sheet.c (CRowSort): Sort in the other direction my list of cells. (sheet_cell_foreach_range): Iterate over the lists with ->next, diff --git a/src/parser.y b/src/parser.y index 3b7982f35703899873d6236e7a2d5406cab1195b..bf383be0249f603b4de9cb897bafdd2a2613180f 100644 --- a/src/parser.y +++ b/src/parser.y @@ -86,6 +86,7 @@ line: exp { parser_result = $1; ; exp: NUMBER { $$ = $1 } + | STRING { $$ = $1 } | CELLREF { $$ = $1 } | CONSTANT { $$ = $1 } | exp '+' exp { @@ -394,7 +395,8 @@ int yylex (void) return NUMBER; } case '"': { - char *string; + char *string, *s; + int v; p = parser_expr; while(*parser_expr && *parser_expr != '"') { @@ -407,19 +409,20 @@ int yylex (void) return ERROR; } - string = (char *) alloca (1 + parser_expr - p); + s = string = (char *) alloca (1 + parser_expr - p); while (p != parser_expr){ if (*p== '\\'){ p++; - *string++ = *p++; + *s++ = *p++; } else - *string++ = *p++; + *s++ = *p++; } - *string = 0; + *s = 0; parser_expr++; - return return_symbol (string); + v = return_symbol (string); + return v; } }