picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 0b711ba1d3c179cd33b447d6146b7be946ce72a0
parent 9f5de045862dec778408b37c4a0ce23dcd628a23
Author: Alexander Burger <abu@software-lab.de>
Date:   Sat, 17 Nov 2012 14:44:04 +0100

Build ETags without temporary file
Diffstat:
Mlib/debug.l | 34++++++++++++++++++----------------
Msrc64/lib/asm.l | 36++++++++++++++++++------------------
2 files changed, 36 insertions(+), 34 deletions(-)

diff --git a/lib/debug.l b/lib/debug.l @@ -164,26 +164,28 @@ (when (: *Dbg) (cons (path (cdar @)) (caar @) This) ) ) (all) ) ) - (let (Tmp (tmp (basename (car Lst))) Line 1 Ofs 0) - (out Tmp - (in (car Lst) - (for X (sort (cdr Lst)) - (do (- (car X) Line) - (inc 'Ofs (inc (size (line T)))) ) - (prinl - (char 127) - (cdr X) - (char 1) - (setq Line (car X)) - "," - Ofs ) ) ) ) - (prinl "^L") + (let Tags + (in (car Lst) + (let (Line 1 Ofs 0) + (mapcar + '((X) + (do (- (car X) Line) + (inc 'Ofs (inc (size (line T)))) ) + (pack + `(pack "^J" (char 127)) + (cdr X) + (char 1) + (setq Line (car X)) + "," + Ofs ) ) + (sort (cdr Lst)) ) ) ) (prinl + "^L^J" (unless (= `(char "/") (char (car Lst))) D) (car Lst) "," - (car (info Tmp)) ) - (in Tmp (echo)) ) ) ) ) + (sum size Tags) + Tags ) ) ) ) ) (call 'vim (pack "+set tags=" (tmp "tags") ",./tags") "+set isk=33-34,36-38,42-90,92,94-95,97-125" diff --git a/src64/lib/asm.l b/src64/lib/asm.l @@ -50,30 +50,30 @@ (when "Map" (out "tags" (for Lst - (group # ((path . file) (line . sym) (line . sym) ..) + (group # (file (line . sym) (line . sym) ..) (mapcar '((This) (cons - (cons (: src 1) (: src 2)) + (pack (: src 1) (: src 2)) (: src -2) This ) ) (idx '*Tags) ) ) - (let (Tmp (tmp (cdar Lst)) Src (pack (car Lst)) Line 1 Ofs 0) - (out Tmp - (in Src - (for X (sort (cdr Lst)) - (do (- (car X) Line) - (inc 'Ofs (inc (size (line T)))) ) - (prinl - (char 127) - (cdr X) - (char 1) - (setq Line (car X)) - "," - Ofs ) ) ) ) - (prinl "^L") - (prinl Src "," (car (info Tmp))) - (in Tmp (echo)) ) ) ) + (let Tags + (in (car Lst) + (let (Line 1 Ofs 0) + (mapcar + '((X) + (do (- (car X) Line) + (inc 'Ofs (inc (size (line T)))) ) + (pack + `(pack "^J" (char 127)) + (cdr X) + (char 1) + (setq Line (car X)) + "," + Ofs ) ) + (sort (cdr Lst)) ) ) ) + (prinl "^L^J" (car Lst) "," (sum size Tags) Tags) ) ) ) (out "Map" (for Sym (idx '*Map) (and