home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #2
/
RBBS_vol1_no2.iso
/
add2
/
tm110_1.zip
/
ASCII-UL.SCR
< prev
next >
Wrap
Text File
|
1989-04-06
|
2KB
|
97 lines
; ASCII upload protocol
; if filename is "", you will be asked to input the filename
; if filename is not "", the specified file will be sent
; e.g. if filename="msg.", then the file "msg." will be sent
filename = ""
TRUE=1 ; boolean values
FALSE=0
PaceChar = "" ; the pace character
LinePace = 0 ; line pacing, in 1/10 second
CharPace = 0 ; character pacing, in 1/10 second
StripLF = TRUE ; TRUE to strip line feed
ExpandBlankLine = TRUE ; TRUE to expand blank line
XonXoff = FALSE ; TRUE to handle Xon/Xoff
if filename="" ; input filename if needed
print
print "*** Which file: ",
input filename
print
endif
open filename
if not success
print "*** Cannot open file"
stop
endif
print "*** Start sending"
set XonXoff,off ; shut system control temporarily
LastCh = ""
readch ch
while success
if ch="^M" and LastCh="^J" and ExpandBlankLine
put " ",
endif
LastCh = ch
if not StripLF or ch<>"^J"
put ch,
endif
if ch="^M" ; if Carriage-Return
if PaceChar="" ; then do line pacing
delay LinePace ; or wait for pace character
else
waiting = FALSE
i = 0
while ch<>PaceChar
getch ch
if XonXoff and ch="^S"
waiting = TRUE
endif
if waiting and ch="^Q"
waiting = FALSE
endif
if not success
if i<LinePace
delay 1
i = i+1
endif
endif
endwhile
if waiting
waitfor "^Q",0
endif
endif
else ; if not Carriage-Return
delay CharPace ; then do character pacing
endif
inputch ch
if success and ch="^["
print
print "*** Aborting sending"
print
exit
endif
if not connected
print
print "*** Carrier lost"
print
exit
endif
readch ch
endwhile
close
clear key
if XonXoff
set XonXoff,on
else
set XonXoff,off
endif