Having said that, I'd like to see Win32forth become even better. Using
it is frustrating at times.
Perhaps the one fix I would most like to see is fixing the files
stuff. When I first downloaded Win32forth, I unthinkingly installed it
under the same directory most applications go under, "C:\Program
Files"...all of you who have done this must be chuckling now, as
pressing F1 results in an error message--basically due to the fact
that there's an embedded space in "C:\Program Files".
Win32forth basically can't handle embedded spaces in filenames or
pathnames--and it is endlessly frustrating, having to either rename
files and directories to remove the spaces or end up typing "cd
c:\progra~1\win32for\test.f" instead of the more normal "cd c:\Program
Files\win32for\test.f". I've actually had to move win32for out of
Program Files because too much stuff breaks when the pathname involves
a space--such as floading a forth source file from winview.
So how about fixing that? I know the space character is the standard
delimiter--how about changing it to the return character? Or use the
quote mark " as the delimiter?
So we could do something like
cd " c:\Program Files\Win32for"
and it would work.
Another little annoying thing I would like to see fixed is how
Win32forth turns all filenames and pathnames into ALL CAPITALS.
I want to save a file as "Test.f" only to see it saved instead as
"TEST.F". This is very annoying to me. I wish I knew how to fix this.
Any ideas what is causing this and how to fix it?
So any comments?
I do like Win32forth very much! I'm tempted to try to fix the file
problems myself, if no one else will and there's sufficient interest.
Using Win32forth has been *extremely* educational in learning how
Windows and the win32 API works. For free, I get full access to the
Win32 API, using only a fraction of the space a C compiler
requires...with all the interactivity and power of the forth debugging
environment. Pretty impressive!! :)
--Richard Adams
boumb...@NOSPAMhotmail.com
(please remove the "NOSPAM" from above address to reply)
That problem was one of the earlier complaints about the bigFORTH for
Windows port. I added into all file name parsing words (path, cd, use) a
test for the first character of the file name. If it's either " or ', it
will redo the parsing with parse of that character. I.e. you can
cd 'foo bar'
or
use "steve's file.fs"
I also have .' and s' for strings with double quotes inside.
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/
A nice solution to the extended filename problems.
I don't remember which version of Windows introduced
the extended filenames.
I might be wrong, but I believe extended filenames were introduced in
1993, when the first version of Windows NT, version 3.1 came out.
Extended filenames did not reach the average consumer until the
original Windows 95 was released on August 24, 1995.
Perhaps you should contact Tom Zimmer to mention your code? Or perhaps
I should?
I would love to see this ported over to Win32forth. I am very pleased
that you have solved a frustrating problem. Thank you!! :)
--Richard Adams
On Wed, 04 Jul 2001 11:14:10 +0200, Bernd Paysan <bpa...@mikron.de>
wrote:
>Richard Adams wrote:
>> So we could do something like
>> cd " c:\Program Files\Win32for"
>> and it would work.
>
>That problem was one of the earlier complaints about the bigFORTH for
>Windows port. I added into all file name parsing words (path, cd, use) a
>test for the first character of the file name. If it's either " or ', it
>will redo the parsing with parse of that character. I.e. you can
>
>cd 'foo bar'
>
>or
>
>use "steve's file.fs"
>
>I also have .' and s' for strings with double quotes inside.
--Richard Adams
Download bigFORTH source from
http://download.sourceforge.net/bigforth/bigforth-2.0.2.tar.bz2 for
Linux or http://download.sourceforge.net/bigforth/bigforth-2.0.0.exe for
Windows.
But the real parsing code is just a two-liner:
: /parse ( -- addr u ) >in @ char swap >in ! dup '" = over '' =
or IF dup parse 2drop ELSE drop bl THEN parse ;
I have taken your suggestions about long filenames, and updated Win32Forth
to handle them as Bernd does. Here is the change file comment;
------------------------------------------------------------------------
July 9th, 2001 - 11:24 tjz
Modified Win32Forth per a suggestion from Richard Adams, with code
provided by Bernd Paysan, to allow Filenames in Win32Forth to contain
spaces. If a filename starts with either a ' (tick), or a " (quote) and
ends with same, then it will be parsed using tick or quote, as a single
word in those words that accept filenames.
The code to do this is as follows;
\ tjz, as posted from Bernd Paysan Thu, 05 Jul 2001 Thanks Bernd
: /parse ( -- addr u )
>in @ char swap >in ! dup '"' = over ''' =
or IF dup parse 2drop ELSE drop bl THEN parse ;
: /parse-word ( -- a1 )
/parse pocket place \ get a word that may start with ' or "
\ into pocket
pocket +null \ make sure it is null terminated
pocket ;
/parse-word is then used in place of "bl word", in those places where a
filename is expected.
Thanks Bernd, and Richard for the suggestion and solution. tjz
------------------------------------------------------------------------
Win32Forth 4.2 Build 671 is up on my web site at;
ftp://pweb.netcom.com/users/zforth/
As you might imagine, it is not particularly well tested, though Win32Forth
does circular generate itself, and WinView still seems to work ok. As
always, use at your own rick. If you do use it, let me know about any
problems this had introduced.
I left the 618 build up, with a different filename for the time being.
Tom Zimmer