Skip to content

Commit

Permalink
Fix typos in code
Browse files Browse the repository at this point in the history
  • Loading branch information
ampli committed May 31, 2024
1 parent 22d2cb7 commit 1c6c69a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bindings/python-examples/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion link-grammar/parse/fast-match.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion link-grammar/parse/preparation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions link-grammar/parse/prune.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion link-parser/lg_readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1c6c69a

Please sign in to comment.