summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2024-03-11 22:45:20 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2024-03-11 22:45:20 +0100
commit017ceb225dcbf287d09daa9d6663b64414a819e3 (patch)
tree0d9db9d0d8aeea501e88a76b4aa697ab9deace01 /src
parent15551604c8eebf9404df561c7c6139dcf1d6a6a9 (diff)
src: piece-table: print piece cache
Diffstat (limited to 'src')
-rw-r--r--src/piece-table.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/piece-table.c b/src/piece-table.c
index 2e7f0a2..440bb69 100644
--- a/src/piece-table.c
+++ b/src/piece-table.c
@@ -25,6 +25,9 @@ void print_piece_table (piece_table *pt) {
for ( cur = pt->sentinel->next; cur != pt->sentinel; cur = cur->next ) {
printf("\n\t\ttext: "); print_string(cur->start, cur->length);
}
+ printf("\n\t cached_offset: %ld", pt->cached_offset);
+ printf("\n\t cached (piece-text):");
+ print_string(pt->cached->start, pt->cached->length);
printf("\n}\n");
}