-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: b5df2812f4711668002645b6bfc2d8eb974c00b6:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit b5df2812f4711668002645b6bfc2d8eb974c00b6
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Mon Jan 9 19:01:56 2006 +0000

    *** empty log message ***

diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in

index 54a9f26aa3cbde24b629e50eb4fc78e929a8b3b8..

index ..0776c18ab03fe47d497c916bf4b1e7415d70fb3e 100644

--- a/src/rxvtlib.h.in
+++ b/src/rxvtlib.h.in
@@ -256,9 +256,8 @@ struct rxvt_vars : TermWin_t {
   int             sb_shadow;    /* scrollbar shadow width                    */
   rxvt_ptytty     pty;
   int             numlock_state;
-  line_t         *row_buf;      // all lines, scrollback + terminal, circular
+  line_t         *row_buf;      // all lines, scrollback + terminal, circular, followed by temp_buf
   line_t         *drawn_buf;    // text on screen
-  line_t         *temp_buf;     // temporary buffer
   line_t         *swap_buf;     // lines for swap buffer
   char           *tabs;         /* per location: 1 == tab-stop               */
   screen_t        screen;
diff --git a/src/screen.C b/src/screen.C

index 9f1183ecb91864425e972e99803856c46e682bc5..

index ..9835ff2205aa31cee467c24ea1e60409d927ee17 100644

--- a/src/screen.C
+++ b/src/screen.C
@@ -196,7 +196,6 @@ rxvt_term::scr_reset ()
     {
       /*
        * first time called so just malloc everything: don't rely on realloc
-       * Note: this is still needed so that all the scrollback lines are NULL
        */
       nsaved = 0;       /* no saved lines */
       term_start = 0;
@@ -204,10 +203,9 @@ rxvt_term::scr_reset ()
       talloc = new rxvt_salloc (ncol * sizeof (text_t));
       ralloc = new rxvt_salloc (ncol * sizeof (rend_t));

-      row_buf   = (line_t *)rxvt_calloc (total_rows, sizeof (line_t));
-      temp_buf  = (line_t *)rxvt_calloc (total_rows, sizeof (line_t));
-      drawn_buf = (line_t *)rxvt_calloc (nrow      , sizeof (line_t));
-      swap_buf  = (line_t *)rxvt_calloc (nrow      , sizeof (line_t));
+      row_buf   = (line_t *)rxvt_calloc (total_rows + nrow, sizeof (line_t));
+      drawn_buf = (line_t *)rxvt_calloc (nrow             , sizeof (line_t));
+      swap_buf  = (line_t *)rxvt_calloc (nrow             , sizeof (line_t));

       for (int row = nrow; row--; )
         {
@@ -262,7 +260,6 @@ rxvt_term::scr_reset ()
 #endif

       drawn_buf = (line_t *)rxvt_realloc (drawn_buf, nrow * sizeof (line_t));
-      temp_buf  = (line_t *)rxvt_realloc (temp_buf , nrow * sizeof (line_t));
       swap_buf  = (line_t *)rxvt_realloc (swap_buf , nrow * sizeof (line_t));

       for (int row = min (nrow, prev_nrow); row--; )
@@ -277,7 +274,8 @@ rxvt_term::scr_reset ()
           drawn_buf[row].clear (); scr_blank_screen_mem (drawn_buf[row], DEFAULT_RSTYLE);
         }

-      line_t *old_buf = row_buf; row_buf = (line_t *)rxvt_calloc (total_rows, sizeof (line_t));
+      line_t *old_buf = row_buf;
+      row_buf = (line_t *)rxvt_calloc (total_rows + nrow, sizeof (line_t));

       int p    = MOD (term_start + prev_nrow, prev_total_rows);  // previous row
       int pend = MOD (term_start - nsaved   , prev_total_rows);
@@ -435,7 +433,6 @@ rxvt_term::scr_release ()
   free (row_buf);
   free (swap_buf);
   free (drawn_buf);
-  free (temp_buf);
   free (tabs);

   row_buf = 0; // signal that we freed all the arrays
@@ -691,6 +688,8 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count)

       min_it (count, rows);

+      line_t *temp_buf = row_buf + total_rows;
+
       for (int row = 0; row < rows; row++)
         {
           temp_buf [row] = ROW(row1 + (row + count + rows) % rows);

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 13:15:13 2024