User Tools

Site Tools


cdc:nos2.source:opl871:fseproc

FSEPROC

Table Of Contents

Source Code

FSEPROC.txt
*NOSEQ 
*WIDTH 132
STARTUP
  -- THIS IS AN EMPTY STARTUP PROCEDURE SO THAT FSE FINDS ONE AND
  -- DOES NOT HAVE TO SEARCH THROUGH THIS ENTIRE FILE AT STARTUP.
QP

CUT
  -- CUT MOVES THE MARKED AREA OF THE SCREEN TO FILE ZZZZCUT.
  -CUT2 &F
QP

CUT2
  -- CUT2 IS USED BY CUT.
  DA(ZZZZCUT)
  SNN
  MMTL(ZZZZCUT)
  F &1
  SA/TEXT MOVED TO FILE ZZZZCUT/
QP

PASTE
  -- PASTE INSERTS A COPY OF THE CUT TEXT AT THE CURRENT LOCATION.
  CA(ZZZZCUT)TP
  SA/TEXT COPIED FROM FILE ZZZZCUT/
QP

EXTRACT
  -- EXTRACT COPIES LINES CONTAINING A STRING TO ZZZTEMP.
  SX
  L1/&?/; -EXTRAC2 &F
QP

EXTRAC2
  -- EXTRAC2 IS USED BY EXTRACT.
  C TO L(ZZZTEMP); F &1; PN; L; -EXTRAC2 &1
  VX
  SA/LINES COPIED TO FILE ZZZTEMP/
QP

REMOVE
  -- REMOVE DELETES LINES CONTAINING A SPECIFIED STRING.
  SX
  L/&?/1; -REMOVE2
QP

REMOVE2
  -- REMOVE2 IS USED BY REMOVE.
  D; PN; L; -REMOVE2
  VX
  SA/LINES REMOVED FROM FILE/
QP

FINDWID
  -- FINDWID FINDS THE NEXT LINE IN THE FILE WHICH IS WIDER THAN THE
  -- WIDTH SPECIFIED IN THE PROCEDURE CALL, I.E., "-FINDWID 72"
  SET VIEW WARN &1
  PCL
  SET VIEW WARN 160
QP

FINDBLK
  -- FINDBLK FINDS THE NEXT LINE FROM THE CURRENT POSITION WHICH IS
  -- BLANK (EMPTY).  IT ONLY WORKS FOR UNSEQUENCED (NON-BASIC) FILES.
  -- IT USES THE X AND Y REGISTERS.
  PC; .P2; SXW
  .END; SYW
  QP XY; PN; -FINDBLK
QP

NEXTBLK
  -- FINDBLK FINDS THE NEXT BLANK LINE NOT INCLUDING THE CURRENT LINE.
  PN; -FINDBLK
QP

FINDNOT
  -- FINDNOT FINDS THE FIRST LINE THAT DOES NOT CONTAIN A STRING.
  SX; L/&?/
  SY; PX; QP YX; PN; -FNDNOT2
QP

FINDREP
  -- FINDREP FINDS THE NEXT LINE THAT DOES NOT CONTAIN A STRING.
  PN;
  SX; L
  SY; PX; QP YX; PN; -FNDNOT2
QP

FNDNOT2
  -- FNDNOT2 IS USED BY FINDNOT.
  SX; L
  SY; PX; QP YX; PN; -FNDNOT2
QP

INDENT
  -- INDENT MOVES THE MARKED AREA OF THE SCREEN RIGHT TWO POSITIONS.
  AM/  #/
QP

DEDENT
  -- DEDENT MOVES THE MARKED AREA OF THE SCREEN LEFT TWO POSITIONS.
  AM/##/
QP

UPPER
  -- UPPER CONVERTS ALL LOWER CASE ALPHABETIC CHARACTERS
  -- ON THE CURRENT LINE TO UPPER CASE IF HAVE SPECIFIED
  -- ASCII AS YOUR DEFAULT CHARACTER SET TO THE SYSTEM.
  RCCQ/^A/A/
  RCCQ/^B/B/
  RCCQ/^C/C/
  RCCQ/^D/D/
  RCCQ/^E/E/
  RCCQ/^F/F/
  RCCQ/^G/G/
  RCCQ/^H/H/
  RCCQ/^I/I/
  RCCQ/^J/J/
  RCCQ/^K/K/
  RCCQ/^L/L/
  RCCQ/^M/M/
  RCCQ/^N/N/
  RCCQ/^O/O/
  RCCQ/^P/P/
  RCCQ/^Q/Q/
  RCCQ/^R/R/
  RCCQ/^S/S/
  RCCQ/^T/T/
  RCCQ/^U/U/
  RCCQ/^V/V/
  RCCQ/^W/W/
  RCCQ/^X/X/
  RCCQ/^Y/Y/
  RCCQ/^Z/Z/
  PC
  SA/CHARACTERS CONVERTED TO UPPER CASE/
