batch bug in xmaxima(%i1) load("foo_3");



Hi Robert,
  This patch fixed my problems with "batch" so far.

Thanks,
  -sen

BTW, I could not get "patch" to install it. So, I just edited the
macsys.lisp file manually.



  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------

On Thu, 15 Feb 2007, Robert Dodier wrote:

> On 2/13/07, sen1 at math.msu.edu <sen1 at math.msu.edu> wrote:
>
>>   Here is an attachment of a file which has the problem of being
>>   loadable with alt-o but not with alt-b.
>
> Sheldon, I have committed a patch to src/macsys.lisp which,
> I think, fixes this problem. I believe the Maxima input loop was
> stuff in batch mode because of the trailing comment in the file.
> I'm cc'ing this to the mailing list since a  change of this kind has
> the potential for widespread, subtle mischief (though I know of
> none at present). I tried it with Xmaxima on Windows & Linux
> and it seemed to work OK.
>
> Robert
>
> PS. Here's the patch.
> --- src/macsys.lisp     11 Feb 2007 05:33:21 -0000      1.55
> +++ src/macsys.lisp     16 Feb 2007 02:02:03 -0000
> @@ -144,8 +144,11 @@
>                  (boundp '*socket-connection*))
>                 (progn
>                   (setq input-stream *standard-input*)
> -                  (setq *mread-prompt* nil)
> -                  (setq r (dbm-read input-stream nil eof))))
> +           (if batch-or-demo-flag
> +             (return '$done)
> +             (progn
> +               (setq *mread-prompt* nil)
> +               (setq r (dbm-read input-stream nil eof))))))
>
>             (cond ((and (eq r eof) (boundp '*socket-connection*)
>                         (eq input-stream *socket-connection*))
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>