From: SourceForge.net <no...@so...> - 2006-09-29 20:14:11
|
Bugs item #1563459, was opened at 2006-09-22 14:14 Message generated for change (Comment added) made by broeker You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104664&aid=1563459&group_id=4664 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Tobias Klauser (tklauser) Assigned to: Nobody/Anonymous (nobody) Summary: Does not handle DOS file format correctly Initial Comment: This bug was reported by a user of the cscope package in the Debian [1] distribution. As I'm the maintainer of this packages, I'm reporting this bug here as I consider it an upstream bug. You can find the original bug report at [2] [1] http://www.debian.org [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325713 When using files with DOS linebreaks (CR+LF) the following features do not work as expected: - "Find this C symbol" does find the symbol but always shows <global> as the containing function - "Find functions called by this function" does not find any function even if they're present in the source file(s) - "Find functions calling this function" does not find anything even if the function is called somewhere in the source file(s) - "Find this text string" show empty lines (as many as the occurence of the string in the source file(s) containig DOS linebreaks) When using files with UNIX linebreaks this bug did not show up. This bug was reproduced with the most recent CVS checkout from [3] [3] http://cscope.cvs.sourceforge.net/cscope/ Attached is the source files of my test case in the DOS file format (created with 'unix2dos -a' from a source file in UNIX format) Please let me know if I can provide any additional information. Tobias ---------------------------------------------------------------------- >Comment By: Hans-Bernhard Broeker (broeker) Date: 2006-09-29 22:14 Message: Logged In: YES user_id=27517 > So you consider this a non-bug? Not quite. It's a lack of a convenience feature. It's neither a promised, nor a truly necessary capability of cscope. Why should cscope be required to parse source that the system's compiler isn't required to accept? What about source that was transferred unaltered from a Mac to a Unix box? Should cscope try to accept CR-only as a line break, completely breaking any concept Unix has of a text file? ---------------------------------------------------------------------- Comment By: Tobias Klauser (tklauser) Date: 2006-09-28 14:18 Message: Logged In: YES user_id=552905 > Ultimately, this is a user error. Source files have to be > in the platform's native text file format. Text-mode > mount options and other tools exist for a reason. So you consider this a non-bug? > What's worse, that file you attached doesn't have DOS line > ends, either: it has *doubled* CRs, i.e. the line breaks are > CR+CR+LF. Once I normalized those to a single CR, both CVS > cscope and version 15.5 work correctly (on Cygwin, binmode > mounts). Oops, that was my fault. Though it still does not work with correct DOS files (on Linux). I couldn't try on Cygwin as I don't run Windows. ---------------------------------------------------------------------- Comment By: Hans-Bernhard Broeker (broeker) Date: 2006-09-22 21:04 Message: Logged In: YES user_id=27517 Ultimately, this is a user error. Source files have to be in the platform's native text file format. Text-mode mount options and other tools exist for a reason. What's worse, that file you attached doesn't have DOS line ends, either: it has *doubled* CRs, i.e. the line breaks are CR+CR+LF. Once I normalized those to a single CR, both CVS cscope and version 15.5 work correctly (on Cygwin, binmode mounts). I'm somewhat baffled why that would make a difference, though --- all the flex rules either allow for arbitrary amounts of whitespace (including \r), or none at all. ---------------------------------------------------------------------- Comment By: Tobias Klauser (tklauser) Date: 2006-09-22 14:33 Message: Logged In: YES user_id=552905 Forgot to mention that the above bugs show up in the curses interface. In the line-oriented interface neither of the above methods show any results (cscope: 0 lines) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104664&aid=1563459&group_id=4664 |