X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fi18n.c;h=cb155723b3e8bc9867c848bc12a9ab8c85fb42c3;hb=28bebf0851bac332b55cdc03e55165dcc8e713c2;hp=59665bee63b6a44ba6910eea288d3ca8b1ae7b12;hpb=f9d0b49f59af300be5600141a0096b26c96abce9;p=pspp-builds.git diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index 59665bee..cb155723 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -85,6 +85,20 @@ create_iconv (const char* tocode, const char* fromcode) return converter->conv; } +/* Converts the single byte C from encoding FROM to TO, returning the first + byte of the result. + + This function probably shouldn't be used at all, but some code still does + use it. */ +char +recode_byte (const char *to, const char *from, char c) +{ + char x; + char *s = recode_string (to, from, &c, 1); + x = s[0]; + free (s); + return x; +} /* Similar to recode_string_pool, but allocates the returned value on the heap instead of in a pool. It is the caller's responsibility to free the