From 3290d6aa1455d2fc40a74d16b0111ef1f13d8930 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 12 Sep 2024 23:56:46 -0300 Subject: [PATCH] Apply editorconfig --- README.md | 66 ++++++++++++------------- share/isinetaddr/examples/iscidraddr4.c | 22 ++++----- share/isinetaddr/examples/isinetaddr4.c | 22 ++++----- share/isinetaddr/examples/isinetaddr6.c | 22 ++++----- 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 16e43e8..e45378b 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,23 @@ The `isinetaddr4` function returns `true` when given a valid IPv4 address: #include const char *ipv4[] = { - /* valid */ - "127.0.0.1", "1.1.1.1", "0.0.0.0", - /* invalid */ - "0.0.0.0.0", "foobar" + /* valid */ + "127.0.0.1", "1.1.1.1", "0.0.0.0", + /* invalid */ + "0.0.0.0.0", "foobar" }; int main(void) { - for (int i = 0; i < 5; i++) { - if (isinetaddr4(ipv4[i])) { - printf("%s is a valid IPv4 address.\n", ipv4[i]); - } else { - printf("%s is an invalid IPv4 address.\n", ipv4[i]); + for (int i = 0; i < 5; i++) { + if (isinetaddr4(ipv4[i])) { + printf("%s is a valid IPv4 address.\n", ipv4[i]); + } else { + printf("%s is an invalid IPv4 address.\n", ipv4[i]); + } } - } - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); } ``` @@ -48,23 +48,23 @@ The following example builds on the previous example: #include const char *ipv4[] = { - /* valid */ - "127.0.0.1", "192.168.2.1/32", "192.168.2.1/0", - /* invalid */ - "192.168.2.1/33", "foobar" + /* valid */ + "127.0.0.1", "192.168.2.1/32", "192.168.2.1/0", + /* invalid */ + "192.168.2.1/33", "foobar" }; int main(void) { - for (int i = 0; i < 5; i++) { - if (iscidraddr4(ipv4[i])) { - printf("%s is a valid IPv4 address.\n", ipv4[i]); - } else { - printf("%s is an invalid IPv4 address.\n", ipv4[i]); + for (int i = 0; i < 5; i++) { + if (iscidraddr4(ipv4[i])) { + printf("%s is a valid IPv4 address.\n", ipv4[i]); + } else { + printf("%s is an invalid IPv4 address.\n", ipv4[i]); + } } - } - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); } ``` @@ -78,24 +78,24 @@ The `isinetaddr6` function returns `true` when given a valid IPv6 address: #include const char *ipv6[] = { - /* valid */ - "::", "::1", "0000:0000:0000:0000:0000:0000:0000:0000", - /* invalid */ - "foobar", "00:::0" + /* valid */ + "::", "::1", "0000:0000:0000:0000:0000:0000:0000:0000", + /* invalid */ + "foobar", "00:::0" }; int main(void) { - for (int i = 0; i < 5; i++) { - if (isinetaddr6(ipv6[i])) { - printf("%s is a valid IPv4 address.\n", ipv6[i]); - } else { - printf("%s is an invalid IPv4 address.\n", ipv6[i]); + for (int i = 0; i < 5; i++) { + if (isinetaddr6(ipv6[i])) { + printf("%s is a valid IPv4 address.\n", ipv6[i]); + } else { + printf("%s is an invalid IPv4 address.\n", ipv6[i]); + } } - } - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); } ``` diff --git a/share/isinetaddr/examples/iscidraddr4.c b/share/isinetaddr/examples/iscidraddr4.c index a9d24d1..c6e2f59 100644 --- a/share/isinetaddr/examples/iscidraddr4.c +++ b/share/isinetaddr/examples/iscidraddr4.c @@ -3,21 +3,21 @@ #include const char *ipv4[] = { - /* valid */ - "127.0.0.1", "192.168.2.1/32", "192.168.2.1/0", - /* invalid */ - "192.168.2.1/33", "foobar" + /* valid */ + "127.0.0.1", "192.168.2.1/32", "192.168.2.1/0", + /* invalid */ + "192.168.2.1/33", "foobar" }; int main(void) { - for (int i = 0; i < 5; i++) { - if (iscidraddr4(ipv4[i])) { - printf("%s is a valid IPv4 address.\n", ipv4[i]); - } else { - printf("%s is an invalid IPv4 address.\n", ipv4[i]); + for (int i = 0; i < 5; i++) { + if (iscidraddr4(ipv4[i])) { + printf("%s is a valid IPv4 address.\n", ipv4[i]); + } else { + printf("%s is an invalid IPv4 address.\n", ipv4[i]); + } } - } - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); } diff --git a/share/isinetaddr/examples/isinetaddr4.c b/share/isinetaddr/examples/isinetaddr4.c index 81cddb4..aba8d11 100644 --- a/share/isinetaddr/examples/isinetaddr4.c +++ b/share/isinetaddr/examples/isinetaddr4.c @@ -3,21 +3,21 @@ #include const char *ipv4[] = { - /* valid */ - "127.0.0.1", "1.1.1.1", "0.0.0.0", - /* invalid */ - "0.0.0.0.0", "foobar" + /* valid */ + "127.0.0.1", "1.1.1.1", "0.0.0.0", + /* invalid */ + "0.0.0.0.0", "foobar" }; int main(void) { - for (int i = 0; i < 5; i++) { - if (isinetaddr4(ipv4[i])) { - printf("%s is a valid IPv4 address.\n", ipv4[i]); - } else { - printf("%s is an invalid IPv4 address.\n", ipv4[i]); + for (int i = 0; i < 5; i++) { + if (isinetaddr4(ipv4[i])) { + printf("%s is a valid IPv4 address.\n", ipv4[i]); + } else { + printf("%s is an invalid IPv4 address.\n", ipv4[i]); + } } - } - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); } diff --git a/share/isinetaddr/examples/isinetaddr6.c b/share/isinetaddr/examples/isinetaddr6.c index 5b1dad6..0d6f812 100644 --- a/share/isinetaddr/examples/isinetaddr6.c +++ b/share/isinetaddr/examples/isinetaddr6.c @@ -3,22 +3,22 @@ #include const char *ipv6[] = { - /* valid */ - "::", "::1", "0000:0000:0000:0000:0000:0000:0000:0000", - /* invalid */ - "foobar", "00:::0" + /* valid */ + "::", "::1", "0000:0000:0000:0000:0000:0000:0000:0000", + /* invalid */ + "foobar", "00:::0" }; int main(void) { - for (int i = 0; i < 5; i++) { - if (isinetaddr6(ipv6[i])) { - printf("%s is a valid IPv4 address.\n", ipv6[i]); - } else { - printf("%s is an invalid IPv4 address.\n", ipv6[i]); + for (int i = 0; i < 5; i++) { + if (isinetaddr6(ipv6[i])) { + printf("%s is a valid IPv4 address.\n", ipv6[i]); + } else { + printf("%s is an invalid IPv4 address.\n", ipv6[i]); + } } - } - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); }