/* Open a conversion descriptor by reference. Wraps the boilerplate
* error reporting when iconv_open() fails.
*/
-int _my_iconv_open(iconv_t* cd, const char *tocode, const char *fromcode) {
+static int _my_iconv_open(iconv_t* cd, const char *tocode, const char *fromcode) {
*cd = iconv_open(tocode, fromcode);
if (*cd == (iconv_t)(-1)) {
/* The errno values are standard, but we have no way of knowing
/* Close a conversion descriptor by reference. Wraps the boilerplate
* error reporting when iconv_close() fails.
*/
-int _my_iconv_close(iconv_t* cd) {
+static int _my_iconv_close(iconv_t* cd) {
if (iconv_close(*cd) == -1) {
/* The underlying type of iconv_t is unspecified, so we can't
* easily print the argument here. */
/*
* Ensure that iconv_open() supports the given indicator suffix.
*/
-int test_iconv_open_supports_suffix(const char* suffix) {
+static int test_iconv_open_supports_suffix(const char* suffix) {
const char* fromcode = "ASCII";
char* tocode = malloc(strlen(fromcode) + strlen(suffix) + 1);
strcpy(tocode, fromcode);
* Check that iconv_open() fails with EINVAL when given a bogus
* indicator suffix.
*/
-int test_iconv_open_does_not_support_invalid_suffix() {
+static int test_iconv_open_does_not_support_invalid_suffix() {
const char* fromcode = "ASCII";
const char* tocode = "ASCII//INVALID";
}
-int test_iconv_open_does_not_support_invalid_to_codeset() {
+static int test_iconv_open_does_not_support_invalid_to_codeset() {
const char* fromcode = "ASCII";
const char* tocode = "ASDJFI$@#%t234tWER";
return FAILURE;
}
-int test_iconv_open_does_not_support_invalid_from_codeset() {
+static int test_iconv_open_does_not_support_invalid_from_codeset() {
const char* fromcode = "ASDJFI$@#%t234tWER";
const char* tocode = "ASCII";
* Input conversion stopped due to an input byte that does not belong
* to the input codeset.
*/
-int test_iconv_invalid_char_is_eilseq() {
+static int test_iconv_invalid_char_is_eilseq() {
iconv_t cd;
const char* tocode = "ASCII";
* Input conversion stopped due to an incomplete character or shift
* sequence at the end of the input buffer.
*/
-int test_iconv_incomplete_multibyte_is_einval() {
+static int test_iconv_incomplete_multibyte_is_einval() {
iconv_t cd;
const char* tocode = "UTF-8";
return FAILURE;
}
-int test_iconv_too_big_is_e2big() {
+static int test_iconv_too_big_is_e2big() {
iconv_t cd;
const char* tocode = "ASCII";
* This shall not be treated as an error.
* --------------------------------------
*/
-int test_iconv_ignore_ignores_invalid() {
+static int test_iconv_ignore_ignores_invalid() {
iconv_t cd;
const char* fromcode = "ASCII";
const char* tocode = "ASCII//IGNORE";
*
* It is merely implied, but this should not be an error.
*/
-int test_iconv_untranslatable() {
+static int test_iconv_untranslatable() {
iconv_t cd;
const char* fromcode = "UTF-8";
const char* tocode = "ASCII";