stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: [PATCH] rw_create_catalog()
Date Tue, 07 Aug 2007 15:00:38 GMT
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Monday, August 06, 2007 5:37 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: [PATCH] rw_create_catalog()
> 
> Since we're moving the function into the driver I think it 
> might be useful to generalize it so as not to assume a fixed 
> number of sets or even messages in each set.
> 
> Here's an idea. How about changing the signature to:
> 
>      _TEST_EXPORT int
>      rw_gencat (const char *catname, const char* catalog);
> 
> with catalog being a newline separated list of strings, each 
> of which representing a single message, and with a blank line 
> separating one set from another.
> 
>      static const char* const
>      messages = {
>          "First set, first message\n"
>          "First set, second message\n"
>          // ...
>          "First set, fifth message\n"
>          "\n"
>          "Second set, first message\n"
>          // ...
>          "Second set, fifth message\n"
>          "\n"
>          //...
> };
> 
> I realize the messages test would need to change but the 
> changes shouldn't be too difficult.
> 
> What do you think about it, Farid?

  Yes, it's reasonable thing. But prevents to have '\n' characters in
message text.
Maybe will be better to use \0 instead of \n?

Farid.

Mime
View raw message