CVS Ids in source files

Roland Illig roland.illig at gmx.de
Tue May 10 21:02:36 UTC 2005


I would like to include a declaration like the following into every .c file.

static const char mc_cvsid[] = "$Id";

Then in case of bug reports we can ask the reporter to run the ident(1) 
command on the mc binary, and even for CVS versions, we get the version 
of every file that's used.

I would provide a macro MC_CVSID("$Id"), which would either do that or 
which expands to nothing, if someone needs to have smaller binaries.

#ifdef MC_WANT_CVS_IDS
#  define MC_CVSID(Id) static const char mc_cvsid[] = Id
#else
#  define MC_CVSID(Id) typedef int mc_cvsid_dummy_type
#endif

Roland



More information about the mc-devel mailing list