]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Adhere to GNU Coding Style.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Jun 2025 21:38:03 +0000 (23:38 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Jun 2025 21:38:03 +0000 (23:38 +0200)
* gettext-runtime/src/envsubst.c (main): Use common 'switch' indentation.
* gettext-tools/src/hostname.c (main): Likewise.
* gettext-tools/src/recode-sr-latin.c (main): Likewise.
* gettext-tools/src/urlget.c (main): Likewise.
* gettext-tools/tests/tstgettext.c (main): Likewise.
* gettext-tools/tests/tstngettext.c (main): Likewise.

gettext-runtime/src/envsubst.c
gettext-tools/src/hostname.c
gettext-tools/src/recode-sr-latin.c
gettext-tools/src/urlget.c
gettext-tools/tests/tstgettext.c
gettext-tools/tests/tstngettext.c

index e3db102f5d1a1d8341f82974140d20390a6c744f..596c2213190cdac0f807a433602cdda9f75cd396 100644 (file)
@@ -88,21 +88,21 @@ main (int argc, char *argv[])
   /* Parse command line options.  */
   while ((opt = getopt_long (argc, argv, "hvV", long_options, NULL)) != EOF)
     switch (opt)
-    {
-    case '\0':          /* Long option.  */
-      break;
-    case 'h':
-      do_help = true;
-      break;
-    case 'v':
-      show_variables = true;
-      break;
-    case 'V':
-      do_version = true;
-      break;
-    default:
-      usage (EXIT_FAILURE);
-    }
+      {
+      case '\0':          /* Long option.  */
+        break;
+      case 'h':
+        do_help = true;
+        break;
+      case 'v':
+        show_variables = true;
+        break;
+      case 'V':
+        do_version = true;
+        break;
+      default:
+        usage (EXIT_FAILURE);
+      }
 
   /* Version information is requested.  */
   if (do_version)
index ebd2ba4e83051d1d3e0a00b67a5f7ffb8be0afa3..bb3e59dac040d5c45bc6699afb41402935717aef 100644 (file)
@@ -160,28 +160,28 @@ main (int argc, char *argv[])
   while ((optchar = getopt_long (argc, argv, "fhisV", long_options, NULL))
          != EOF)
     switch (optchar)
-    {
-    case '\0':          /* Long option.  */
-      break;
-    case 'f':
-      format = long_format;
-      break;
-    case 's':
-      format = short_format;
-      break;
-    case 'i':
-      format = ip_format;
-      break;
-    case 'h':
-      do_help = true;
-      break;
-    case 'V':
-      do_version = true;
-      break;
-    default:
-      usage (EXIT_FAILURE);
-      /* NOTREACHED */
-    }
+      {
+      case '\0':          /* Long option.  */
+        break;
+      case 'f':
+        format = long_format;
+        break;
+      case 's':
+        format = short_format;
+        break;
+      case 'i':
+        format = ip_format;
+        break;
+      case 'h':
+        do_help = true;
+        break;
+      case 'V':
+        do_version = true;
+        break;
+      default:
+        usage (EXIT_FAILURE);
+        /* NOTREACHED */
+      }
 
   /* Version information requested.  */
   if (do_version)
index de636b6324191152e9be82dbab29b09862da5fbb..50292ce97313b92a48a592874910d916abda32cd 100644 (file)
@@ -85,18 +85,18 @@ main (int argc, char *argv[])
   /* Parse command line options.  */
   while ((opt = getopt_long (argc, argv, "hV", long_options, NULL)) != EOF)
     switch (opt)
-    {
-    case '\0':          /* Long option.  */
-      break;
-    case 'h':
-      do_help = true;
-      break;
-    case 'V':
-      do_version = true;
-      break;
-    default:
-      usage (EXIT_FAILURE);
-    }
+      {
+      case '\0':          /* Long option.  */
+        break;
+      case 'h':
+        do_help = true;
+        break;
+      case 'V':
+        do_version = true;
+        break;
+      default:
+        usage (EXIT_FAILURE);
+      }
 
   /* Version information is requested.  */
   if (do_version)
index 6cfd71059c424085c1ac2351084f381e1122179f..c1ade19eb733c64eb38eeab1555e5bc781a2a4a5 100644 (file)
@@ -114,22 +114,22 @@ main (int argc, char *argv[])
   /* Parse command line options.  */
   while ((optchar = getopt_long (argc, argv, "hqV", long_options, NULL)) != EOF)
     switch (optchar)
-    {
-    case '\0':          /* Long option.  */
-      break;
-    case 'h':           /* --help */
-      do_help = true;
-      break;
-    case 'q':           /* --quiet / --silent */
-      verbose = false;
-      break;
-    case 'V':           /* --version */
-      do_version = true;
-      break;
-    default:
-      usage (EXIT_FAILURE);
-      /* NOTREACHED */
-    }
+      {
+      case '\0':          /* Long option.  */
+        break;
+      case 'h':           /* --help */
+        do_help = true;
+        break;
+      case 'q':           /* --quiet / --silent */
+        verbose = false;
+        break;
+      case 'V':           /* --version */
+        do_version = true;
+        break;
+      default:
+        usage (EXIT_FAILURE);
+        /* NOTREACHED */
+      }
 
   /* Version information requested.  */
   if (do_version)
index a90980eff7cbb21c1804fc26450bca9d09e19714..a0989dd2a8575ddd39fec7072b6198f2da5851ce 100644 (file)
@@ -119,49 +119,49 @@ main (int argc, char *argv[])
   while ((optchar = getopt_long (argc, argv, "+d:eEhnstV", long_options, NULL))
          != EOF)
     switch (optchar)
-    {
-    case '\0':          /* Long option.  */
-      break;
-    case 'd':
-      context.domain = optarg;
-      break;
-    case 'e':
-      context.do_expand = true;
-      break;
-    case 'E':
-      /* Ignore.  Just for compatibility.  */
-      break;
-    case 'h':
-      do_help = true;
-      break;
-    case 'n':
-      context.inhibit_added_newline = true;
-      break;
-    case 's':
-      context.do_shell = true;
-      break;
-    case 't':
-      do_thread = true;
-      break;
-    case 'V':
-      do_version = true;
-      break;
-    case '=':
       {
-        /* Undocumented option --env sets an environment variable.  */
-        char *separator = strchr (optarg, '=');
-        if (separator != NULL)
-          {
-            *separator = '\0';
-            xsetenv (optarg, separator + 1, 1);
-            environ_changed = true;
-            break;
-          }
+      case '\0':          /* Long option.  */
+        break;
+      case 'd':
+        context.domain = optarg;
+        break;
+      case 'e':
+        context.do_expand = true;
+        break;
+      case 'E':
+        /* Ignore.  Just for compatibility.  */
+        break;
+      case 'h':
+        do_help = true;
+        break;
+      case 'n':
+        context.inhibit_added_newline = true;
+        break;
+      case 's':
+        context.do_shell = true;
+        break;
+      case 't':
+        do_thread = true;
+        break;
+      case 'V':
+        do_version = true;
+        break;
+      case '=':
+        {
+          /* Undocumented option --env sets an environment variable.  */
+          char *separator = strchr (optarg, '=');
+          if (separator != NULL)
+            {
+              *separator = '\0';
+              xsetenv (optarg, separator + 1, 1);
+              environ_changed = true;
+              break;
+            }
+        }
+        FALLTHROUGH;
+      default:
+        usage (EXIT_FAILURE);
       }
-      FALLTHROUGH;
-    default:
-      usage (EXIT_FAILURE);
-    }
 
   if (environ_changed)
     /* Set locale again via LC_ALL.  */
index 34c3d04d858716508e4d64d381d0d18d922b3dea..7af6c38cd3b79bcc5b12d117ae2a6d371418680a 100644 (file)
@@ -107,37 +107,37 @@ main (int argc, char *argv[])
   while ((optchar = getopt_long (argc, argv, "+d:htV", long_options, NULL))
          != EOF)
     switch (optchar)
-    {
-    case '\0':          /* Long option.  */
-      break;
-    case 'd':
-      context.domain = optarg;
-      break;
-    case 'h':
-      do_help = true;
-      break;
-    case 't':
-      do_thread = true;
-      break;
-    case 'V':
-      do_version = true;
-      break;
-    case '=':
       {
-        /* Undocumented option --env sets an environment variable.  */
-        char *separator = strchr (optarg, '=');
-        if (separator != NULL)
-          {
-            *separator = '\0';
-            xsetenv (optarg, separator + 1, 1);
-            environ_changed = true;
-            break;
-          }
+      case '\0':          /* Long option.  */
+        break;
+      case 'd':
+        context.domain = optarg;
+        break;
+      case 'h':
+        do_help = true;
+        break;
+      case 't':
+        do_thread = true;
+        break;
+      case 'V':
+        do_version = true;
+        break;
+      case '=':
+        {
+          /* Undocumented option --env sets an environment variable.  */
+          char *separator = strchr (optarg, '=');
+          if (separator != NULL)
+            {
+              *separator = '\0';
+              xsetenv (optarg, separator + 1, 1);
+              environ_changed = true;
+              break;
+            }
+        }
+        FALLTHROUGH;
+      default:
+        usage (EXIT_FAILURE);
       }
-      FALLTHROUGH;
-    default:
-      usage (EXIT_FAILURE);
-    }
 
   if (environ_changed)
     /* Set locale again via LC_ALL.  */