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:25Showing 2 changed files
... | ... |
@@ -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)))))) |