-o option in newlisp commandline

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

-o option in newlisp commandline

Post by newdep »

Hi Lutz,

Found some time to fiddle the OS//2 port of newlisp and added an extra function
(not very impressive but usefull for me, especialy in OS/2) to the newlisp commandline.

I added the -o option below



[C:\utils\prog\nl\newlisp-8.9.3]newlisp -h

newLISP v.8.9.3 Copyright (c) 2006 Lutz Mueller. All rights reserved.

usage: newlisp [file ...] [options ...] [file ...]

options:


-h this help
-s <stacksize>
-m <max-mem-megabyte>
-c suppress prompts
-l log connections only
-L log all
-p <port-number>
-d <port-number>
-x <port-number>
-e <quoted lisp expression>
-o <quoted lisp expression with no exit>, used in OS/2

for more information see http://newlisp.org





-o <quoted lisp expression with no exit>, used in OS/2

This does not exit(0) after execution and your are able to stay in the newlisp comsole.

The use is that when not using an init.lsp or want to execute anyting befor newlisp
starts this -o option can be used. I find it very handy to use befor the newlisp starts i.e.
like this ->

c:\newlisp -o "(!\"mode 154,40\")"

0
newLISP v.8.9.3 on OS/2 v4+, execute 'newlisp -h' for more info.

>


perhpas its intresting as a generic command for the newlisp distribution?


Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

You could use the following batch file:

Code: Select all

# - newlispOS2
echo $1 > /tmp/junk
newlisp /tmp/junk
and then do:

Code: Select all

~> ./newlispOS2 '(setq x 123)'
newLISP v.8.9.3 on OSX UTF-8, execute 'newlisp -h' for more info.

> x
123
> 

Locked