Category : Word Processors
Archive   : WEMP10.ZIP
Filename : WSBRIEF.DOC

 
Output of file : WSBRIEF.DOC contained in archive : WEMP10.ZIP































WORDSTAR

EMULATION

MACRO

PACKAGE
































USER'S

GUIDE







Table of Contents


COPYRIGHT NOTICE AND LICENSE . . . . . . . . . . . . . . . . 1

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . 2

Design Philosophy . . . . . . . . . . . . . . . . . . . . . . 3

INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . 4

Block Operations . . . . . . . . . . . . . . . . . . . . . . 5

Book Marks . . . . . . . . . . . . . . . . . . . . . . . . . 7

Miscellaneous Functions . . . . . . . . . . . . . . . . . . . 8

Search and Replace Functions . . . . . . . . . . . . . . . . 10

Anomalies in Editing Behaviour . . . . . . . . . . . . . . . 12

Command Guide . . . . . . . . . . . . . . . . . . . . . . . . 13
Cursor Movement . . . . . . . . . . . . . . . . . . . . 13
Scroll . . . . . . . . . . . . . . . . . . . . . . . . . 13
Format . . . . . . . . . . . . . . . . . . . . . . . . . 13
Delete and Insert . . . . . . . . . . . . . . . . . . . 14
Find and Replace . . . . . . . . . . . . . . . . . . . . 14
Save Files . . . . . . . . . . . . . . . . . . . . . . . 14
File and Block Operations . . . . . . . . . . . . . . . 14







COPYRIGHT NOTICE AND LICENSE

I'll try to make this as short as I can.

This document, all related program files, source code,
demonstration code and compiled object modules accompanying this
document are Copyright 1989 Alberto de la Torre.

Using this software for more than a 30 day trial period is
stealing. Please send in the requested registration fee.

Send $20.00 cash or check to:
Alberto de la Torre
4586-B SW 139th Ct.
Miami, Fl. 33175
305-554-9346 (7am to 9pm EST)

Include your name & telephone number. Only registered users will
receive support.


































1







INTRODUCTION


Thank you for downloading and trying the WordStar
Emulation Macro Package for BRIEF! I hope this package
will enable you to quickly use all the power of BRIEF
without having to give up those old familiar WordStar
commands. Although I've taken great pains to insure
WordStar compatibility, a few of the operations do have
subtle differences. These arose from compromises made
to tap in to the incredible power that BRIEF offers as
a text editor.
The documentation is divided into two parts. The
first part is an overview and explanation of the text
operations and features available. The sections are
ordered in a manner which follows the structuring of
the source code for the macro package.
This is where you want to start if you are
primarily interested in using the macro package, and
not how the macros themselves work.
If you are a veteran WordStar user, or are eager
to rush and start using the macro package, the final

section in part one is a command guide which lists all
the available functions and their keystrokes. Turn to
it right after reading Installation.

The second part of the documentation is an
optional WordPerfect document which includes some
examples of macro source code, flow charts for most of
the complex macros, and accompanying text explaining
how the example macros work. It will be provided to
registered users only, upon request.
Although the source code included with the package
is commented, these examples and their explanations
provide a clearer understanding of what is actually
happening in many of the program statements and
expressions. The documentation which comes with BRIEF
has improved tremendously from the early days, but
still more can be done to ease and speed learning the
BRIEF macro language. I hope this second part of the
documentation will save you many of the hours I put in
trying to figure out how to get BRIEF to do what I
wanted.


Alberto de la Torre







2







Design Philosophy

I had two primary goals when writing this package.
Implement the WordStar editing keys as closely as
possible, and enhance the underlying function to take
advantage of those additional capabilities which exist
in BRIEF. A secondary goal was to leave intact as much
of the "default" brief functions and editing keys as
possible. Where this wasn't possible, I usually re-
mapped the function to another key. With this in mind
let's go on to see how things work.










































3







INSTALLATION

