mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
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
This commit is contained in:
parent
9dcea776a1
commit
fd6bd4d829
5 changed files with 0 additions and 75 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -138,8 +138,6 @@ static void text_chunk_line_free(TEXT_BUFFER_REC *buffer, LINE_REC *line)
|
|||
break;
|
||||
|
||||
text = tmp-1;
|
||||
} else if (cmd == LINE_CMD_INDENT_FUNC) {
|
||||
text += sizeof(int (*) ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -446,9 +444,6 @@ void textbuffer_line2text(LINE_REC *line, int coloring, GString *str)
|
|||
g_string_sprintfa(str, "\004%c",
|
||||
FORMAT_STYLE_INDENT);
|
||||
break;
|
||||
case LINE_CMD_INDENT_FUNC:
|
||||
ptr += sizeof(void *);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ enum {
|
|||
LINE_CMD_UNDERLINE, /* enable/disable underlining */
|
||||
LINE_CMD_REVERSE, /* enable/disable reversed text */
|
||||
LINE_CMD_INDENT, /* if line is split, indent it at this position */
|
||||
LINE_CMD_INDENT_FUNC, /* if line is split, use the specified indentation function */
|
||||
LINE_CMD_BLINK, /* enable/disable blink */
|
||||
LINE_CMD_BOLD, /* enable/disable bold */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue