public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Re: "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues)
@ 2012-04-17  7:55 Schwarz, Konrad
  2012-04-17  8:07 ` marco atzeri
  0 siblings, 1 reply; 6+ messages in thread
From: Schwarz, Konrad @ 2012-04-17  7:55 UTC (permalink / raw)
  To: cygwin-xfree

Hello,

an easy work around for the problem that cscope and its variant mlcscope
cannot deal with paths containing spaces under Cygwin is to replace such paths
with their DOS short name equivalents, since these do not contain spaces.

The error surfaces as the error message

	mlcscope: cannot read trailer offset from file ./cscope.out

and in that mlcscope recreates the program database each time it is started.

When starting cscope using relative paths (the most frequent case), eliminating
spaces must be done for the current working directory.

The cygpath utility comes in handy for this. E.g., invoking mlcscope as

	(cd $(cygpath -u $(cygpath -d "$PWD"));mlcscope -b)

solves the problem.

In the above line, the inner call to cygpath converts the working directory
to DOS format, the outer call converts the result to Cygwin format; preserving
the short names of DOS, but replacing backslashes with forward slashes, for example.

Unfortunately, it is not possible to combine the -u and -d flags in a single
invocation of cygpath; this would be a useful extension.

Regards,
Konrad Schwarz


P.S.: Sorry for resurrecting an old thread from Jan 2007.  However, this thread
seems to be the only place the problem was discussed.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues)
  2012-04-17  7:55 "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues) Schwarz, Konrad
@ 2012-04-17  8:07 ` marco atzeri
  2012-04-17 23:15   ` Jim Reisert AD1C
  0 siblings, 1 reply; 6+ messages in thread
From: marco atzeri @ 2012-04-17  8:07 UTC (permalink / raw)
  To: cygwin-xfree

On 4/17/2012 9:55 AM, Schwarz, Konrad wrote:
> Hello,
>
> an easy work around for the problem that cscope and its variant mlcscope
> cannot deal with paths containing spaces under Cygwin is to replace such paths
> with their DOS short name equivalents, since these do not contain spaces.

the easy solution is to not use paths with space in cygwin

>
> Regards,
> Konrad Schwarz
>
>
> P.S.: Sorry for resurrecting an old thread from Jan 2007.  However, this thread
> seems to be the only place the problem was discussed.

the right way is to open a new thread, not resurrecting the dead.
Things are changed in 5 years

Marco




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues)
  2012-04-17  8:07 ` marco atzeri
@ 2012-04-17 23:15   ` Jim Reisert AD1C
  2012-04-18  4:44     ` Vivek Agarwal
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Reisert AD1C @ 2012-04-17 23:15 UTC (permalink / raw)
  To: cygwin-xfree

On Tue, Apr 17, 2012 at 2:07 AM, marco atzeri wrote:

> the easy solution is to not use paths with space in cygwin

Not so easy.  Cygwin inherits the Windows path, and I have several
directories in my Windows PATH with spaces in them.

-- 
Jim Reisert AD1C, <jjreisert@alum.mit.edu>, http://www.ad1c.us

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues)
  2012-04-17 23:15   ` Jim Reisert AD1C
@ 2012-04-18  4:44     ` Vivek Agarwal
  0 siblings, 0 replies; 6+ messages in thread
From: Vivek Agarwal @ 2012-04-18  4:44 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: somelist-unsubscribe-agravivek

On 4/18/12, Jim Reisert AD1C <jjreisert@alum.mit.edu> wrote:
> On Tue, Apr 17, 2012 at 2:07 AM, marco atzeri wrote:
>
>> the easy solution is to not use paths with space in cygwin
>
> Not so easy.  Cygwin inherits the Windows path, and I have several
> directories in my Windows PATH with spaces in them.
>
> --
> Jim Reisert AD1C, <jjreisert@alum.mit.edu>, http://www.ad1c.us
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://x.cygwin.com/docs/
> FAQ:                   http://x.cygwin.com/docs/faq/
>
>


-- 
Thanks & Regards,
Vivek Agarwal

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues)
  2007-01-03 21:54 Fred Ma
@ 2007-01-03 21:55 ` Fred Ma
  0 siblings, 0 replies; 6+ messages in thread
From: Fred Ma @ 2007-01-03 21:55 UTC (permalink / raw)
  To: cygwin-xfree

Sorry for posting in the wrong group, slippery typing fingers.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues)
@ 2007-01-03 21:54 Fred Ma
  2007-01-03 21:55 ` Fred Ma
  0 siblings, 1 reply; 6+ messages in thread
From: Fred Ma @ 2007-01-03 21:54 UTC (permalink / raw)
  To: cygwin-xfree

Bug fix requested submitted for cscope via sourceforge:

This problem arose when using vim, but also appears when using "cscope
-d".  I get the error "cannot read trailer offset from file
cscope.out".  I browsed build.c to find that it is caused when reading
in a single number with fscanf.  To see what could be confusing
fscanf, I found the context of the "trailer offset" from
http://www1.bell-labs.com/project/wwexptools/cscope/cscope.html, which
shows that the number to be read occupies a single line along with
other space-delimited data, including the specification of the current
directory.  The space delimiting will get messed up if the current
directory contains spaces, which is often the case in Windows and
Cygwin (though it can also be the case in *nix).  P.S.: It also
happens with mlcscope.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-18  4:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17  7:55 "cscope -d" can't find trailer offset if path contains space (was: vim mlcscope interface issues) Schwarz, Konrad
2012-04-17  8:07 ` marco atzeri
2012-04-17 23:15   ` Jim Reisert AD1C
2012-04-18  4:44     ` Vivek Agarwal
  -- strict thread matches above, loose matches on Subject: below --
2007-01-03 21:54 Fred Ma
2007-01-03 21:55 ` Fred Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).