Hi,
In general you cannot detect which version of the standard some C has
been written against since C89 code should still compile with a C99
compiler. There are new keywords, but some developers use macros to
emulate C99 like features in C89 code. Your best bet is a mode line,
possible a good ol' human one as a comment at the top of the file - /*
This file developed against C99/C89 [delete as applicable] */ - so that
the code is self documenting, and it can be picked up by VIM on loading
to set whatever settings you want.
<shameless_self_promotion>
While not helping with detecting whether C source is C89 or C99, my
alternate C syntax file helps with developing portable C for a
particular C standard.
http://www.vim.org/scripts/script.php?script_id=234
</shameless_self_promotion>
TTFN
Mike
--
Pulse not found: (A)bandon hope, (R)eincarnate, or (I)gnore?