Table of Contents

FSEMAIN

Table Of Contents

  • [00005] - FILE-BUILD/CTL-CRACK OVERLAY
  • [00112] FILBUILD - READ FIRST SOURCE FILE INTO WORKFILE.
  • [00214] RESUMEFILES - ATTEMPT TO RESUME PREVIOUS SESSION.
  • [00295] FILEWRITE - COPY ONE INTERNAL FILE IMAGE TO LOCAL FILE.
  • [00366] FILREBUILD - REBUILD ALL SOURCE FILES.
  • [00578] CRACKCTL - CRACK CONTROL STATEMENT.
  • [00717] BLDINIT - INITIALIZE EDIT SESSION.
  • [00913] BLDTERM - TERMINATE EDIT SESSION.

Source Code

FSEMAIN.txt
  1. PROC FSEMAIN;
  2. BEGIN
  3.  
  4. #
  5. *** FSEMAIN -- FILE-BUILD/CTL-CRACK OVERLAY
  6. *
  7. * COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. *
  9. * FSEMAIN PERFORMS CONTROL CARD SCANNING, INITIALIZTION
  10. * OF THE EDITOR AND WORKFILE, RESUMPTION OF PREVIOUS WORK
  11. * FILES, AND INITIAL/FINAL COPYING OF FILES. IF THE EDITOR
  12. * IS CONVERTED TO AN OVERLAY STRUCTURE AT A FUTURE DATE,
  13. * THIS MODULE WOULD BE A CANDIDATE FOR AN OVERLAY. THIS
  14. * MODULE EXISTS ONLY IN THE SINGLE-USER VERSION OF THE
  15. * EDITOR, SO IT IS PROGRAMMED NON-REENTRANTLY.
  16. #
  17.  
  18. DEF LISTCON #0#;
  19.  
  20. CONTROL EJECT; # UNIVERSAL DECLARES #
  21. *IFCALL SINGLE,COMFSGL
  22. *IFCALL ONLY,COMFONL
  23. *IFCALL MULTI,COMFMLT
  24. *CALL COMFFSE
  25.  
  26. # EXTERNALS #
  27.  
  28. XDEF PROC BLDINIT;
  29. XDEF PROC BLDTERM;
  30.  
  31. XREF
  32. BEGIN
  33. *CALL COMFXFL
  34. *CALL COMFXFO
  35. *CALL COMFXTI
  36. *CALL COMFXVT
  37. *CALL COMFXSB
  38. *CALL COMFXWK
  39. END
  40.  
  41. XREF # FSELIB SUPPORT #
  42. BEGIN
  43. FUNC LENGTH;
  44. PROC DISSJ; # DISABLE/ENABLE SSJ= #
  45. PROC MOVEWD;
  46. PROC FLDLEN;
  47. PROC DISTCON;
  48. PROC SETNAD;
  49. PROC VDTGSL;
  50. PROC SETAUC; # APPLICATION UNIT CHARGE #
  51. PROC VDTGTN;
  52. END
  53.  
  54. XREF # SRVLIB SUPPORT #
  55. BEGIN
  56. PROC REWIND;
  57. PROC WRITEC;
  58. PROC WRITEF;
  59. PROC WRITER;
  60. PROC READC;
  61. PROC MESSAGE;
  62. PROC ENDRUN;
  63. PROC ABORT;
  64. PROC EXCST;
  65. PROC TSTATUS;
  66. PROC GETJO;
  67. PROC RECALL;
  68. PROC READ;
  69. PROC RETERN;
  70. PROC RTIME;
  71. PROC DEFINE;
  72. PROC PURGE;
  73. PROC GETSS;
  74. PROC PF;
  75. END
  76.  
  77. XREF # BUFFER MAPPING #
  78. BEGIN
  79. ARRAY WORKBUF;;
  80. ARRAY BUILDBF;;
  81. ITEM MAXADDR;
  82. END
  83.  
  84.  
  85. *CALL COMFDS1
  86. *CALL COMFVD2
  87. *CALL COMFDS2
  88. *CALL COMFTAB
  89. *CALL COMSPFM
  90. PAGE # COMMAND BUFFER MANIPULATION #
  91.  
  92.  
  93. PROC SETCMD(STR,LEN,OFFSET);
  94. BEGIN
  95. ITEM STR C(40);
  96. ITEM LEN, OFFSET;
  97. ITEM TMP1, TMP2;
  98. TMP2=0;
  99. FOR TMP1=1 STEP 1 UNTIL LEN DO
  100. BEGIN
  101. C<9,1>TMP2=C<TMP1-1,1>STR;
  102. IF TMP2 EQ 0 THEN C<9,1>TMP2=" ";
  103. SETCHAR(CMDLINE,OFFSET+TMP1-1,TMP2);
  104. END
  105. END # OF SETCMD #
  106. PAGE # INITIAL FILE CONSTRUCTION #
  107.  
  108.  
  109. PROC FILBUILD;
  110. BEGIN
  111. #
  112. ** FILBUILD - READ FIRST SOURCE FILE INTO WORKFILE.
  113. *
  114. * FILBUILD PERFORMS INITIAL FILE COPYING AND CERTAIN OTHER
  115. * TASKS TO INITIALIZE THE EDITOR. FILBUILD IS CALLED IF
  116. * THERE IS A FILE SPECIFIED BY THE CONTROL STATEMENT OR IF
  117. * THERE WAS NO FILE AND NO RESUMABLE WORKFILE IMAGE. IN THE
  118. * LATTER CASE, FILBUILD ATTEMPTS TO IDENTIFY A PRIMARY FILE
  119. * AS THE FILE TO EDIT.
  120. *
  121. * IN ADDITION TO COPYING THE FIRST SOURCE FILE OF THE EDIT
  122. * SESSION, FILBUILD ALSO INITIALIZES THE WORKFILE MANAGER,
  123. * SETS THE CHARACTER SET FOR LINE-MODE TERMINAL
  124. * COMMUNICATIONS, READS IN THE DEFAULT PROCEDURE FILE, AND
  125. * INITIALIZES THE RELOCATION VECTOR TO BRACKET THE SOURCE
  126. * FILE AND A NEW, EMPTY AUDIT TRAIL IMAGE.
  127. *
  128. * ENTRY FILENAM[1] - NAME OF FILE TO EDIT OR BLANK.
  129. * CHARPARM - FILE CHARACTER SET SPECIFICATION.
  130. * GETPARM - PERMANENT FILE ACCESS REQUEST.
  131. * ALLASCII - WHETHER DEFAULT CHARACTER SET IS 6/12.
  132. *
  133. * EXIT FILENAM[1] - NAME OF PRIMARY FILE IF NEEDED.
  134. * BUILDCIO - CIO COUNT FOR FILE COPY.
  135. * TOPC(), BOTC() - BRACKET FILE DIRECTORY.
  136. * TOPF(), BOTF() - BRACKET FILE IMAGES.
  137. * TOPA(), BOTA(), CURA() - BRACKET AUDIT TRAIL.
  138. * TOPK(), BOTK() - BRACKET FUNCTION KEY STRINGS.
  139. *
  140. * CALLS MAKEFET, FATAL, VFYFILE, INITIO, SETCSET,
  141. * INSY, ADDFILE, TTSTR, TTLFN, TTBRK, TTLIN, PUSH,
  142. * OPENFILE, POP.
  143. *
  144. * USES FILNUM, READNAM, CURFILE, CHARPARM, GETPARM.
  145. #
  146. ITEM TMP1;
  147.  
  148. INITIO;
  149. ONWAYINBLK=BLANKS;
  150. SETCSET(TRUE);
  151.  
  152. TOPK(FKEYS)=PALAST[0]; # FUNCTION KEYS ARE 1ST BRACKET #
  153. LINE[0]=NULLIN;
  154. FOR TMP1=1 STEP 1 UNTIL NUMFKEYS DO
  155. BEGIN
  156. INSY; # INSERT BLANK LINE FOR EACH KEY #
  157. END
  158. BOTK(FKEYS)=PALAST[0]; # FKEY BRACKET NEVER CHANGE SIZE #
  159. TOPC(FILECTL)=PALAST[0]; # FILE DIRECTORY IS 2ND BRACKET #
  160. LINE[0]=NULLIN;
  161. INSY;
  162. BOTC(FILECTL)=PALAST[0];
  163. INSY; # AUDIT NEEDS EXTRA SEPARATOR #
  164. TOPA(AUDITCTL)=PALAST[0]; # AUDIT MUST BE LAST BRACKET #
  165. CURA(AUDITCTL)=PALAST[0];
  166. INSY;
  167. BOTA(AUDITCTL)=PALAST[0];
  168.  
  169. FILNUM=1; # ADD FIRST FILE BRACKET #
  170. READNAM=FILENAM[1];
  171. FILENAM[1]=" ";
  172. SCNFDINIT = 1; # INDICATE INITIAL FILE #
  173. ADDFILE; # BUILD FIRST FILE #
  174. IF NOT INTERACT THEN
  175. BEGIN
  176. TTLIN("1$"); # CARRIAGE CONTROL #
  177. TTSTR(" $"); # MOVE EDIT/CREATE #
  178. END
  179. IF BOTF(1) GR TOPF(1)+1 THEN
  180. BEGIN # IF NON-EMPTY FILE #
  181. TTSTR("EDIT: $");
  182. END
  183. ELSE
  184. BEGIN # NEW FILE #
  185. TTSTR("CREATE: $");
  186. END
  187. TTLFN(READNAM);
  188. IF LOCKED[1] NQ 0 THEN TTSTR(" (READ-ONLY FILE) $");
  189. TTBRK;
  190. IF NUMBERED[1] NQ 0 THEN TTLIN("SEQUENCE NUMBERED FILE$");
  191.  
  192. CURFILE=1;
  193. PUSH; # HOLD POSITION WHILE INIT PROCS #
  194. FILNUM=2;
  195. GETPARM=1;
  196. IF PROCNAM NQ READNAM THEN
  197. BEGIN # IF PROCEDURE FILE IS NOT EDIT FILE #
  198. CHARPARM=2; # FORCE PROCEDURE FILE TO ASCII MODE #
  199. READNAM=PROCNAM;
  200. END
  201. OPENFILE;
  202. POP;
  203.  
  204. CONTROL IFEQ METERING,1;
  205. BUILDCIO=CIOCOUNT;
  206. CONTROL FI;
  207.  
  208. END # OF FILBUILD #
  209.  
  210.  
  211. PROC RESUMEFILES;
  212. BEGIN
  213. #
  214. ** RESUMEFILES - ATTEMPT TO RESUME PREVIOUS SESSION.
  215. *
  216. * RESUMEFILES ATTEMPTS TO RESUME SOME PREVIOUS EDIT SESSION
  217. * FROM A LEFT-OVER WORKFILE. THIS MAY BE POSSIBLE BECAUSE
  218. * WORKFILES CONTAIN NOT ONLY ALL TEXT OF ALL FILES, BUT ALSO
  219. * BINARY DATA IMAGES FOR ALL EDITOR DATA.
  220. *
  221. * THE CALLER DECIDES WHETHER TO CALL RESUMEFILES ON THE BASIS
  222. * OF CONTROL STATEMENT SYNTAX. IF RESUMEFILES IS NOT
  223. * SUCCESSFUL, THEN IT CLEARS THE TRYRESUME FLAG AS A SIGNAL
  224. * TO THE CALLER THAT FILBUILD SHOULD BE CALLED.
  225. *
  226. * IF RESUMPTION OCCURS, THEN RESUMEFILES RE-INITIALIZES SOME
  227. * OF THE DATA READ UP FROM THE WORKFILE. THE TERMINAL IS
  228. * RECONFIGURED (FOR SCREEN MODE) BY CALLING VDTSTM/STD AND
  229. * COPYTABS. THE COMMAND BUFFER IS CLEARED. THE MULTI-USER
  230. * CONNECTION STATUS IS CLEARED. THE INTERNAL FILE DIRECTORY
  231. * IS SEARCHED AND EACH FILE IS RE-VERIFIED FOR PERMISSIONS.
  232. * IF THE LAST EXIT WAS A *QUIT REPLACE*, EACH FILE IS FLAGGED
  233. * AS UNALTERED. THE LAST CURRENT LINE SELECTION IS RESTORED.
  234. *
  235. * ENTRY TRYRESUME - PRESUMED TRUE.
  236. *
  237. * EXIT TRYRESUME - FORCED FALSE IF NO RESUMPTION OCCURRED.
  238. * ALL DATA REDEFINED IF RESUMPTION OCCURRED.
  239. *
  240. * MACROS SETCHAR.
  241. *
  242. * CALLS COPYTABS, FWDZ, POSZ, REPY, RESUMIO, SCANFDL, SETCSET,
  243. * TTSYNC, VDTSTD, VDTSTM, VFYFILE, WRITEABLE.
  244. #
  245.  
  246. ITEM TMP1 I; # TEMPORARY STORAGE #
  247. ITEM TMP2 I; # TEMPORARY STORAGE #
  248.  
  249. RESUMIO;
  250. IF IORESUMED THEN # THERE IS OLD EDIT #
  251. BEGIN
  252. # RESUMED EDIT ACCEPTABLE -- FINAL SETUP FOLLOWS #
  253. # OVERRIDE SOME RESTORED DATA #
  254. CONNECTED=FALSE;
  255. FOR TMP1=0 STEP 1 UNTIL 10 DO SETCHAR(CMDLINE,TMP1,CBLANK);
  256. SETCHAR(CMDLINE,11,CENDLINE);
  257. IF INTERACT THEN
  258. BEGIN
  259. VDTGSL(TMP1,TMP2); # GET SCREEN/LINE MODE #
  260. IF TMP2 NQ 0 THEN SETCMD("SET SCREEN",10,0);
  261. ELSE SETCMD("SET LINE",8,0);
  262. END
  263. SETCSET(TRUE);
  264. POSZ(TOPC(FILECTL)+1);
  265. WHYLE CURRENT LS BOTC(FILECTL) DO # CHECK ALL FILES IN SESSION #
  266. BEGIN # UPDATE LOCKED, CHANGED #
  267. SCANFDL(READNAM);
  268. VFYFILE(READNAM,-1);
  269. IF NOT WRITEABLE(READNAM) THEN
  270. BEGIN
  271. SETCHAR(LINE,8,CDIGIT0+1);
  272. IF CURRENT EQ FDLF(1) THEN LOCKED[1]=1;
  273. IF CURRENT EQ FDLF(2) THEN LOCKED[2]=1;
  274. END
  275. IF EXITSAVE THEN SETCHAR(LINE,10,CDIGIT0);
  276. REPY; # UPDATE FILE DESCRIPTOR #
  277. FWDZ; # NEXT FILE DESCRIPTOR #
  278. END
  279. IF EXITSAVE THEN
  280. BEGIN # IF REPLACED ON EXIT #
  281. CHANGED[1]=0;
  282. CHANGED[2]=0;
  283. END
  284. EXITFLAGS=0;
  285. POSZ(SAVECURL);
  286. END
  287. ELSE TRYRESUME=FALSE;
  288. END # OF RESUMEFILES #
  289. PAGE # FINAL FILE RECONSTRUCTION #
  290.  
  291.  
  292. PROC FILEWRITE;
  293. BEGIN
  294. #
  295. ** FILEWRITE - COPY ONE INTERNAL FILE IMAGE TO LOCAL FILE.
  296. *
  297. * ENTRY FILEFET - INITIALIZED FOR EXTERNAL FILE.
  298. * TOPF(1), BOTF(1) - BRACKET INTERNAL FILE IMAGE.
  299. *
  300. * EXIT FILEFET - EOR WRITTEN, REWOUND.
  301. *
  302. * CALLS REWIND, POSZ, FWDZ, CONVOUT, WRITER, WRITEF,
  303. * WRITEC.
  304. *
  305. * USES LIN, TMPLIN, CURRENT.
  306. #
  307. DEF AVERAGE #500#; # AVERAGE FILE SIZE #
  308. DEF TWOANAHALF #2500#; # TWO AND A HALF SECONDS #
  309. ITEM COUNTER I; # LINE COUNTER #
  310. ITEM SAMPLE I; # LINE SAMPLE RATE #
  311. ITEM STARTTIME I; # REAL TIME CLOCK (START) #
  312. ITEM CHECKTIME I; # REAL TIME CLOCK (CHECK) #
  313. IF DONTPRINT OR NOT INTERACT THEN
  314. BEGIN # IF NO MESSAGE SHOULD BE SENT #
  315. COUNTER = 0;
  316. END
  317. ELSE
  318. BEGIN # MESSAGE MAY BE SENT #
  319. COUNTER = 1;
  320. SAMPLE = AVERAGE;
  321. RTIME(STARTTIME);
  322. STARTTIME = B<24,36>STARTTIME;
  323. END
  324. REWIND(FILEFET,1);
  325. POSZ(TOPF(1));
  326. WHYLE CURRENT LS BOTF(1)-1 DO
  327. BEGIN
  328. FWDZ;
  329. CONVOUT(LIN,1);
  330. IF TMPLINE[0] EQ EORCON THEN WRITER(FILEFET,1);
  331. ELSE IF TMPLINE[0] EQ EOFCON THEN WRITEF(FILEFET,1);
  332. ELSE
  333. BEGIN
  334. CONVOUT(LIN,ASCII[1]);
  335. WRITEC(FILEFET,TMPLIN);
  336. IF COUNTER NQ 0 THEN
  337. BEGIN # IF MESSAGE STILL TO ISSUE #
  338. COUNTER = COUNTER + 1;
  339. IF COUNTER GR SAMPLE THEN
  340. BEGIN # IF SAMPLE SIZE REACHED #
  341. RTIME(CHECKTIME);
  342. CHECKTIME = B<24,36>CHECKTIME - STARTTIME;
  343. IF CHECKTIME GR TWOANAHALF THEN
  344. BEGIN # IF ENOUGH TIME HAS PASSED #
  345. TTLIN(" (REBUILDING) $");
  346. TTSTR(" $");
  347. COUNTER = 0; # ONE MESSAGE IS ENOUGH #
  348. VDTCLO(COUNTER); # FLUSH OUTPUT, NO RECALL #
  349. END
  350. ELSE
  351. BEGIN # COMPUTE PROBABLE SAMPLE COUNT #
  352. SAMPLE = (SAMPLE*TWOANAHALF)/CHECKTIME;
  353. END
  354. END
  355. END
  356. END
  357. END
  358. WRITER(FILEFET,1);
  359. REWIND(FILEFET,1);
  360. END
  361.  
  362.  
  363. PROC FILREBUILD;
  364. BEGIN
  365. #
  366. ** FILREBUILD - REBUILD ALL SOURCE FILES.
  367. *
  368. * FILREBUILD IS CALLED AT THE END OF AN EDIT SESSION. IT
  369. * GOES THRU THE DIRECTORY OF INTERNAL FILE IMAGES. FOR EVERY
  370. * ALTERED FILE, THE LOCAL FILE IS RECONSTRUCTED OUT OF THE
  371. * EDITOR'S INTERNAL FILE IMAGE. IF THE REPLACE OPTION WAS
  372. * SELECTED, THEN FILREBUILD ALSO ASSURES THAT PERMANENT FILES
  373. * ARE BUILT. IF THE REPLACE OPTION WAS IGNORED, THEN
  374. * FILREBUILD PERFORMS A RETURN MACRO TO ASSURE THAT THE FILE
  375. * WRITTEN IS A PURELY LOCAL FILE, AND NOT A PRE-ATTACHED
  376. * PERMANENT FILE.
  377. *
  378. * FOR ALL FILES (EVEN THOSE UNALTERED OR READ-ONLY
  379. * RESTRICTED) FILREBUILD PRINTS OUT A STATUS MESSAGE. THE
  380. * STATUS MESSAGES, HOWEVER, ARE SUPPRESSED IF THE USER
  381. * SELECTED THE QUIET OPTION.
  382. *
  383. * FILREBUILD CLOSES OUT BOTH BRACKETS, AS NEEDED, AND CLEARS
  384. * THE COMMAND BUFFER, THEN CHECKPOINTS THE WORKFILE. IT
  385. * IS ABSOLUTELY ESSENTIAL THAT NEITHER FILREBUILD NOR THE
  386. * CALLER NOR ANY OTHER ROUTINE PERFORM ANY DESTRUCTIVE
  387. * WORKFILE ACCESSES ONCE CHECKIO HAS BEEN CALLED, OTHERWISE
  388. * THE USER MAY PERCEIVE A CONFUSING FILE SELECTION SHOULD THE
  389. * WORKFILE BE RESUMED INTO A LATER EDIT SESSION.
  390. *
  391. * ENTRY DONTPRINT - QUIET OPTION.
  392. * EXITSAVE - REPLACE OPTION.
  393. * FILE DIRECTORY - DESCRIBES ALL INTERNAL IMAGES.
  394. *
  395. * EXIT FILE WRITTEN, POSSIBLY SAVED.
  396. *
  397. * CALLS PADNAME, CLOSEFILE, CHECKIO, POSZ, SCANFDL, PUSH,
  398. * OPENFILE, TTSTR, TTLFN, MAKEFET, ASSGNFILE,
  399. * LOCALFILE, RETERN, FILEWRITE, REPLACE, ATTACH,
  400. * TTBRK, POP, FWDZ.
  401. *
  402. * USES FILNUM, FILENAM[1], FILENAM[2], READNAM, CURRENT,
  403. * LIN, CHARPARM, GETPARM, CHANGED[1], LOCKED[1],
  404. * ASCII[1], PFMFET.
  405. #
  406. ITEM TMP1, TMP2;
  407. ITEM NOTCHANGED B; # NOT CHANGED FLAG #
  408.  
  409. CMDLINE[0]=NULLIN;
  410. IF EXITSAVE THEN
  411. BEGIN # IF QUIT WITH REPLACE REQUESTED #
  412. TMP1=CURFILE;
  413. IF FILENAM[TMP1] EQ "FSEHELP"
  414. AND CHANGED[TMP1] EQ 0 THEN TMP1=3 LXR TMP1;
  415. END
  416. ELSE TMP1=0;
  417. FOR FILNUM=1 STEP 1 UNTIL 2 DO
  418. BEGIN
  419. IF PADNAME(FILENAM[FILNUM]) NQ " " THEN
  420. BEGIN # IF A FILE IN THIS SPLIT #
  421. IF FILNUM EQ TMP1 THEN
  422. BEGIN # IF CURRENT FILE TO BE REPLACED #
  423. IF FILENAM[FILNUM] NQ "FSTEACH" THEN CHANGED[FILNUM]=1;
  424. END
  425. CLOSEFILE;
  426. END
  427. END
  428. CHECKIO; # ABSOLUTELY MUST NOT CHANGE WORKFILE AFTER THIS #
  429.  
  430. NOTCHANGED=FALSE; # RESET NOT CHANGED FLAG #
  431. IF NOT EXITQUIT THEN
  432. BEGIN
  433. FILENAM[2]=" ";
  434. POSZ(TOPC(FILECTL)+1);
  435. WHYLE CURRENT LS BOTC(FILECTL) DO
  436. BEGIN
  437. SCANFDL(READNAM);
  438. IF READNAM NQ "ZZZNULL" THEN
  439. BEGIN
  440. PUSH;
  441. FILENAM[1]=" ";
  442. FILNUM=1;
  443. CHARPARM=0;
  444. GETPARM=0;
  445. OPENFILE;
  446. IF ZEROCOLASK THEN ZEROCOLIN = FALSE; # DO NOT "ASK" TWICE #
  447. IF ZEROCOLIN AND INTERACT AND CHANGED[1] NQ 0
  448. AND FILENAM[1] NQ "FSEPROC" THEN
  449. BEGIN # IF MESSAGE TO SEND #
  450. ZEROCOLIN = FALSE; # ONCE IS ENOUGH #
  451. TTLIN(" $");
  452. TTLIN("WARNING: ONE OR MORE OF YOUR ASCII FILES $");
  453. TTLIN("CONTAINED CHARACTERS CODED IN THE DISPLAY $");
  454. TTLIN("CODE FORMAT OF OCTAL 00 (:) RATHER THAN $");
  455. TTLIN("THE ASCII FORMAT OF OCTAL 7404 (@AD). $");
  456. ASKAGAIN: # ASK UNTIL Y OR N #
  457. TTLIN(" $");
  458. TTLIN("ENTER ... $");
  459. TTLIN
  460. ("YES DISPLAY(:) AND ASCII(@AD) CHANGED TO DISPLAY(:)$");
  461. TTLIN
  462. ("NO DISPLAY(:) AND ASCII(@AD) CHANGED TO ASCII(@AD)$");
  463. PROMPT(QCCKWRD);
  464. CONVIN(CMDLIN,2);
  465. GETCHAR(CMDLINE,0,TMP1);
  466. TMP1 = XLTINTDSP[TMP1];
  467. IF TMP1 NQ CLETTERY AND TMP1 NQ CLETTERN THEN GOTO ASKAGAIN;
  468. IF TMP1 EQ CLETTERY THEN ZEROCOLOUT = TRUE;
  469. END
  470. IF NOT DONTPRINT THEN
  471. BEGIN
  472. IF NOT INTERACT THEN TTSTR(" $");
  473. TTSTR("FILE: $");
  474. TTLFN(FILENAM[1]);
  475. IF LOCKED[1] NQ 0 THEN
  476. BEGIN
  477. TTSTR(" (READ-ONLY) $");
  478. END
  479. ELSE
  480. BEGIN
  481. IF CHANGED[1] EQ 0 THEN TTSTR(" (NO CHANGES)$");
  482. END
  483. IF EXITSAVE AND CHANGED[1] EQ 0 THEN
  484. BEGIN # IF QUIT REPLACE OPTION #
  485. TTSTR(" (NOT REPLACED)$");
  486. END
  487. END
  488. IF CHANGED[1] NQ 0 AND LOCKED[1] EQ 0 THEN
  489. BEGIN
  490. MAKEFET(FILEFET,FILENAM[1],FILEBUF,DSKSIZ);
  491. # REWRITE LOCAL OR PREATTACHED FILE #
  492. FILEWRITE;
  493. IF EXITSAVE AND LOCALFILE(READNAM) THEN
  494. BEGIN # IF FILE TO BE MADE PERMANENT #
  495. # FILE NEEDS TO BE MADE PERMANENT - TRY INDIRECT FIRST #
  496. PF("REPLACE",READNAM,READNAM,"RC",PFMERROR,"EM",PFMMSG,
  497. "EL","40",0);
  498. IF PFMERROR EQ FNF THEN
  499. BEGIN # IF NOT INDIRECT TRY ATTACH #
  500. PF("ATTACH",READNAM,READNAM,"RC",PFMERROR,"M","W",
  501. "NA","YES","SR","NF","EM",PFMMSG,"EL","40",0);
  502. FILEWRITE;
  503. END
  504. ELSE
  505. BEGIN
  506. IF PFMERROR EQ FTL THEN
  507. BEGIN # IF FILE TOO LONG #
  508. # SAVE FIRST ERROR, RETURN LOCAL FILE, TRY DEFINE #
  509. PFMMS2=PFMMSG;
  510. RETERN(FILEFET,1);
  511. PF("DEFINE",READNAM,READNAM,"RC",PFMERROR,
  512. "EM",PFMMSG,"EL","40",0);
  513. FILEWRITE;
  514. IF PFMERROR NQ 0 THEN
  515. BEGIN # IF DEFINE FAILED #
  516. PFMMSG=PFMMS2; # REPLACE ERROR MESSAGE #
  517. END
  518. END
  519. END
  520. IF PFMERROR NQ 0 THEN
  521. BEGIN # IF FILE NOT MADE PERMANENT #
  522. TMP1=39;
  523. WHYLE C<TMP1,1>PFMMSG EQ " " DO TMP1=TMP1-1;
  524. C<0,1>PFMMSG="(";
  525. C<TMP1,2>PFMMSG=")$";
  526. IF DONTPRINT THEN
  527. BEGIN # IF QUIET OPTION, OVERRIDE #
  528. IF NOT INTERACT THEN TTSTR(" $");
  529. TTSTR("FILE: $");
  530. TTLFN(FILENAM[1]);
  531. END
  532. TTLIN(" (LOCAL - COULD NOT BE SAVED)$");
  533. TTSTR(" $");
  534. TTSTR(PFMMSG);
  535. NOTCHANGED=TRUE; # SET NOT CHANGED FLAG #
  536. IF DONTPRINT THEN TTBRK;
  537. END
  538. ELSE
  539. BEGIN # IF FILE WAS MADE PERMANENT #
  540. IF NOT DONTPRINT THEN TTSTR(" (PERMANENT)$");
  541. END
  542. END
  543. ELSE # IF NOT TO BE MADE PERMANENT #
  544. BEGIN
  545. IF NOT DONTPRINT THEN
  546. BEGIN # IF NOT QUIET OPTION #
  547. IF LOCALFILE(READNAM) THEN TTSTR(" (LOCAL)$");
  548. ELSE IF FILINFFT EQ 2 THEN TTSTR(" (QUEUED)$");
  549. ELSE TTSTR(" (PERMANENT)$");
  550. END
  551. END
  552. END
  553. IF NOT DONTPRINT THEN TTBRK;
  554. POP;
  555. END
  556. FWDZ;
  557. END
  558. ZEROCOLOUT=FALSE;
  559. END
  560.  
  561. IF NOTCHANGED AND INTERACT THEN # IF FILE NOT CHANGED #
  562. BEGIN
  563. TTLIN(" $");
  564. TTLIN("WARNING: ONE OR MORE OF YOUR FILES $");
  565. TTLIN("COULD NOT BE SAVED. $");
  566. TTLIN(" $");
  567. TTLIN("ENTER ... CARRIAGE RETURN TO CONTINUE. $");
  568. PROMPT(QCCKWRD);
  569. END
  570.  
  571. END # OF FILREBUILD #
  572. PAGE # INITIATION ROUTINE #
  573.  
  574.  
  575. PROC CRACKCTL;
  576. BEGIN
  577. #
  578. ** CRACKCTL - CRACK CONTROL STATEMENT.
  579. *
  580. * ENTRY RA+2, RA+3, ETC - PARAMETERS, EITHER FORMAT.
  581. * FILENAM[1] - BLANK.
  582. * INPTNAM, OUTPNAM, PROCNAM, WORKNAM, - DEFAULTS.
  583. * GETPARM, CHARPARM, ECHOOFF - DEFAULTS.
  584. *
  585. * EXIT TRYRESUME - WHETHER RESUMPTION SHOULD BE TRIED.
  586. * FILENAM[1] - FILLED IN IF SUPPLIED.
  587. * INPTNAM - CHANGED IF SUPPLIED.
  588. * OUTPNAM - CHANGED IF SUPPLIED.
  589. * PROCNAM - CHANGED IF SUPPLIED.
  590. * WORKNAM - CHANGED IF SUPPLIED.
  591. * GETPARM - 2 IF "GET" PARAMETER SPECIFIED.
  592. * CHARPARM - 1, 2, OR 3 IF SPECIFIED.
  593. * ECHOOFF - TRUE IF *E=NO* SPECIFIED, FALSE IF *E=YES*.
  594. *
  595. * CALLS PADNAME, MATCHKEY.
  596. *
  597. * USES TOKENSYM, KEYWDNDX, KEYWDTYPE, TOKENLEN.
  598. #
  599.  
  600. # PARMKEYS AND PARMSW MUST MATCH #
  601. DEF MAXPARMS #8#;
  602. ARRAY PARMKEYS [0:MAXPARMS]; ITEM PARMKEY C(0,0,7) = [ "*NULL*",
  603. "FN", "I", "L", "IP", "CS", "OP", "WF", "E" ];
  604. SWITCH KEYPARMSW PSDFLT, PSFILE, PSINP, PSLST, PSPROC,
  605. PSCHAR, PSOP, PSWORK, PSECHO;
  606. SWITCH POSPARMSW PSOP, PSFILE, PSOP, PSINP, PSLST, PSPROC, PSWORK,
  607. PSECHO;
  608. ITEM TMP1, TMP2, TMP3, TMP4, QUIT B, KEYPARM, POSPARM;
  609.  
  610. TRYRESUME=TRUE;
  611. KEYPARM=0;
  612. POSPARM=0;
  613. FOR TMP1=2 STEP 1 UNTIL 1+B<42,18>MEM[O"64"] DO
  614. BEGIN # UNTIL PARAMETERS EXHAUSTED #
  615. TOKENSYM=PADNAME(MEM[TMP1]);
  616. IF B<42,18>MEM[TMP1] EQ 2 OR B<42,18>MEM[TMP1] EQ O"54" THEN
  617. BEGIN # KEYWORD ASSIGNMENT #
  618. IF KEYPARM NQ 0 THEN
  619. BEGIN # IF BAD ASSIGNMENT #
  620. MORTAL(" UNRECOGNIZED FSE COMMAND SYNTAX.$");
  621. END
  622. FOR TMP2=0 STEP 1 UNTIL MAXPARMS DO
  623. BEGIN # SEARCH FOR MATCH #
  624. IF TOKENSYM EQ PARMKEY[TMP2] THEN KEYPARM=TMP2;
  625. END
  626. IF KEYPARM EQ 0 THEN
  627. BEGIN # NO MATCH FOUND #
  628. ERRSTRING = " UNKNOWN FSE OPTION : ";
  629. C<22,7>ERRSTRING = C<0,7>TOKENSYM;
  630. C<29,1>ERRSTRING = "$";
  631. MORTAL(ERRSTRING);
  632. END
  633. END
  634. ELSE
  635. BEGIN # PARAMETER #
  636. IF KEYPARM NQ 0 THEN GOTO KEYPARMSW[KEYPARM];
  637. POSPARM=POSPARM+1;
  638. IF POSPARM GR MAXPARMS - 1 THEN
  639. BEGIN # IF TOO MANY PARAMETERS #
  640. MORTAL(" TOO MANY FSE COMMAND PARAMETERS.$");
  641. END
  642. TMP2 = B<42,18>MEM[TMP1];
  643. IF TMP2 NQ 0 AND TMP2 NQ 1 AND TMP2 NQ 2 AND TMP2 NQ O"17" THEN
  644. BEGIN # IF BAD SYNTAX #
  645. MORTAL(" UNRECOGNIZED FSE COMMAND SYNTAX.$");
  646. END
  647. IF B<0,42>MEM[TMP1] NQ 0 THEN GOTO POSPARMSW[POSPARM];
  648. GOTO NEXTPARM;
  649.  
  650. PSFILE:
  651. FILENAM[1]=C<0,7>MEM[TMP1];
  652. TRYRESUME=FALSE;
  653. GOTO NEXTPARM;
  654.  
  655. PSINP:
  656. INPTNAM=C<0,7>MEM[TMP1];
  657. GOTO NEXTPARM;
  658.  
  659. PSLST:
  660. OUTPNAM=C<0,7>MEM[TMP1];
  661. GOTO NEXTPARM;
  662.  
  663. PSPROC:
  664. PROCNAM=C<0,7>MEM[TMP1];
  665. GOTO NEXTPARM;
  666.  
  667. PSWORK:
  668. WORKNAM=C<0,7>MEM[TMP1];
  669. GOTO NEXTPARM;
  670.  
  671. PSECHO:
  672. FOR TOKENLEN=7 STEP -1 WHILE TOKENLEN GR 0 DO
  673. BEGIN
  674. IF C<TOKENLEN-1,1>TOKENSYM NQ " " THEN GOTO PSECH2;
  675. END
  676. PSECH2:
  677. KEYWDNDX=-1;
  678. KEYWDTYPE=3;
  679. MATCHKEY(TMP2);
  680. IF KEYWDNDX EQ KEYST"STNO" THEN ECHOOFF=TRUE;
  681. ELSE IF KEYWDNDX EQ KEYST"SYES" THEN ECHOOFF=FALSE;
  682. ELSE MORTAL(" UNKNOWN FSE COMMAND OPTION.$");
  683. GOTO NEXTPARM;
  684.  
  685. PSDFLT: PSCHAR: PSOP:
  686. FOR TOKENLEN=7 STEP -1 WHILE TOKENLEN GR 0 DO
  687. BEGIN
  688. IF C<TOKENLEN-1,1>TOKENSYM NQ " " THEN GOTO PSOP2;
  689. END
  690. PSOP2:
  691. KEYWDNDX=-1;
  692. KEYWDTYPE=4;
  693. MATCHKEY(TMP2);
  694. IF KEYWDNDX EQ KEYST"XGET" THEN GETPARM=2;
  695. ELSE IF KEYWDNDX EQ KEYST"XDIS" OR KEYWDNDX EQ KEYST"XNOR"
  696. THEN CHARPARM=1;
  697. ELSE IF KEYWDNDX EQ KEYST"XASC" THEN CHARPARM=2;
  698. ELSE IF KEYWDNDX EQ KEYST"XASC8" OR KEYWDNDX EQ KEYST"XA8"
  699. THEN CHARPARM=3;
  700. ELSE MORTAL(" UNKNOWN FSE COMMAND OPTION.$");
  701. TOKENSYM=C<TMP2,10-TMP2>TOKENSYM;
  702. TOKENLEN=TOKENLEN-TMP2;
  703. IF TOKENLEN GR 0 THEN GOTO PSOP2;
  704.  
  705. NEXTPARM:
  706. KEYPARM=0;
  707.  
  708. END
  709. END
  710.  
  711. END # OF CRACKCTL #
  712.  
  713.  
  714. PROC BLDINIT;
  715. BEGIN
  716. #
  717. ** BLDINIT - INITIALIZE EDIT SESSION.
  718. *
  719. * ENTRY EVERYTHING DEFAULTED.
  720. *
  721. * EXIT OLD SESSION RESUMED OR NEW SESSION STARTED.
  722. * ERRSTRING - ANNOUNCEMENT OF THE DAY.
  723. * P<CORE> - ZERO.
  724. * NUMMODE - CONTROLS EMPTY FILE SEQUENCE ASSUMPTION.
  725. * P<FET,OBF,READLST,BFPRU,DISK,FILEBUF> - INIT.
  726. * CONTROL STATEMENT SCANNED.
  727. * FILENAM[1] - FIRST FILE TO EDIT.
  728. * INPTNAM, OUTPNAM, WORKNAM, PROCNAM - FILE NAMES.
  729. * IORESUMED - TRUE.
  730. * NULLINPUT - WHETHER THERE IS ANY INPUT FILE.
  731. * INTERACT - WHETHER TRUE INTERACTIVE SESSION.
  732. * ALLASCII - WHETHER DISPLAY CODE OR 6/12 ASCII DEFAULT.
  733. * TTYINPUT - WHETHER INPUT IS FROM A TERMINAL.
  734. * WORKFILE ACCESS VALIDATED.
  735. * DEFAULT PROCEDURE FILE ACCESSED IF NEEDED.
  736. * SINGLEONLY - WHETHER TO SUPPRESS MULTI-USER.
  737. * CMDLIN - CLEARED OR BUILT-IN FIRST COMMAND.
  738. * SCANPOS, TOKENPOS - SET TO START SYNTAX SCAN.
  739. * SMALLFIELD - TRUE, AND FIELD LENGTH REDUCED.
  740. * USER BREAKS DISABLED IF INTERACT.
  741. *
  742. * MACROS SETCHAR.
  743. *
  744. * CALLS GETSS, GETJO, CRACKCTL, TSTATUS, TTEQUIP,
  745. * VDTOPN, TTINIT, WRITEABLE, FATAL, VFYFILE,
  746. * ASSGNFILE, MAKEFET, GET, READ, LOCALFILE,
  747. * RESUMEFILES, FILBUILD, PAUSEIO, FLDLEN, STARTCMD,
  748. * DISTCON.
  749. *
  750. * USES PFMFET, CHARPARM, GETPARM, DSKSIZ, SETCMD(INTERNAL).
  751. #
  752. ITEM TMP1, TMP2, TMP3;
  753.  
  754. ERRSTRING="NOS FULL SCREEN EDITOR$";
  755. P&lt;CORE>=0;
  756. IF B&lt;00,01>MEM[CSMR] EQ 0 THEN # IF SYSTEM CHARACTER SET = 63 #
  757. BEGIN
  758. XLTINTXP[O"00"]=O"4045"; # COLON = PERCENT #
  759. XLTINTXP[O"63"]=O"4072"; # PERCENT = COLON #
  760. XLTDSPXP[O"00"]=O"4045"; # COLON = PERCENT #
  761. XLTDSPXP[O"63"]=O"4072"; # PERCENT = COLON #
  762. XLTDSPINT[O"00"]=O"0063"; # COLON = PERCENT #
  763. XLTDSPINT[O"63"]=O"0000"; # PERCENT = COLON #
  764. XLTXPINT[O"45"]=O"0000"; # PERCENT = COLON #
  765. XLTXPINT[O"72"]=O"0063"; # COLON = PERCENT #
  766. XLTINTDSP[O"00"]=O"0055"; # COLON = BLANK #
  767. END
  768. NUMMODE=NUMST"INTERPRET";
  769. GETSS(TMP1);
  770. GETJO(ORIGIN);
  771. IF TMP1 EQ BASIC THEN NUMMODE=NUMST"PREFER";
  772. IF TMP1 EQ FORTRAN OR TMP1 EQ FTNTS THEN
  773. BEGIN
  774. NUMMODE=NUMST"PREFER";
  775. BLANKS=0;
  776. END
  777. P&lt;FET>=LOC(SNGLFET);
  778. P&lt;OBF>=LOC(SNGLOBF);
  779. P&lt;READLST>=LOC(SNGLLST);
  780. P&lt;BFPRU>=LOC(SNGLPRU);
  781. P&lt;DISK>=LOC(WORKBUF);
  782. P&lt;FILEBUF>=LOC(BUILDBF);
  783. LINE[0]=NULLIN;
  784. CMDLINE[0]=NULLIN;
  785. TTYLINE[0]=NULLIN;
  786. CRACKCTL;
  787.  
  788. IF OUTPNAM EQ DEFOUTNAM AND FILENAM[1] EQ DEFOUTNAM
  789. THEN B&lt;0,42>OUTPNAM=0;
  790. IF OUTPNAM EQ NULLNAM THEN B&lt;0,42>OUTPNAM=0;
  791. IF INPTNAM EQ NULLNAM THEN
  792. BEGIN
  793. B&lt;0,42>INPTNAM=0;
  794. NULLINPUT=TRUE;
  795. END
  796. IF FILENAM[1] EQ NULLNAM
  797. OR (GETPARM EQ 3 AND NOT TRYRESUME) THEN TRYRESUME=TRUE;
  798.  
  799. INTERACT=FALSE;
  800. IF ORIGIN EQ TXOT THEN
  801. BEGIN
  802. INTERACT=TRUE;
  803. TSTATUS(TSTATAREA);
  804. FORMERASCII=CURRENTASC;
  805. ALLASCII=INITASCII;
  806. END
  807. TTYINPUT=INTERACT AND TTEQUIP(INPTNAM);
  808. TTYOUTPUT=INTERACT AND TTEQUIP(OUTPNAM);
  809. INTERACT=INTERACT AND TTYINPUT AND TTYOUTPUT;
  810. VDTOPN;
  811. TTINIT;
  812. IF NOT (WRITEABLE(WORKNAM) AND WRITEABLE("ZZZMOVE"))
  813. THEN MORTAL(" WORKFILE MUST BE WRITABLE.$");
  814. IF FILENAM[1] NQ " " THEN VFYFILE(FILENAM[1],-1);
  815.  
  816. IF NOT ASSGNFILE(PROCNAM) THEN
  817. BEGIN
  818. PF("GET",PROCNAM,PROCNAM,"RC",PFMERROR,0);
  819. IF PROCNAM EQ "FSEPROC" AND PFMERROR NQ 0 THEN
  820. BEGIN
  821. PF("GET",PROCNAM,PROCNAM,"RC",PFMERROR,"UN",HELPUSERNUM,"PN","0",0);
  822. END
  823. IF PFMERROR NQ 0 THEN
  824. BEGIN
  825. MAKEFET(PFMFET,PROCNAM,UTILBUF,MINIBUFSIZ);
  826. READ(PFMFET,1); # ASSIGN NULL FILE #
  827. END
  828. END
  829.  
  830. DSKSIZ=INIDSKSIZ; # NOW BUILD OR RESUME #
  831.  
  832. # NOTE RESUMEFILES WILL CLEAR TRYRESUME IF UNABLE, THUS IT #
  833. # IS NECESSARY TO INTERROGATE TRYRESUME AGAIN AFTERWARDS #
  834. IF TRYRESUME THEN RESUMEFILES;
  835. IF NOT TRYRESUME THEN
  836. BEGIN # NO RESUME ATTEMPT OR ATTEMPT FAILED #
  837. IF FILENAM[1] EQ " " AND INTERACT THEN
  838. BEGIN
  839. TTSTR("WHICH FILE$");
  840. PROMPT(QCCKWRD);
  841. CONVIN(TTYLIN,2);
  842. TRIM(TTYLIN,0);
  843. TMP3=0;
  844. FOR TMP1=0 STEP 1 UNTIL LENGTH(TTYLIN)-1 DO
  845. BEGIN
  846. GETCHAR(TTYLINE,TMP1,TMP2);
  847. # CODE ASSUMES INTERNAL CHARSET EQUALS DISPLAY CODE #
  848. CONTROL IFNQ CLETTERA,1; DEFERROR; CONTROL FI;
  849. CONTROL IFNQ CDIGIT0,O"33"; DEFERROR; CONTROL FI;
  850. IF TMP2 GQ CLOWERA AND TMP2 LQ CLOWERZ
  851. THEN TMP2=TMP2-CLOWERA+CLETTERA;
  852. IF NOT DELIMITER[TMP2] AND TMP3 LQ 6 THEN
  853. BEGIN
  854. C&lt;TMP3,1>FILENAM[1]=C&lt;9,1>TMP2;
  855. TMP3=TMP3+1;
  856. END
  857. ELSE IF TMP2 NQ CBLANK THEN MORTAL("INVALID FILE NAME$");
  858. END
  859. VFYFILE(FILENAM[1],-1);
  860. END
  861. IF FILENAM[1] EQ " " THEN
  862. BEGIN
  863. MORTAL(" NO FILE NAME ON FSE COMMAND.$");
  864. END
  865. FILBUILD;
  866. FOR TMP1=0 STEP 1 UNTIL 20 DO SETCHAR(CMDLINE,TMP1,CBLANK);
  867. SETCHAR(CMDLINE,21,CENDLINE);
  868. IF INTERACT THEN
  869. BEGIN # IF INTERACTIVE #
  870. VDTGSL(TMP1,TMP2); # GET SCREEN/LINE MODE #
  871. IF TMP2 NQ 0 THEN # SCREEN MODE #
  872. BEGIN
  873. SETCMD("SET SCREEN",10,0); # CONSTRUCT SETSCREEN COMMAND #
  874. SETCMD(";",1,10);
  875. END
  876. ELSE # PUT OUT HEADER MESSAGE #
  877. BEGIN
  878. TTLIN(ERRSTRING);
  879. ERRSTRING=" $";
  880. END
  881. SETCMD("-STARTUP",8,12); # ADD "-STARTUP" COMMAND #
  882. END
  883. ELSE
  884. BEGIN # BATCH MODE #
  885. TTSTR(" $"); # PUT OUT SHIFTED HEADER MESSAGE #
  886. TTLIN(ERRSTRING);
  887. ERRSTRING=" $";
  888. SETCMD("-STARTUP",8,0); # "-STARTUP" COMMAND #
  889. END
  890. FLOAT = TRUE; # CLEAR *SET NUMBERS NONE* #
  891. END
  892.  
  893. PAUSEIO; # TO ACCEPT NEW DSKSIZ #
  894. DSKSIZ=DISKSIZE;
  895. FLDLEN(LOC(WORKBUF)+DSKSIZ+4);
  896. SMALLFIELD=TRUE;
  897. STARTCMD;
  898. IF INTERACT THEN DISTCON(USRBRK);
  899.  
  900. WORKORG = WORKNAM; # SAVE FOR USE IN &Z MICRO #
  901. IF NOT LOCALFILE(WORKNAM) THEN SINGLEONLY=TRUE;
  902.  
  903. IF PALAST[0] GR MAXLMULTI OR (NOT INTERACT) OR
  904. B&lt;41,1>MEM[LWPR] EQ 0 OR TSTATUSTN GR MAXCONNECT
  905. THEN SINGLEONLY=TRUE;
  906.  
  907. END # OF BLDINIT #
  908. PAGE # TERMINATION ROUTINE #
  909.  
  910. PROC BLDTERM;
  911. BEGIN
  912. #
  913. ** BLDTERM - TERMINATE EDIT SESSION.
  914. *
  915. * ENTRY PAUSEIO MUST HAVE BEEN CALLED TO IDLE WORKIO.
  916. * EXITEXCST, TTYLIN - USER'S CONTROL STATEMENT.
  917. *
  918. * EXIT ALL FILES REWRITTEN AS APPROPRIATE.
  919. * FIELD LENGTH ENLARGED.
  920. * WORKFILE HAS NO-AUTO-DROP STATUS.
  921. * TERMINAL OUTPUT DRAINED FROM BUFFERS.
  922. * IAF CHARACTER SET RESTORED.
  923. * B-DISPLAY MESSAGE CLEARED.
  924. * USER-SPECIFIED CONTROL STATEMENT INVOKED.
  925. *
  926. * CALLS CONVOUT, DISSJ, ENDRUN, EXCST, FILREBUILD, FLDLEN,
  927. * MESSAGE, SETCSET, SETNAD, TTSYNC, VDTCLO.
  928. *
  929. * USES TMPLIN.
  930. #
  931. IF ACCTPRU NQ 0 THEN # ACCOUNT FOR MULTI USER WORK #
  932. BEGIN
  933. DISSJ(3); # ENABLE SSJ= #
  934. SETAUC(ACCTCIO,ACCTPRU,ACCTOUT); # COMPUTE AND APPLY CHARGES #
  935. DISSJ(2); # DISABLE SSJ= #
  936.  
  937. # CLEAR ACCUMULATORS IN CASE THIS SESSION IS RESUMED. #
  938.  
  939. ACCTPRU=0;
  940. ACCTCIO=0;
  941. ACCTTRANS=0;
  942. ACCTOUT=0;
  943. END
  944. DSKSIZ=INIDSKSIZ;
  945. FLDLEN(LOC(MAXADDR)+4);
  946. SMALLFIELD=FALSE;
  947. FILREBUILD; # CANNOT ALTER WORKFILE AFTER THIS #
  948. SETNAD(FET);
  949. TTSYNC;
  950. VDTCLO(0);
  951. SETCSET(FORMERASCII);
  952. MESSAGE(0,1,1);
  953. IF EXITEXCST THEN
  954. BEGIN
  955. CONVOUT(TTYLIN,1);
  956. EXCST(TMPLIN);
  957. END
  958. ELSE ENDRUN;
  959.  
  960. END # OF BLDTERM #
  961.  
  962.  
  963. END TERM