mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
*** empty log message ***
This commit is contained in:
parent
b1d25146c3
commit
ee8f10684d
@ -2029,7 +2029,7 @@ element:
|
|||||||
| KW_SHORT | KW_SIGNED | KW_SIZEOF | KW_STATIC | KW_STATIC_CAST
|
| KW_SHORT | KW_SIGNED | KW_SIZEOF | KW_STATIC | KW_STATIC_CAST
|
||||||
| KW_STRUCT | KW_THROW | KW_TRUE | KW_TRY | KW_TYPEDEF | KW_TYPENAME
|
| KW_STRUCT | KW_THROW | KW_TRUE | KW_TRY | KW_TYPEDEF | KW_TYPENAME
|
||||||
| KW_UNION | KW_UNSIGNED | KW_VIRTUAL | KW_VOID | KW_VOLATILE
|
| KW_UNION | KW_UNSIGNED | KW_VIRTUAL | KW_VOID | KW_VOLATILE
|
||||||
| KW_WHILE
|
| KW_WHILE | TOKENPASTE
|
||||||
| KW_OPERATOR
|
| KW_OPERATOR
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,42 @@ CPPFile::
|
|||||||
~CPPFile() {
|
~CPPFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: CPPFile::is_c_or_i_file
|
||||||
|
// Access: Public
|
||||||
|
// Description: Returns true if the file appears to be a C or C++
|
||||||
|
// source code file based on its extension. That is,
|
||||||
|
// returns true if the filename ends in .c, .C, .cc,
|
||||||
|
// .cpp, or any of a series of likely extensions.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
bool CPPFile::
|
||||||
|
is_c_or_i_file() const {
|
||||||
|
return is_c_or_i_file(_filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: CPPFile::is_c_or_i_file
|
||||||
|
// Access: Public, Static
|
||||||
|
// Description: Returns true if the file appears to be a C or C++
|
||||||
|
// source code file based on its extension. That is,
|
||||||
|
// returns true if the filename ends in .c, .C, .cc,
|
||||||
|
// .cpp, or any of a series of likely extensions.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
bool CPPFile::
|
||||||
|
is_c_or_i_file(const Filename &filename) {
|
||||||
|
string extension = filename.get_extension();
|
||||||
|
// downcase the extension.
|
||||||
|
for (string::iterator ei = extension.begin();
|
||||||
|
ei != extension.end();
|
||||||
|
++ei) {
|
||||||
|
(*ei) = tolower(*ei);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (extension == "c" || extension == "cc" ||
|
||||||
|
extension == "cpp" || extension == "c++" || extension == "cxx" ||
|
||||||
|
extension == "i");
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: CPPFile::is_c_file
|
// Function: CPPFile::is_c_file
|
||||||
// Access: Public
|
// Access: Public
|
||||||
@ -90,8 +126,7 @@ is_c_file(const Filename &filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (extension == "c" || extension == "cc" ||
|
return (extension == "c" || extension == "cc" ||
|
||||||
extension == "cpp" || extension == "c++" || extension == "cxx" ||
|
extension == "cpp" || extension == "c++" || extension == "cxx");
|
||||||
extension == "i");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -32,6 +32,9 @@ public:
|
|||||||
void operator = (const CPPFile ©);
|
void operator = (const CPPFile ©);
|
||||||
~CPPFile();
|
~CPPFile();
|
||||||
|
|
||||||
|
bool is_c_or_i_file() const;
|
||||||
|
static bool is_c_or_i_file(const Filename &filename);
|
||||||
|
|
||||||
bool is_c_file() const;
|
bool is_c_file() const;
|
||||||
static bool is_c_file(const Filename &filename);
|
static bool is_c_file(const Filename &filename);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ add_source_file(const string &filename) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CPPFile::is_c_file(filename)) {
|
if (!CPPFile::is_c_or_i_file(filename)) {
|
||||||
_include_files.insert('"' + filename + '"');
|
_include_files.insert('"' + filename + '"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ build() {
|
|||||||
++ii) {
|
++ii) {
|
||||||
const string &filename = (*ii);
|
const string &filename = (*ii);
|
||||||
// Don't add any C files to the include list.
|
// Don't add any C files to the include list.
|
||||||
if (!CPPFile::is_c_file(filename)) {
|
if (!CPPFile::is_c_or_i_file(filename)) {
|
||||||
_include_files.insert('"' + filename + '"');
|
_include_files.insert('"' + filename + '"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ build() {
|
|||||||
++ii) {
|
++ii) {
|
||||||
const string &filename = (*ii);
|
const string &filename = (*ii);
|
||||||
// Don't add any C files to the include list.
|
// Don't add any C files to the include list.
|
||||||
if (!CPPFile::is_c_file(filename)) {
|
if (!CPPFile::is_c_or_i_file(filename)) {
|
||||||
_include_files.insert('<' + filename + '>');
|
_include_files.insert('<' + filename + '>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user