* RFR002.QM * Written By Tom Hogshead * [ See RFRMxx.QM For Use ] * 8/8/91 * Key Subfile Description * ===== =============== ==================================================== * @(3) Capitalize First Letter of all Words in COLUMN Block * @(4) Capitalize First Letter of all Words in CHARACTER Blk * @(t) (Alternate version of @4 for technique only) * @(8) (Alternate version of @4 for technique only) * @(5) Capitalize First Letter of all Words in LINE Block * #(f1_) Capitalize Word At Cursor * #(f2_) Capitalize First Letter of Word At Cursor * #(f4_) Un-Capitalize Word At Cursor * @(6) Make all Letters in Block LOWER Case * @(7) Make all Letters in Block UPPER Case * * {e:\up\RFRM*}--Return To RFRMxx.QM * *-- eoi *  * ------------------------------------------------------ * #(f1_) Capitalize word at cursor * ------------------------------------------------------ * #f1 macrobegin markword upper unmarkblock * * 7 bytes Mon 08-20-1990 07:17:53 *  * ---------------------------------------- * #(F2_) Capitalize First Letter of Word * ---------------------------------------- * #f2 macrobegin markword lower * | gotoblockbeg unmarkblock markcolumn upper unmarkblock wordright * | * * 10 bytes Sun 03-10-1991 16:05:55 * 12 bytes Thu 08-08-1991 16:36:11 (TH #f2, added lower and wordright *  *------------------------------------------------------------ * @(3) Capitalize First Letter of all Words in Column Block *------------------------------------------------------------ * Mark column block, then press @3 to capitalize first letter of every * word in block. Unmark when finished if OK. Block MUST be a column * block, NOT a line or character block, and need not be closed. This * macro also unconditionally uppercases the first character of the * block, so be sure the block includes a full first word. @3 Macrobegin AltWordSet * For all words GotoBlockBeg * Test if closed JTrue BEG: * MarkColumn * Close if block was started gotoblockbeg * Test if now closed Jfalse END: * End macro if no block closed BEG: Onewindow * Close all windows Horizontalwindow * Open window editfile "NUL" return * Load NUL copyblock * Copy block to NUL gotoblockend * Position to mark | #250 * Mark block end with wierd char | gotoblockbeg * Return to block begin | Unmarkblock * LOOP: * Upper * Capitalize first letter Wordright * Move to next word Jtrue LOOP: * Continue until no more words END_LOOP: * find #250 return "G" return * Put cursor on wierd char | Cursorleft * Position cursor on last char MarkColumn * Mark column block begin Begfile * Finish mark Copy * Copy block to scrap Quit * Quit NUL Prevwindow * Return to starting file Pasteover * Paste back where it was Onewindow * Close windows END: DefaultWordSet * Reset * * 53 bytes Fri 02-22-1991 16:08:43 * 50 bytes Mon 07-15-1991 07:56:46 (TH @3, changed c:! to NUL, shortened) * 61 bytes Mon 07-15-1991 20:40:59 (TH @3, added windows) * 63 bytes Mon 07-15-1991 21:16:49 (TH @3, added altwordset) * 53 bytes Mon 07-15-1991 22:52:27 (TH @3, removed #255) * 52 bytes Wed 07-17-1991 11:10:41 (TH @3, removed extra unmarkblock) * 51 bytes Fri 07-19-1991 00:43:20 (TH @3, removed markcolumn) * 40 bytes Fri 07-19-1991 14:26:26 (TH @3, removed window shrink) * 51 bytes Tue 07-23-1991 16:14:27 (TH @3, use wierd char to mark NUL |) *  *--------------------------------------------------------------- * @(4) Capitalize First Letter of all Words in Character Block *--------------------------------------------------------------- * Mark character block, then press @4 to capitalize first letter of * every word in block. Unmark when finished if OK. Block MUST be a * character block, NOT a column or line block, and need not be closed. * This macro also unconditionally uppercases the first character of the * block, so be sure the block includes a full first word. @4 macrobegin AltWordSet * For all words GotoBlockBeg * Test if closed JTrue BEG: * DropAnchor * Close if block was started gotoblockbeg * Test if now closed Jfalse END: * End macro if no block closed BEG: onewindow horizontalwindow * Make two windows editfile "NUL" return * Load NUL moveblock * Move block to NUL Unmarkblock * LOOP: * Upper * Capitalize first letter Wordright * Move to next word Jtrue LOOP: * Continue until no more words END_LOOP: * MarkCharacter * Mark character block begin Begfile * Finish mark copy * Copy block Quit * Quit NUL Prevwindow * Return to starting file paste * Paste block back where it was Onewindow * Close windows END: * We're done... DefaultWordSet * Reset * * 39 bytes Fri 07-19-1991 14:29:37 (TH @4) *  * ---------------------------------------------------------------------- * @(t) Capitalize First Letter of all Words in Character Block * (Alternate version of @4) * ---------------------------------------------------------------------- * This is an alternate version of @4. I use a block location marker * #173, move the block to the end of file with a block begin marker * #174, and move it back where it was when done. It is not as fast as * @4 and is included here for technique only. This same technique can * be used for column and line blocks (@3 and @5). @t Macrobegin AltWordSet * For all words GotoBlockBeg * Test if closed JTrue BEG: * DropAnchor * Close if block was started gotoblockbeg * Test if now closed Jfalse END: * End macro if no block closed BEG: insertline * Insert line on top of block #173 * Insert block location marker endfile * Go to eof addline * Add line for block begin marker begline * Go to bol #174 * Insert block begin marker addline * Add line for block begline * Go to bol moveblock * Move block to eof Unmarkblock * Unmark to start capitalization LOOP: * Upper * Capitalize first letter Wordright * Move to next word Jtrue LOOP: * Capitalize until no more words MarkCharacter * Start block mark Find #174 Return "B" Return * Find block begin marker delline * Delete it MarkCharacter * Close block Find #173 Return "G" Return * Find block location marker delline * Delete it moveblock * Move block back where it was END: * We're done... DefaultWordSet * Reset * * 51 bytes Fri 07-19-1991 12:11:43 (TH @t) *  * ---------------------------------------------------------------------- * @(8) Convert Character Block to Initial Capitals * (Alternate version of @4) * (Written by Tom Hogshead and John Goodman) * ---------------------------------------------------------------------- * Mark character block, then press @8 to capitalize first letter of * every word in block. Unmark when finished if OK. Block MUST be * a character block, NOT a column or line block, and need not be * closed. This macro also unconditionally uppercases the first * character of the block, so be sure the block includes a full * first word. * This alternate version uses a technique developed by me with the help * of John Goodman. We move the marked block to the end of the current * file, process it, then move it back where it was. This version is * not quite as fast as @4 and is included here for technique only. @8 Macrobegin AltWordSet * For all words GotoBlockBeg * Test if closed JTrue BEG: * DropAnchor * Close if block was started gotoblockbeg * Test if now closed Jfalse END: * End macro if no block closed BEG: * BegFile InsertLine "* @z " InsertDate InsertTime Gotoblockbeg insertline * Insert line on top of block #173 * Insert block location marker endfile * Go to eof addline * Add line for block begin marker begline * Go to bol #173 * Insert block begin marker | * addline * Add line for block |a * begline * Go to bol | moveblock * Move block to eof Unmarkblock * Unmark to start capitalization LOOP: * Upper * Capitalize first letter Wordright * Move to next word Jtrue LOOP: * Capitalize until no more words MarkCharacter * Start block mark Find #173 Return "B" Return * Find block begin marker * delline * Delete it |a MarkCharacter * Close block DelCh * Delete marker character | CursorUp * Move up one line |a JoinLine * Remove added CR/LF at Eof | RepeatFind * |b * Find Return "G" Return * Find block location marker | delline * Delete it moveblock * Move block back where it was END: * We're done... DefaultWordSet * Reset * BegFile EndLine CursorRight InsertTime * * 51 Bytes Fri 07-19-1991 12:11:43 (TH @8) * 49 Bytes Tue 07-23-1991 22:09:23 (JG @8 Changes |A) * 45 Bytes Wed 07-24-1991 02:44:09 (TH @8, Substituted Repeatfind |B) *  *------------------------------------------------------------ * @(5) Capitalize First Letter of all Words in Line Block *------------------------------------------------------------ * Mark Line Block, Then Press @5 To Capitalize First Letter of Every * Word in Block. Unmark When Finished If OK. Block MUST Be A Line * Block, NOT A Column Or Character Block, And Need Not Be Closed. @5 Macrobegin AltWordSet * For all Words GotoBlockBeg * Test If Closed JTrue BEG: * MarkLine * Close If Block Was Started Gotoblockbeg * Test If Now Closed Jfalse END: * End Macro If No Block Closed BEG: Onewindow Horizontalwindow * Make Two Windows Editfile "NUL" Return * Load NUL Moveblock * Move Block To NUL Unmarkblock * LOOP: * Upper * Capitalize First Letter Wordright * Move To Next Word Jtrue LOOP: * Continue Until No More Words END_LOOP: * Cursorup * Needed For Line Blocks Markline * Mark Line Block Begin Begfile * Finish Mark Copy * Copy Block To Scrap Quit * Quit NUL Prevwindow * Return To Starting File Paste * Put Block Back Where It Was Onewindow * Close Windows END: * DefaultWordSet * Reset * * 40 Bytes Fri 07-19-1991 14:25:09 (TH @5) *  * ----------------------------------------- * @(6) Make all Letters in Block LOWER Case * ----------------------------------------- @6 Macrobegin Lower * * 5 Bytes Tue 07-16-1991 08:58:48 (TH @6) *  * ----------------------------------------- * @(7) Make all Letters in Block UPPER Case * ----------------------------------------- @6 Macrobegin Upper * * 5 Bytes Tue 07-16-1991 08:58:48 (TH @6) *  * ------------------------------------------------------ * #(f4_) Un-capitalize Word At Cursor * ------------------------------------------------------ * #f4 Macrobegin Markword Lower Unmarkblock * * 7 Bytes Mon 08-20-1990 07:18:07 * Macros #f7 And #f8 Were Written By Richard Blackburn of SemWare. * I Picked Them Up From SemWare Message #317 Intelec Conference 24. * Comments Are Mine And I Changed Key Assignments From Un-shifted * To Shifted F7 And F8.