~peterpall/maxima/+git/maxima.code:rtoy-handle-catprog-args

Last commit made on 2022-10-16
Get this branch:
git clone -b rtoy-handle-catprog-args https://git.launchpad.net/~peterpall/maxima/+git/maxima.code

Branch merges

Branch information

Name:
rtoy-handle-catprog-args
Repository:
lp:~peterpall/maxima/+git/maxima.code

Recent commits

d0fc96e... by Raymond Toy <email address hidden>

Handle lisp args better for category program

The current code does
```
$lispprog $lispargs
```

But when lispargs is complicated, this doesn't actually pass the
desired lispargs correctly. For example for cmucl, we want to do
```
lispargs="-noinit -nositeinit -eval '(setf *gc-verbose* nil *default-external-format* :utf8)' -eval '(set-system-external-format :utf8 :utf8)' -load $catprogname -eval '(quit)'"
```

But the actual args are parsed in an unexpected way. This can be tested
via this simple program
```
#include <stdio.h>
int
main(int argc, char **argv)
{
        int i;

        for (i = 0; i < argc; i++) printf("argv[%d]='%s'\n", i, argv[i]);
        return 0;
}
```

Then
```
$ lispargs="-noinit -nositeinit -eval '(setf *gc-verbose* nil *default-external-format* :utf8)' -eval '(set-system-external-format :utf8 :utf8)' -load $catprogname -eval '(quit)'"
$ ./args $lispargs
argv[0]='./args'
argv[1]='-noinit'
argv[2]='-nositeinit'
argv[3]='-eval'
argv[4]=''(setf'
argv[5]='*gc-verbose*'
argv[6]='nil'
argv[7]='*default-external-format*'
argv[8]=':utf8)''
argv[9]='-eval'
argv[10]=''(set-system-external-format'
argv[11]=':utf8'
argv[12]=':utf8)''
argv[13]='-load'
argv[14]='-eval'
argv[15]=''(quit)''

```
Note that the `(setf *gc-verbose* nil)` is broken up into 3 separate
args which is not what we want. It should be just one arg, which is
the arg to `-eval`. What we really want is:
```
argv[0]='./args'
argv[1]='-noinit'
argv[2]='-nositeinit'
argv[3]='-eval'
argv[4]='(setf *gc-verbose* nil *default-external-format* :utf8)'
argv[5]='-eval'
argv[6]='(set-system-external-format :utf8 :utf8)'
argv[7]='-load'
argv[8]='-eval'
argv[9]='(quit)'
```

To fix this, we add a `runlisp` function to run the lisp with the
desired args. And instead of putting all the args into lispargs, we
just call runlisp after deciding which lisp is being used and just
append the desired args to the runlisp command.

ce29527... by Wolfgang Dautermann <email address hidden>

Typo in commit b68360c6 fixed.

ffa742e... by Raymond Toy <email address hidden>

Add xref to "Getting Started with ODEPACK"

In the description for dlsode_step and dlsode_init, add a cross-ref to
the section "Getting Started with ODEPACK" to help users figure out
where to go to learn how to use the functions.

Also fixed a typo, and added @math{} to a couple of places to make it
typeset a bit nicer.

fdc7b4a... by Wolfgang Dautermann <email address hidden>

Windows installer: Update wxWidgets.

b68360c... by Wolfgang Dautermann <email address hidden>

Add quit() with an exit code to the german documentation.

a5d0486... by Raymond Toy <email address hidden>

Quit supports an exit code

Quit takes an optional integer that is used as the exit code from
maxima.

* src/suprv1.lisp
  * Add optional exit-code arg for $quit; this calls bye with the
    given code.

* src/utils.lisp
  * Add optional exit-code arg to bye. This calls the appropriate
    implementation-specific function with the exit-code if possible.
    Otherwise it's ignored.

* doc/info/Command.texi
  * Update docs to mention the optional exit-code

*

b7e2cf1... by Wolfgang Dautermann <email address hidden>

Windows installer: Update SBCL.

a204668... by Raymond Toy <email address hidden>

Add functions to categories for hompack, minpack, odepack

The functions in the hompack, minpack, and odepack packages were not
listed in any category. Thus, add them to the corresponding package
categories.

231452a... by Raymond Toy <email address hidden>

Ignore math.m4 and cobyla.texi

These are generated files. math.m4 is generated by configure, and
cobyla.texi is processed from cobyla.texi.m4

f74a31f... by Raymond Toy <email address hidden>

Add intro sentence for the examples

The examples just randomly start after the table, which is weird. So,
add an intro sentence to separate the end of the table and the
beginning of the examples.