home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR36
/
KEXX.ZIP
/
BROWSE.DOC
next >
Wrap
Text File
|
1992-12-29
|
4KB
|
114 lines
BROWSE.KEX Version 2.1 - December, 1992
Description:
BROWSE.KEX makes it easy to locate symbol definitions and references in
your C source files. It finds definitions and references via the
browser libraries (.BSC files) created by the PWBRMAKE utility
distributed with Microsoft C version 6.0 or Microsoft C/C++ 7.0.
BROWSE is similar to the older CTAGS, but has two important advantages:
1) It works on variables, macros, and types in addition to functions.
2) It finds all references to a symbol in addition to the definition.
The disadvantage is that it works only with the Microsoft C compilers,
and not with other vendor's compilers. (Note that only C programs are
supported, and not C++ programs.)
Prerequisites:
- KEDIT 5.00 or later.
- The RUNCMD, POP, PUSH, and PRGLINES macros (all distributed as part
of this package in the \COMMON subdirectory) must be in your KEDIT
macropath.
- BROWSE.EXE must be in your path. This is a family mode
application that will run under either DOS or OS/2.
NOTE: Because Microsoft changed the format of their browser
libraries for C/C++ 7.0, different BROWSE.EXE programs are supplied.
One for each version of the compiler: BROWSE.EXE is for C/C++ 7.0,
and BROWSE6.EXE, which must be renamed to BROWSE.EXE before you use it,
is for C 6.0.
- BROWSE.KEX must be run from the directory containing your source
files.
- Only one .BSC file can be in your current directory. Alternately you
can set the BROWSEFILE editv variable as described below.
Using BROWSE:
(Remember that only C programs are supported, and not C++ programs.)
Add the following three commands to your KEDIT profile:
'define ctrl-d "macro browse -d"'
'define ctrl-r "macro browse -r"'
'define ctrl-b "macro browse -b"'
Then rerun your profile. If you've created a .BSC file as described
below, you can now press one of the following keys:
ctrl-d to list all definitions of the symbol at the cursor position
ctrl-r to list all references to the symbol at the cursor position
ctrl-b to back up to the point at which BROWSE was last started
Note: the ctrl-r definition overrides the default ctrl-r definition.
You can, of course, use another key instead of ctrl-r if you
prefer.
Each time you invoke BROWSE to find either symbol references or
definitions in your source files, the macro creates a new BROWSE
level. Each level uses a number of EDITV variables and POINT settings
to remember the filenames and the lines that contain references (or
definitions) to a particular symbol.
Backing up a level (BROWSE -B) removes the EDITV variables and line
names associated with the top browse level, and tries to return you to
the location you were at prior to issuing the latest BROWSE command.
This makes it easy to look up the definition of a variable or
procedure, and later return to the place you were editing -- knowing
more about whatever it was that you just looked up.
Keep in mind though, that each level requires some of your PC's memory
to hold the information associated with it. Repeated BROWSEs without
backups may continue to fill up memory until no more can be done until
you do some backups.
Creating .BSC files:
BROWSE uses the .BSC files created by the PWBRMAKE utility distributed
with Microsoft C 6.0 or C/C++ 7.0. Two steps, both typically handled
by NMAKE files, are involved in setting up a .BSC file:
1) Always use the /FR options when you compile (this creates the .SBR
files that PWBRMAKE uses as input). For example,
cl /c /FR mainrtn.c
cl /c /FR subrtn.c
2) Issue the BSCMAKE command (if you are using C/C++ 7.0; with C 6.0,
the command is PWBRMAKE) after compiling all your source files. A good
time to do this is right after you run LINK. For example,
link mainrtn+subrtn, myprog;
bscmake /o myprog *.sbr
Setting the BROWSEFILE editv variable:
If you have multiple .BSC files in your current directory, you have to
tell BROWSE.KEX which one to use by setting the BROWSEFILE editv
variable. For example,
EDITV SET BROWSEFILE other.bsc
Feedback:
Questions, suggestions, comments, bug reports, etc. are welcome.
Feel free to leave messages regarding BROWSE on the Mansfield
Software Group BBS (203-429-3784), or section 2 of the PCVENA forum
on CompuServe.