]> granicus.if.org Git - fortune-mod/commitdiff
Fix tidyall tests.
authorShlomi Fish <shlomif@shlomifish.org>
Tue, 26 Jan 2021 20:06:31 +0000 (22:06 +0200)
committerShlomi Fish <shlomif@shlomifish.org>
Tue, 26 Jan 2021 20:06:31 +0000 (22:06 +0200)
See:

https://metacpan.org/release/Code-TidyAll .

fortune-mod/fortune/fortune.c
fortune-mod/util/rot.c
fortune-mod/util/strfile.h

index 2f201eaaee3dde95c157ce025ada32e69ee11d4b..879dad5ed9e4b7dec98ef711d684a6f450db9942 100644 (file)
@@ -1147,7 +1147,7 @@ static void getargs(int argc, char **argv)
             (void)fprintf(stderr, "%s",
                 "fortune: can't match fortunes on this system (Sorry)\n");
             exit(0);
-#else             /* NO_REGEX */
+#else /* NO_REGEX */
         case 'm': /* dump out the fortunes */
             Match = true;
             pat = optarg;
@@ -1155,7 +1155,7 @@ static void getargs(int argc, char **argv)
         case 'i': /* case-insensitive match */
             ignore_case = true;
             break;
-#endif            /* NO_REGEX */
+#endif /* NO_REGEX */
         case 'u': /* Don't recode the fortune */
             No_recode = true;
             break;
index f13e9337802ba2380bbac9bd64180323c6ae23db..a45faf40ee4b8102cadd0149493a71a5982f550f 100644 (file)
@@ -8,8 +8,9 @@ int main(void)
     int a;
     while ((a = getchar()) != EOF)
     {
-        putchar(isupper(a) ? ('A' + (a - 'A' + 13) % 26)
-                           : islower(a) ? ('a' + (a - 'a' + 13) % 26) : a);
+        putchar(isupper(a)   ? ('A' + (a - 'A' + 13) % 26)
+                : islower(a) ? ('a' + (a - 'a' + 13) % 26)
+                             : a);
     }
     return 0;
 }
index 582e0ca3a949012ac7b15faaa3bbbff29537ed23..848f5b1beb0c61e19dc7ee7d52745c1f2f5b0c3f 100644 (file)
@@ -50,8 +50,8 @@ typedef struct
     uint32_t str_longlen;  /* length of longest string */
     uint32_t str_shortlen; /* length of shortest string */
 #define STR_RANDOM 0x1     /* randomized pointers */
-#define STR_ORDERED 0x2    /* ordered pointers */
-#define STR_ROTATED 0x4    /* rot-13'd text */
+#define STR_ORDERED 0x2 /* ordered pointers */
+#define STR_ROTATED 0x4 /* rot-13'd text */
     uint32_t str_flags;    /* bit field for flags */
     uint8_t stuff[4];      /* long aligned space */
 #define str_delim stuff[0] /* delimiting character */