diff options
Diffstat (limited to 'source/luametatex/source/libraries')
-rw-r--r-- | source/luametatex/source/libraries/avl/avl.c | 12 | ||||
-rw-r--r-- | source/luametatex/source/libraries/hnj/hnjhyphen.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/luametatex/source/libraries/avl/avl.c b/source/luametatex/source/libraries/avl/avl.c index 46e0bcd50..e1c18ceb5 100644 --- a/source/luametatex/source/libraries/avl/avl.c +++ b/source/luametatex/source/libraries/avl/avl.c @@ -1442,7 +1442,7 @@ avl_code_t avl_del_first(avl_tree t, void **backup) if (t && t->root) { avl_code_t rv; if (backup) { - ptr_handler h = { NULL, OP_BACKUP }; + ptr_handler h = { NULL, OP_BACKUP, 0 }; rv = node_del_first(t, &h); *backup = h.ptr; } else { @@ -1460,7 +1460,7 @@ avl_code_t avl_del_last(avl_tree t, void **backup) if (backup == NULL) { return node_del_last(t, NULL); } else { - ptr_handler h = { NULL, OP_BACKUP }; + ptr_handler h = { NULL, OP_BACKUP, 0 }; avl_code_t rv = node_del_last(t, &h); *backup = h.ptr; return rv; @@ -1527,7 +1527,7 @@ void avl_cat(avl_tree t0, avl_tree t1) return; } else if (t0->root) { int delta = depth(t1->root) - depth(t0->root); - ptr_handler h = { NULL, OP_DETACH }; + ptr_handler h = { NULL, OP_DETACH, 0 }; if (delta <= 0) { if (node_del_first (t1, &h) == 2) { --delta; @@ -1559,13 +1559,13 @@ void avl_cat(avl_tree t0, avl_tree t1) avl_code_t avl_split(const void *item, avl_tree t, avl_tree t0, avl_tree t1) { if (t && t->root) { + avl_compare_func cmp = t->compare; + avl_node *a, *p, *sn; /* sn: split node */ + int k, na, an[AVL_STACK_CAPACITY]; t0->root = NULL; t1->root = NULL; t0->count = 0; t1->count = 0; - avl_compare_func cmp = t->compare; - avl_node *a, *p, *sn; /* sn: split node */ - int k, na, an[AVL_STACK_CAPACITY]; /* invariant: [na]= size of tree rooted at [a] plus one */ for (a = t->root, na = (int) (t->count + 1), k = 0;;) { int d_ = item_compare(cmp, t, item, get_item(a)); diff --git a/source/luametatex/source/libraries/hnj/hnjhyphen.c b/source/luametatex/source/libraries/hnj/hnjhyphen.c index ad9d87683..cde68cb93 100644 --- a/source/luametatex/source/libraries/hnj/hnjhyphen.c +++ b/source/luametatex/source/libraries/hnj/hnjhyphen.c @@ -552,7 +552,7 @@ void hnj_dictionary_load(hjn_dictionary *dict, const unsigned char *f, int trace char *newpat_pat = lookup_pattern(dict->merged, word, l1); if (! newpat_pat) { char *neworg; - unsigned char *newword = (unsigned char *) hnj_malloc((size_t) (l1 + 1)); + unsigned char *newword = (unsigned char *) hnj_malloc(l1 + 1); int e1 = 0; strncpy((char *) newword, (char *) word, (size_t) l1); newword[l1] = 0; @@ -561,7 +561,7 @@ void hnj_dictionary_load(hjn_dictionary *dict, const unsigned char *f, int trace e1++; } } - neworg = hnj_malloc((size_t) (l1 + 2 - e1)); + neworg = hnj_malloc(l1 + 2 - e1); /*tex Fill with right amount of zeros: */ sprintf(neworg, "%0*d", l1 + 1 - e1, 0); insert_pattern(dict->merged, newword, combine_patterns(neworg, subpat_pat), trace); |