Loading ...
Sorry, an error occurred while loading the content.

46044vim/cscope interface bug

Expand Messages
  • Zhao, Yu (William)
    Feb 1 9:22 PM
    • 0 Attachment
      Folks,

      Vim 6.4/7.0 can't show result of "cscope find f name" correctly.

      E.g.

      1 1 Makefile <<<unknown>>>

      2 1 arch/Makefile <<<unknown>>>
      h
      3 1 arch/README <<<unknown>>>
      "
      4 1 arch/evbsh5/Makefile <<<unknown>>>
      Ã~mts5
      5 1 arch/evbsh5/compile/Makefile <<<unknown>>>
      °
      6 1 arch/evbsh5/conf/CAYMAN <<<unknown>>>

      7 1 arch/evbsh5/conf/CAYMAN64 <<<unknown>>>

      8 1 arch/evbsh5/conf/SIMULATOR <<<unknown>>>
      ^]Ðh
      9 1 arch/evbsh5/conf/files.evbsh5 <<<unknown>>>

      10 1 arch/evbsh5/conf/majors.evbsh5 <<<unknown>>>
      ^]ÐÃ~
      11 1 arch/evbsh5/conf/std.evbsh5.eb <<<unknown>>>

      Fix:
      --- vim70-old/src/if_cscope.c 2006-11-09 15:17:47.000000000 -0600
      +++ vim70/src/if_cscope.c 2006-11-09 15:21:16.000000000 -0600
      @@ -1923,14 +1923,8 @@
      if ((fname = strtok(NULL, (const char *)"\t")) == NULL)
      continue;
      if ((lno = strtok(NULL, (const char *)"\t")) == NULL)
      - {
      - /* if NULL, then no "extra", although in cscope's case, there
      - * should always be "extra".
      - */
      - extra = NULL;
      - }
      -
      - extra = lno + strlen(lno) + 1;
      + continue;
      + extra = strtok(NULL, (const char *)"");

      lno[strlen(lno)-2] = '\0'; /* ignore ;" at the end */