From 011880df0d963a65c83675e69332d7d045fb0f46 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Thu, 16 May 2019 14:28:21 +0000 Subject: [PATCH] Cleanup Address API: unexpose mutt_addr_is_(intl|local) --- address/address.c | 4 ++-- address/address.h | 2 -- test/Makefile.autosetup | 2 -- test/address/mutt_addr_is_intl.c | 36 ------------------------------- test/address/mutt_addr_is_local.c | 36 ------------------------------- test/main.c | 2 -- 6 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 test/address/mutt_addr_is_intl.c delete mode 100644 test/address/mutt_addr_is_local.c diff --git a/address/address.c b/address/address.c index b14325422..76d613e44 100644 --- a/address/address.c +++ b/address/address.c @@ -887,7 +887,7 @@ bool mutt_addresslist_search(const struct Address *needle, const struct AddressL * @param a Address to check * @retval true Address contains IDN components */ -bool mutt_addr_is_intl(const struct Address *a) +static bool mutt_addr_is_intl(const struct Address *a) { if (!a) return false; @@ -899,7 +899,7 @@ bool mutt_addr_is_intl(const struct Address *a) * @param a Address to check * @retval true Address contains NO IDN components */ -bool mutt_addr_is_local(const struct Address *a) +static bool mutt_addr_is_local(const struct Address *a) { if (!a) return false; diff --git a/address/address.h b/address/address.h index 1da06e3c4..604207475 100644 --- a/address/address.h +++ b/address/address.h @@ -73,8 +73,6 @@ const char * mutt_addr_for_display(const struct Address *a); void mutt_addr_free(struct Address **a); size_t mutt_addr_write(char *buf, size_t buflen, struct Address *addr, bool display); -bool mutt_addr_is_intl(const struct Address *a); -bool mutt_addr_is_local(const struct Address *a); int mutt_addr_mbox_to_udomain(const char *mbox, char **user, char **domain); struct Address *mutt_addr_new(void); int mutt_addr_remove_from_list(struct AddressList *a, const char *mailbox); diff --git a/test/Makefile.autosetup b/test/Makefile.autosetup index 82a540046..6be3de9cb 100644 --- a/test/Makefile.autosetup +++ b/test/Makefile.autosetup @@ -6,8 +6,6 @@ ADDRESS_OBJS = test/address/mutt_addr_append.o \ test/address/mutt_addr_for_display.o \ test/address/mutt_addr_free.o \ test/address/mutt_addr_has_recips.o \ - test/address/mutt_addr_is_intl.o \ - test/address/mutt_addr_is_local.o \ test/address/mutt_addresslist_equal.o \ test/address/mutt_addresslist_parse2.o \ test/address/mutt_addresslist_parse.o \ diff --git a/test/address/mutt_addr_is_intl.c b/test/address/mutt_addr_is_intl.c deleted file mode 100644 index 43a512880..000000000 --- a/test/address/mutt_addr_is_intl.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file - * Test code for mutt_addr_is_intl() - * - * @authors - * Copyright (C) 2019 Richard Russon - * - * @copyright - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 2 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ - -#define TEST_NO_MAIN -#include "acutest.h" -#include "config.h" -#include "mutt/mutt.h" -#include "address/lib.h" - -void test_mutt_addr_is_intl(void) -{ - // bool mutt_addr_is_intl(struct Address *a); - - { - TEST_CHECK(!mutt_addr_is_intl(NULL)); - } -} diff --git a/test/address/mutt_addr_is_local.c b/test/address/mutt_addr_is_local.c deleted file mode 100644 index 2015e897f..000000000 --- a/test/address/mutt_addr_is_local.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file - * Test code for mutt_addr_is_local() - * - * @authors - * Copyright (C) 2019 Richard Russon - * - * @copyright - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 2 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ - -#define TEST_NO_MAIN -#include "acutest.h" -#include "config.h" -#include "mutt/mutt.h" -#include "address/lib.h" - -void test_mutt_addr_is_local(void) -{ - // bool mutt_addr_is_local(struct Address *a); - - { - TEST_CHECK(!mutt_addr_is_local(NULL)); - } -} diff --git a/test/main.c b/test/main.c index cc15ac512..6ceaca87d 100644 --- a/test/main.c +++ b/test/main.c @@ -34,8 +34,6 @@ NEOMUTT_TEST_ITEM(test_mutt_addr_for_display) \ NEOMUTT_TEST_ITEM(test_mutt_addr_free) \ NEOMUTT_TEST_ITEM(test_mutt_addr_has_recips) \ - NEOMUTT_TEST_ITEM(test_mutt_addr_is_intl) \ - NEOMUTT_TEST_ITEM(test_mutt_addr_is_local) \ NEOMUTT_TEST_ITEM(test_mutt_addr_mbox_to_udomain) \ NEOMUTT_TEST_ITEM(test_mutt_addr_new) \ NEOMUTT_TEST_ITEM(test_mutt_addr_remove_from_list) \ -- 2.40.0