stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: [PATCH] rw_create_catalog()
Date Mon, 06 Aug 2007 14:37:11 GMT
Farid Zaripov wrote:
>  Attached is a patch, moving generate_catalog() function from 
> 22.locale.messages.cpp into rwtest library.

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"
         "Second set, first message\n"
         // ...
         "Second set, fifth message\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?


>  ChangeLog:
>  * rw_locale.h (rw_create_catalog): New function to create message catalog.
>  * locale.cpp: Ditto.
>  * 22.locale.messages.cpp: Removed generate_catalog(), used 
> rw_create_catalog().
> Farid.

View raw message