]> mj.ucw.cz Git - umpf.git/blobdiff - int.c
redo variables
[umpf.git] / int.c
diff --git a/int.c b/int.c
index 5c9c33a71c78d5102042629ccec6e95655e0bf3c..59c1f93a396f011ff339c067773de3775199082a 100644 (file)
--- a/int.c
+++ b/int.c
@@ -192,7 +192,7 @@ modify_headers(struct list* headers, struct list* hash)
        
 
        LIST_FOREACH(p, headers){
-               pv = get_var_struct(p->name, hash);
+               pv = get_var_struct(p->name, VAR_HEADER, hash);
                if (!pv)
                        continue;
                u = unfold(p->value);
@@ -210,14 +210,14 @@ modify_headers(struct list* headers, struct list* hash)
        // find new headers 
        for (i = 0; i < HASHSIZE; i++){
                LIST_FOREACH(pv, hash + i){
-                       if (isupper(pv->name[0]) && pv->modified){
+                       if (pv->type == VAR_HEADER && pv->modified){
                                pv->modified = 0;
 
                                p = xmalloc(sizeof(struct hlist));
                                p->name = xstrdup(pv->name);
                                p->value = get_var(pv->varcode);
 
-                               list_add_last(headers,&p->car);
+                               list_add_last(headers, &p->car);
                        }
                }
        }
@@ -700,7 +700,7 @@ save_current_headers(struct list* hash)
        struct variable* pv;
 
        LIST_FOREACH(p, current_headers){
-               pv = get_var_struct(p->name, hash);
+               pv = get_var_struct(p->name, VAR_HEADER, hash);
                if (!pv)
                        continue;
                u = unfold(p->value);