| 2000 | } |
| 2001 | |
| 2002 | static void |
| 2003 | balance (int total_stored) |
| 2004 | { |
| 2005 | COLUMN *p; |
| 2006 | int i, lines; |
| 2007 | int first_line = 0; |
| 2008 | |
| 2009 | for (i = 1, p = column_vector; i <= columns; ++i, ++p) |
| 2010 | { |
| 2011 | lines = total_stored / columns; |
| 2012 | if (i <= total_stored % columns) |
| 2013 | ++lines; |
| 2014 | |
| 2015 | p->lines_stored = lines; |
| 2016 | p->current_line = first_line; |
| 2017 | |
| 2018 | first_line += lines; |
| 2019 | } |
| 2020 | } |
| 2021 | |
| 2022 | /* Store a character in the buffer. */ |
| 2023 |