CTAGS and the function list

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
AlanF
Posts: 8
Joined: Mon Dec 18, 2006 4:23 am

CTAGS and the function list

Post by AlanF »

We have just upgraded 3.8 to 3.95. Most things are working, however we cannot seem to trick the function list into populating. We are using Zeus with Microstation mdl which is a slightly extended version of C. The embedded CTAGS (exuberant ?) is finding and populating all but the function list. We have extended the c/c++ doc type with the appropriate .mc extension that MDL uses and it is happily colour coded as C, the included structures etc. are found. Just the functions are missing. As an experiment we copied and renamed one of the files to just .c and automagically the function list was populated. So it looks like the tag generator is not seeing the file as a "C" file as far as functions are concerned.

Does anyone have experiences (or hopefully solutions) like this ?

TIA

Alan
jussij
Site Admin
Posts: 2461
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Alan,
So it looks like the tag generator is not seeing the file as a "C" file as far as functions are concerned.
It sounds like the xtags.exe (ie ctags.exe) needs to be changed to treat the mdl file as a c file.

If you download the source code for ctags from here: http://ctags.sourceforge.net

in the c.c file you will find this function:

Code: Select all

extern parserDefinition* CParser (void)
It needs to be changed to include the mdl file extension. You then need to rebuild ctags.exe and copy this file back to the Zeus directory as xtags.exe.

If you don't have access to a c/c++ compiler let me know and I will make this change for you and upload a new xtags.exe to the Zeus web site.

Cheers Jussi
AlanF
Posts: 8
Joined: Mon Dec 18, 2006 4:23 am

Post by AlanF »

Hi Jussij,

Thanks for the response. Sound like a little job for me in the New Year.

In the meantime, I've managed to use the public ctags, with the -force-language=C switch to recognize the .mc files as C files, and I've generated a tags file that contains the function references that I am expecting.

Is there anyway of getting Zeus to recogize and use this tag file ? I've tried doing a "type tags > workspace.zbd" and then re-opening the workspace. When I attempt a code completion I receive a dialog telling me that the tags file is in a wrong format.....and that I should re-generate it using xbuilder, which is what I am trying to circumvent.

Any possible workarounds ?

Thanks,

Alan.
jussij
Site Admin
Posts: 2461
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Alan,
Any possible workarounds ?

Unfortunately not. The xtags.exe command line is hard coded into the xtags.dll :)

But I will make a change so that in future the command line is read from an INI file ;)

Cheers Jussi
jussij
Site Admin
Posts: 2461
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Allan,
Any possible workarounds ?
Here is a new xTags.dll that allows the ctags.exe command line to be configured ;)

http://www.zeusedit.com/z300/xTags.zip

To install this new version backup the current xTags.dll and replace it with the one in the zip file.

To configure the command line start then close Zeus and in the Zeus install directory you will find an xTags.ini file where you can define the new command line.

Cheers Jussi
AlanF
Posts: 8
Joined: Mon Dec 18, 2006 4:23 am

Post by AlanF »

Thanks Jussi, I've installed it and created a new workspace and it is giving some trouble :oops: . I've emailed you the error and log files that Zeus is creating. I've included the ini that I'm using and the zbd being produced.

I've tried it with both the provided xtags.exe and ctags.exe 5.6 from sourceforge. Should I be using one or the other ?

Regards,

Alan.
jussij
Site Admin
Posts: 2461
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Alan,

Unfortunately it looks like the xTags.dll that was posted is not compatible with your version of Zeus executable :(

The reason for this is the current Zeus source code tree contains a lot of code to generally speed up the Zeus.exe and I suspect some of these code changes make the xTags.dll will on compatible with Zeus.exe built from the current code tree :(

You will need to revert back to the older xTags.dll backup copy for now, until I have time to restore the old code base and create a backwardly compatible xTags.dll.

If you don?t have a backup you can get the previous xTags.dll from the zeus 395z patch found here:

http://www.zeusedit.com/forum/viewtopic.php?t=1000

Sorry for the stuff up on my part :oops:

Cheers Jussi
AlanF
Posts: 8
Joined: Mon Dec 18, 2006 4:23 am

Post by AlanF »

Hi Jussi,

Thanks for the quick response. Yes, I'd already rolled back and got back to my :wink: real work.

Regards,

Alan.
jussij
Site Admin
Posts: 2461
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

The latest Zeus 3.96a patch implements this feature correctly :)

Refer to this link for more details: http://www.zeusedit.com/forum/viewtopic.php?t=1035

Cheers Jussi
Post Reply