diff options
Diffstat (limited to 'src/piece-table.h')
-rw-r--r-- | src/piece-table.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/piece-table.h b/src/piece-table.h index 94ab072..c053069 100644 --- a/src/piece-table.h +++ b/src/piece-table.h @@ -5,14 +5,12 @@ #include <stddef.h> #include "buffer.h" -struct piece { +typedef struct _piece { char *start; size_t length; - struct piece *next; - struct piece *prev; -}; - -typedef struct piece piece; + struct _piece *next; + struct _piece *prev; +} piece; typedef struct { fixed_buffer orig; @@ -27,6 +25,8 @@ typedef struct { bool init_piece_table(piece_table *pt, char *orig); void free_piece_table(piece_table *pt); -void free_piece_list(piece *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); #endif // PIECE_TABLE_H |