vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 8d448a90889da61056ce73a732b75ef99713eb6a parent 18506aad10c78ad15e93ccdb11ffec4c0c318a29 Author: Marc André Tanner <mat@brain-dump.org> Date: Fri, 3 Jul 2015 13:44:06 +0200 Remove text dump debugging code Instead use the text-dump git branch if necessary. Diffstat:
| M | text.c | | | 16 | ---------------- |
| M | text.h | | | 3 | --- |
2 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/text.c b/text.c @@ -858,22 +858,6 @@ Text *text_load_fd(int fd) { return txt; } -static void print_piece(Piece *p) { - fprintf(stdout, "index: %d\tnext: %d\tprev: %d\t len: %zd\t data: %p\n", p->index, - p->next ? p->next->index : -1, - p->prev ? p->prev->index : -1, - p->len, p->data); - fwrite(p->data, p->len, 1, stdout); - fputc('\n', stdout); - fflush(stdout); -} - -void text_debug(Text *txt) { - for (Piece *p = &txt->begin; p; p = p->next) { - print_piece(p); - } -} - /* A delete operation can either start/stop midway through a piece or at * a boundry. In the former case a new piece is created to represent the * remaining text before/after the modification point. diff --git a/text.h b/text.h @@ -114,7 +114,4 @@ void text_regex_free(Regex *r); int text_search_range_forward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags); int text_search_range_backward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags); -// TMP -void text_debug(Text*); - #endif