QP

LOWER
  -- LOWER CONVERTS ALL UPPER CASE ALPHABETIC CHARACTERS
  -- ON THE CURRENT LINE TO LOWER CASE IF HAVE SPECIFIED
  -- ASC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  RCCQ/^3L/^L/
  RCCQ/M/^3^M/
  RCCQ/^M/M/
  RCCQ/^3M/^M/
  RCCQ/N/^3^N/
  RCCQ/^N/N/
  RCCQ/^3N/^N/
  RCCQ/O/^3^O/
  RCCQ/^O/O/
  RCCQ/^3O/^O/
  RCCQ/P/^3^P/
  RCCQ/^P/P/
  RCCQ/^3P/^P/
  RCCQ/Q/^3^Q/
  RCCQ/^Q/Q/
  RCCQ/^3Q/^Q/
  RCCQ/R/^3^R/
  RCCQ/^R/R/
  RCCQ/^3R/^R/
  RCCQ/S/^3^S/
  RCCQ/^S/S/
  RCCQ/^3S/^S/
  RCCQ/T/^3^T/
  RCCQ/^T/T/
  RCCQ/^3T/^T/
  RCCQ/U/^3^U/
  RCCQ/^U/U/
  RCCQ/^3U/^U/
  RCCQ/V/^3^V/
  RCCQ/^V/V/
  RCCQ/^3V/^V/
  RCCQ/W/^3^W/
  RCCQ/^W/W/
  RCCQ/^3W/^W/
  RCCQ/X/^3^X/
  RCCQ/^X/X/
  RCCQ/^3X/^X/
  RCCQ/Y/^3^Y/
  RCCQ/^Y/Y/
  RCCQ/^3Y/^Y/
  RCCQ/Z/^3^Z/
  RCCQ/^Z/Z/
  RCCQ/^3Z/^Z/
  PC
  SA/CHARACTER CASES SWITCHED/
QP

GOODIES
  -- HERE ARE SOME USEFUL FUNCTION KEYS.
  -- CHKPT CHECKPOINTS EDIT INTO PERM FILE AND RESUMES EDIT.
  SK1 /QR'FSE./ LABEL / CHKPT/
  -- HALF ADVANCES SCREEN BY HALF PAGES REGARDLESS OF CURSOR POSITION.
  SK2 /PS;V/ LABEL / HALF /
  -- MYSPLIT IS A VARIATION ON THE STANDARD SPLIT FUNCTION, BUT INSTEAD
  -- OF POINTING CURSOR AT START OF SECOND LINE, WE PUT IT AT END OF
  -- FIRST LINE.
  SK3 /.S;PP;.E/ LABEL /MYSPLIT/
  -- FTN5 COMPILES THE CURRENT FILE.
  SK4 '/FTN5,I=&&F.' LABEL ' FTN5 '
  -- RESEQ RESEQUENCES A BASIC PROGRAM AND CONTINUES EDITING.
  -- IT ASSUMES THE FOLLOWING CCL PROC IN YOUR PROCFIL --
  --
  --   .PROC,RESEQ,FILE.
  --   RESEQ,FILE,B,100,100.
  --   FSE.F FILE READ
  SK5 '-GOODY3' LABEL ' RESEQ'
  -- FORT COMPILES A FORTRAN PROGRAM, THEN IF THE COMPILE FAILED,
  -- IT PUTS YOU BACK IN THE EDITOR WITH THE LISTING AND SOURCE FILE
  -- ON THE SCREEN FOR INSPECTION AND CORRECTION.  IT ASSUMES THAT
  -- YOUR PROCFIL CONTAINS THIS CCL PROC --
  --
  --   .PROC,FORT,FILE.
  --   RETURN,LIST.
  --   FTN5,I=FILE,L=LIST.
  --   FSE.F LIST SPLIT READ
  SK6 /-GOODY2/ LABEL / FORT /
  -- MYJOIN IS A VARIATION ON THE DEFAULT JOIN FUNCTION KEY.  THIS
  -- ONE DIFFERS IN THAT IT GUARANTEES EXACTLY ONE BLANK AT THE POINT
  -- OF JUNCTURE, WHILE THE DEFAULT JOIN PROVIDES ZERO OR MORE BLANKS
  -- BASED ON CURSOR POSITION.
  SK7 /.E;.J;.I/ LABEL / JOIN /
  -- EDIT IS A WAY TO SWITCH FILES ON THE FLY, WITH THE EDITOR PROMPTING
  -- THE USER FOR THE NAME OF THE FILE TO BE EDITED.
  SK8/-GOODY4/ LABEL / EDIT /
QP

GOODY2
  /BEGIN,FORT,,&F.
