]> gitweb.michael.orlitzky.com - iconv-quirks.git/commitdiff
main.c: all functions except main() are static
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 6 Jul 2026 16:56:32 +0000 (12:56 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 6 Jul 2026 16:56:32 +0000 (12:56 -0400)
main.c

diff --git a/main.c b/main.c
index 9ff48eeece3de3c83f431604dc468fbd907a1978..21f1628131f60ed0640b7998cca5bd727101fa3b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -50,7 +50,7 @@
 /* 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
@@ -69,7 +69,7 @@ int _my_iconv_open(iconv_t* cd, const char *tocode, const char *fromcode) {
 /* 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. */
@@ -83,7 +83,7 @@ int _my_iconv_close(iconv_t* cd) {
 /*
  * 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);
@@ -115,7 +115,7 @@ int test_iconv_open_supports_suffix(const char* suffix) {
  * 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";
 
@@ -137,7 +137,7 @@ int test_iconv_open_does_not_support_invalid_suffix() {
 }
 
 
-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";
 
@@ -158,7 +158,7 @@ int test_iconv_open_does_not_support_invalid_to_codeset() {
   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";
 
@@ -188,7 +188,7 @@ int test_iconv_open_does_not_support_invalid_from_codeset() {
  *    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";
 
@@ -237,7 +237,7 @@ int test_iconv_invalid_char_is_eilseq() {
  *   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";
 
@@ -280,7 +280,7 @@ int test_iconv_incomplete_multibyte_is_einval() {
   return FAILURE;
 }
 
-int test_iconv_too_big_is_e2big() {
+static int test_iconv_too_big_is_e2big() {
   iconv_t cd;
   const char* tocode = "ASCII";
 
@@ -336,7 +336,7 @@ int test_iconv_too_big_is_e2big() {
  * 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";
@@ -390,7 +390,7 @@ int test_iconv_ignore_ignores_invalid() {
  *
  * 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";