File: vip

package info (click to toggle)
picolisp 25.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,388 kB
  • sloc: ansic: 3,092; javascript: 1,004; makefile: 107; sh: 2
file content (30 lines) | stat: -rwxr-xr-x 904 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/picolisp /usr/lib/picolisp/lib.l
# 26feb25abu

(unless *Dbg
   (load "@lib/vip.l") )

(stack 1024)

(bye
   (if
      (vip~vi  ## [+<pat> | +[<num>]] <file1>  [+[<num>]] <file2> ..
         (make
            (while (opt)
               (let (S @  L (chop S))
                  (cond
                     ((pre? "+" S)
                        (link
                           (ifn (get (any (cdr L)) '*Dbg 1)
                              (cons
                                 (cond
                                    ((= "+" S) T)
                                    ((format S) @)
                                    (T (cdr L)) )
                                 (opt) )
                              (symbols (cddr @))
                              (cons (car @) (cadr @)) ) ) )
                     ((pre? "-" S) (load S))
                     (T (link S)) ) ) ) ) )
      0
      1 ) )