From fd6bd4d8298e64370472fe087d50b1d2486bce22 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Tue, 13 Jan 2009 18:31:31 +0000 Subject: Remove broken and unused format to add an indent function to a line. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4982 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/textbuffer-view.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'src/fe-text/textbuffer-view.c') diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index 135c5323..bea2fc38 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -204,11 +204,6 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line) /* set indentation position here - don't do it if we're too close to right border */ if (xpos < view->width-5) indent_pos = xpos; - } else if (cmd == LINE_CMD_INDENT_FUNC) { - memcpy(&indent_func, ptr, sizeof(INDENT_FUNC)); - ptr += sizeof(INDENT_FUNC); - if (indent_func == NULL) - indent_func = view->default_indent_func; } else update_cmd_color(cmd, &color); continue; @@ -427,8 +422,6 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line, memcpy(&tmp, text+1, sizeof(unsigned char *)); text = tmp; continue; - } else if (*text == LINE_CMD_INDENT_FUNC) { - text += sizeof(INDENT_FUNC); } else { update_cmd_color(*text, &color); term_set_color(view->window, color); @@ -609,10 +602,6 @@ void textbuffer_view_set_default_indent(TEXT_BUFFER_VIEW_REC *view, static void view_unregister_indent_func(TEXT_BUFFER_VIEW_REC *view, INDENT_FUNC indent_func) { - INDENT_FUNC func; - LINE_REC *line; - const unsigned char *text, *tmp; - if (view->default_indent_func == indent_func) view->default_indent_func = NULL; @@ -620,34 +609,6 @@ static void view_unregister_indent_func(TEXT_BUFFER_VIEW_REC *view, to the indent function */ view_reset_cache(view); view->cache = textbuffer_cache_get(view->siblings, view->width); - - /* remove all references to the indent function from buffer */ - line = view->buffer->first_line; - while (line != NULL) { - text = line->text; - - for (text = line->text;; text++) { - if (*text != '\0') - continue; - - text++; - if (*text == LINE_CMD_EOL) - break; - - if (*text == LINE_CMD_INDENT_FUNC) { - text++; - memcpy(&func, text, sizeof(INDENT_FUNC)); - if (func == indent_func) - memset(&func, 0, sizeof(INDENT_FUNC)); - text += sizeof(INDENT_FUNC); - } else if (*text == LINE_CMD_CONTINUE) { - memcpy(&tmp, text+1, sizeof(char *)); - text = tmp-1; - } - } - - line = line->next; - } } void textbuffer_views_unregister_indent_func(INDENT_FUNC indent_func) -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0