<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,8 +2,8 @@
 ;;; to perform the specified action.
 
 (define (main)
-  (define command (second (command-line)))
-  (define files (cddr (command-line)))
+  (define command (second command-line-args))
+  (define files (cddr command-line-args))
   (cond ((string-equal? command &quot;expand&quot;)
          (do-expand-files files))
         ((string-equal? command &quot;interpret&quot;)</diff>
      <filename>compiler/drivermain.pco</filename>
    </modified>
    <modified>
      <diff>@@ -8,4 +8,4 @@
   (read-integer (make-string-istream str) 10))
 
 (define (main)
-  (formout stdout &quot;~D~%&quot; (fib (atoi (second (command-line))))))
+  (formout stdout &quot;~D~%&quot; (fib (atoi (second command-line-args)))))</diff>
      <filename>examples/fib.pco</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@
    (eval-body-form (expand-body-form form dual-env) (cdr dual-env)))
 
   ;; process runtime files
-  (dolist (file (cdr (command-line)))
+  (dolist (file (cdr command-line-args))
     (formout stderr &quot;Reading ~A~%&quot; file)
     (with-open-file-for-reading (in file)
       (define (eval-form-from-file)</diff>
      <filename>language/repl.pco</filename>
    </modified>
    <modified>
      <diff>@@ -1386,34 +1386,31 @@
 
 ;;; Command line access
 
-(define (copy-c-string addr)
-  (define (strlen addr)
-    (define (aux offset)
-        (if (= 0 (raw-&gt;fixnum (raw-1-vec-ref addr offset)))
-            offset
-            (aux (1+ offset))))
+(when-compiling
+  (define (copy-c-string addr)
+    (define (strlen addr)
+      (define (aux offset)
+          (if (= 0 (raw-&gt;fixnum (raw-1-vec-ref addr offset)))
+              offset
+              (aux (1+ offset))))
+      (aux 0))
+
+    (define len (strlen addr))
+    (define str (make-string len))
+    (raw-1-copy addr (raw-string-address str 0) len)
+    str)
+
+  (define (c-string-array-to-list addr)
+    (define (aux index)
+        (define str-addr (raw-vec-ref addr index))
+      (if (eq? 0 str-addr)
+          ()
+          (cons (copy-c-string str-addr) (aux (1+ index)))))
     (aux 0))
 
-  (define len (strlen addr))
-  (define str (make-string len))
-  (raw-1-copy addr (raw-string-address str 0) len)
-  str)
+  (define command-line-args
+          (c-string-array-to-list (raw-c-global &quot;lisp_argv&quot;))))
 
-(define (c-string-array-to-list addr)
-  (define (aux index)
-    (define str-addr (raw-vec-ref addr index))
-    (if (eq? 0 str-addr)
-        ()
-        (cons (copy-c-string str-addr) (aux (1+ index)))))
-  (aux 0))
-
-(define saved-command-line false)
-
-(define (command-line)
-  (unless saved-command-line
-    (set! saved-command-line
-      (c-string-array-to-list (raw-c-global &quot;lisp_argv&quot;))))
-  saved-command-line)
 
 ;;; Entry point function
 </diff>
      <filename>runtime/runtime.pco</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a71258d0bbfff67bd5ec74de689793c6ba8feabb</id>
    </parent>
  </parents>
  <author>
    <name>David Wragg</name>
    <email>david@wragg.org</email>
  </author>
  <url>http://github.com/dpw/pachuco/commit/99ab41c46d02bde82c18637ba405827240e2118f</url>
  <id>99ab41c46d02bde82c18637ba405827240e2118f</id>
  <committed-date>2008-11-25T11:14:54-08:00</committed-date>
  <authored-date>2008-11-25T11:10:47-08:00</authored-date>
  <message>Change the (command-line) funtion to a command-line-args variable</message>
  <tree>d225c8f9f1205dac7529bbd2723beed0d56cd5b8</tree>
  <committer>
    <name>David Wragg</name>
    <email>david@wragg.org</email>
  </committer>
</commit>