I've never found an "automatic" installation1 program which
did what I wanted without problems. Usually in an effort to make
things simpler, the opposite happened. I would end up going
through the batch file that did the install to figure out what it
did, and then manually copy the files to where I wanted them.
What's the big deal with telling you to issue a few copy
commands?
With all due respect to your knowledge of DOS, here's what
you need to do to install this package:

The distribution file is a compressed archive useing the ZIP
format. It contains the following files:

WSBRIEF.DOC - this file
READ.ME - directions to read this file, last minute changes,
etc.
CM.ZIP - the compiled macros
HELP.ZIP - the help files
SOURCE.ZIP - the source code for the macros

Copy the CM.ZIP file to wherever you have the *.CM files
BRIEF now uses.(most likely something like C:\BRIEF\MACROS)
Unpack it using PKUNZIP or another "unzip" utility, then delete
it.

Copy the HELP.ZIP to wherever you have BRIEF's help
files.(most likely C:\BRIEF\HELP) Unpack it using PKUNZIP or
another "unzip" utility, then delete it.

If you don't like the default colors, or want to modify the
anything, copy SOURCE.ZIP to wherever you keep your *.m files.
Unpack it using PKUNZIP or another "unzip" utility, then delete
delete it. To compile the WordStar Emulation Macro Package a
batch file CMACWS.BAT has been included for your convenience.

