File: led.min.l

package info (click to toggle)
picolisp 3.1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,100 kB
  • sloc: ansic: 14,205; lisp: 795; makefile: 290; sh: 13
file content (23 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 05feb05abu
# (c) Software Lab. Alexander Burger

# *Line

# Line input editing
(de mkChar (C)
   (prin C)
   (queue '*Line C) )

# Enable line editing
(de *Led
   (use C
      (until (member (setq C (key)) '("^J" "^M"))
         (case C
            (("^H" "^?")
               (when *Line
                  (prin "^H ^H")
                  (setq *Line (cdr (rot *Line))) ) )
            ("^I" (do 3 (mkChar " ")))
            (T (mkChar C)) ) ) )
   (prinl)
   (prog1 (pack *Line) (off *Line)) )