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 199794dfd6392a20cc3cdc78e7b6f27bd5493d89
parent c2f78d0b8559316412be6b57ab810d2216626b3b
Author: Commit-Bot <unknown>
Date:   Tue, 14 Sep 2010 07:13:45 +0000

Automatic commit from picoLisp.tgz, From: Tue, 14 Sep 2010 07:13:45 GMT
Diffstat:
Alib/el/README | 23+++++++++++++++++++++++
Mlib/tags | 80++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/io.c | 28+++++++++++++++-------------
Msrc64/flow.l | 16+++++++---------
Msrc64/io.l | 22+++++++++-------------
Msrc64/version.l | 4++--
6 files changed, 96 insertions(+), 77 deletions(-)

diff --git a/lib/el/README b/lib/el/README @@ -0,0 +1,23 @@ +In order to get the picolisp-mode working correctly you have to add the following expressions to your .emacs and adapt them according to your set-up: + +(add-to-list 'load-path "<path-to>/picoLisp/lib/el") +(load "tsm.el") ;; Picolisp TransientSymbolsMarkup (*Tsm) +(autoload 'run-picolisp "inferior-picolisp") +(autoload 'picolisp-mode "picolisp" "Major mode for editing Picolisp." t) +(setq picolisp-program-name "<path-to>/picoLisp/plmod") + +If you have also SLIME installed, it will suck all possible lisp extensions up (greedy bastard). So in order to get the correct file-association for picolisp files you'll have to also add this: + +(add-to-list 'auto-mode-alist '("\\.l$" . picolisp-mode)) + +If you want, you can add a few hooks for convenience: + +(add-hook 'picolisp-mode-hook + (lambda () + (paredit-mode +1) ;; Loads paredit mode automatically + (tsm-mode) ;; Enables TSM + (define-key picolisp-mode-map (kbd "RET") 'newline-and-indent) + (define-key picolisp-mode-map (kbd "C-h") 'paredit-backward-delete) ) ) + + +By the way, don't forget to patch your paredit.el (v21) with the patch provided to get a smoother editing. diff --git a/lib/tags b/lib/tags @@ -29,7 +29,7 @@ adr (613 . "@src64/main.l") alarm (487 . "@src64/main.l") all (772 . "@src64/sym.l") and (1643 . "@src64/flow.l") -any (3778 . "@src64/io.l") +any (3774 . "@src64/io.l") append (1329 . "@src64/subr.l") apply (597 . "@src64/apply.l") arg (2243 . "@src64/main.l") @@ -46,7 +46,7 @@ bool (1743 . "@src64/flow.l") box (841 . "@src64/flow.l") box? (999 . "@src64/sym.l") by (1553 . "@src64/apply.l") -bye (3453 . "@src64/flow.l") +bye (3451 . "@src64/flow.l") caaaar (271 . "@src64/subr.l") caaadr (288 . "@src64/subr.l") caaar (99 . "@src64/subr.l") @@ -82,11 +82,11 @@ cdddr (245 . "@src64/subr.l") cddr (79 . "@src64/subr.l") cdr (17 . "@src64/subr.l") chain (1132 . "@src64/subr.l") -char (3260 . "@src64/io.l") +char (3256 . "@src64/io.l") chop (1093 . "@src64/sym.l") circ (816 . "@src64/subr.l") clip (1786 . "@src64/subr.l") -close (4166 . "@src64/io.l") +close (4162 . "@src64/io.l") cmd (2846 . "@src64/main.l") cnt (1297 . "@src64/apply.l") co (2566 . "@src64/flow.l") @@ -97,7 +97,7 @@ cond (1938 . "@src64/flow.l") connect (201 . "@src64/net.l") cons (747 . "@src64/subr.l") copy (1216 . "@src64/subr.l") -ctl (4106 . "@src64/io.l") +ctl (4102 . "@src64/io.l") ctty (2644 . "@src64/main.l") cut (1797 . "@src64/sym.l") date (2358 . "@src64/main.l") @@ -114,13 +114,13 @@ dir (2777 . "@src64/main.l") dm (561 . "@src64/flow.l") do (2158 . "@src64/flow.l") e (2932 . "@src64/flow.l") -echo (4197 . "@src64/io.l") +echo (4193 . "@src64/io.l") env (625 . "@src64/main.l") -eof (3337 . "@src64/io.l") -eol (3328 . "@src64/io.l") +eof (3333 . "@src64/io.l") +eol (3324 . "@src64/io.l") errno (1358 . "@src64/main.l") eval (208 . "@src64/flow.l") -ext (4926 . "@src64/io.l") +ext (4922 . "@src64/io.l") ext? (1034 . "@src64/sym.l") extern (900 . "@src64/sym.l") extra (1284 . "@src64/flow.l") @@ -135,13 +135,13 @@ find (1206 . "@src64/apply.l") fish (1497 . "@src64/apply.l") flg? (2419 . "@src64/subr.l") flip (1686 . "@src64/subr.l") -flush (4901 . "@src64/io.l") +flush (4897 . "@src64/io.l") fold (3343 . "@src64/sym.l") for (2247 . "@src64/flow.l") fork (3276 . "@src64/flow.l") format (2089 . "@src64/big.l") free (2035 . "@src64/db.l") -from (3356 . "@src64/io.l") +from (3352 . "@src64/io.l") full (1066 . "@src64/subr.l") fun? (734 . "@src64/sym.l") gc (439 . "@src64/gc.l") @@ -153,14 +153,14 @@ glue (1234 . "@src64/sym.l") gt0 (2702 . "@src64/big.l") head (1807 . "@src64/subr.l") heap (542 . "@src64/main.l") -hear (3078 . "@src64/io.l") +hear (3074 . "@src64/io.l") host (184 . "@src64/net.l") id (1027 . "@src64/db.l") idx (2037 . "@src64/sym.l") if (1824 . "@src64/flow.l") if2 (1843 . "@src64/flow.l") ifn (1884 . "@src64/flow.l") -in (4002 . "@src64/io.l") +in (3998 . "@src64/io.l") inc (2256 . "@src64/big.l") index (2611 . "@src64/subr.l") info (2681 . "@src64/main.l") @@ -169,21 +169,21 @@ ipid (3221 . "@src64/flow.l") isa (978 . "@src64/flow.l") job (1448 . "@src64/flow.l") journal (970 . "@src64/db.l") -key (3187 . "@src64/io.l") +key (3183 . "@src64/io.l") kill (3253 . "@src64/flow.l") last (2031 . "@src64/subr.l") length (2687 . "@src64/subr.l") let (1498 . "@src64/flow.l") let? (1559 . "@src64/flow.l") lieu (1156 . "@src64/db.l") -line (3512 . "@src64/io.l") -lines (3665 . "@src64/io.l") +line (3508 . "@src64/io.l") +lines (3661 . "@src64/io.l") link (1163 . "@src64/subr.l") lisp (1921 . "@src64/main.l") list (887 . "@src64/subr.l") listen (151 . "@src64/net.l") lit (183 . "@src64/flow.l") -load (3979 . "@src64/io.l") +load (3975 . "@src64/io.l") lock (1184 . "@src64/db.l") loop (2190 . "@src64/flow.l") low? (3215 . "@src64/sym.l") @@ -233,31 +233,31 @@ offset (2651 . "@src64/subr.l") on (1583 . "@src64/sym.l") onOff (1613 . "@src64/sym.l") one (1646 . "@src64/sym.l") -open (4128 . "@src64/io.l") +open (4124 . "@src64/io.l") opid (3237 . "@src64/flow.l") opt (2967 . "@src64/main.l") or (1659 . "@src64/flow.l") -out (4022 . "@src64/io.l") +out (4018 . "@src64/io.l") pack (1144 . "@src64/sym.l") pair (2381 . "@src64/subr.l") pass (638 . "@src64/apply.l") pat? (720 . "@src64/sym.l") path (1200 . "@src64/io.l") -peek (3244 . "@src64/io.l") +peek (3240 . "@src64/io.l") pick (1253 . "@src64/apply.l") pid (157 . "@src64/flow.l") -pipe (4043 . "@src64/io.l") -poll (3140 . "@src64/io.l") +pipe (4039 . "@src64/io.l") +poll (3136 . "@src64/io.l") pool (648 . "@src64/db.l") pop (1773 . "@src64/sym.l") port (5 . "@src64/net.l") -pr (5017 . "@src64/io.l") +pr (5013 . "@src64/io.l") pre? (1411 . "@src64/sym.l") -prin (4825 . "@src64/io.l") -prinl (4839 . "@src64/io.l") -print (4865 . "@src64/io.l") -println (4896 . "@src64/io.l") -printsp (4881 . "@src64/io.l") +prin (4821 . "@src64/io.l") +prinl (4835 . "@src64/io.l") +print (4861 . "@src64/io.l") +println (4892 . "@src64/io.l") +printsp (4877 . "@src64/io.l") prog (1779 . "@src64/flow.l") prog1 (1787 . "@src64/flow.l") prog2 (1804 . "@src64/flow.l") @@ -276,15 +276,15 @@ rand (2959 . "@src64/big.l") range (988 . "@src64/subr.l") rank (2970 . "@src64/subr.l") raw (465 . "@src64/main.l") -rd (4943 . "@src64/io.l") +rd (4939 . "@src64/io.l") read (2532 . "@src64/io.l") replace (1490 . "@src64/subr.l") rest (2272 . "@src64/main.l") reverse (1665 . "@src64/subr.l") -rewind (4909 . "@src64/io.l") +rewind (4905 . "@src64/io.l") rollback (1886 . "@src64/db.l") rot (848 . "@src64/subr.l") -rpc (5050 . "@src64/io.l") +rpc (5046 . "@src64/io.l") run (331 . "@src64/flow.l") sect (2515 . "@src64/subr.l") seed (2944 . "@src64/big.l") @@ -295,31 +295,31 @@ set (1482 . "@src64/sym.l") setq (1515 . "@src64/sym.l") sigio (503 . "@src64/main.l") size (2752 . "@src64/subr.l") -skip (3314 . "@src64/io.l") +skip (3310 . "@src64/io.l") sort (3869 . "@src64/subr.l") sp? (711 . "@src64/sym.l") -space (4843 . "@src64/io.l") +space (4839 . "@src64/io.l") split (1579 . "@src64/subr.l") stack (571 . "@src64/main.l") state (2028 . "@src64/flow.l") stem (1976 . "@src64/subr.l") -str (3832 . "@src64/io.l") +str (3828 . "@src64/io.l") str? (1013 . "@src64/sym.l") strip (1563 . "@src64/subr.l") sub? (1444 . "@src64/sym.l") sum (1344 . "@src64/apply.l") super (1237 . "@src64/flow.l") -sym (3818 . "@src64/io.l") +sym (3814 . "@src64/io.l") sym? (2408 . "@src64/subr.l") -sync (3040 . "@src64/io.l") +sync (3036 . "@src64/io.l") sys (3073 . "@src64/flow.l") t (1770 . "@src64/flow.l") tail (1898 . "@src64/subr.l") -tell (3110 . "@src64/io.l") +tell (3106 . "@src64/io.l") text (1272 . "@src64/sym.l") throw (2510 . "@src64/flow.l") tick (3189 . "@src64/flow.l") -till (3423 . "@src64/io.l") +till (3419 . "@src64/io.l") time (2491 . "@src64/main.l") touch (1049 . "@src64/sym.l") trim (1746 . "@src64/subr.l") @@ -336,12 +336,12 @@ use (1592 . "@src64/flow.l") usec (2596 . "@src64/main.l") val (1463 . "@src64/sym.l") version (2981 . "@src64/main.l") -wait (3002 . "@src64/io.l") +wait (2998 . "@src64/io.l") when (1903 . "@src64/flow.l") while (2080 . "@src64/flow.l") wipe (3090 . "@src64/sym.l") with (1349 . "@src64/flow.l") -wr (5034 . "@src64/io.l") +wr (5030 . "@src64/io.l") xchg (1538 . "@src64/sym.l") xor (1720 . "@src64/flow.l") x| (2871 . "@src64/big.l") diff --git a/src/io.c b/src/io.c @@ -1,4 +1,4 @@ -/* 11sep10abu +/* 14sep10abu * (c) Software Lab. Alexander Burger */ @@ -174,12 +174,14 @@ bool wrBytes(int fd, byte *p, int cnt) { return YES; p += n; } - else if (errno == EBADF || errno == EPIPE || errno == ECONNRESET) - return NO; - else if (errno != EINTR) - writeErr("bytes"); - if (*Signal) - sighandler(NULL); + else { + if (errno == EBADF || errno == EPIPE || errno == ECONNRESET) + return NO; + if (errno != EINTR) + writeErr("bytes"); + if (*Signal) + sighandler(NULL); + } } } @@ -1463,8 +1465,6 @@ long waitFd(any ex, int fd, long ms) { } } } - if (*Signal) - sighandler(ex); } while (ms && fd >= 0 && !isSet(fd, &rdSet)); Env.task = taskSave; val(At) = Pop(c1); @@ -1500,10 +1500,12 @@ any doSync(any ex) { break; p += n; } - else if (errno != EINTR) - writeErr("sync"); - if (*Signal) - sighandler(ex); + else { + if (errno != EINTR) + writeErr("sync"); + if (*Signal) + sighandler(ex); + } } Sync = NO; do diff --git a/src64/flow.l b/src64/flow.l @@ -1,4 +1,4 @@ -# 04sep10abu +# 13sep10abu # (c) Software Lab. Alexander Burger (code 'redefMsgEC) @@ -3299,12 +3299,12 @@ ld4 (SpMiPipe 4) # Write end call closeOnExecAX end - push A # Create 'hear' and 'tell' pipes - push A - cc pipe(S) # Open 'hear' pipe + push A # Create 'tell' pipe + cc pipe(S) # Open 'tell' pipe nul4 # OK? jnz pipeErrX - cc pipe(&(S 8)) # Open 'tell' pipe + push A # Create 'hear' pipe + cc pipe(S) # Open 'hear' pipe nul4 # OK? jnz pipeErrX ld4 (S) # Read end of 'hear' @@ -3411,10 +3411,9 @@ setc # Return "in child" ret end + push A # Save child's 'pid' cmp C (Children) # Children table full? - ldnz E A # No: Get 'pid' into E if eq # Yes - push A # Save child's 'pid' ld A (Child) # Get vector ld E C # Children add E (* 8 VI) # Eight more slots @@ -3428,10 +3427,9 @@ ld (A) 0 # Clear 'pid' dec E # Done? until z # Yes - pop E # Get 'pid' end add C (Child) # Point C to free 'child' entry - ld (C) E # Set 'pid' + pop (C) # Set 'pid' ld4 (S) # Close read end of 'hear' call closeAX ld4 (S 4) # Write end of 'hear' diff --git a/src64/io.l b/src64/io.l @@ -1,4 +1,4 @@ -# 11sep10abu +# 14sep10abu # (c) Software Lab. Alexander Burger # Close file descriptor @@ -327,10 +327,10 @@ jeq retnz # Return 'nz' cmp A EINTR # Interrupted? jne wrBytesErr # No - end - null (Signal) # Signal? - if nz # Yes - call sighandler0 + null (Signal) # Signal? + if nz # Yes + call sighandler0 + end end loop @@ -2765,10 +2765,6 @@ ld (Run) Nil # Clear '*Run' jmp selectErrX end - null (Signal) # Signal? - if nz # Yes - call sighandlerX - end loop call msec_A # Get milliseconds sub A E # Time difference @@ -3057,10 +3053,10 @@ call errno_A cmp A EINTR # Interrupted? jne wrSyncErrX # No - end - null (Signal) # Signal? - if nz # Yes - call sighandlerX + null (Signal) # Signal? + if nz # Yes + call sighandlerX + end end loop set (Sync) 0 # Clear sync flag diff --git a/src64/version.l b/src64/version.l @@ -1,6 +1,6 @@ -# 07sep10abu +# 14sep10abu # (c) Software Lab. Alexander Burger -(de *Version 3 0 3 20) +(de *Version 3 0 3 21) # vi:et:ts=3:sw=3