#223 no $ symbol in tagaddress field

closed-invalid
None
5
2008-04-26
2008-04-17
evgenM
No

ctags 5.7

1. create new file (file.h) with text:

>>
typedef struct myStruct{
int i;
}test;
<<

2. run
ctags file.h

3. in tag file i have line
test file.h /^}test;/;" t ...

so /^}test;/;" is wrong, no '$' symbol

Discussion

  • Elliott Hughes

    Elliott Hughes - 2008-04-19

    Logged In: YES
    user_id=1127237
    Originator: NO

    works for me using ctags from svn, and with ctags 5.7. are you sure you don't have extra characters after that ;?

    lithium:~/Projects/ctags/trunk$ cat -E Test/bug1944834.c
    typedef struct myStruct {$
    int i;$
    } test;$
    lithium:~/Projects/ctags/trunk$ ./dctags -o - Test/bug1944834.c
    i Test/bug1944834.c /^ int i;$/;" m struct:myStruct file:
    myStruct Test/bug1944834.c /^typedef struct myStruct {$/;" s file:
    test Test/bug1944834.c /^} test;$/;" t typeref:struct:myStruct file:
    lithium:~/Projects/ctags/trunk$

    it even works if i add ^Ms to the end of each line, in case you're using DOS.

     
  • Elliott Hughes

    Elliott Hughes - 2008-04-19
    • assigned_to: nobody --> elliotth
    • status: open --> open-works-for-me
     
  • evgenM

    evgenM - 2008-04-20

    Logged In: YES
    user_id=1573472
    Originator: YES

    hmm i found the problem. No end-of-line "\n" at the end of this code.
    But i still think it bug.

     
  • Elliott Hughes

    Elliott Hughes - 2008-04-20

    Logged In: YES
    user_id=1127237
    Originator: NO

    GCC will complain if your source file doesn't end in a newline. and i don't understand how the lack of a $ would cause a problem. if you're really concerned about getting the right line, you probably want -n, and if you're more concerned about being robust in the face of changes to the source, you're better off without the $ (because the tag will still be correct when you fix the missing newline). the format description doesn't mandate anything; it just says "any ex command".

    do you have a convincing example where the current behavior causes a problem that would be fixed by treating EOF specially?

     
  • evgenM

    evgenM - 2008-04-20

    Logged In: YES
    user_id=1573472
    Originator: YES

    sure, this problem not so serious. But i use gcc 2.95 (can't change :( , and this old don't inform me about missing newline at end. So my class viewer based on ctags sometimes loose some info. I don't want make you correct this problem, just want to let know about.

     
  • Elliott Hughes

    Elliott Hughes - 2008-04-26

    Logged In: YES
    user_id=1127237
    Originator: NO

    i'm closing this as a bug in the class viewer rather than ctags.

     
  • Elliott Hughes

    Elliott Hughes - 2008-04-26
    • status: open-works-for-me --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks