aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-07-07 09:09:29 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-07-07 09:09:29 +0200
commitd6d8f777f0e899323ed531453828c2153cb08a16 (patch)
treebd4e22e8be995e93faf846cee6ca60d574219116
parentcee423bb3f8678f39a94e33b8b2d6e413b59a80d (diff)
downloadvis-d6d8f777f0e899323ed531453828c2153cb08a16.tar.gz
vis-d6d8f777f0e899323ed531453828c2153cb08a16.tar.xz
text: remove left over debugging code
-rw-r--r--text.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/text.c b/text.c
index c5f3768..1227136 100644
--- a/text.c
+++ b/text.c
@@ -70,7 +70,6 @@ struct Piece {
Piece *global_next; /* used to free individual pieces */
const char *data; /* pointer into a Buffer holding the data */
size_t len; /* the lenght in number of bytes starting from content */
- int index; /* unique index identifiying the piece */
};
/* used to transform a global position (byte offset starting from the begining
@@ -124,7 +123,6 @@ struct Text {
Buffer *buffers; /* all buffers which have been allocated to hold insertion data */
Piece *pieces; /* all pieces which have been allocated, used to free them */
Piece *cache; /* most recently modified piece */
- int piece_count; /* number of pieces allocated, only used for debuging purposes */
Piece begin, end; /* sentinel nodes which always exists but don't hold any data */
Action *history; /* undo tree */
Action *current_action; /* action holding all file changes until a snapshot is performed */
@@ -454,7 +452,6 @@ static Piece *piece_alloc(Text *txt) {
if (!p)
return NULL;
p->text = txt;
- p->index = ++txt->piece_count;
p->global_next = txt->pieces;
if (txt->pieces)
txt->pieces->global_prev = p;
@@ -1000,9 +997,6 @@ Text *text_load(const char *filename) {
if (!txt)
return NULL;
int fd = -1;
- txt->begin.index = 1;
- txt->end.index = 2;
- txt->piece_count = 2;
piece_init(&txt->begin, NULL, &txt->end, NULL, 0);
piece_init(&txt->end, &txt->begin, NULL, NULL, 0);
lineno_cache_invalidate(&txt->lines);