http://www.ohloh.net/projects/crossfire/contributors/1971389991050 seems to indicated I edited some C++ files in crossfire, however crossfire doesn't contain any C++ as far as I know, and I certainly didn't edit any C++ files. What files is it that ohloh think are C++ in crossfire?
I tried ohcount to see what ones it detected: some header files that are definitely C were misdetected as C++.
My only guess is that this in a struct caused the misdetect:
uint32 template:1; /**< If set, this is a template map. */
template is NOT a keyword in C, and the file is definitely not valid C++, it would cause a syntax error in C++.
However this would only explain one of the files (include/map.h in server) and not the other ones also misdetected as C++, like include/global.h in server.
Hope you can fix the bug.
Our C vs. C++ detector is pretty basic. We grep the entire source file for any text that looks like a C++ keyword, and when we find one we assume the file is C++. Unfortunately this means that if you choose variable names like "class" or "template", you're going to come up as C++ instead of C.
It's a simple trick, but it gets us right in about 95% of the source files.
Mitchell, our hardy Google summer of code worker, has been working on a much-improved C parser for the last few weeks. Rather than simply looking for comments vs. code, it does a full lexical parse of the source. Once that work is complete, it's reasonable that we could do a very precise differentiation between C and C++.
Ah very nice
Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.