On Mon, Jun 09, 2008 at 10:37:56AM +0400, Alexandra N. Kossovsky wrote:
> Yes, it looks not so easy:
> bash$ ctags -o a trac/htdocs/js/blame.js
> bash$ ctags -o a trac/htdocs/js/folding.js
> bash$ ctags -o a trac/htdocs/js/folding.js trac/htdocs/js/blame.js
> bash$ ctags -o a trac/htdocs/js/blame.js trac/htdocs/js/folding.js
> ctags: Unexpected end of file: trac/htdocs/js/folding.js
> bash$ 
> 
> So, it depends on order of files. I'm attaching the folding.js now.
> If I add another file to the command line
> (ctags blame.js folding.js otherfile), tags from the last file are not
> generated.

Thanks, reproduced now. Backtrace follows for the record. I think what's
happening is that somewhere it's cached file positions from the previous
file, which fails because the second file is smaller than the first.

Current upstream SVN doesn't suffer from this problem, so I'll see if I
can locate and backport a fix.

#0  readSourceLine (vLine=0x80976a8, location={__pos = 3423, __state = {__count 
= 0, __value = {__wch = 0, __wchb = "\000\000\000"}}}, pSeekValue=0x0) at 
read.c:548
        orignalPosition = {__pos = 677, __state = {__count = -1209130015, 
__value = {__wch = 0, __wchb = "\000\000\000"}}}
        result = 0x0
#1  0x0805385e in writePatternEntry (tag=0xbfe0301c) at entry.c:770
        line = 0xbfe02fbc "\200\177\t\b"
        searchChar = 134660752
        newlineTerminated = 134839112
        length = -1209277662
#2  0x080539d5 in writeCtagsEntry (tag=0xbfe0301c) at entry.c:799
        length = 43
#3  0x08053a91 in makeTagEntry (tag=0xbfe0301c) at entry.c:827
        length = 0
#4  0x08057bda in makeConstTag (token=0x80982a0, kind=JSTAG_FUNCTION) at 
jscript.c:237
        name = 0x8098070 "fn.enableFolding"
        e = {lineNumberEntry = FALSE, lineNumber = 102, filePosition = {__pos = 
3423, __state = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}}, 
language = 0x8074608 "JavaScript",
  isFileScope = FALSE, isFileEntry = FALSE, truncateLine = FALSE, 
sourceFileName = 0x8097f80 "trac/htdocs/js/folding.js", name = 0x8098070 
"fn.enableFolding", kindName = 0x806d440 "function", kind = 102 'f',
  extensionFields = {access = 0x0, fileScope = 0x0, implementation = 0x0, 
inheritance = 0x0, scope = {0x0, 0x0}, signature = 0x0, typeRef = {0x0, 0x0}}}
#5  0x08057cc2 in makeJsTag (token=0x80982a0, kind=JSTAG_FUNCTION) at 
jscript.c:261
        fulltag = (vString *) 0x80980c8
#6  0x08057d8a in makeFunctionTag (token=0x80982a0) at jscript.c:284
No locals.
#7  0x08058e44 in parseStatement (token=0x8097fa0, is_inside_class=FALSE) at 
jscript.c:1224
        name = (tokenInfo * const) 0x80982a0
        secondary_name = (tokenInfo * const) 0x8098138
        saveScope = (vString *) 0x8098100
        is_class = FALSE
        is_terminated = TRUE
        is_global = FALSE
        is_prototype = FALSE
#8  0x08059114 in parseLine (token=0x8097fa0, is_inside_class=FALSE) at 
jscript.c:1393
        is_terminated = TRUE
#9  0x08059178 in parseJsFile (token=0x8097fa0) at jscript.c:1414
No locals.
#10 0x080591cd in findJsTags () at jscript.c:1436
        token = (tokenInfo * const) 0x8097fa0
        exception = ExceptionNone
#11 0x0805fabc in createTagsForFile (fileName=0xbfe04f4c 
"trac/htdocs/js/folding.js", language=14, passCount=1) at parse.c:617
        lang = (const parserDefinition * const) 0x80745d0
        retried = FALSE
#12 0x0805fb6c in createTagsWithFallback (fileName=0xbfe04f4c 
"trac/htdocs/js/folding.js", language=14) at parse.c:639
        numTags = 7
        tagFilePosition = {__pos = 377, __state = {__count = 134839016, __value 
= {__wch = 3219141032, __wchb = "▒1▒"}}}
        passCount = 1
        tagFileResized = FALSE
#13 0x0805fc0e in parseFile (fileName=0xbfe04f4c "trac/htdocs/js/folding.js") 
at parse.c:666
        tagFileResized = FALSE
        language = 14
#14 0x0805b2cb in createTagsForEntry (entryName=0xbfe04f4c 
"trac/htdocs/js/folding.js") at main.c:303
        resize = FALSE
        status = (fileStatus *) 0x8073a20
#15 0x0805b306 in createTagsForArgs (args=0x8074110) at main.c:348
        arg = 0xbfe04f4c "trac/htdocs/js/folding.js"
        resize = FALSE
#16 0x0805b7f8 in makeTags (args=0x8074110) at main.c:494
        timeStamps = {0, -1075826072, 134603270}
        resize = FALSE
        files = TRUE
#17 0x0805b992 in main (argc=3, argv=0xbfe03338) at main.c:562
        args = (cookedArgs *) 0x8074110

-- 
Colin Watson                                       [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to