From 5097a1982bb7687b778255c9321407642320d24a Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 23 Mar 2024 17:48:42 -0300 Subject: formatting & tweaks pass --- plugins/libre_redirect/libre_redirect.c | 22 +++++++++++----------- plugins/readability/readability.h | 5 +---- plugins/strings/strings.h | 2 ++ plugins/style/style.h | 5 +---- 4 files changed, 15 insertions(+), 19 deletions(-) (limited to 'plugins') diff --git a/plugins/libre_redirect/libre_redirect.c b/plugins/libre_redirect/libre_redirect.c index e6ec5fc..a4fabdf 100644 --- a/plugins/libre_redirect/libre_redirect.c +++ b/plugins/libre_redirect/libre_redirect.c @@ -49,17 +49,17 @@ int libre_redirect(const char* uri, char* output) int replace_check = str_replace_start(uri, annoying_sites[i], alternatives[i], output); switch (replace_check) { - case 0: // no match found - break; - case 1: // str_replace_start somehow failed - printf("str_replace_start failed\n"); - return 1; - break; - case 2: // match succeeded - return 2; - break; - default: - printf("Unreachable state"); + case 0: // no match found + break; + case 1: // str_replace_start somehow failed + printf("str_replace_start failed\n"); + return 1; + break; + case 2: // match succeeded + return 2; + break; + default: + printf("Unreachable state"); } } strcpy(output, uri); diff --git a/plugins/readability/readability.h b/plugins/readability/readability.h index 90d8ba0..9dab8c1 100644 --- a/plugins/readability/readability.h +++ b/plugins/readability/readability.h @@ -1,8 +1,5 @@ -#ifndef READABILITY -#define READABILITY +#pragma once #define READABILITY_N 88067 + 1000 void read_readability_js(char* string); - -#endif diff --git a/plugins/strings/strings.h b/plugins/strings/strings.h index df08c75..02054d5 100644 --- a/plugins/strings/strings.h +++ b/plugins/strings/strings.h @@ -1,2 +1,4 @@ +#pragma once + void str_init(char* str, int n); int str_replace_start(const char* string, const char* target, const char* replacement, char* output); diff --git a/plugins/style/style.h b/plugins/style/style.h index 1faab7a..42fe798 100644 --- a/plugins/style/style.h +++ b/plugins/style/style.h @@ -1,8 +1,5 @@ -#ifndef STYLE -#define STYLE +#pragma once #define STYLE_N 7624 + 1000 void read_style_js(char* string); - -#endif -- cgit v1.2.3