Unlike interpreted languages such as Perl and Python, the keyword line must NOT be commented out in .c or .h files. The keyword string is defined as a static char so that it remains unchanged in the compiled executable. This program will display a complete keyword line where the number after CVSid is always unique. You can then cut and paste the line into your .c or .h file. The diplayed line will look like: static char *CVSid432422157="@(#) $Header$ ";
1 2 3 4 5 6 | #!/usr/bin/env /usr/local/bin/python
import time
TIME=str(time.time())
LEFT=TIME[3:9]
RIGHT=TIME[10:13]
print ("\nstatic char *CVSid%s%s=\"@(#) $Header$ \";\n" % (LEFT,RIGHT))
|