Problem jumping to source from Command Results

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Peter Hall

Problem jumping to source from Command Results

Post by Peter Hall »

Hi - I'm evaluating v4.3.2 under NT4. I'm trying to write a regular expression to allow me to jump to a source code line from my compiler output in the Command Results window.

The compiler outputs in the following form:

Compiling time.c into time.o
time.c: In function `FindModule':
time.c:14: `pfdummy' undeclared (first use this function)
time.c:14: (Each undeclared identifier is reported only once
time.c:14: for each function it appears in.)
make: *** [time.o] Error 1

So I'm using the following regexp:

^\([^:]+\):\([0-9]+\):

This matches the format I want when I search the Command Results window, but doesn't work when I double-click (status bar reports "Cannot jump to item under the cursor".

I don't really understand the meaning of the "Registers" section of the tool preferences dialog - I've set it up for File=1, Line=2, Column=<empty>.

Can anyone help?

Many thanks,

Pete
Keith MacDonald

RE: Problem jumping to source from Command Results

Post by Keith MacDonald »

Pete,

What you've done works for me. If you paste that RE into the Find dialog box, does it match what you expect in the Command Results window? If not, please check that you haven't checked "Use POSIX regular expression syntax", on the Editor page of the Preferences dialog box. If you have, just delete all the backslashes from the RE.

If that doesn't help, please make sure that your configuration for that compiler tool has "Initial Folder" set to "$FileDir". This is necessary, because your compiler doesn't output the full path name with each error message, so TextPad needs that information.

Regards,

Keith MacDonald
Helios Software Solutions
Peter Hall

RE: Problem jumping to source from Command Results

Post by Peter Hall »

By playing about with the RE, and slightly modifying the output of the compiler using sed, I've got it to work!

Thanks for your help

Pete
Post Reply