X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fi18n.c;h=80a0ed35dd57a388f622146482e56fddca9b7211;hb=cdaf2362480a6462d53522603bf8ce12fd74fd3a;hp=d443619ac5bc9e6deb39860099dc788d53ab5e6d;hpb=729b96a6bd9342c45e6f65a113fd87c70da85b0a;p=pspp-builds.git diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index d443619a..80a0ed35 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -73,13 +73,13 @@ create_iconv (const char* tocode, const char* fromcode) hmapx_insert (&map, converter, hash); /* I don't think it's safe to translate this string or to use messaging - as the convertors have not yet been set up */ + as the converters have not yet been set up */ if ( (iconv_t) -1 == converter->conv && 0 != strcmp (tocode, fromcode)) { const int err = errno; fprintf (stderr, "Warning: " - "cannot create a convertor for \"%s\" to \"%s\": %s\n", + "cannot create a converter for \"%s\" to \"%s\": %s\n", fromcode, tocode, strerror (err)); } @@ -94,7 +94,8 @@ recode_string (const char *to, const char *from, } -/* Return a string based on TEXT converted according to HOW. +/* Return a string based on TEXT which must be encoded using FROM. + The returned string will be encoded in TO. If length is not -1, then it must be the number of bytes in TEXT. The returned string must be freed when no longer required. */ @@ -119,7 +120,6 @@ recode_string_pool (const char *to, const char *from, if ( length == -1 ) length = strlen(text); - if (to == NULL) to = default_encoding;