billiob pushed a commit to branch master.

commit 055631876121f9e5850a7423640c626b5461d128
Author: Boris Faure <[email protected]>
Date:   Wed Mar 20 23:02:58 2013 +0100

    reflow: change _text_save_top() termpty_text_save_top()
    
    also change prototype
---
 src/bin/termptyops.c | 10 ++++------
 src/bin/termptyops.h |  1 +
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index 140767f..92ee44d 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -28,17 +28,15 @@ _text_clear(Termpty *ty, Termcell *cells, int count, int 
val, Eina_Bool inherit_
    termpty_cell_fill(ty, &src, cells, count);
 }
 
-static void
-_text_save_top(Termpty *ty)
+void
+termpty_text_save_top(Termpty *ty, Termcell *cells, ssize_t w_max)
 {
    Termsave *ts;
-   Termcell *cells;
    ssize_t w;
 
    if (ty->backmax <= 0) return;
 
-   cells = &(TERMPTY_SCREEN(ty, 0, 0));
-   w = termpty_line_length(cells, ty->w);
+   w = termpty_line_length(cells, w_max);
    ts = calloc(1, sizeof(Termsave) + ((w - 1) * sizeof(Termcell)));
    ts->w = w;
    _termpty_text_copy(ty, cells, ts->cell, w);
@@ -77,7 +75,7 @@ _termpty_text_scroll(Termpty *ty)
      {
         if (!ty->altbuf)
           {
-             _text_save_top(ty);
+             termpty_text_save_top(ty, &(TERMPTY_SCREEN(ty, 0, 0)), ty->w);
              if (ty->cb.scroll.func) ty->cb.scroll.func(ty->cb.scroll.data);
           }
         else
diff --git a/src/bin/termptyops.h b/src/bin/termptyops.h
index bf93c6b..3358602 100644
--- a/src/bin/termptyops.h
+++ b/src/bin/termptyops.h
@@ -5,6 +5,7 @@ typedef enum _Termpty_Clear
    TERMPTY_CLR_ALL
 } Termpty_Clear;
 
+void termpty_text_save_top(Termpty *ty, Termcell *cells, ssize_t w_max);
 void _termpty_text_copy(Termpty *ty, Termcell *cells, Termcell *dest, int 
count);
 void _termpty_text_scroll(Termpty *ty);
 void _termpty_text_scroll_rev(Termpty *ty);

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to