diff options
author | Dimitrij Mijoski <dmjpp@hotmail.com> | 2022-03-16 13:55:15 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2022-03-19 06:21:57 +0000 |
commit | e523f845add260106335cecfe08534cf8732cc29 (patch) | |
tree | 5bb3304708a5ffc49b035ab332b84614dd9afb1c /src | |
parent | 49d87fea52bb19770f76710cfaf69881246a7219 (diff) | |
download | enchant-e523f845add260106335cecfe08534cf8732cc29.tar.gz |
Reduce dependency on gnulib by requiring C99 and POSIX 2008
- Remove gnulib modules c99, getopt-posix, strdup-posix, ssize_t
- Also remove obsolete gnulib module snippet/unused-parameter, use
_GL_UNUSED instead of older _GL_UNUSED_PARAMETER, and instead of
[[maybe_unused]].
Thanks to @dimztimz for providing the patch on which this commit is based.
Diffstat (limited to 'src')
-rw-r--r-- | src/enchant-lsmod.c | 19 | ||||
-rw-r--r-- | src/lib.c | 7 | ||||
-rw-r--r-- | src/pwl.c | 7 |
3 files changed, 15 insertions, 18 deletions
diff --git a/src/enchant-lsmod.c b/src/enchant-lsmod.c index 22c5560..737ca7a 100644 --- a/src/enchant-lsmod.c +++ b/src/enchant-lsmod.c @@ -34,7 +34,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "unused-parameter.h" #include "enchant.h" #include "enchant-provider.h" @@ -42,18 +41,18 @@ static void describe_dict (const char * const lang_tag, const char * const provider_name, - const char * const provider_desc _GL_UNUSED_PARAMETER, - const char * const provider_file _GL_UNUSED_PARAMETER, - void * user_data _GL_UNUSED_PARAMETER) + const char * const provider_desc _GL_UNUSED, + const char * const provider_file _GL_UNUSED, + void * user_data _GL_UNUSED) { printf ("%s (%s)\n", lang_tag, provider_name); } static void -describe_word_chars (const char * const lang_tag _GL_UNUSED_PARAMETER, - const char * const provider_name _GL_UNUSED_PARAMETER, - const char * const provider_desc _GL_UNUSED_PARAMETER, - const char * const provider_file _GL_UNUSED_PARAMETER, +describe_word_chars (const char * const lang_tag _GL_UNUSED, + const char * const provider_name _GL_UNUSED, + const char * const provider_desc _GL_UNUSED, + const char * const provider_file _GL_UNUSED, void * user_data) { EnchantDict *dict = (EnchantDict *)user_data; @@ -66,8 +65,8 @@ describe_word_chars (const char * const lang_tag _GL_UNUSED_PARAMETER, static void describe_provider (const char * name, const char * desc, - const char * file _GL_UNUSED_PARAMETER, - void * user_data _GL_UNUSED_PARAMETER) + const char * file _GL_UNUSED, + void * user_data _GL_UNUSED) { printf ("%s (%s)\n", name, desc); } @@ -48,7 +48,6 @@ #include "enchant-provider.h" #include "debug.h" #include "pwl.h" -#include "unused-parameter.h" #include "relocatable.h" #include "configmake.h" @@ -162,7 +161,7 @@ enchant_get_conf_dirs (void) /* returns TRUE if tag is valid * for requires alphanumeric ASCII or underscore */ -static _GL_ATTRIBUTE_PURE int +static G_GNUC_PURE int enchant_is_valid_dictionary_tag(const char * const tag) { const char * it; @@ -1300,7 +1299,7 @@ enchant_broker_dict_exists (EnchantBroker * broker, const char * const tag) return exists; } -_GL_ATTRIBUTE_PURE const char * +G_GNUC_PURE const char * enchant_dict_get_extra_word_characters (EnchantDict *dict) { g_return_val_if_fail (dict, NULL); @@ -1308,7 +1307,7 @@ enchant_dict_get_extra_word_characters (EnchantDict *dict) return dict->get_extra_word_characters ? (*dict->get_extra_word_characters) (dict) : ""; } -_GL_ATTRIBUTE_PURE int +G_GNUC_PURE int enchant_dict_is_word_character (EnchantDict * dict, uint32_t uc_in, size_t n) { g_return_val_if_fail (n <= 2, 0); @@ -65,7 +65,6 @@ #include <glib.h> #include <glib/gstdio.h> #include "enchant-provider.h" -#include "unused-parameter.h" #include "pwl.h" @@ -494,7 +493,7 @@ static int enchant_is_all_caps(const char*const word, size_t len) return hasCap; } -static _GL_ATTRIBUTE_PURE int enchant_is_title_case(const char * const word, size_t len) +static G_GNUC_PURE int enchant_is_title_case(const char * const word, size_t len) { g_return_val_if_fail (word && *word, 0); @@ -708,9 +707,9 @@ static void enchant_trie_free(EnchantTrie* trie) g_free(trie); } -static void enchant_trie_free_cb(void* key _GL_UNUSED_PARAMETER, +static void enchant_trie_free_cb(void* key _GL_UNUSED, void* value, - void* data _GL_UNUSED_PARAMETER) + void* data _GL_UNUSED) { enchant_trie_free((EnchantTrie*) value); } |