home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
utilsm
/
move
/
MOVE.OPL
next >
Wrap
Text File
|
1993-01-13
|
1KB
|
84 lines
PROC move:
local zn%,chan%,choose%,ret%
local adr&,n$(240),x%,laen%,yn%
local header$(12)
header$=chr$(155)+"1M0 "
dinit
dtext "","Copy or Paste",$202
dbuttons "Copy",%c,"Paste",%p
choose%=dialog
if choose%=%p
ret%=ioopen(chan%,"m:\npbuf31",$0020)
if ret%>0
Fehler:(ret%)
return
endif
adr&=addr(n$)
while ret%<>-36
ret%=ioread(chan%,adr&+1,240)
if ret%>0
pokeb adr&,ret%
d.n$=header$+n$
append
c:
endif
endwh
ret%=ioclose(chan%)
if ret%>0
Fehler:(ret%)
return
endif
elseif choose%=%c
dinit
dtext "","Should the marked items be",$202
dbuttons "Deleted",%d,"Unmarked",%u,"Left",%l
yn%=dialog
ret%=ioopen(chan%,"m:\npbuf31",$0122)
if ret%>0
Fehler:(ret%)
return
endif
first
x%=1
do
if mid$(d.n$,13,1)=chr$(250)
n$=mid$(d.n$,15,240)
adr&=addr(n$) :laen%=len(n$)
ret%=iowrite(chan%,adr&+1,laen%)
if ret%>0
Fehler:(ret%)
return
endif
if yn%=%d
position x%
erase
c:
x%=x%-1
position x%
elseif yn%=%u
position x%
d.n$=left$(d.n$,12)+n$
update
x%=x%-1
position x%
endif
endif
x%=x%+1 :next
until eof
ret%=ioclose(chan%)
if ret%>0
Fehler:(ret%)
return
endif
endif
pos%=1 :realpos%=1 :redraw%=1
giprint "Done"
ENDP
proc fehler:(wert%)
dinit "Fehler"
dtext num$(wert%,4),err$(wert%)
dialog
endp