Skip to contentSkip to conversation

datastruct: Allow 'breaklines' in hash_resize() for ebook-size builds

PATCH Applied Akira Yokosawa 2 participants 2 messages Aug 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 datastruct: Allow 'breaklines' in hash_resize() for ebook-size builds

This code snippet already has the special tabsize of 6 for 1c and 2c builds. However, it is too wide for ebook-size builds.
As a workaround, add "breaklines=true" in the option list and permit folding of long lines.

---
 CodeSamples/datastruct/hash/hash_resize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CodeSamples/datastruct/hash/hash_resize.c +1 -1
index 6e450e3c..d084264f 100644
@@ -276,7 +276,7 @@ void hashtab_del(struct ht_elem *htep,			//\lnlbl{del:b}
 }							//\lnlbl{del:e}
 //\end{snippet}
 
-//\begin{snippet}[labelbase=ln:datastruct:hash_resize:resize,commandchars=\\\@\$,tabsize=6]
+//\begin{snippet}[labelbase=ln:datastruct:hash_resize:resize,commandchars=\\\@\$,tabsize=6,breaklines=true]
 /* Resize a hash table. */
 int hashtab_resize(struct hashtab *htp_master,
                    unsigned long nbuckets,
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · Akira Yokosawa

This code snippet already has the special tabsize of 6 for 1c and 2c builds. However, it is too wide for ebook-size builds.
As a workaround, add "breaklines=true" in the option list and permit folding of long lines.

Queued and pushed, thank you!

Thanx, Paul

Quoted 21 lines
---
 CodeSamples/datastruct/hash/hash_resize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CodeSamples/datastruct/hash/hash_resize.c +1 -1
index 6e450e3c..d084264f 100644
@@ -276,7 +276,7 @@ void hashtab_del(struct ht_elem *htep,			//\lnlbl{del:b}
 }							//\lnlbl{del:e}
 //\end{snippet}
 
-//\begin{snippet}[labelbase=ln:datastruct:hash_resize:resize,commandchars=\\\@\$,tabsize=6]
+//\begin{snippet}[labelbase=ln:datastruct:hash_resize:resize,commandchars=\\\@\$,tabsize=6,breaklines=true]
 /* Resize a hash table. */
 int hashtab_resize(struct hashtab *htp_master,
                    unsigned long nbuckets,
Signature · 1 line
2.17.1