Tapatalk

Wrong line numbers in function list

Wrong line numbers in function list

2
NewbieNewbie
2

PostJun 12, 2009#1

I've tried to edit sample .c files from Windows DDK and got the trouble with line numbers in function list.
When I'm clicking on function name in Function list, UEdit moves to some lines higher than the function I've selected.
I assume that it is caused by source code formatting. Can I correct this by editing wordfiles or is it a bug in UEdit? :)

Sample .c file is attached.
pscrcb.zip (6.1 KiB)   261
Random sample file from Windows DDK.

6,826625
Grand MasterGrand Master
6,826625

PostJun 13, 2009#2

Wow, that is a very strange syntax for a function definition. However, UltraEdit finds the function definitions correct, but has a problem to remember the correct line number. That is a bug and you should report it by email to IDM. The problem is following:

The first function definition string in the wordfile c_cplusplus.uew finds the function definitions spanning over multiple lines.

UltraEdit does not remember the line where the found string starts which would be the correct behavior (here).

Instead UltraEdit gets the line number where the found string ends and then subtracts the number of line ending characters found inside the found string. At least it looks so, I don't really know how UE works inside.

As workaround you can modify the first function string in c_cplusplus.uew from

/Function String = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./()!<>]++)[~;]"

to

/Function String = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]++([ ^t]++$"

2
NewbieNewbie
2

PostJun 13, 2009#3

Thank you, Mofi! Your workaround solved the problem.