From 1c6c69a7e93bda2d4b86f2bcc686a28bd8a63ca4 Mon Sep 17 00:00:00 2001 From: ampli Date: Fri, 31 May 2024 03:26:32 +0300 Subject: [PATCH] Fix typos in code --- bindings/python-examples/tests.py | 2 +- link-grammar/parse/fast-match.h | 2 +- link-grammar/parse/preparation.c | 2 +- link-grammar/parse/prune.c | 4 ++-- link-parser/lg_readline.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/python-examples/tests.py b/bindings/python-examples/tests.py index 10531c30d..303eedb41 100755 --- a/bindings/python-examples/tests.py +++ b/bindings/python-examples/tests.py @@ -490,7 +490,7 @@ def test_21_set_error_handler_None(self): self.numerr = LG_Error.printall(self.error_handler_test, None) self.assertEqual(self.numerr, self.numerr) - def test_22_defaut_handler_param(self): + def test_22_default_handler_param(self): """Test bad data parameter to default error handler""" # (It should be an integer >=0 and <= lg_None.) # Here the error handler is still set to None. diff --git a/link-grammar/parse/fast-match.h b/link-grammar/parse/fast-match.h index 01c6cfaa1..cde097ab3 100644 --- a/link-grammar/parse/fast-match.h +++ b/link-grammar/parse/fast-match.h @@ -20,7 +20,7 @@ #include "link-includes.h" // for Sentence #include "memory-pool.h" -typedef struct match_list_cache_sruct +typedef struct { Disjunct *d; /* disjuncts with a jet linkage */ Count_bin count; /* the counts for that linkage */ diff --git a/link-grammar/parse/preparation.c b/link-grammar/parse/preparation.c index 3ef6ade60..f598a884e 100644 --- a/link-grammar/parse/preparation.c +++ b/link-grammar/parse/preparation.c @@ -121,7 +121,7 @@ static void build_sentence_disjuncts(Sentence sent, float cost_cutoff, #ifdef DEBUG unsigned int dcnt, ccnt; count_disjuncts_and_connectors(sent, &dcnt, &ccnt); - lgdebug(+D_PREP, "%u disjucts, %u connectors (%zu allocated)\n", + lgdebug(+D_PREP, "%u disjuncts, %u connectors (%zu allocated)\n", dcnt, ccnt, pool_num_elements_issued(sent->Connector_pool) - num_con_alloced); #endif diff --git a/link-grammar/parse/prune.c b/link-grammar/parse/prune.c index 04101db39..88b6da8ad 100644 --- a/link-grammar/parse/prune.c +++ b/link-grammar/parse/prune.c @@ -1321,9 +1321,9 @@ static unsigned int cms_hash(const char *s) return (i & (CMS_SIZE-1)); } -static void reset_last_criterion(multiset_table *cmt, const char *ctiterion) +static void reset_last_criterion(multiset_table *cmt, const char *criterion) { - unsigned int h = cms_hash(ctiterion); + unsigned int h = cms_hash(criterion); for (Cms *cms = cmt->cms_table[h]; cms != NULL; cms = cms->next) cms->last_criterion = false; diff --git a/link-parser/lg_readline.c b/link-parser/lg_readline.c index cf0ba5921..4116de8eb 100644 --- a/link-parser/lg_readline.c +++ b/link-parser/lg_readline.c @@ -82,7 +82,7 @@ void find_history_filepath(const char *dictname, const char *argv0, { prt_error("Warning: xdg_get_home(XDG_BD_STATE) failed; " "input history will not be supported.\n"); - history_file = strdup("dev/null"); + history_file = strdup("/dev/null"); } if (get_verbosity() == D_USER_FILES)