Ineiev <[email protected]> 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 <[email protected]>, 2006, > and Bruno Haible <[email protected]>, 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
