home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
PROGRAM
/
FORTHCMP.ZIP
/
UNSCREEN.4TH
< prev
next >
Wrap
Text File
|
1992-03-30
|
1KB
|
53 lines
\ UNSCREEN PROGRAM, BY TOM ALMY.
\ THIS PROGRAM IS COPYRIGHT (C) 1985 BY TOM ALMY,
\ ALL RIGHTS RESERVED.
\ Permission is granted to registered users of ForthCMP to sell or distribute
\ computer programs incorporating the compiled contents of this file.
\ YOU MIGHT ALSO WANT TO MAKE THIS SMARTER, LIKE DELETING
\ EXTRA BLANK LINES, "-->" COMMANDS, START ON SCREEN 1 OR 2...
100 MSDOS
SCONSTANT SDEFSTR SCR" ( SOURCE DEFAULTS TO .SCR )
SCONSTANT DDEFSTR 4TH" ( DESTINATION DEFAULTS TO .4TH )
16384 CONSTANT BUFSIZ
INCLUDE VARS
INCLUDE FILTER
0 1 IN/OUT
: UNSCREEN? ( -- successflag )
HERE 64 EXPECT ( get a line )
SPAN @ 0> DUP IF ( got one )
HERE SPAN @ -TRAILING TYPE CR
THEN
;
0 0 IN/OUT
: NOTICE CONSOLE CR
." FORTH UN-SCREEN CONVERSION PROGRAM " CR
." COPYRIGHT (C) 1985 BY THOMAS ALMY " CR ;
0 0 IN/OUT
: USAGE CONSOLE
." USAGE: UNSCREEN [SCRFILE] [TXTFILE] " CR
." where SCRFILE (default .SCR) is a file of Forth screens" CR
." if absent or `-' then standard input is used" CR
." and TXTFILE (default .4TH) is output file." CR
ABORT
;
: MAIN
SETBUFS ( allows I/O )
NOTICE ( Welcome Message )
SETFILES IF USAGE THEN ( Indicate failure )
OPTIONSTRING 2+ @ IF USAGE THEN
BEGIN UNSCREEN? NOT UNTIL
BYE ;
INCLUDE DOS2
INCLUDE FORTHLIB
END