]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/acid/lex.c
abaco: cleanup, handle image/x-icon, don't use backspace as a hotkey, and remove...
[plan9front.git] / sys / src / cmd / acid / lex.c
old mode 100755 (executable)
new mode 100644 (file)
index ca28548..5c7ed6c
@@ -329,6 +329,14 @@ loop:
        case '\t':
                goto loop;
 
+       case '/':
+               c = lexc();
+               if(c != '/'){
+                       unlexc(c);
+                       return '/';
+               }
+               eatnl();
+
        case '\n':
                line++;
                if(interactive == 0)
@@ -391,15 +399,6 @@ loop:
                unlexc(c);
                return '+';
 
-       case '/':
-               c = lexc();
-               if(c == '/') {
-                       eatnl();
-                       goto loop;
-               }
-               unlexc(c);
-               return '/';
-
        case '\'':
                c = lexc();
                if(c == '\\')
@@ -570,11 +569,11 @@ enter(char *name, int t)
        s->lexval = t;
 
        v = gmalloc(sizeof(Value));
-       s->v = v;
-
+       memset(v, 0, sizeof(Value));
        v->fmt = 'X';
        v->type = TINT;
-       memset(v, 0, sizeof(Value));
+
+       s->v = v;
 
        return s;
 }