~mdw
/
sgt
/
halibut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce global (cross-backend) \cfg{contents} and \cfg{index}
[sgt/halibut]
/
keywords.c
diff --git
a/keywords.c
b/keywords.c
index
6e8a230
..
8101282
100644
(file)
--- a/
keywords.c
+++ b/
keywords.c
@@
-33,7
+33,7
@@
keyword *kw_lookup(keywordlist *kl, wchar_t *str) {
*/
keywordlist *get_keywords(paragraph *source) {
int errors = FALSE;
*/
keywordlist *get_keywords(paragraph *source) {
int errors = FALSE;
- keywordlist *kl =
mk
new(keywordlist);
+ keywordlist *kl =
s
new(keywordlist);
numberstate *n = number_init();
int prevpara = para_NotParaType;
numberstate *n = number_init();
int prevpara = para_NotParaType;
@@
-62,14
+62,13
@@
keywordlist *get_keywords(paragraph *source) {
* This also sets up the `parent', `child' and `sibling'
* links.
*/
* This also sets up the `parent', `child' and `sibling'
* links.
*/
- source->kwtext = number_mktext(n, source, q, prevpara, &errors);
- prevpara = source->type;
+ source->kwtext = number_mktext(n, source, q, &prevpara, &errors);
if (p && *p) {
if (source->kwtext || source->type == para_Biblio) {
keyword *kw, *ret;
if (p && *p) {
if (source->kwtext || source->type == para_Biblio) {
keyword *kw, *ret;
- kw =
mk
new(keyword);
+ kw =
s
new(keyword);
kw->key = p;
kw->text = source->kwtext;
kw->para = source;
kw->key = p;
kw->text = source->kwtext;
kw->para = source;
@@
-83,7
+82,8
@@
keywordlist *get_keywords(paragraph *source) {
} else {
if (kl->nlooseends >= kl->looseendssize) {
kl->looseendssize = kl->nlooseends + 32;
} else {
if (kl->nlooseends >= kl->looseendssize) {
kl->looseendssize = kl->nlooseends + 32;
- kl->looseends = resize(kl->looseends, kl->looseendssize);
+ kl->looseends = sresize(kl->looseends, kl->looseendssize,
+ word *);
}
kl->looseends[kl->nlooseends++] = source->kwtext;
}
}
kl->looseends[kl->nlooseends++] = source->kwtext;
}
@@
-134,7
+134,7
@@
void subst_keywords(paragraph *source, keywordlist *kl) {
kw->para->type != para_BiblioCited)
ustrlow(subst->text);
kw->para->type != para_BiblioCited)
ustrlow(subst->text);
- close =
mk
new(word);
+ close =
s
new(word);
close->text = NULL;
close->alt = NULL;
close->type = word_XrefEnd;
close->text = NULL;
close->alt = NULL;
close->type = word_XrefEnd;