// READWRITE module get "BRAVO1.DF"; get "CHAR.DF"; get "DISPLAY.DF"; get "SELECT.DF"; get "DOC.DF"; get "ALTOFILESYS.D"; get "ST.DF"; get "DIR.DF"; get "com.df" get "rn1.df" // Incoming procedures external [ SetRegionW ugt; ult; underline; selectwholedoc; MakeCurrentBuf inserttx; deleted; getvch; updateunderline; updatedisplay; cpvisible; setsel; confirm; SetRegionSys move; unsetdirty; enww; stnum; oreadfile; owritefile; puts; stget; tsmakegood; tsflush; gets; errhlt; stput; umin; resetts; stsize; FChInSb; selectwholeww; deletea invalidatedoc ] // Incoming statics external [ vrlwsys tscorrect; tsread; chcom; rgmaccp; vdoc; vcp; rgpctb; vpc; selaux; rgsbcom; comno; vmessage; vmapstatus; char; fnts; mpWwWwd; dcpendofdoc ] // Outgoing procedures external [ oreadwritecoms; ofnamfilter; ofilemessage; processtsesc; ] // O R E A D W R I T E C O M S // let oreadwritecoms(cf) = valof [ let ab = abnil let selmain = cf>>CF.sel; let selarg = cf>>CF.selarg let tcplast = nil; let tpc = nil; // let docselm = selmain >> SEL.doc; // let cpfirstselm = selmain >> SEL.cpfirst; // let cplastselm = selmain >> SEL.cplast; if selmain >> SEL.type eq snone then [ ab<> SEL.ww; let wwdselm = mpWwWwd ! wwselm let wwDocName = wwdselm >> WWD.wwgroup let wwdDocName = mpWwWwd ! wwDocName let ww = wwDocName+1 let doc = (mpWwWwd ! ww) >> WWD.doc selmain >> SEL.ww = ww selmain >> SEL.doc = doc let mppccp = nil; unless ugt(rgmaccp ! doc,dcpendofdoc) then if chcom eq $p then [ ab<> WWD.doc) eq dcpendofdoc then [ ab<> WWD.doc; vcp = 0; vmapstatus = statusblind; underline(uloff,selmain); updateunderline(); selectwholeww(selarg,wwDocName); selarg >> SEL.cplast = selarg >> SEL.cplast - dcpendofdoc test (chcom eq $g) % (chcom eq ctrlz) ifso [ // cpfirstselm = umin(cpfirstselm,tcpendofdoc+1); if (mpWwWwd ! ww) >> WWD.fDirty then [ unless confirm("clearing window(s) before Get") then [ ab<> PCTB.rvmppccp); // cplastselm = mppccp ! (tpc+1)-1; // if (cpfirstselm eq 0) & (cplastselm+1 eq rgmaccp ! docselm-dcpendofdoc) then // enww(unsetdirty,doc); // setsel(selaux,0,rgmaccp ! doc-dcpendofdoc-1); // setsel(selmain,0,0); // underline(ulmode1,selmain) // ] // ifnot resultis ab ] ifnot [ // if ugt(selmain >> SEL.cplast,tcpendofdoc) then // selmain >> SEL.cplast = tcpendofdoc; // test (selmain >> SEL.cpfirst eq 0) & (selmain >> SEL.cplast eq tcpendofdoc) ifso selmain >> SEL.xdlast = -1; // enww(unsetdirty,doc); // ] // ifnot [ if ult(selmain >> SEL.cplast,selmain >> SEL.cpfirst) then // [ // ab<