summaryrefslogtreecommitdiff
path: root/support/dktools/hbtool.ctr
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
committerNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
commit1f457376b478257b88d4a857f5ec1b6155442dd7 (patch)
tree2a06a60551dea362cf8cb0cb0ba66c78608717c4 /support/dktools/hbtool.ctr
parentac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff)
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/hbtool.ctr')
-rw-r--r--support/dktools/hbtool.ctr31
1 files changed, 27 insertions, 4 deletions
diff --git a/support/dktools/hbtool.ctr b/support/dktools/hbtool.ctr
index 31075a254e..3a51adcadc 100644
--- a/support/dktools/hbtool.ctr
+++ b/support/dktools/hbtool.ctr
@@ -2,7 +2,7 @@
copyright owner = Dirk Krause
copyright year = 2013-xxxx
-license = bsd
+SPDX-License-Identifier: BSD-3-Clause
@@ -115,6 +115,7 @@ hbtool_write_text_utf(hb_job_t *job, dkChar const *src);
#include "dk3all.h"
#include "dk3se.h"
#include "htmlbook.h"
+#include "dk3unused.h"
@@ -196,7 +197,14 @@ hbtool_check_filename(hb_job_t *job, dkChar const *fn)
dk3_c32_t
-hbtool_get_start_char(dkChar const *text, int enc)
+hbtool_get_start_char(
+ dkChar const *text,
+#if DK3_CHAR_SIZE > 1
+ int DK3_ARG_UNUSED(enc)
+#else
+ int enc
+#endif
+)
{
dk3_c32_t back = 0UL;
dk3_c32_t c32 = 0UL; /* Start character */
@@ -205,6 +213,9 @@ hbtool_get_start_char(dkChar const *text, int enc)
#if DK3_CHAR_SIZE <= 1
char c; /* Result character */
#endif
+#if DK3_CHAR_SIZE > 1
+ DK3_UNUSED_ARG(enc)
+#endif
$? "+ hbtool_get_start_char"
if(text) {
sl = dk3str_len(text);
@@ -229,7 +240,7 @@ hbtool_get_start_char(dkChar const *text, int enc)
back &= ((dk3_c32_t)0x000000FFUL);
}
#endif
- } $? "- hbtool_get_start_char 0x%lx %lu", (unsigned long)back, (unsigned long)back
+ } $? "- hbtool_get_start_char 0x%lx %lu", dk3enc_uc_to_ul(back), dk3enc_uc_to_ul(back)
return back;
}
@@ -300,6 +311,11 @@ hbtool_write_header_number(hb_job_t *job, hb_node_t *nptr)
back = 0; $? ". this is impressum"
}
}
+ if(job->privacynode) {
+ if((job->privacynode)->objno == nptr->objno) {
+ back = 0; $? ". this is privacy"
+ }
+ }
if(back) { $? ". ok to write number"
hbtool_write_header_number(job, nptr->parent);
if(1 < nptr->depth) { $? ". write dot"
@@ -360,7 +376,7 @@ hbtool_add_url(hb_job_t *job, dkChar const *url)
void
-hbtool_correct_backslash_to_slash(dkChar *str)
+hbtool_correct_backslash_to_slash(dkChar * DK3_ARG_UNUSED(str) )
{
#if DK3_ON_WINDOWS
dkChar *ptr;
@@ -369,6 +385,8 @@ hbtool_correct_backslash_to_slash(dkChar *str)
if(dkT('\\') == *ptr) { *ptr = dkT('/'); }
ptr++;
}
+#else
+ DK3_UNUSED_ARG(str)
#endif
}
@@ -387,6 +405,11 @@ hbtool_write_all_titles(hb_job_t *job, hb_node_t *nptr, int isprim)
back = 0;
}
}
+ if (job->privacynode) {
+ if ((job->privacynode)->objno == nptr->objno) {
+ back = 0;
+ }
+ }
if (back) {
if (hbtool_write_all_titles(job, nptr->parent, 0)) {
hbhtml_output_for_text(job, dkT(" &#8594; "));