git.fiddlerwoaroof.com
Browse code

I am obviously not qualified to do this. The whole problem with the missing elements was my ignorance of CL's vector system.

In other diff news, I dropped a couple flags for the compiler code, but to be extra sure the whole C code is pure ANSI.

Fernando Borretti authored on 29/10/2013 00:03:25
Showing 2 changed files
... ...
@@ -19,7 +19,7 @@
19 19
 
20 20
 (defmethod perform ((o load-op) (c c->so)) t)
21 21
 
22
-(defparameter +c-flags+ "-Wall -Wextra -c -fPIC -O0 -ansi")
22
+(defparameter +c-flags+ "-Wall -Wextra -c -fPIC -O0 -g")
23 23
 (defparameter +linker-flags+ "-lyaml")
24 24
 
25 25
 (defun comp (file out)
... ...
@@ -33,7 +33,7 @@
33 33
 
34 34
 (defun process (str &optional (len (length str)))
35 35
   (let ((tok-list (tokenize str len))
36
-        (tokens (make-array 64 :fill-pointer 0)))
36
+        (tokens (make-array 64 :fill-pointer 0 :adjustable t)))
37 37
     (if (list-err tok-list)
38 38
         (error "Parsing error")
39 39
         (progn
... ...
@@ -42,10 +42,10 @@
42 42
                    (type (gethash (tok-type tok) +enum+)))
43 43
               (if type
44 44
                   (progn
45
-                    (vector-push (list type
46
-                                       (tok-value tok)
47
-                                       (tok-anchor tok))
48
-                                 tokens)
45
+                    (vector-push-extend (list type
46
+                                              (tok-value tok)
47
+                                              (tok-anchor tok))
48
+                                        tokens)
49 49
                     (destroy-nth-tok tok-list i)))))
50 50
           (destroy-token-list tok-list)
51 51
           (group-documents (clean tokens))))))