[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: A new revsion keyword request

From: Marcus Rohrmoser <mrohrmoser_at_gmx-gmbh.de>
Date: 2005-11-30 17:00:09 CET

André Pönitz schrieb:
> Marcus Rohrmoserw wrote:
>
>>Hanjy schrieb:
>>
>>>I want a new keyword such as Revsion2, etc.
>>>it will be replaced to a new formated line that include the
>>>revsion value.
>>>Usage:
>>> $Revsion2:Format_string$
>>>
>>>in format_string, the % will be replace to revsion value.
>>>
>>>example, in my resource file: xx.rc
>>>
>>> //$Revsion2:#define VERSION 2.0.0.%$
>>>
>>>
>>>it will be replaced to:
>>>
>>> //$Revsion2:#define VERSION 2.0.0.%$
>>> #define VERSION 2.0.0.63
>>>
>>>Thanks for considering this.
>>
>>Why don't you do a string manipulation in the DEFINE, eg
>>
>>#define VERSION extractRevision("$Revision$")
>
>
> How so?
>
> The preprocessor is rather limited when it comes to string
> manipulation. So what would 'extractRevision' look like to
> get the equivalent of #define VERSION 2.0.0.63?

The preprocessor doesn't need to parse the String, that's what a normal function
"extractRevision(char*)" can do, not?

I'm not too familiar with c string manipulation, using java I get this done via regular expressions.

By the way - why does it have to be a #define anyway?

Greetings,
        M

Received on Wed Nov 30 17:45:01 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.