Change in minimum terminal size

Hi.

I used to run moc using a ~160x9/210x12 char terminal or so (160 columns, 9 lines), and this worked just fine.

Recently, I upgraded from Debian etch to testing (1:2.5.0~alpha3+svn20080629-2), and this "broke" moc, as it now complained about the terminal size being too small.

I tracked this down to the following commit fragment using rgrep and `svn blame`:

------------------------------------------------------------------------
r2062 | daper | 2008-02-10 17:00:29 +0200 (Sun, 10 Feb 2008) | 3 lines

Don't exit program if the terminal heught is below some limit, just print an
error message. (Niels Aan de Brugh)

------------------------------------------------------------------------
Index: interface_elements.c
===================================================================
--- interface_elements.c (revision 2061)
+++ interface_elements.c (revision 2062)
@@ -2252,10 +2273,9 @@
}

/* End the program if the terminal is too small. */
-static void check_term_size ()
+static void check_term_size (struct main_win *mw, struct info_win *iw)
{
- if (COLS < 79 || LINES < 7)
- interface_fatal ("The terminal is too small after resizeing.");
+ mw->too_small = iw->too_small = COLS < 59 || LINES < 17;
}

The commit message doesn't have any rationale for the change, and seems quite unrelated. Was this an inadvertent change, or was there some reason for raising the lines limit and lowering the columns limit?

In any case, mocp "breaks"/looks weird on a 59-column terminal now.

Find below a simple `svn diff` against trunk@r2150.

-- Tero Marttila

Index: interface_elements.c
===================================================================
--- interface_elements.c (revision 2150)
+++ interface_elements.c (working copy)
@@ -2356,7 +2356,7 @@
/* End the program if the terminal is too small. */
static void check_term_size (struct main_win *mw, struct info_win *iw)
{
- mw->too_small = iw->too_small = COLS < 59 || LINES < 17;
+ mw->too_small = iw->too_small = COLS < 79 || LINES < 7;
}

/* Update the title with the current fill. */

Your patch was applied. Thanks.

I now use MOC in terminal around 40x15 because I set big font so I will be able to read from a couch and operate moc with my remote. Moc is fully usable in this way, much better for my purpose than xvbm ;-) Only problem is that I don't see "shuffle", "repeat" and so on.

Now, I have to trick MOC each time to run by changing font after starting moc. I would be nice to have even more liberal term requirements or maybe switch to force moc to work even if term is too small.

BTW - moc does run in small term, it just doesn't display anything. But you can still use it with your eyes closed.

Best
Tomasz