From 49ca294dee2fbe892cf8266261c59e7d0a4c6fb3 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sat, 11 Sep 2021 23:54:56 +0000 Subject: [PATCH] Cherrypicked minor upstream fixes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7319 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/bin/halibut/biblio.c | 2 ++ Docs/src/bin/halibut/contents.c | 4 ++++ Docs/src/bin/halibut/input.c | 3 +++ Docs/src/bin/halibut/keywords.c | 2 ++ Docs/src/bin/halibut/ustring.c | 4 ++-- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Docs/src/bin/halibut/biblio.c b/Docs/src/bin/halibut/biblio.c index ff0910c4..18d45965 100644 --- a/Docs/src/bin/halibut/biblio.c +++ b/Docs/src/bin/halibut/biblio.c @@ -112,8 +112,10 @@ void gen_citations(paragraph * source, keywordlist * kl) word *wd = smalloc(sizeof(word)); wd->text = gentext(++bibnum); wd->type = word_Normal; + wd->breaks = FALSE; wd->alt = NULL; wd->next = NULL; + wd->aux = 0; kw->text = wd; } para->kwtext = kw->text; diff --git a/Docs/src/bin/halibut/contents.c b/Docs/src/bin/halibut/contents.c index 27215fe6..88d8e487 100644 --- a/Docs/src/bin/halibut/contents.c +++ b/Docs/src/bin/halibut/contents.c @@ -55,6 +55,8 @@ static void dotext(word *** wret, wchar_t * text) mnewword->type = word_Normal; mnewword->alt = NULL; mnewword->next = NULL; + mnewword->breaks = FALSE; + mnewword->aux = 0; **wret = mnewword; *wret = &mnewword->next; } @@ -66,6 +68,8 @@ static void dospace(word *** wret) mnewword->type = word_WhiteSpace; mnewword->alt = NULL; mnewword->next = NULL; + mnewword->breaks = FALSE; + mnewword->aux = 0; **wret = mnewword; *wret = &mnewword->next; } diff --git a/Docs/src/bin/halibut/input.c b/Docs/src/bin/halibut/input.c index 4669fc34..cca822e6 100644 --- a/Docs/src/bin/halibut/input.c +++ b/Docs/src/bin/halibut/input.c @@ -763,7 +763,10 @@ static void read_file(paragraph *** ret, input * in, indexdata * idx, tree234 *m break; case c__comment: if (isbrace(in)) + { + needkw = -1; // Upstream 56b96573 (r8312) break; /* `\#{': isn't a comment para */ + } do { dtor(t), t = get_token(in); diff --git a/Docs/src/bin/halibut/keywords.c b/Docs/src/bin/halibut/keywords.c index cb7c59ed..6df1cbe5 100644 --- a/Docs/src/bin/halibut/keywords.c +++ b/Docs/src/bin/halibut/keywords.c @@ -156,6 +156,8 @@ void subst_keywords(paragraph * source, keywordlist * kl) close->alt = NULL; close->type = word_XrefEnd; close->fpos = ptr->fpos; + close->breaks = FALSE; + close->aux = 0; close->next = ptr->next; ptr->next = subst; diff --git a/Docs/src/bin/halibut/ustring.c b/Docs/src/bin/halibut/ustring.c index 0192d8b0..e0d0a699 100644 --- a/Docs/src/bin/halibut/ustring.c +++ b/Docs/src/bin/halibut/ustring.c @@ -119,7 +119,7 @@ wchar_t *ustrlow(wchar_t * s) return s; } -int utoi(wchar_t * s) +int utoi(const wchar_t *s) { int sign = +1; int n; @@ -138,7 +138,7 @@ int utoi(wchar_t * s) s++; } - return n; + return n * sign; } int utob(wchar_t * s)