--------------------------
Raghavendra Prabhu
GPG Id : D72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
> Currently when using cscope with vim and being several levels deep from
> project root directory (with cscope.out located in this directory), the
> cscope queries fail because of lack of prefix. Using a cscope prefix on
> a per-project basis is hard. So, this patch introduces a boolean
> variable setting which vim will be able use (in the absence of an
> already existing prefix path) the prefix of cscope.out to canonicalize
> the path obtained from 'cs find'. I have also tested it and it works
> fine.
Isn't this similar to what 'tagrelative' does to file names in tags
files? Then perhaps we should use a similar name: 'cscoperelative'?
--
hundred-and-one symptoms of being an internet addict:
17. You turn on your intercom when leaving the room so you can hear if new
e-mail arrives.
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
A few remarks about the patch. Please fix this and send a new patch.
The strdup() calls are leaking memory. You can't use dirname(), it's
not on all systems.
I don't think it works when the directory name is empty, it would result
in a leading slash.
You can use gettail(). You probably want to compute the size of the
directory name and concate the name when it's not zero. Search for
"p_tr" in src/tag.c for an example. The use of vim_isAbsName() might
also apply.
Please use coding style as in the rest of the Vim sources.
The documentation in if_cscop.txt isn't very clear. Please mention what
happens to a path that cscope returns. I don't know what "prefix path"
means. Either explain that or use some other wording.
--
From "know your smileys":
% Bike accident. A bit far-fetched, I suppose; although...
o _ _ _
_o /\_ _ \\o (_)\__/o (_)
_< \_ _>(_) (_)/<_ \_| \ _|/' \/
(_)>(_) (_) (_) (_) (_)' _\o_
Hi,
Thanks for all the comments. I have made appropriate changes. I have
attached the patch. I have also improved the documentation.
Suggestions welcome.
Regards,
--------------------------
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net
Thanks for the quick response. I'll look at it next week.
--
I AM THANKFUL...
...for all the complaining I hear about the government
because it means we have freedom of speech.