* RFR001.QM * Written By Tom Hogshead * [ See RFRMxx.QM For Use ] * August 1, 1991 * Key Subfile Description * ===== =============== ==================================================== * @(F8) Makes All Blank Lines In Document Single Space, * "Lightning Fast!" (Condenses for better readability) * @(F7) SINGLE Space Document, "Slow" * @(g) SINGLE Space Document, "Lightning Fast!" * @(F9) DOUBLE Space Document, "Lightning Fast!" * @(F0) TRIPLE Space Document, "Lightning Fast!" * * {e:\up\RFRM*}--Return To RFRMxx.QM * *-- eoi *  * ---------------------------------------------------------------------- * @(F7) Deletes ALL BLANK lines in document, slow * ---------------------------------------------------------------------- * Single space document. See @g below for "Lightning Fast" version. @f7 Macrobegin Begfile * Go to bof CHK4BLANK: * Endline Begline * Check if line has text Jtrue NOTBLANK: * If so, go to NOTBLANK Delline * Or line is blank, delete it Jtrue CHK4BLANK: * Go check next line NOTBLANK: *ELSE Endpara * Move to paragraph end Cursordown * Move down to blank line Jtrue CHK4BLANK: * If not eof, check again Begfile * Go to bof * * 20 bytes Wed 02-20-1991 16:48:58 *  * ------------------------------------------------------------------------ * @(g) Single Space Document, Uses Windows, Lightning Fast! * ------------------------------------------------------------------------ * Using the windows approach, @g is "Lightning Fast" compared to @F7; * on a 199 line double spaced file, 10,198 bytes, run times were: * Seconds * @F7 13 * @g 2 (6 times faster) @g macrobegin Begfile * Start at file begin onewindow horizontalwindow * Make two windows editfile escape * For all QConfig's shrinkwindow * Shrink window cursordown cursordown cursordown* cursordown cursordown cursordown* cursordown cursordown cursordown* escape * prevfile * Starting file in window 2 CHK4BLANK: * Endline Begline * Test if line has text Jtrue NOTBLANK: * If it has text, go to NOTBLANK Delline *ELSE line is blank, delete it Jtrue CHK4BLANK: *ELSE line has text NOTBLANK: * Endpara * Move to paragraph end Cursordown * Move down to blank line Jtrue CHK4BLANK: * We're done if eof, else test again Begfile * File begin when done onewindow * Close all windows * * 20 bytes Wed 02-20-1991 16:48:58 (TH @f7) * 37 bytes Tue 07-02-1991 16:20:47 (TH @g, added windows) *  * ---------------------------------------------------------------------------- * @(F8) Makes All Blank Lines In Document Single Space, "Lightning Fast" * ---------------------------------------------------------------------------- * This macro is handy for condensing documents, so that there are * only single blank lines between text for better screen readability. @F8 Macrobegin Begfile * Start at file begin onewindow horizontalwindow * Make two windows editfile escape * For all QConfig's shrinkwindow * Shrink window cursordown cursordown cursordown* cursordown cursordown cursordown* cursordown cursordown cursordown* escape * prevfile * Starting file in window 2 CHK4BLANK: * Endline Begline * Test if line has text Jtrue NOTBLANK: * If it has text, go to NOTBLANK Delline *ELSE line is blank, delete it Jtrue CHK4BLANK: * Test if this line is blank NOTBLANK: *ELSE line has text Endpara * Move to paragraph end Cursordown * Move to blank line 1 Cursordown * And down one more line Jtrue CHK4BLANK: * We're done if eof, else test again Begfile * File begin when done onewindow * Close all windows * * 21 bytes Wed 02-20-1991 16:46:39 * 38 bytes Sun 07-14-1991 17:36:39 (TH @F8, added windows) *  *------------------------------------------------ * @(F9) Double Space document, "Lightning Fast!" *------------------------------------------------ * * With cursor anywhere in a document, press @F9 and document will * be double spaced with a single blank line between each text line. * * Removing the five lines marked with ** in the @f10 macro below will * also double space a document like @F9 does. * @F9 Macrobegin Begfile * Start at file begin onewindow horizontalwindow * Make two windows editfile escape * For all QConfig's shrinkwindow * Shrink window cursordown cursordown cursordown* cursordown cursordown cursordown* cursordown cursordown cursordown* escape * prevfile * Starting file in window 2 START: Endline Begline * ? if line has text Jfalse DEL_BLANK: * No text, go to DEL_BLANK: INS_BLANK: *----------------Insert Blank Line LOOP-----------------* *ELSE line is not blank, and Cursordown * Move down to check next line Jfalse END: * If at eof, END macro * Endline Begline *ELSE ? if next line has text Jfalse NEXT_LINE: * No text, go to NEXT_LINE *ELSE line is not blank, and Insertline * Insert blank line between * two text lines Cursordown * Move down to next line Jump INS_BLANK: * Go check this line for text NEXT_LINE: Cursordown * Move down to check next line Jump START: * Go check line for text DEL_BLANK: *---------Delete More Than One Blank Line LOOP----------* Cursordown * Move down to check if eof Jfalse END: * If at eof, END macro *ELSE not yet at eof, and Cursorup * Move back up to second blank Delline * line and delete it Jump START: * Go check line for text END: * Begfile * onewindow * Close all windows * * 38 bytes Fri 02-22-1991 13:22:05 * 55 bytes Sun 07-14-1991 17:45:16 (TH @F9, added windows) *  *--------------------------------------------------- * @(F0) Triple space document, "Lightning Fast!" *--------------------------------------------------- * * With cursor anywhere in a document, press @F10 and document will * be triple spaced with two blank lines between each text line. * * Removing the four lines marked with ** in this macro will double space * a document like @F9 (a simpler shorter macro) does. * @F10 Macrobegin Begfile * Start at file begin onewindow horizontalwindow * Make two windows editfile escape * For all QConfig's shrinkwindow * Shrink window cursordown cursordown cursordown* cursordown cursordown cursordown* cursordown cursordown cursordown* escape * prevfile * Starting file in window 2 INITIAL: *----------Delete All Blanks lines on Top LOOP-------------* Endline Begline * ? if top line has text Jtrue START: * If text line, go to START Delline *ELSE delete line Jump INITIAL: * and continue until no blank * lines on top START: *--------------Check Line For Text LOOP--------------------* Endline Begline * ? if line has text Jfalse DEL_BLANK: * No text, go to DEL_BLANK: INS_BLANK: *----------------Insert Blank Line LOOP-----------------* *ELSE line is not blank, and Cursordown * Down to next line Jfalse END: * If at eof, END macro Endline Begline * ? if next line has text Jfalse DEL_BLANK: * If line blank. go check next * line *ELSE line is not blank, then Insertline * insert blank line Addline ** And another Cursordown * Move down to next line Jump INS_BLANK: * Go check next line for text DEL_BLANK: *-----------------Delete Blank Line LOOP----------------* Cursordown * Move down off first blank line Jfalse END: * If at eof, END macro *ELSE not yet at eof, and Endline Begline * Check line for text Jfalse CONTINUE: * If blank, go to CONTINUE: Insertline **ELSE must be text line and * insertline blank #2 Cursordown ** Down to text line Jump INS_BLANK: * Go check next line CONTINUE: Cursordown ** Move down to next line NEXT: *---------Delete More Than 2 blank lines LOOP-----------* Endline Begline * Check line for text Jtrue INS_BLANK: * If text, go check next line * for text *ELSE line is blank Delline * and delete it Jfalse END: * If at eof, can't delete more * than 1 blank line, then END Jump NEXT: * Loop to delete blank lines * until text line END: * Here to END Begfile * onewindow * Close all windows * * 62 bytes Sun 02-24-1991 13:33:59 * 79 bytes Sun 07-14-1991 17:48:05 (TH @F10, added windows)