Adriaan van Os wrote:
Objective-C++ is in the process of being merged into gcc, although currently it is still a development branch for fsf-gcc (see http://gcc.gnu.org/cvs.html#devbranches, objc-improvements-branch). For the suffixes involved, see
http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.0/gcc/Overall-Options.html.
Well, I'm now putting in the following. And this doesn't yet include Ada and Fortran. Really looks like I should switch to regular expressions in the future ...
A standard trick I've used is to just use a string like:
'|.c|.cc|.cpp|.CPP|...|.s|'
and then use Pos( '|'+extension+'|', s ) > 0
A lot lighter weight than PCRE! ;-)
Enjoy, Peter.
LanguageSuffixes: array [TFileKind, 1 .. 17] of String (4) = (('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''), ('.pas', '.p', '.pp', '.dpr', '', '', '', '', '', '', '', '', '', '', '', '', ''), ('.pas', '.p', '.pp', '.dpr', '', '', '', '', '', '', '', '', '', '', '', '', ''), ('.pas', '.p', '.pp', '.dpr', '', '', '', '', '', '', '', '', '', '', '', '', ''), ('.c', '.cc', '.cpp', '.CPP', '.cp', '.C', '.c++', '.cxx', '.i', '.ii', '.m', '.mi', '.mm', '.M', '.mii', '.S', '.s'), ('.o', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''));
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8