X-Git-Url: http://git.pld-linux.org/?p=packages%2Ftf.git;a=blobdiff_plain;f=tf-50b5-multistatus.patch;fp=tf-50b5-multistatus.patch;h=0000000000000000000000000000000000000000;hp=58e6334cc0ec0fcc2e680fd9e49f2c0cdcc58a13;hb=2d536ae7629f8c7e310c7af4377da6552ecd3cf9;hpb=246143fdf002c8ca9c5cfdf0b34612f17f6862c1 diff --git a/tf-50b5-multistatus.patch b/tf-50b5-multistatus.patch deleted file mode 100644 index 58e6334..0000000 --- a/tf-50b5-multistatus.patch +++ /dev/null @@ -1,292 +0,0 @@ -diff -ur tf-50b5/src/globals.h tf-50b5-patch/src/globals.h ---- tf-50b5/src/globals.h Wed Jul 21 02:19:41 2004 -+++ tf-50b5-patch/src/globals.h Wed Jul 28 00:21:15 2004 -@@ -223,6 +223,7 @@ - #define status_attr getattrvar(VAR_stat_attr) - #define status_fields getstdvar(VAR_stat_fields) - #define status_pad getstdvar(VAR_stat_pad) -+#define status_height getintvar(VAR_stat_height) - #define sub getintvar(VAR_sub) - #define tabsize getintvar(VAR_tabsize) - #define telopt getintvar(VAR_telopt) -diff -ur tf-50b5/src/main.c tf-50b5-patch/src/main.c ---- tf-50b5/src/main.c Fri Jul 16 23:13:51 2004 -+++ tf-50b5-patch/src/main.c Wed Jul 28 00:21:15 2004 -@@ -49,7 +49,7 @@ - #endif - "TinyFugue version 5.0 beta 5"; - --const char mods[] = ""; -+const char mods[] = "With multistatus line written by Someone [Minor changes by Karol Lassak (ingwar@ingwar.eu.org)]"; - - const char copyright[] = - "Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004 Ken Keys (hawkeye@tcp.com)"; -diff -ur tf-50b5/src/output.c tf-50b5-patch/src/output.c ---- tf-50b5/src/output.c Tue Jul 27 03:02:34 2004 -+++ tf-50b5-patch/src/output.c Wed Jul 28 00:21:15 2004 -@@ -15,6 +15,8 @@ - * Handles all screen-related phenomena. - *****************************************************************/ - -+#define MAX_STATUS_HEIGHT 5 -+ - #define TERM_vt100 1 - #define TERM_vt220 2 - #define TERM_ansi 3 -@@ -388,15 +390,15 @@ - lines = ((str = getvar("LINES"))) ? atoi(str) : 0; - columns = ((str = getvar("COLUMNS"))) ? atoi(str) : 0; - if (lines <= 0 || columns <= 0) get_window_size(); -- ystatus = lines - isize; -+ ystatus = lines - isize - (status_height - 1); - top_margin = 1; - bottom_margin = lines; - - prompt = fgprompt(); - - init_term(); -- Stringninit(status_line, columns); -- check_charattrs(status_line, columns, 0, __FILE__, __LINE__); -+ Stringninit(status_line, columns * MAX_STATUS_HEIGHT); -+ check_charattrs(status_line, columns * MAX_STATUS_HEIGHT, 0, __FILE__, __LINE__); - ch_attr(&special_var[VAR_hiliteattr]); - ch_attr(&special_var[VAR_alert_attr]); - ch_attr(&special_var[VAR_stat_attr]); -@@ -686,7 +688,7 @@ - } else { - prompt = fgprompt(); - if (isize > lines - 3) set_var_by_id(VAR_isize, lines - 3); -- ystatus = lines - isize; -+ ystatus = lines - isize - (status_height - 1); - #if 0 - outcount = ystatus - 1; - #endif -@@ -697,7 +699,7 @@ - } - update_status_line(NULL); - ix = iendx = oy = 1; -- iy = iendy = istarty = ystatus + 1; -+ iy = iendy = istarty = ystatus + status_height; - ipos(); - #endif - } -@@ -1314,9 +1316,9 @@ - inlist(field, status_field_list, status_field_list->tail); - } - -- if (width > columns) { -- eprintf("status_fields: status width (%d) is wider than screen (%d)", -- width, columns); -+ if (width > columns * status_height) { -+ eprintf("status_fields: status width (%d) is wider than screen * status height (%d * %d)", -+ width, columns, status_height); - } - - /* update new fields */ -@@ -1408,21 +1410,21 @@ - { - int column; - if (field->column >= 0) -- return (field->column > columns) ? columns : field->column; -+ return (field->column > columns * status_height) ? columns * status_height : field->column; - column = field->column + -- ((status_left + status_right > columns) ? -- status_left + status_right : columns); -- return (column > columns) ? columns : column; -+ ((status_left + status_right > columns * status_height) ? -+ status_left + status_right : columns * status_height); -+ return (column > columns * status_height) ? columns * status_height : column; - } - - static int status_width(StatusField *field, int start) - { - int width; -- if (start >= columns) return 0; -- width = (field->width == 0) ? columns - status_right - status_left : -+ if (start >= columns * status_height) return 0; -+ width = (field->width == 0) ? columns * status_height - status_right - status_left : - (field->width > 0) ? field->width : -field->width; -- if (width > columns - start) -- width = columns - start; -+ if (width > columns * status_height - start) -+ width = columns * status_height - start; - if (width < 0) - width = 0; - return width; -@@ -1580,8 +1582,8 @@ - continue; - } - if (internal >= 0 && field->internal != internal) continue; -- column = status_field_column(field); -- if (column >= columns) /* doesn't fit, nor will any later fields */ -+ column = status_field_column(field); -+ if (column >= columns * status_height) /* doesn't fit, nor will any later fields */ - break; - count++; - width = format_status_field(field); -@@ -1590,17 +1592,17 @@ - column >= alert_pos + alert_len) - { - /* no overlap with alert */ -- xy(column + 1, ystatus); -+ xy((column + 1) % columns, ystatus + (column / columns)); - hwrite(CS(status_line), column, width, 0); - } else { - if (column < alert_pos) { - /* field starts left of alert */ -- xy(column + 1, ystatus); -+ xy((column + 1) % columns, ystatus + (column / columns)); - hwrite(CS(status_line), column, alert_pos - column, 0); - } - if (column + width >= alert_pos) { - /* field ends right of alert */ -- xy(alert_pos + alert_len + 1, ystatus); -+ xy((alert_pos + alert_len + 1) % columns, ystatus + (column / columns)); - hwrite(CS(status_line), alert_pos + alert_len, - column + width - (alert_pos + alert_len), 0); - } -@@ -1622,12 +1624,12 @@ - for (node = status_field_list->head; node; node = node->next) { - field = (StatusField*)node->datum; - -- if ((column = status_field_column(field)) >= columns) -+ if ((column = status_field_column(field)) >= columns * status_height) - break; - width = format_status_field(field); - } - -- for (column += width; column < columns; column++) { -+ for (column += width; column < columns * status_height; column++) { - status_line->data[column] = true_status_pad; - status_line->charattrs[column] = status_attr; - } -@@ -1635,23 +1637,33 @@ - - int display_status_line(void) - { -+ int i; - if (screen_mode < 1) return 0; - - if (!alert_len) { - /* no overlap with alert */ -- xy(1, ystatus); -- hwrite(CS(status_line), 0, columns, 0); -+ for (i = 0; i < status_height; i++) { -+ xy(1, ystatus + i); -+ hwrite(CS(status_line), (columns * i), columns, 0); -+ } - } else { - /* overlap with alert (this could happen in ch_status_attr()) */ -- if (alert_pos > 0) { -- xy(1, ystatus); -- hwrite(CS(status_line), 0, alert_pos, 0); -- } -- if (alert_pos + alert_len < columns) { -- xy(alert_pos + alert_len + 1, ystatus); -- hwrite(CS(status_line), alert_pos + alert_len, -- columns - (alert_pos + alert_len), 0); -- } -+ for (i = 0; i < status_height; i++) { -+ if (!i) { -+ if (alert_pos > 0) { -+ xy(1, ystatus); -+ hwrite(CS(status_line), 0, alert_pos, 0); -+ } -+ if (alert_pos + alert_len < columns) { -+ xy(alert_pos + alert_len + 1, ystatus); -+ hwrite(CS(status_line), alert_pos + alert_len, -+ columns - (alert_pos + alert_len), 0); -+ } -+ } else { -+ xy(1, ystatus + i); -+ hwrite(CS(status_line), (columns * i), columns, 0); -+ } -+ } - } - - bufflush(); -@@ -1744,9 +1756,9 @@ - { - int need_redraw; - -- if (status_line->len < columns) -- Stringnadd(status_line, '?', columns - status_line->len); -- Stringtrunc(status_line, columns); -+ if (status_line->len < columns * status_height) -+ Stringnadd(status_line, '?', columns * status_height - status_line->len); -+ Stringtrunc(status_line, columns * status_height); - - if (screen_mode < 0) { /* e.g., called by init_variables() */ - need_redraw = 0; -@@ -1760,6 +1772,11 @@ - #ifdef SCREEN - } else if (var == &special_var[VAR_isize]) { /* %isize changed */ - need_redraw = 1; -+ } else if (var == &special_var[VAR_stat_height]) { /* %status_height changed */ -+ if (status_height > MAX_STATUS_HEIGHT) { -+ set_var_by_id(VAR_stat_height, MAX_STATUS_HEIGHT); -+ } -+ need_redraw = 1; - } else { /* SIGWINCH */ - /* Set ystatus to the top of the area fix_screen() must erase. */ - /* ystatus = 1; */ -@@ -1853,9 +1870,9 @@ - static void clear_input_window(void) - { - /* only called in visual mode */ -- clear_lines(ystatus + 1, lines); -+ clear_lines(ystatus + status_height, lines); - ix = iendx = 1; -- iy = iendy = istarty = ystatus + 1; -+ iy = iendy = istarty = ystatus + status_height; - ipos(); - } - -@@ -1873,14 +1890,14 @@ - static void scroll_input(int n) - { - if (n > isize) { -- clear_lines(ystatus + 1, lines); -- iendy = ystatus + 1; -+ clear_lines(ystatus + status_height, lines); -+ iendy = ystatus + status_height; - } else if (delete_line) { -- xy(1, ystatus + 1); -+ xy(1, ystatus + status_height); - for (iendy = lines + 1; iendy > lines - n + 1; iendy--) - tp(delete_line); - } else if (has_scroll_region) { -- setscroll(ystatus + 1, lines); -+ setscroll(ystatus + status_height, lines); - xy(1, lines); - crnl(n); /* DON'T: cy += n; */ - iendy = lines - n + 1; -@@ -2039,7 +2056,7 @@ - } - } else if (scroll && !clearfull) { - scroll_input(1); -- if (istarty > ystatus + 1) istarty--; -+ if (istarty > ystatus + status_height) istarty--; - } else { - clear_input_window(); - } -@@ -2273,7 +2290,7 @@ - ioutall(place - (ix - 1) - (iy - lines - 1) * Wrap); - iy = lines; - ipos(); -- } else if ((iy < ystatus + 1) || (iy > lines)) { -+ } else if ((iy < ystatus + status_height) || (iy > lines)) { - logical_refresh(); - } else { - ipos(); -diff -ur tf-50b5/src/varlist.h tf-50b5-patch/src/varlist.h ---- tf-50b5/src/varlist.h Mon Jul 26 10:30:56 2004 -+++ tf-50b5-patch/src/varlist.h Wed Jul 28 00:21:15 2004 -@@ -128,6 +128,7 @@ - varstr (VAR_sprefix, "sprefix", NULL, NULL) - varstr (VAR_stat_attr, "status_attr", NULL, ch_status_attr) - varstr (VAR_stat_fields,"status_fields",NULL, ch_status_fields) -+varint (VAR_stat_height,"status_height",1, ch_visual) - varstr (VAR_stat_pad, "status_pad", "_", update_status_line) - varstr (VAR_stint_clock,"status_int_clock",NULL, ch_status_int) - varstr (VAR_stint_more, "status_int_more",NULL, ch_status_int)