bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] reversible recode-sr-latin?


From: Daiki Ueno
Subject: Re: [bug-gettext] reversible recode-sr-latin?
Date: Tue, 23 Apr 2013 16:08:37 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Ineiev <address@hidden> writes:

> Recently I considered an implementation of a reverse recode-sr-latin
> conversion.
[...]
> A draft implementation is attached for further reference; it adds
> three options: "-d" for the reverse conversion, "-r" to output
> in the "reversible" format, "-R" to treat the input as written
> in the "reversible" format.

Sounds useful, but I'm not familiar with those scripts, so only I can do
is giving some minor comments.

>     Written by Danilo $(D*^(Began <address@hidden>, 2006,
>     and Bruno Haible <address@hidden>, 2006.

Maybe good to contact the authors?

> +/* The reverse table is a hash where the index is the first byte
> +   of the Latin-encoded sequence. */

Put two spaces after a period.

> +void
> +serbian_to_latin (const char *in, size_t in_len, char **out, size_t *out_len,
> +                  int *in_verb, int *out_verb, int reverse)
> +{
> +  if (reverse)
> +    to_cyrillic (in, in_len, out, out_len, in_verb, out_verb);
> +  else
> +    to_latin (in, in_len, out, out_len, in_verb, out_verb);
>  }

Why not add a separate function like latin_to_serbian, instead of adding
REVERSE flag?  Also, bool type can be used for flags.

Regards,
-- 
Daiki Ueno




reply via email to

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