]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/acid/util.c
abaco: cleanup, handle image/x-icon, don't use backspace as a hotkey, and remove...
[plan9front.git] / sys / src / cmd / acid / util.c
index f77e9f8297cf4491e36ef5c70ff65156a3ebeb17..46431f75ec263d976ac3dc93c569581baac89147 100644 (file)
@@ -7,6 +7,7 @@
 #include "acid.h"
 #include "y.tab.h"
 
+char afmt = 'X';
 static int syren;
 
 Lsym*
@@ -71,6 +72,12 @@ varsym(void)
                        if(s->name[0] == '.')
                                continue;
 
+                       if(strlen(s->name) >= sizeof(buf)-6){
+                               if(!quiet)
+                                       print("Symbol name too long: %s\n", s->name);
+                               continue;
+                       }
+
                        v = s->value;
                        tl = al(TLIST);
                        *tail = tl;
@@ -82,7 +89,7 @@ varsym(void)
                        l->v->type = TINT;
                        l->v->ival = v;
                        if(l->v->comt == 0)
-                               l->v->fmt = 'X';
+                               l->v->fmt = 'A';
 
                        /* Enter as list of { name, type, value } */
                        list = al(TSTRING);
@@ -95,7 +102,7 @@ varsym(void)
                        list->ival = s->type;
                        list->next = al(TINT);
                        list = list->next;
-                       list->fmt = 'X';
+                       list->fmt = l->v->fmt;
                        list->ival = v;
 
                }
@@ -116,6 +123,12 @@ varreg(void)
        Reglist *r;
        List **tail, *li;
 
+       if(mach->szaddr == 8){
+               afmt = 'Y';
+               fsize['a'] = fsize[afmt];
+               fsize['A'] = fsize[afmt];
+       }
+
        l = mkvar("registers");
        v = l->v;
        v->set = 1;