Now all you need to do to use the WordStar Emulation Macro
Package is to add "-mwstartup" to the command line when you
invoke BRIEF (don't include the quotes). Conversely you could
add "-mwstartup" to your BFLAGS environment variable.2 e.g.:

set bflags=-a -b -c -mwstartup





1 This installation assumes you've already installed BRIEF.

2 See the BRIEF manual for an explanation of the BFLAGS
environment variable.

4







The Block Operations

The block operations are a superset of those found in
WordStar. The begin-block and end-block keys are ^KB and ^KK
respectively. They differ from their WordStar counterparts in a
few ways. The sequence in which they are dropped is restricted.
You must drop the begin-block marker prior to dropping the end-
block marker. After a block has been marked, it does not remain
highlighted. And an end-block may be placed above, or before, a
begin-block within a file. This latter feature negates any
weakness caused by having to use the begin-block marker prior to
the end-block marker.
Wordstar supports two types of blocks: column and normal.
This package supports three: normal, column, and line. The first
two are analogous to their Wordstar counterparts. That last will
mark entire lines, regardless of where the cursor/end-block is
located. This saves quite a few keystrokes when marking a single
line. Merely pressing ^KB, ^KK will mark a line. You need not
first move to the beginning of the line, drop begin-block, move
to the end of the line, drop end block, then return to your
original cursor position as with WordStar.
To alter the type of block markers you are using, the ^KN
key sequence will toggle through all available mark-types. In
addition to doing this prior to marking a block of text, ^KN will
also change they mark-type after you've already started marking a
block of text. "N" was chosen for it's somewhat mnemonic "next"
block type.
The block copy, block move and block delete all work as
you'd expect. Block delete will not allow you to delete a block
if it is not in the current buffer.
The ^QB and ^QK will move you to the begin-block and end-
block positions respectively. Because of the greater variety of
block types, this can sometimes lead to unexpected results. For
example: if you have been using a block-type of LINE, the end-
block position may not be at the end of the line.
There are a few very useful extensions to the block
operations which are not found in WordStar. Two are ^KL which
will change the entire block to lower-case letters, and it's
counterpart ^KU which will change the entire block to UPPER-CASE
letters. Another command steals a WordStar keystroke combination
and uses it for something very handy. A block-sort routine is
tied to ^KS. Recall that ^KS is used in WordStar to save and
continue. Since BRIEF has no opening menu like WordStar, ^KD can
be used to save the current file and continue editing.
The block-sort may be called after marking a block of text
using the LINE markers. If you try to sort a block marked with
the regular WordStar type marks, or column marks, you will
receive an error message saying "Must use LINE marks 4 block, use
^KN to change." Simply type ^KN till you get the message that
you are using LINE marks, remark the area you wish to sort, and
type ^KS again.
You will be prompted for the column number to use for the

5







sort key. Let's work through a quick example together to show
you how this can be useful. Create a file which contains a list
of all the files in you current subdirectory by typing the
following line at the DOS prompt and pressing ENTER:

DIR >temp

Now edit the file "temp" with BRIEF by typing:

b temp -mwstartup

Type ^KN until you get the message "line marking is on", begin a
block at the top of the file by typing ^KB, go to the end of the
file (by typing ^QC), finish marking the block by typing ^KK.
Now you are ready to sort. Type ^KS, answer 1 for the column to
sort, and press D for a descending sort at the next prompt. Soon
you will see the files listed in reverse alphabetical order. Now
call block-sort again by typing ^KS, only this time type 10 for
the column to use for the sort key. Just press return to accept
a default ascending sort order (this just means things will be
ordered from A to Z). Voila! The file list is sorted by file
extension. The ability to specify the column gives you added
flexibility to a plain sort.






























6







The Book Marks

There are two types of "book marks" available in the
WordStar Emulation Macro Package: invisible (the default) and
visible.3
These are analogous to the place "markers" in WordStar, and
the same keys are used to set them (^K0-9) and to goto them (^Q0-
9). They are extended from their WordStar counterparts in that
they will work across buffers. This means that if you are
editing more than one buffer, set a book mark and switch to
another buffer; a subsequent goto-mark command (^Q0-9) will take
you back to the buffer where the mark was set.
The invisible markers have an extra command ^Q?, which will
show you a bounce-bar menu list of all markers currently in use.
You can then point to the marker you wish to goto, press enter,
and you will automatically be moved to that marker.



































3 Edit the file STARTUP.M to alter the type of book marks.

7







Miscellaneous Functions

There are a few extensions to WordStar here also. The list
files command; "^KF" needs to have the dos file SORT.EXE
available via the PATH. If it is not, you will get a "File not
found" error msg upon returning to BRIEF from DOS.
If things are set up correctly, after typing ^KF you will
then be prompted for a "PathSpec". You can enter either a drive
as in "A:", a directory as in "\DOS", a filename as in "READ.ME",
or any combination of the above. Wildcards are also supported in
a manner consistent with DOS. The current PathSpec is displayed,
so if you want to work with the current directory, you only need
to press the ENTER key. Starting to type anything else will
immediately erase the default PathSpec being displayed. In other
words you don't need to delete what's there to enter something
different. Just type what you want.
After entering a PathSpec, a window will open showing you a
list of files which matched the PathSpec you entered. The bottom
of the window lists the options available for manipulating those
files. They are:

Add adds the file to this list of buffers, leaving you
in the file manager

Copy allows you to copy the file (just like DOS)

Del deletes the highlighted file (prompts for
confirmation)

Edit reads the file into a new buffer and switches to
that buffer

Ins inserts the highlighted file at the cursor
position (same as ^KR)

Ren allows you to rename the highlighted file

A feature I've included which can be invoked by typing ALT-T
facilitates writing a "use-one-time" macro. Believe it or not
there are some things which can't be done with BRIEF's find and
replace. For those occassions I write a quick and dirty macro,
complile it with ALT-F10, use it and then forget about it. To
prevent these "use-one-time" macros from growing like a cancer
all over my hard disk (or from cluttering up my \BRIEF\MACROS
directory); I always name the macro TEMP which I keep in a file
called TEMP.M in my \BRIEF\MACROS subdirectory. This method will
save you the work of recreating the skeleton of a macro, or
typing in a long pathspec. Below is the macro skeleton used in
TEMP.M:




8








;use one time macro
;compile with ALT-F10
;invoke by pressing F10, type TEMP, then press ENTER
;
(macro temp
(
(int number)
(string letters)

(__ ;<------begin typing here
)
)








































9







The Search and Replace Functions

The search and search & replace functions work very much
like their WordStar counterparts. They are invoked by ^QF and
^QA respectively. They are extended by being able to use
"regular" expressions,(see the BRIEF manual) and the "options"
available differ slightly from the WordStar search and replace
options.
When you are presented the "options" prompt after entering a
search, or search and replace pattern, you are shown the current
settings of the options. You may accept them as shown by
pressing the enter key, turn them all off by pressing the space
bar and then the enter key, enter a new set of options by typing
the appropriate letter(s), or edit those options shown by using
the backspace and arrow keys. It doesn't matter whether you
enter the options in upper or lower case. Lastly, you may get
help on the available options by pressing ALT-h. The available
"options" are:

B Backward, if this is displayed the search, or search
and replace, will work backward from the current cursor
position. The default is OFF.

G Global, if this option is displayed the search or
search and replace, will work through all buffers.
(this differs from the way the global option in
wordstar works) The default is OFF.

N Replace without asking, if this option is displayed a
search and replace will not prompt you for permission
to make the replacement. If this is used without G
only the first occurrence of the replacement will take
place. If you want to replace all occurrences of a
pattern in a single buffer, do not use this option.
You can merely answer "G" to the [Yes|No|Global]?
prompt which is displayed when the first occurrence of
the pattern to replace is found. This option was
primarily intended to be used with the G global option
above to make replacements automatically in all buffers
without having to stop in each one. The default is
OFF.

R Regular expressions, if this option is displayed the
pattern entered for search, or search and replace, will
be evaluated as a "regular" expression.(see BRIEF
manual) The default is ON.

U Ignore Case, if this is displayed the search is
insensitive to case. (ex. a search pattern of mike
will stop if it finds MIKE) If absent upper and lower
case will not match. (ex. a search pattern of dave
will not find DAVE)

10










Both the search, and search and replace share the same
"pattern" and "options". This means that if you enter a
"pattern" to search for, the next invocation of search and
replace will present you with that "pattern". Likewise, the
"options" you enter for either search, or search and replace will
be reflected in the next invocation of the other function.4
The existing function keys for search and translate as
outlined in the BRIEF documentation are still functional.
However they will invoke the wordstarlike functions when used.
The "repeat last" function, better known as ^L to wordstar
aficionados works as expected. It repeats the last search, or
search and replace operation.


































4 This may be changed by modifying the WSEARCH.M file and
recompiling. See the programmer's reference for more
information.

11







Anomalies in Editing Behaviour

There are a few anomalies which arise due to interation of
WEMP's features with some of BRIEF's features. Below is a
partial list of what's been discovered so far. This list is by
no means complete, as it is impossible to test every combination
of editing commands.

PROBLEM: Mixing WEMP's block marks with BRIEF's "anchors".
CAUSE: This situation occurs when you begin marking a block,
and then use one of BRIEF's anchor types (ALT-C, ALT-M,
ALT-L) before you mark the end-block with ^Kk.
SOLUTION: Use either BRIEF's or WEMP's commands for one entire
block operation.

PROBLEM: Undoing a block move.
CAUSE: The block operations are designed so you can move a
block multiple times with ^KV. This means if you first
moved the block to one location in your file, and later
decided to move it somewhere else, you'd just have to
move the cursor to the destination and press ^KV again.
However, if you use BRIEF's UNDO to undo a block move,
a subsequent invocation of ^KV will have unpredictable
results.
SOLUTION: Explicitly mark a block you want prior to using ^KV a
second time if you've undone a block move.



























12







Command Guide

This section lists all available commands/features and the
keystrokes needed to invoke them. It is ordered in the same
manner as the quick reference card for WordStar.

The famous WordStar Cursor Movement Diamond is fully
implemented:
^E moves the cursor up a line
^X moves the cursor down a line
^D moves the cursor to the right one character (or more
accurately one character forward through the file)
^S moves the cursor to the left one character (or more
accurately one character backwards through the file)
^F moves the cursor to the next word
^A moves the cursor to the previous word
^QE moves the cursor to the top of the screen
^QX moves the cursor to the bottom of the screen
^QD moves the cursor to the right end of the line
^QS moves the cursor to the left side of the screen
^QR moves the cursor to the beginning of the file
^QC moves the cursor to the end of the file
^Q0-9 moves the cursor to place marker 0-9

In addition, most of the default BRIEF cursor movement keys
are still enabled. This has the added benefit of allowing you to
use the arrow keys to move up and down without "falling in" to
the end of a line.

Commands to Scroll the screen:
^W scrolls up one line
^Z scrolls down one line
^R scrolls up one screen
^C scrolls down one screen

Again, most of the default BRIEF keys which perform the same
or similar scrolling functions are still enabled

Commands to Format:
^OC centers text between the currently set margins(the
default BRIEF margin is at col 70)
^OR set right margin
^OI set tabs (see the brief manual on tabs for more
information)
^ON clear tabs (this actually resets tabs to their original
setting)
^OW toggle word wrap on and off
^B reformat paragraph or currently highlighted block





13








Commands to Delete and Insert:
^G or Del deletes character at cursor
^H or BS deletes character to the left of cursor
^T deletes word to the right of cursor
^Y deletes line
^QY deletes from the cursor to the end of line
^KY deletes the most recent marked block
^V toggles insert mode on and off
^N inserts a carriage return (blank line)
^BS delete previous word (ctrl-backspace)

Commands to Find and Replace:
^QF find text
^QA find and replace text
^L repeat most recent find, or find and replace

Save Files:
^KD save and resume editing (saves only current buffer)
^KX save and exit (writes all modified buffers before
exiting)
^KQ abandon file(s) without saving, all modifications since

last save are lost

Miscellaneous Commands:
^Q? invoke bounce-bar menu to locate/move cursor
to bookmarks

File and Block Operations:
^KL lower-case block
^KN toggle column, normal, line modes for block marking
^KB mark/unmark beginning of block
^KK mark end of block
^KC copy block
^KS sort block
^KY delete block
^KV move block
^KU upper-case block
^KW write block to another file
^KR read file into current buffer at cursor location
^K0-9 set place marker
^KJ delete file
^KF list files










14








INDEX

anomalies . . . . . . . . . . . . . . . . . . . . . . . . . . 12
block copy . . . . . . . . . . . . . . . . . . . . . . . . . . 5
block move . . . . . . . . . . . . . . . . . . . . . . . . 5, 12
block operations . . . . . . . . . . . . . . . . . . . 5, 12, 14
copy block . . . . . . . . . . . . . . . . . . . . . . . 14
delete block . . . . . . . . . . . . . . . . . . . . . . 14
lower-case . . . . . . . . . . . . . . . . . . . . . . . . 5
lower-case block . . . . . . . . . . . . . . . . . . . . 14
mark end of block . . . . . . . . . . . . . . . . . . . 14
mark/unmark beginning of block . . . . . . . . . . . . . 14
move block . . . . . . . . . . . . . . . . . . . . . . . 14
sort block . . . . . . . . . . . . . . . . . . . . . . . . 5
UPPER-CASE . . . . . . . . . . . . . . . . . . . . . . . . 5
upper-case block . . . . . . . . . . . . . . . . . . . . 14
write block to another file . . . . . . . . . . . . . . 14
bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . . 14
clear tabs . . . . . . . . . . . . . . . . . . . . . . . . . 13
install . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
list of files . . . . . . . . . . . . . . . . . . . . . . . . . 4
lower-case . . . . . . . . . . . . . . . . . . . . . . . . 5, 14
margin . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
reformat . . . . . . . . . . . . . . . . . . . . . . . . . . 13
replace . . . . . . . . . . . . . . . . . . . . . . 8, 10, 11, 14
search . . . . . . . . . . . . . . . . . . . . . . . . . 10, 11
set tabs . . . . . . . . . . . . . . . . . . . . . . . . . . 13
sort . . . . . . . . . . . . . . . . . . . . . . . . 5, 6, 8, 14
tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
upper-case . . . . . . . . . . . . . . . . . . . . . . . . 5, 14





















15


  3 Responses to “Category : Word Processors
Archive   : WEMP10.ZIP
Filename : WSBRIEF.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/