Welcome, guest | Sign In | My Account | Store | Cart

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$ ";

Python, 6 lines
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))
Created by Ken Goldstein on Mon, 12 Mar 2001 (PSF)
Python recipes (4591)
Ken Goldstein's recipes (1)

Required Modules

Other Information and Tasks