1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

- when editing a value list, we need to return the values and free them in case

of successful validation
- free previous expression in set_col_values
- added rapid entry also for table values (fill the row)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5460 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-08-16 05:05:12 +00:00
parent 64f80e84a2
commit e3794589a8
8 changed files with 147 additions and 6 deletions

21
expr.c
View File

@@ -483,7 +483,7 @@ void free_expr(struct expr *expr)
}
/* ----- var = value, ... shortcut ----------------------------------------- */
/* ----- [var =] value, ... shortcuts -------------------------------------- */
int parse_var(const char *s, const char **id, struct value **values,
@@ -497,8 +497,7 @@ int parse_var(const char *s, const char **id, struct value **values,
return -1;
if (id)
*id = var_id;
if (values)
*values = var_value_list;
*values = var_value_list;
n = 0;
for (value = var_value_list; value; value = value->next)
n++;
@@ -509,6 +508,22 @@ int parse_var(const char *s, const char **id, struct value **values,
}
int parse_values(const char *s, struct value **values)
{
const struct value *value;
int n;
scan_values(s);
if (yyparse())
return -1;
*values = var_value_list;
n = 0;
for (value = var_value_list; value; value = value->next)
n++;
return n;
}
void free_values(struct value *values, int keep_expr)
{
struct value *next;