get_indent_level(const char *l)
{
int indent = 0;
+
while (l[0]) {
if (l[0] == '>') {
indent++;
l++;
}
- return indent;
+ if (strcmp("-- ", l) == 0) {
+ return -1-indent;
+ } else {
+ return indent;
+ }
}
static void
}
static void
-append_quoted(GString *buf, const int indent, const GString *str, const int cutpoint) {
+append_quoted(GString *buf, int indent, const GString *str, const int cutpoint) {
int i;
+ indent = indent < 0? abs(indent) -1 : indent;
for (i=0; i<=indent; i++) {
g_string_append(buf, "> ");
}
}
static int
-get_breakpoint_utf8(const gchar *s, const gint indent, const gint limit) {
+get_breakpoint_utf8(const gchar *s, gint indent, const gint limit) {
gint index = 0;
const gchar *pos, *last;
gunichar *uni;
+ indent = indent < 0? abs(indent) -1 : indent;
+
last = NULL;
pos = s;
uni = g_utf8_to_ucs4_fast(s, -1, NULL);
index++;
}
g_free(uni);
- return index;
+ return strlen(s);
}
static int