home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
editors
/
amac41.arj
/
SIZE16.QM
< prev
next >
Wrap
Text File
|
1991-08-26
|
26KB
|
485 lines
* SIZE16.QM
* Macros To Show Byte Size of Macros
* Written by Tom Hogshead
* 8/18/91
* -Bytes-
* @(1) Size of SINGLE Macro 208 |chg
*
* @(3) Size of SINGLE Macro, Fast Windows Version 190 |new
*
* @(5) Size of ALL Macros in Document 202 |chg
*
* @(7) Size of ALL Macros in Document, Fast Windows Version 186 |new
*
* (See DSIZ.QM and DSIZ.BAT for ^F6 to sort Directory sizes by size)
*
*-- eoi
* Description
* --------------
* SIZE16.QM are QEdit macros to quickly show byte size of a macro added
* to the end of the macro with an asterisk and space in column 1. See
* the end of each of these macros for byte size using any of these
* macros
* Change c:\ to a ramdisk for faster operation. These macros require
* "QEdit and QMAC v2.1, February, 1990" or later. Batch file QMACB.BAT
* shown at the end of this file is required to be in the path.
* To BEGIN, just type "START SIZE" <Enter>. All pertinent files will
* be loaded in the "Ring" for viewing, and SIZE16.MAC is read.
* Alternatively, type "START SIZE 0" <Enter> and the disk copies of all
* files in the "Ring" will be loaded ready for editing, saving time.
* For other macros see ALLMACRO.INF.
*
* ----------------------------------------------------------------------
* @(1) Macro To Show Byte Size of SINGLE Macro Inserted At End of Macro,
* Macro File Name Optional
* ----------------------------------------------------------------------
* Place cursor line anywhere in a txtfile macro and press @1. Macro
* size is added at the end of the macro as shown below along with macro
* key. Macro name may be included in byte size line by uncommenting
* and adding the "macro name" lines at the end of the macro. Macro
* must be a paragraph with NO blank lines. If the paragraph does NOT
* contain a macro, the macro stops executing with a beep, meaning
* "macro_begin" was not found in the paragraph. QMACB.BAT must be in
* path. Word "macro_begin" (no _) must be used only at start of macro.
* Key and "macro_begin" must be on same line.
@1 macrobegin
onewindow * Close all windows
unmarkblock insertline begline * Insert temp line
dropanchor currentfilename *
storescrbuff "9" return * Get name to scratchbuff 9
cut * Delete temp line
prevpara begline * Go to macro begin
NEXT: * Get ready to mark
markcharacter * Markblock begin
endpara * Go to para end
markcharacter * Markblock end
gotoblockbeg * Get to para begin
FIND "macro" "begin" return * Check if para is macro
"LI" return *
jtrue HASMACRO: * If para is a macro, go to HASMACRO
* ELSE end macro
jump END: *
HASMACRO: * Come here if para has macro
begline * Move to <key> begin
altwordset * To make all keys a word
markword * Mark key
defaultwordset * Reset for wordright below
storescrbuff "7" return * Store <key> to scratchbuff 7
markline * Mark start of macro
endpara * Go to end of macro
editfile "c:#.qm" return *
killfile quit * Kill/quit c:#.qm
makectrofscreen * Quick look at end of macro
writeblock return * Write macro block to c:#.qm
addline * Add blank line at end of macro
editfile return * Load c:#.qm macro block txtfile
DOS "qmacb " currentfilename * Make macfile of macro block
backspace backspace backspace * Remove '.qm'
return return * Return from Dos
DOS "dir " currentfilename * Get macfile size with Dir
backspace backspace * Delete "qm"
"mac >c:!" * Add "mac", save list to temp
return return * Back fom DOS
killfile quit * Kill/quit c:#.qm
editfile "c:!" return * Load Dir listing of macfile
gotoline "4" return * Drop down
wordright wordright markword * Mark size
storescrbuff "8" return * Get size to scratchbuff 8
killfile quit * Kill/quit c:!
getscrbuff "9" return * Insert orig file name
cut * Get to scrap
editfile paste return * Load orig file * edit currentfilename
prevpara endpara cursordown * Move to blank line at macro end
begline * Begline
"*" cursorright * Put asterisk in column 1
getscrbuff "8" return * Insert byte size of macro
endline cursorright "bytes" * Add "bytes"
cursorright * Space
insertdate inserttime * Insert date and time
"(TH" * Author ID, (change to your inits)
cursorright * One space right
getscrbuff "7" return * Get macro <key>
endline * Move to end of <key>
* *--------------------- Insert Macro File Name ----------------------*
* "," * Insert comma
* cursorright *
* "in" * Insert 'in'
* cursorright *
* unmarkblock * Unmark key
* markcolumn * Begin column block
* currentfilename * Insert CurrentFileName
* find "\" return "LB" return * Find '\'
* deleteblock * Delete path
* endline * Move to end of file name
* *--------------------------------------------------------------------
")" cursorleft * Add end parentheses
END:
unmarkblock * Un-mark key
*
* 189 bytes Thu 09-13-1990 19:13:24
* 190 bytes Mon 05-06-1991 15:08:09
* 199 bytes Thu 05-16-1991 11:32:44 (TH added author identification)
* 209 bytes Mon 07-01-1991 15:01:30 (TH added macro <key>)
* 209 bytes Sat 07-06-1991 01:31:43 (TH moved makectrofscreen up)
* 208 bytes Tue 07-16-1991 21:16:56 (TH chng key mark for scan codes)
* 207 bytes Sat 07-20-1991 08:59:33 (TH, removed unmarkblock)
* 207 bytes Mon 07-22-1991 17:26:40 (TH, changed c:$.qm to c:#.qm)
* 208 bytes Sun 07-28-1991 22:16:17 (TH, added onewindow)
* 208 bytes Sun 08-18-1991 02:28:35 (TH @1)
*
* ----------------------------------------------------------------------
* @(3) Macro To Show Byte Size of SINGLE Macro Inserted At End of Macro,
* Faster Shorter Version Using Windows
* ----------------------------------------------------------------------
* This macro is a modification of @1 using windows. It is about 10%
* smaller and 10% faster than @1.
* Place cursor line anywhere in a txtfile macro and press @3. Macro
* size is added at the end of the macro as shown below along with macro
* key. Macro name may be included in byte size line by uncommenting
* and adding the "macro name" lines at the end of the macro. Macro
* must be a paragraph with NO blank lines. If the paragraph does NOT
* contain a macro, the macro stops executing with a beep, meaning
* "macro_begin" was not found in the paragraph. QMACB.BAT must be in
* path. Word "macro_begin" (no _) must be used only at start of macro.
* Key and "macro_begin" must be on same line.
@3 macrobegin
onewindow * Close all windows
unmarkblock * Clear any marked block to start
cursordown * in case we're on key line
prevpara begline * Go to macro begin
NEXT: * Get ready to mark
markcharacter * Markblock begin
endpara * Go to para end
markcharacter * Markblock end
gotoblockbeg * Get to para begin
FIND "macro" "begin" return * Check if para is macro
"LI" return *
jfalse END: * If para is not a macro, end macro
HASMACRO: *ELSE come here if para is a macro
begline * Move to <key> begin
altwordset * To make all keys a word
markword * Mark key
defaultwordset * Reset for wordright below
storescrbuff "7" return * Store <key> to scratchbuff 7
markline * Mark start of macro
endpara * Go to end of macro
addline * Add blank line at end of macro
horizontalwindow * Window 2
editfile "c:~.qm" return * Load temp file c:~.qm
copyblock * Copy macro to temp file
unmarkblock * A little less screen flicker
writeblock return * Write macro block to c:~.qm
DOS "qmacb " currentfilename * Make macfile of macro block
backspace backspace backspace * Remove '.qm'
return return * Return from Dos
DOS "dir " currentfilename * Get macfile size with Dir
backspace backspace * Delete "qm"
"mac >c:~" * Add "mac", save list to temp
return return * Back fom DOS
horizontalwindow * Window 3
editfile "c:~" return * Load Dir listing of macfile
gotoline "4" return * Drop down
wordright wordright markword * Mark size
storescrbuff "8" return * Get size to scratchbuff 8
nextwindow * Window 1
begline * Begline
"*" cursorright * Put asterisk in column 1
getscrbuff "8" return * Insert byte size of macro
endline cursorright "bytes" * Add "bytes"
cursorright * Space
insertdate inserttime * Insert date and time
"(TH" * Author ID, (change to your inits)
cursorright * One space right
getscrbuff "7" return * Get macro <key>
endline * Move to end of <key>
* *---------------------- Insert Macro File Name ----------------------*
* * (These lines may be removed if you do not wish to insert file name)
* "," * Insert comma
* cursorright *
* "in" * Insert 'in'
* cursorright *
* unmarkblock * Unmark key
* markcolumn * Begin column block
* currentfilename * Insert CurrentFileName
* find "\" return "LB" return * Find '\'
* deleteblock * Delete path
* endline * Move to end of file name
* *---------------------------------------------------------------------
")" cursorleft * Add end parentheses
makectrofscreen * Center bytes line on screen
nextwindow * Window 2
killfile * Kill c:~.qm
nextwindow * Window 3
killfile * Kill c:~
quit * quit c:~
quit * quit c:~.qm
onewindow * Close all windows if QConfig set
END: * to NOT close window on quit
unmarkblock * Un-mark key
*
* 190 bytes Sun 08-18-1991 02:28:39 (TH @3)
*
* ----------------------------------------------------------------------
* @(5) Macro To Show Byte Size of ALL Macros in Document,
* Includes Macro File Name
* ----------------------------------------------------------------------
* Place cursor line anywhere in a txtfile macro and press @5. Macro
* size is added at the end of each macro in the document, along with
* macro key. Macro name may be included in byte size line by
* uncommenting and adding the "macro name" lines at the end of the
* macro. Macro must be a paragraph with NO blank lines. If the
* paragraph does NOT contain a macro, the macro stops executing with a
* beep, meaning "macro_begin" was not found in the paragraph.
* QMACB.BAT must be in path. Word "macro_begin" (no _) must be used
* only at start of macro. Key and "macro_begin" must be on same line.
@5 macrobegin
onewindow * Close all windows
begfile * Get to begin of file
unmarkblock insertline begline * Insert temp line
dropanchor currentfilename *
storescrbuff "9" return * Get name to scratchbuff 9
cut * Delete temp line
NEXT: * Get ready to mark
FIND "macro" "begin" return * Find start of macro
"I" return *
jfalse END: * End macro if no more macros
begline * Move to <key> begin
altwordset * To make all keys a word
markword * Mark key
defaultwordset * Reset for wordright below
storescrbuff "7" return * Store <key> to scratchbuff 7
unmarkblock *
markline * Mark start of macro
endpara * Go to end of macro
makectrofscreen * Quick look at end of macro
writeblock "c:#.qm" return * Write macro block to c:#.qm
addline * Add blank line at end of macro
editfile return quit * Quit c:#.qm file from ring
editfile return * Load new macro block txtfile
DOS "qmacb " currentfilename * Make macfile of macro block
backspace backspace backspace * Remove '.qm'
return return * Return from Dos
DOS "dir " currentfilename * Get macfile size with Dir
backspace backspace * Delete "qm"
"mac >c:!" * Add "mac", save list to temp
return return * Back from Dos
killfile quit * Kill/quit c:#.qm
editfile "c:!" return * Load Dir listing of macfile
gotoline "4" return * Drop down
wordright wordright markword * Mark size
storescrbuff "8" return * Get size to scratchbuff 8
killfile quit * Kill/quit c:!
getscrbuff "9" return * Insert orig file name
cut * Get to scrap
editfile paste return * Load orig file
prevpara endpara cursordown * Move to blank line at macro end
begline * Begline
"*" cursorright * Put asterisk in column 1
getscrbuff "8" return * Insert byte size of macro
endline cursorright "bytes" * Add "bytes"
cursorright * Space
insertdate inserttime * Insert date and time
"(TH" * Author ID, (change to your inits)
cursorright * One space right
getscrbuff "7" return * Get macro <key>
endline * Move to end of <key>
* *---------------------- Insert Macro File Name ----------------------*
* * (These lines may be removed if you do not wish to insert file name)
* "," * Insert comma
* cursorright *
* "in" * Insert 'in'
* cursorright *
* unmarkblock * Unmark key
* markcolumn * Begin column block
* currentfilename * Insert CurrentFileName
* find "\" return "LB" return * Find '\'
* deleteblock * Delete path
* endline * Move to end of file name
* *---------------------------------------------------------------------
")" cursorleft * Add end parentheses
jump NEXT: * Loop again
END: *
unmarkblock * Unmark key
begfile *
*
* 200 bytes Thu 09-13-1990 19:13:19
* 201 bytes Mon 05-06-1991 14:36:44
* 210 bytes Thu 05-16-1991 12:00:10 (TH, added author identification)
* 219 bytes Mon 07-01-1991 15:01:24 (TH, added macro <key>)
* 203 bytes Sat 07-06-1991 11:47:04 (TH, shortened)
* 202 bytes Tue 07-16-1991 21:20:32 (TH, chng key mark for scan codes)
* 201 bytes Sat 07-20-1991 09:00:24 (TH, removed unmarkblock)
* 201 bytes Mon 07-22-1991 17:26:34 (TH, changed c:$.qm to c:#.qm)
* 202 bytes Sun 07-28-1991 22:21:10 (TH, added onewindow)
* 202 bytes Sun 08-18-1991 02:28:44 (TH @5)
*
* ----------------------------------------------------------------------
* @(7) Macro To Show Byte Size of ALL Macros in Document,
* Faster Shorter Version Using Windows
* ----------------------------------------------------------------------
* This macro is a modification of @5 using windows. It is about 10%
* smaller and 10% faster than @5.
* Place cursor line anywhere in a txtfile macro and press @7. Macro
* size is added at the end of each macro in the document, along with
* macro key. Macro name may be included in byte size line by
* uncommenting and adding the "macro name" lines at the end of the
* macro. Macro must be a paragraph with NO blank lines. If the
* paragraph does NOT contain a macro, the macro stops executing with a
* beep, meaning "macro_begin" was not found in the paragraph. QMACB.BAT
* must be in path. Word "macro_begin" (no _) must be used only at
* start of macro. Key and "macro_begin" must be on same line.
@7 macrobegin
onewindow * Close all windows
unmarkblock * Clear any marked block to start
begfile
NEXT: * Get ready to mark
FIND "macro" "begin" return * Check if para is macro
"I" return *
jfalse END: * If para is not a macro, end macro
HASMACRO: *ELSE come here if para is a macro
begline * Move to <key> begin
altwordset * To make all keys a word
markword * Mark key
defaultwordset * Reset for wordright below
storescrbuff "7" return * Store <key> to scratchbuff 7
markline * Mark start of macro
endpara * Go to end of macro
addline * Add blank line at end of macro
horizontalwindow * Window 2
editfile "c:~.qm" return * Load temp file c:~.qm
copyblock * Copy macro to temp file
unmarkblock * A little less screen flicker
writeblock return * Write macro block to c:~.qm
DOS "qmacb " currentfilename * Make macfile of macro block
backspace backspace backspace * Remove '.qm'
return return * Return from Dos
DOS "dir " currentfilename * Get macfile size with Dir
backspace backspace * Delete "qm"
"mac >c:~" * Add "mac", save list to temp
return return * Back fom DOS
horizontalwindow * Window 3
editfile "c:~" return * Load Dir listing of macfile
gotoline "4" return * Drop down
wordright wordright markword * Mark size
storescrbuff "8" return * Get size to scratchbuff 8
nextwindow * Window 1
begline * Begline
"*" cursorright * Put asterisk in column 1
getscrbuff "8" return * Insert byte size of macro
endline cursorright "bytes" * Add "bytes"
cursorright * Space
insertdate inserttime * Insert date and time
"(TH" * Author ID, (change to your inits)
cursorright * One space right
getscrbuff "7" return * Get macro <key>
endline * Move to end of <key>
* ---------------------- Insert Macro File Name ----------------------*
* * (These lines may be removed if you do not wish to insert file name)
* "," * Insert comma
* cursorright *
* "in" * Insert 'in'
* cursorright *
* unmarkblock * Unmark key
* markcolumn * Begin column block
* currentfilename * Insert CurrentFileName
* find "\" return "LB" return * Find '\'
* deleteblock * Delete path
* endline * Move to end of file name
* ---------------------------------------------------------------------
")" cursorleft * Add end parenthesis
makectrofscreen * Center bytes line on screen
nextwindow * Window 2
killfile * Kill c:~.qm
nextwindow * Window 3
killfile * Kill c:~
quit * quit c:~
quit * quit c:~.qm
onewindow * Close all windows if QConfig set
jump NEXT: * Do again until done
END: *
unmarkblock * Unmark key
begfile *
*
* 186 bytes Sun 08-18-1991 02:28:49 (TH @7)
* QMACTB.BAT
* -----------
* The following batch file QMACB.BAT is required to be in the path to
* run these macros:
*--
* @echo off
* rem qmacB.bat Sun 09-30-1990
* cls
* echo Converts %1.QM (text) To %1.MAC (binary)
* if not exist %1.QM goto NOTEXIST
* QMAC %1.MAC %1.QM /B /A- %2 %3
* goto END
* :NOTEXIST
* echo %1.QM does not exist
* :END
*--
* Version History
* ---------------------------------------------------------------------
* 1.0 - Initial
* 1.1 - Added @5 to show size of all macros in txtfile.
* 1.1a - Modified @5 for paragraphs that are not macros.
* 1.1b- Changed other file names in series, this is an update.
* 1.2 - Changed documentation only.
* - Changed .LST and .QL files.
* 1.3 - Modified macros slightly, @1 now checks if
* paragraph is a macro, like @5.
* 1.3a - Removed [d:]\[path] for location of QMAC from QMACB.BAT
* files. QMAC can be located anywhere in path.
* 1.3b - Modified documentation and added START.BAT.
* 1.4 - Added reference to DSIZ.QM and DSIZ.BAT.
* - Changed @5 and @1 to unmark byte size after running.
* 1.5 - Added author identification to macro size line.
* 1.5a - Changed @5 and @1 to include macro <key> in size line.
* 1.5b - Added makectrofscreen to and shortened @5.
* - Moved makectrofscreen up in @1. Updated comments.
* 1.5c - Changed @5 and @1 to mark keys using scan codes correctly.
* 1.5d - Removed unmarkblock from @5 and @1.
* - Included with AMAC39.ZIP, July 21, 1991.
* 1.5e - Changed temporary file c:$.qm to c:#.qm in @5 and @1
* in order to measure byte size of macros produced with
* @5 and @7 in MACRxx.QM, July 22, 1991.
* 1.5f - Minor documentation changes, 7/29/91.
* - Added onewindow to @5 and @1.
* - Changed markblockbeg/end to markcharacter in @1.
* (Included in AMACxx, v 4.0)
* 1.6 - Changed keys: @0 to @1 and @9 to @5. 8/7/91
* - Modified @1 and @5 for optional macro file name. 8/7/91
* - Added shorter faster windows versions, @3 and @7. 8/18/91
*
*
*
*
*
*