]> git.pld-linux.org Git - packages/tf.git/blobdiff - tf-50b6-multistatus.patch
- orphaned, outdated
[packages/tf.git] / tf-50b6-multistatus.patch
diff --git a/tf-50b6-multistatus.patch b/tf-50b6-multistatus.patch
deleted file mode 100644 (file)
index 2d7521e..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-diff -ur tf-50b6/src/globals.h tf-50b6-patch/src/globals.h
---- tf-50b6/src/globals.h      Wed Jul 21 02:19:41 2004
-+++ tf-50b6-patch/src/globals.h        Thu Aug  5 14:27:52 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-50b6/src/main.c tf-50b6-patch/src/main.c
---- tf-50b6/src/main.c Thu Jul 29 19:37:19 2004
-+++ tf-50b6-patch/src/main.c   Thu Aug  5 14:27:52 2004
-@@ -49,7 +49,7 @@
- #endif
-     "TinyFugue version 5.0 beta 6";
--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)";
-Only in tf-50b6-patch/src: main.c.orig
-diff -ur tf-50b6/src/output.c tf-50b6-patch/src/output.c
---- tf-50b6/src/output.c       Fri Jul 30 21:21:02 2004
-+++ tf-50b6-patch/src/output.c Thu Aug  5 14:27:53 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,7 +390,7 @@
-     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;
-@@ -396,8 +398,8 @@
-     old_ix = -1;
-     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]);
-@@ -688,7 +690,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
-@@ -699,7 +701,7 @@
-         }
-         update_status_line(NULL);
-         ix = iendx = oy = 1;
--        iy = iendy = istarty = ystatus + 1;
-+        iy = iendy = istarty = ystatus + status_height;
-         ipos();
- #endif
-     }
-@@ -1317,9 +1319,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 */
-@@ -1411,21 +1413,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;
-@@ -1583,8 +1585,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);
-@@ -1593,17 +1595,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);
-           }
-@@ -1625,12 +1627,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;
-     }
-@@ -1638,23 +1640,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();
-@@ -1747,9 +1759,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;
-@@ -1763,6 +1775,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; */
-@@ -1858,9 +1875,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();
- }
-@@ -1878,14 +1895,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;
-@@ -2049,7 +2066,7 @@
-           }
-         } else if (scroll && !clearfull) {
-             scroll_input(1);
--            if (istarty > ystatus + 1) istarty--;
-+            if (istarty > ystatus + status_height) istarty--;
-         } else {
-             clear_input_window();
-         }
-@@ -2292,7 +2309,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();
-Only in tf-50b6-patch/src: output.c.orig
-diff -ur tf-50b6/src/varlist.h tf-50b6-patch/src/varlist.h
---- tf-50b6/src/varlist.h      Mon Jul 26 10:30:56 2004
-+++ tf-50b6-patch/src/varlist.h        Thu Aug  5 14:27:53 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)
This page took 0.033433 seconds and 4 git commands to generate.