Topic: Improvements to UTAGS macro (1 of 1), Read 22 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Lowell Dennis
Date: Tuesday, September 16, 2003 05:46 PM

I recently posted a reply to a message chain under Compiler Support that actually fits better here.

For some time, I have been using a custom TAG lookup mechanism that (I feel) provides a couple of improvements over the standard one that is provided with VEDIT. These improvements include:

1) The ability to have duplicate tags or perform a lookup using a partial TAG allowing the user to select the one they desire.
2) The ability to go backwards through the tags links you have followed.

These macros have proven very useful to me (and a few others) and I would like to make them available on this forum. I welcome your feedback as to how they can be improved. One such improvement that I would like to add is the ability to use the mouse in both indicating the TAG to be processed and in selecting the desired item from the list of matches.

Actually my TAG macros make use of several more general purpose macros that are divided into several files ...

ALLOC.VDM - Has macros for allocating buffers and text registers with error reporting in the status line.

STACK.VDM - has macros for implementing stacks (that allow pushing and popping of variable length data) using vedit text registers.

FILESTCK.VDM - uses STACK.VDM to implement a stack of filenames. This is used to backtrack through the tags.

PICK.VDM - uses STACK.VDM to implement a pick list. This is what is used to display the list of matching tags from which the user can choose. This is the one that I would like to improve with point and click.

TAG.VDM - is the macro that drives the whole TAG lookup process.

The following is part of my USTARTUP.VDM
Key_Add("Ctrl-F",'[VISUAL EXIT] CALL(102,"TAG_LOOKUP")',OK)
Key_Add("Ctrl-B",'[VISUAL EXIT] #80=#91;CALL(102,"POP_FILE")',OK)
Key_Add("Ctrl-S",'[VISUAL EXIT] CALL(102,"GET_SYMBOL") IF (RV==0) { Search(@80,BEGIN+SET) }',OK)

The code is pretty rough (this is why I wanted the review). So don't laugh or I'll take my toys and go home :-)

I hope I added enough comments for you all to follow what I am doing (sometimes I'm not even sure what I was thinking).

There are 10 kinds of people.
Ones who understand binary and
Ones who don't!