-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
in the last few days I've extended the upload tool from
pix. He has written a nice python script to ease (and
speed up) the sending of forth source code to amforth without
running into trouble due to lost characters etc.
You can find the script in the subversion repository (re-connect
the link if broken), the next release of amforth will contain
it as well (if I do not forget to include it)
http://amforth.svn.sourceforge.net/viewvc/amforth/tools/amforth-upload.py?view=markup
It has two enhancements which are related: first it
scans the uploaded text for a command named #include.
When it detects this command, it will take the
next word as a filename and send it's content insted of the
two words. That looks like the following excerpt:
- -----8<--------8<--------8<-
...
#include ans94/marker.frt
#include bitnames.frt
marker _hello_
: hello_world ." Hello World " ;
hello_world
- ---------8<---------8<--------8<
As you may notice, subdirectories can be used. But no
spaces in the (file)names. The syntax is modelled after
the C preprocessor (and not something forth-ish) since
the code cannot be used without that preprocessing, it
is not really forth.
The other enhancement is the introduction of an environment
variable AMFORTH_LIB. This variable works like PATH. It
contains a double-colon separated list of directories the
upload tool looks for the files if it does not find them in the
current working directory. This list is iterated sequentially
from left to right until the first file is found. If not
file is found, the tool aborts with an error message and
the controller may need some cleanup.
in bash it looks like
export AMFORTH_LIB=~/projects/amforth/trunk/devices:~/lib/amforth
Note: the . (current working directory) is always preprended to
this list.
Note2: amforth-upload.py has help screen, call it with -h and enjoy
Please test it and feel free to comment.
Matthias
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHTUU99bEHdGEMFjMRAvHsAJ0X6cVvI6rP/xEE79W4Njkxw9ny6wCePwEB
MCVB1ioPuA8xGRWY9+RIWkw=
=VxhR
-----END PGP SIGNATURE-----
|