info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change keyword expansion format


From: Mark D. Baushke
Subject: Re: How to change keyword expansion format
Date: Thu, 24 Jun 2004 09:35:22 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Todd Denniston <address@hidden> writes:

> "Mark D. Baushke" wrote:
> > Ivan Ivanov <address@hidden> writes:
> > 
> > > I am using quite successfully CVS Keywords and the
> > > keyword expansion format and I have some minor
> > > questions on these useul feature:
> <SNIP>
> > > Touch is not the exact word, because we do not
> > > want to change the last commit date, we simply
> > > wants when we create distibution $Date$ be
> > > expanded to the current date. Any ideas?
> > 
> > It would appear that you want a program of some
> > sort (possibly a perl script) to be run on your
> > sources sometime after you do a checkout.
> > 
> >         -- Mark
> If it is C or C++ code (and using the gnu
> compiler, not sure they are standard C) the
> following line might do what he wants.
>
> fprintf(stderr, "\n \t compiled %s %s\n", __DATE__ , __TIME__ );

__DATE__ and __TIME__ are included in both ANSI
C89 and C99 as predefined macro names.

__DATE__ The date of translation of the source
         file (a character string literal of the
         form "Mmm dd yyyy", where the names of
         the months are the same as those generate
         by the asctime function, and the first
         character of dd is a space character if
         the value is less than 10). If the date of
         translation is not available, an
         implementation-defined valid date shall
         be supplied.

__TIME__ The time of translation of the source
         file (a character string literal of the
         form "hh:mm:ss" as in the time generated
         by the asctime function). If the time of
         translation is not available, an
         implementation-defined valid time shall
         be supplied.

However, it is not clear that this format or value is what
the original requestor desired.

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFA2wLK3x41pRYZE/gRAgNlAKCzjpZxcOsnml8y/phYfjxGHl5gyQCePShm
OE8MyAUSKjR/QlLqmTfXvUQ=
=MT91
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]