commit 16308d53306b0dbb774d9443d72663f167766b74
parent c17a1b7312ac3617fea2c2f1cf5806a5a955571b
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed,  9 Mar 2011 10:34:13 +0100
Removed 'rpc' function
Diffstat:
15 files changed, 23 insertions(+), 93 deletions(-)
diff --git a/CHANGES b/CHANGES
@@ -1,4 +1,5 @@
 * XXmar11 picoLisp-3.0.6
+   Removed 'rpc' function
    man pages for 'picolisp' and 'pil'
    'version' also for 32-bit
    Map/apply support for FEXPRs
diff --git a/ReleaseNotes b/ReleaseNotes
@@ -1,4 +1,4 @@
-08mar11abu
+09mar11abu
 (c) Software Lab. Alexander Burger
 
 
@@ -48,3 +48,6 @@
       http://code.google.com/p/picolisp/source/browse/?repo=addons
 
    and untar them over the install directory.
+
+7. The 'rpc' function was removed from the release. It is seldom used, and also
+   redundant: (rpc 'foo ''arg) is equivalent to (pr '(foo 'arg))
diff --git a/doc/ref.html b/doc/ref.html
@@ -2202,7 +2202,6 @@ abbreviations:
    <a href="refR.html#rd">rd</a>
    <a href="refP.html#pr">pr</a>
    <a href="refW.html#wr">wr</a>
-   <a href="refR.html#rpc">rpc</a>
    <a href="refW.html#wait">wait</a>
    <a href="refS.html#sync">sync</a>
    <a href="refE.html#echo">echo</a>
diff --git a/doc/refE.html b/doc/refE.html
@@ -375,13 +375,12 @@ href="refS.html#subr">subr</a></code>.
 <dt><a name="ext"><code>(ext 'cnt . prg) -> any</code></a>
 <dd>During the execution of <code>prg</code>, all <code><a
 href="ref.html#external">external symbols</a></code> processed by <code><a
-href="refR.html#rd">rd</a></code>, <code><a href="refP.html#pr">pr</a></code>,
-<code><a href="refR.html#rpc">rpc</a></code> or <code><a
-href="refU.html#udp">udp</a></code> are modified by an offset <code>cnt</code>
-suitable for mapping via the <code><a href="refE.html#*Ext">*Ext</a></code>
-mechanism. All external symbol's file numbers are decremented by
-<code>cnt</code> during output, and incremented by <code>cnt</code> during
-input.
+href="refR.html#rd">rd</a></code>, <code><a href="refP.html#pr">pr</a></code> or
+<code><a href="refU.html#udp">udp</a></code> are modified by an offset
+<code>cnt</code> suitable for mapping via the <code><a
+href="refE.html#*Ext">*Ext</a></code> mechanism. All external symbol's file
+numbers are decremented by <code>cnt</code> during output, and incremented by
+<code>cnt</code> during input.
 
 <pre><code>
 : (out 'a (ext 5 (pr '({6-2} ({8-9} . a) ({7-7} . b)))))
diff --git a/doc/refP.html b/doc/refP.html
@@ -267,8 +267,8 @@ the standard output of that process as input channel during the execution of
 <code>prg</code>. The current input channel will be saved and restored
 appropriately. See also <code><a href="refL.html#later">later</a></code>,
 <code><a href="refI.html#ipid">ipid</a></code>, <code><a
-href="refI.html#in">in</a></code>, <code><a href="refO.html#out">out</a></code>
-and <code><a href="refR.html#rpc">rpc</a></code>.
+href="refI.html#in">in</a></code> and <code><a
+href="refO.html#out">out</a></code>.
 
 <pre><code>
 : (pipe                                # equivalent to 'any'
@@ -443,8 +443,7 @@ href="refV.html#vi">vi</a></code>.
 channel in encoded binary format. See also <code><a
 href="refR.html#rd">rd</a></code>, <code><a
 href="refT.html#tell">tell</a></code>, <code><a
-href="refH.html#hear">hear</a></code>, <code><a
-href="refR.html#rpc">rpc</a></code> and <code><a
+href="refH.html#hear">hear</a></code> and <code><a
 href="refW.html#wr">wr</a></code>.
 
 <pre><code>
diff --git a/doc/refR.html b/doc/refR.html
@@ -238,8 +238,7 @@ little endian) is read as a single number. Upon end of file, if the
 <code>sym</code> argument is given, it is returned, otherwise <code>NIL</code>.
 See also <code><a href="refP.html#pr">pr</a></code>, <code><a
 href="refT.html#tell">tell</a></code>, <code><a
-href="refH.html#hear">hear</a></code>, <code><a
-href="refR.html#rpc">rpc</a></code> and <code><a
+href="refH.html#hear">hear</a></code> and <code><a
 href="refW.html#wr">wr</a></code>.
 
 <pre><code>
@@ -682,22 +681,6 @@ href="ref.html#num-io">Numbers</a></code>.
 -> "12.3456"
 </code></pre>
 
-<dt><a name="rpc"><code>(rpc 'sym ['any ..]) -> flg</code></a>
-<dd><i>Rapid</i> (or <i>remote</i>) procedure call: Send an executable list
-<code>(sym any ..)</code> via standard output in encoded binary format. See also
-<code><a href="refP.html#pr">pr</a></code>, <code><a
-href="refP.html#pipe">pipe</a></code>, <code><a
-href="refT.html#tell">tell</a></code> and <code><a
-href="refH.html#hear">hear</a></code>.
-
-<pre><code>
-: (hear (pipe (do 3 (wait 2000) (rpc 'println ''OK))))
--> 3
-: OK  # every two seconds
-OK
-OK
-</code></pre>
-
 <dt><a name="rules"><code>(rules 'sym ..) -> sym</code></a>
 <dd>Prints all rules defined for the <code>sym</code> arguments. See also <a
 href="ref.html#pilog">Pilog</a> and <code><a href="refB.html#be">be</a></code>.
diff --git a/doc/refT.html b/doc/refT.html
@@ -214,8 +214,7 @@ process. <code>tell</code> is also used internally by <code><a
 href="refC.html#commit">commit</a></code> to notify about database changes. When
 called without arguments, no message is actually sent, and the parent process
 may grant <code><a href="refS.html#sync">sync</a></code> to the next waiting
-process. See also <code><a href="refH.html#hear">hear</a></code> and <code><a
-href="refR.html#rpc">rpc</a></code>.
+process. See also <code><a href="refH.html#hear">hear</a></code>.
 
 <pre><code>
 : (call 'ps "x")                            # Show processes
diff --git a/lib/el/picolisp.el b/lib/el/picolisp.el
@@ -318,7 +318,7 @@ See `run-hooks'."
                       "skip" "eol" "eof" "from" "till" "line" "format" "scl" 
                       "read" "print" "println" "printsp" "prin" "prinl" "msg" 
                       "space" "beep" "tab" "flush" "rewind" "rd" "pr" "wr" 
-                      "rpc" "wait" "sync" "echo" "info" "file" "dir" "lines" 
+                      "wait" "sync" "echo" "info" "file" "dir" "lines" 
                       "open" "close" "port" "listen" "accept" "host" "connect" 
                       "udp" "script" "once" "rc" "pretty" "pp" "show" 
                       "view" "here" "prEval" "mail"
diff --git a/lib/tags b/lib/tags
@@ -286,7 +286,6 @@ reverse (1674 . "@src64/subr.l")
 rewind (5011 . "@src64/io.l")
 rollback (1890 . "@src64/db.l")
 rot (848 . "@src64/subr.l")
-rpc (5144 . "@src64/io.l")
 run (313 . "@src64/flow.l")
 sect (2537 . "@src64/subr.l")
 seed (2958 . "@src64/big.l")
diff --git a/src/io.c b/src/io.c
@@ -1,4 +1,4 @@
-/* 05feb11abu
+/* 09mar11abu
  * (c) Software Lab. Alexander Burger
  */
 
@@ -2579,21 +2579,6 @@ any doWr(any x) {
    return y;
 }
 
-static void putChar(int c) {putchar_unlocked(c);}
-
-// (rpc 'sym ['any ..]) -> flg
-any doRpc(any x) {
-   any y;
-
-   x = cdr(x);
-   putChar(BEG);
-   do
-      y = EVAL(car(x)),  putBin = putChar,  binPrint(ExtN, y);
-   while (isCell(x = cdr(x)));
-   putChar(END);
-   return fflush(stdout)? Nil : T;
-}
-
 /*** DB-I/O ***/
 #define BLKSIZE 64  // DB block unit size
 #define BLK 6
diff --git a/src/pico.h b/src/pico.h
@@ -1,4 +1,4 @@
-/* 07mar11abu
+/* 09mar11abu
  * (c) Software Lab. Alexander Burger
  */
 
@@ -674,7 +674,6 @@ any doReverse(any);
 any doRewind(any);
 any doRollback(any);
 any doRot(any);
-any doRpc(any);
 any doRun(any);
 any doSect(any);
 any doSeed(any);
diff --git a/src/tab.c b/src/tab.c
@@ -1,4 +1,4 @@
-/* 07mar11abu
+/* 09mar11abu
  * (c) Software Lab. Alexander Burger
  */
 
@@ -286,7 +286,6 @@ static symInit Symbols[] = {
    {doRewind, "rewind"},
    {doRollback, "rollback"},
    {doRot, "rot"},
-   {doRpc, "rpc"},
    {doRun, "run"},
    {doSect, "sect"},
    {doSeed, "seed"},
diff --git a/src64/glob.l b/src64/glob.l
@@ -1,4 +1,4 @@
-# 25feb11abu
+# 09mar11abu
 # (c) Software Lab. Alexander Burger
 
 (data 'Globals 0)
@@ -522,7 +522,6 @@
    initFun NIL       "rd"        doRd
    initFun NIL       "pr"        doPr
    initFun NIL       "wr"        doWr
-   initFun NIL       "rpc"       doRpc
 
    # Database
    initFun NIL       "pool"      doPool
diff --git a/src64/io.l b/src64/io.l
@@ -1,4 +1,4 @@
-# 03mar11abu
+# 09mar11abu
 # (c) Software Lab. Alexander Burger
 
 # Close file descriptor
@@ -5140,33 +5140,4 @@
    pop X
    ret
 
-# (rpc 'sym ['any ..]) -> flg
-(code 'doRpc 2)
-   push X
-   ld X (E CDR)  # Args
-   ld A BEG  # Begin list
-   call putCharB
-   do
-      ld E (X)  # Eval next arg
-      eval
-      ld (PutBinBZ) putCharB  # Set binary print function
-      ld (Extn) (ExtN)  # Set external symbol offset
-      call binPrintEZ
-      ld X (X CDR)  # X on rest
-      atom X  # Any
-   until nz  # No
-   ld A END  # End list
-   call putCharB
-   cc fflush((stdout))  # Flush
-   nul4  # OK?
-   ld E Nil
-   ldz E TSym  # Yes
-   pop X
-   ret
-
-(code 'putCharB 0)
-   zxt  # Extend into A
-   cc putchar_unlocked(A)
-   ret
-
 # vi:et:ts=3:sw=3
diff --git a/test/src/io.l b/test/src/io.l
@@ -1,4 +1,4 @@
-# 07aug10abu
+# 09mar11abu
 # (c) Software Lab. Alexander Burger
 
 ### path ###
@@ -219,9 +219,4 @@
    (in (tmp "wr")
       (rd 3) ) )
 
-
-### rpc ###
-(test *Pid
-   (pipe (rpc '*Pid) (run (rd))) )
-
 # vi:et:ts=3:sw=3