From dfb7d4b2bd6a5bd7a2bf63927c84c46bf88ba379 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sun, 3 Mar 2024 22:21:15 +0100 Subject: piece-table: fix memory and implement delete --- src/piece-table.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/piece-table.h') diff --git a/src/piece-table.h b/src/piece-table.h index c053069..8a13ae3 100644 --- a/src/piece-table.h +++ b/src/piece-table.h @@ -22,11 +22,13 @@ typedef struct { size_t cached_offset; } piece_table; -bool init_piece_table(piece_table *pt, char *orig); +void init_piece_table(piece_table *pt, char *orig); void free_piece_table(piece_table *pt); char index_piece_table(piece_table *pt, size_t pos); void insert_piece_table(piece_table *pt, char val, size_t pos); void delete_piece_table(piece_table *pt, size_t pos, size_t len); +void print_piece_table(piece_table *pt); + #endif // PIECE_TABLE_H -- cgit v1.2.3