|
|
Comments and Discussions
|
|
 |

|
Anybody interested in fixing the bugs?
Like to use it to fix Windows inability to copy files with long names.
But it will build them!!
Cannot make it stay on line, crashes every time.
Vaclav
|
|
|
|

|
case CDSSetting::SETTING_UNDEFINE:
{
for( int i = 0; i<p_roDefines.size(); ++i )
{
if( !p_roDefines[i].compare( a_pszText ) )
{
p_roDefines.erase( &p_roDefines[i] );
break;
}
}
break;
}
You are erasing from the vector you are iterating through - in the case of erase, i would be still be incremented, and you would miss one element behind the deleted one. Is this intended?
(Also, it doesn't compile on VC8, but this can be fixed )
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|

|
Ah yes, I guess I hadn't thought about the case where a setting appeared more than once in the list. Thanks for the information. And please ignore my [mis]use of STL in this program
peterchen wrote: (Also, it doesn't compile on VC8, but this can be fixed )
Unfortunately for me I only have VC6 and VC7. I'm unsure when I will be upgrading to VC8, but I am not surprised it doesn't compile .
Thanks,
Chris Richardson
|
|
|
|

|
With a few fixes it does
(1) two instances where the return value of _tcschr is assigned to TCHAR pointer (must be TCHAR const *)
(2) two for's that break due to the now standard-compliant scope rules
(3) above line (the vector iterators are no longer pointers) but this fixes both problems:
if( !p_roDefines[i].compare( a_pszText ) )
{
p_roDefines.erase( p_roDefines.begin() + i );
break;
}
[edit]just noticed: the loop counter is no problem, since you break immediately after deleting [/edit]
I'm currently poking around in the code base to see if I can improve/add a few things.
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|

|
I appreciate the help, thanks again. I hadn't noticed the break statement either.
If you are interested in the code base, I could talk to Chris M. about making you a co-author so you could upload your changes. Otherwise if you'd like to send them to me I will make sure to attribute the fixes to you, in the article and code.
Like I said before though, the code is pretty rough, and it has been a few years since I've had time to work on it.
Do you mind if I ask what you are thinking about adding? Only out of curiousity; you are of course welcome to do whatever you'd like with the code.
Thanks,
Chris Richardson
|
|
|
|

|
Chris Richardson wrote: If you are interested in the code base, I could talk to Chris M. about making you a co-author so you could upload your changes
I was going to suggest that if I get anything useful done I think that's better than a separate article.
I am thinking of the following:
Finding include paths (how come a.cpp depends from b.h?)
Reverting the tree, i.e. starting at a file and seeing into which files it goes)
Some better control over the include directories, like not scanning PDSK headers (and it looks like VC8 include directories need to be supported, too)
better command line support (so it can be added to Extras/Tools conveniently)
VC6 also has a problem accessing the headers during a build while you are scanning - it looks like you are doing everything right (_tfopen opens with "share deny none" at least wit hthe VC8 runtime, so this might be a VC6 problem)
Other things I am now thinking of: some metrics (how "hot" is a file, lines of code), using a checkbox to enable/disable (comment/uncomment) #include statements, so one can go looking for unused ones, stripping a base folder from paths (if they are local to it) ....
But these are just ideas, I am currently just checking if I can get along with the code base and I don't know how much time and energy I can put into it.
Anyway, it's a great tool!
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|

|
The company I work for has a Visual Studio Addin that shows include graphs inside Visual Studio itself. They update automatically as you type and are very configurable. See my sig for more details. It's commercial but cheap, and with a 14-day free trial
|
|
|
|

|
..and your message board currently isn't working
submitting an e-mail gives the following error message:
Failed sending email :: PHP ::
DEBUG MODE
Line : 234
File : emailer.php
-- modified at 19:45 Saturday 11th November, 2006
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|

|
I recently made a fix and added an enhancement to IncludeFinder that I wanted to share.
The fix has to do with the search order of include directories -- "standard" include directories should be searched last, not first, the latest version has this backwards. This only matters if you're including a file with the same name as one of the "standard" include files, in which case the wrong file gets picked up. (In my case, it was IMessage.h).
The enhancement supports the use of environment variables to specify include directories in project files. Visual Studio supports this, but IncludeFinder does not without the attached patch.
Diff output for two affected files is listed following:
FILE COMPARISON
Produced: 7/28/2006 9:52:10 AM
Left base folder: K:\IncludeFinder
Right base folder: K:\IncludeFinderOrig
File: VC6Objects.cpp
116c116
< if( p_pszOpt )
---
> if( *p_pszOpt )
118,133c117,118
< // check for and expand env vars in include settings
< if ( (p_eType == CDSSetting::SETTING_INCLUDE) && ((_tcsncmp(p_pszOpt, "($", 2) == 0) || (_tcsncmp(p_pszOpt, "$(", 2) == 0) ) ) {
< TCHAR p_pszOptEnv[MAX_PATH +1] = "";
< TCHAR p_pszOptEx[MAX_PATH +1] = "";
< _tcsncpy(p_pszOptEnv, p_pszOpt+2, strlen(p_pszOpt) -2);
< TCHAR* p_pszOptEnd = _tcschr(p_pszOptEnv, _T(')'));
< if (p_pszOptEnd) {
< *p_pszOptEnd = _T('\0');
< TCHAR* p_pszOptEnvEx = getenv(p_pszOptEnv);
< _tcscat(p_pszOptEx, p_pszOptEnvEx);
< _tcscat(p_pszOptEx, (p_pszOpt + (p_pszOptEnd - p_pszOptEnv) +3));
< p_roSettings.push_back( CDSSetting( p_eType, p_pszOptEx ) );
< }
< }
< else
< p_roSettings.push_back( CDSSetting( p_eType, p_pszOpt ) );
---
> p_roSettings.push_back( CDSSetting( p_eType, p_pszOpt ) );
320,321c305,306
< a_roIncludes.insert( a_roIncludes.begin(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
< a_roIncludes.insert( a_roIncludes.end(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
---
> a_roIncludes.insert( a_roIncludes.begin(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
> a_roIncludes.insert( a_roIncludes.end(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
FILE COMPARISON
Produced: 7/28/2006 9:53:30 AM
Left base folder: K:\IncludeFinder
Right base folder: K:\IncludeFinderOrig
File: VC7Objects.cpp
192,193c192,193
< a_roIncludes.insert( a_roIncludes.begin(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
< a_roIncludes.insert( a_roIncludes.end(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
---
> a_roIncludes.insert( a_roIncludes.begin(), a_oStdIncludes.begin(), a_oStdIncludes.end() );
> a_roIncludes.insert( a_roIncludes.end(), a_oNewIncludes.begin(), a_oNewIncludes.end() );
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A tool to view the include file hierarchy of your source code.
| Type | Article |
| Licence | |
| First Posted | 6 Jan 2003 |
| Views | 226,133 |
| Bookmarked | 149 times |
|
|