QP

GOODY3
  /BEGIN,RESEQ,,&F.
QP

GOODY4
  SET ANNOUNCE /ENTER FILENAME, PARMS/
  FSE &?
QP

NOHEAD
  -- NOHEAD SIMPLY EXEMPLIFIES THE SET HEADER COMMAND.  THIS COMMAND
  -- CAN BE USED TO SHORTEN THE FILE TITLE MESSAGE, WHICH WILL SAVE
  -- SCREEN PAINTING TIME FOR THE SLOWER BAUD RATES, ESPECIALLY WHEN
  -- THE USER IS ADDING TEXT BEYOND THE END OF A FILE.
  SET HEADER NO
QP

BOX
--  BOX PROCESSING IS DONE WITH 6 PROCEDURES
--    BOXTOP - SET UPPER LEFT CORNER OF THE BOX
--    BOXBTM - SET LOWER RIGHT CORNER OF THE BOX
--    DELBOX - DELETE THE BOX (LINES ARE SHORTENED)
--    ERSBOX - ERASE THE BOX (LINE LENGTH UNCHANGED)
--    INSBOX - INSERT THE BOX AT THE CURRENT CURSOR POSITION (LENGTHENS LINES)
--    REPBOX - REPLACE THE BOX AT THE CURRENT CURSOR POSITION (LENGTH UNCHANGED)
--
--  THE BOX PROCEDURES MARK THE BOX WITH THE X AND Y MARKS. THE Z MARK IS SET TO
--  THE CURRENT POSITION.
--
--  DELBOX AND ERSBOX DESTROY THE VALUES OF X AND Y. A NEW BOX MUST BE SET
--  BEFORE MORE BOX OPERATIONS CAN BE DONE.
--
--  INSBOX AND REPBOX PRESERVE THE BOX DEFINITION. A BOX MAY BE COPIED MORE THAN
--  ONCE WITHOUT RESETTING THE TOP AND BOTTOM. IF THE TEXT IN THE BOX MOVES,
--  THE BOX CORNERS MUST BE RESET.
--
--  A BOX MAY BE MOVED BY USING INSBOX OR REPBOX, FOLLOWED BY ERSBOX OR DELBOX.
--
--  NOTE THAT INSERTING OR COPYING A BOX TO A LOCATION ON EXACTLY THE SAME
--  LINES MAY PRODUCE UNEXPECTED RESULTS. IF THIS HAPPENS, UNDO THE CHANGE,
--  COPY THE BOX TO A SCRATCH AREA, AND THEN COPY IT TO THE DESIRED LOCATION.
--
SK  6 '-BOXSX' LABEL 'BOXTOP'
SK S6 '-BOXSY' LABEL 'BOXBTM'
SK  7 '-BOXSZ,DEL' LABEL 'DELBOX'
SK S7 '-BOXSZ,ERS' LABEL 'ERSBOX'
SK  8 '-BOXSZ,INS' LABEL 'INSBOX'
SK S8 '-BOXSZ,REP' LABEL 'REPBOX'
QP

BOXSX
SXW
SA 'TOP LEFT CORNER SET'
QP

BOXSY
SYW
SA 'BOTTOM RIGHT CORNER SET'
QP

BOXSZ
SA 'BAD BOX (MINIMUM OF 2 CHARS OR LINES)';QPXY
SZW
PX
PX;PY;SA/ /;-BOX&1 &L
QP

BOXINS
P&1;.PX;SMW;.PY+1;.I/&&?$!/;.PY+4;SMW
PZ;CM;R/&&?$!//CCQ
P&1;.PY+1;RCCQ
SA/ /;PN
PZ;QP&LY;P&L
SZZ+1W;-BOXINS &L
PL;I/ /;SZZ+1W;-BOXINS &L
QP

BOXDEL
PX;SMW;.PY;SMW;DM
SXX+1W;QPXY;-BOXDEL
QP

BOXREP
PX
-BOXRE1 &1 &C
QP

BOXRE1
.PY-&2
.P&C+1
-BOXRE2 &1 &C
QP

BOXRE2
P&1;.PX;SMW;.PY+1;.I/&&?$!/;.PY+4;SMW
PZ;.PZ+&2;.S;PP;.PZ;.S;DC;.J;.PZ;CM;.PZ+&2;R/&&?$!//CCQ
P&1;.PY+1;RCCQ
SA/ /;PN;QPCY
SZZ+1W;PZ;-BOXRE2 &L &2
PL;I/ /;SZZ+1W;PZ;-BOXRE2 &L &2
QP

BOXERS
PX;.PY+1;.S;PP;.PX;.S;DC;.PY+1;.J
SXX+1W;QPXY;-BOXERS
QP
*WEOR
cdc/nos2.source/opl871/fseproc.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator