Thank you. I understood.
> Is there some easy way to extract this information directly from the DB?
Since Global is a line oriented tool like grep(1), its DB don't have column
information.
> What I’d like to see is an output like this:
>
> $ machine-readable-global -r arg
> 6:8,13
> 6:15,20
So, you have to write a program to know column information.
[global's output]
arg 6 multiple-users.c func(arg(), arg());
[program]
pattern = "\\barg\\b" // \\b matches to a word boundary
line = read a line at 6 in multiple-users.c.
regex_t reg;
regmatch_t m[100];
regcomp(®, pattern, ...);
regexec(®, line, 100, &m, ...);
As the result, the 'm' array has column information.
Regards
Shigio