From 8721afe4e408f0885cd6758a825db8a58d13554a Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 7 Oct 2005 21:56:12 +0000 Subject: [PATCH] Automatic dynamic detecting of users screensize --- ChangeLog | 16 +++++++++ examples/menus-en.tar | Bin 61440 -> 61440 bytes examples/txtfiles-en.tar | Bin 81920 -> 81920 bytes lang/Language.xref | 6 ++-- lang/chinese.txt | 6 ++-- lang/dutch.txt | 6 ++-- lang/english.txt | 6 ++-- lang/french.txt | 6 ++-- lang/galego.txt | 6 ++-- lang/german.txt | 6 ++-- lang/germandu.txt | 6 ++-- lang/spanish.txt | 6 ++-- mbsebbs/change.c | 40 ++++------------------ mbsebbs/change.h | 1 - mbsebbs/input.c | 22 +++++++++++- mbsebbs/input.h | 1 + mbsebbs/mbnewusr.c | 7 ++-- mbsebbs/mbsebbs.c | 7 ++-- mbsebbs/menu.c | 4 --- mbsebbs/newuser.c | 23 +------------ mbsebbs/term.c | 16 ++++----- mbsebbs/term.h | 2 +- mbsebbs/user.c | 2 +- mbsetup/ledit.c | 1 - mbsetup/m_global.c | 19 ++++------- mbsetup/m_users.c | 72 ++++++++++++++++++--------------------- mbtask/mbtask.c | 1 - 27 files changed, 131 insertions(+), 157 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68739959..760ea176 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,9 +3,25 @@ $Id$ v0.81.0 07-Oct-2005 + upgrade: + The bbs menu Change Screenlength is obsolete. Remove this from + the menus (setup.mnu) and ascii/ansi screens (setup.a??). + mbcico: Made binkp GZ and BZ2 compression final. + mbsebbs: + Automatic dynamic detection of the users screensize. + + mbsetup: + Removed settings for users screenlength. + + lang: Removed prompts 64, 80 and 81. + + examples: + removed Change Screenlength from the English menus and + txtfiles. + v0.80.0 27-Oct-2004 - 06-Oct-2005 diff --git a/examples/menus-en.tar b/examples/menus-en.tar index 4b93b1b00af20069db7e1b030d8ab7b43b518e5b..f73ab2047a55eb5d46335a4ae852152059a35010 100644 GIT binary patch delta 374 zcmZp8z})bFdBQYyLjwa71_gu3g3KwC85un$KhW7ZiJ4_H8`A_Hc0)sRQ*3eqAUPvL zBW!YV69ho|46(@>Ob}r=G{J7B8%UqIF{YVpn>ix-fc6=iV9EjAnKpq9=m$fr?#!FO z2b421#^#nfh+E9D$xW#fkTfRZ9jf}9Gdgzxf0LRX20ssI2 delta 592 zcmZp8z})bFdBQYyBO?!p@X1HK|~h^5#7D#rd0d>iWx%qIPcGQ{+zU0#a64hlNr6u>ca-LR z&azMHpwDy6ZKCt@)7gOcw2(8$`z9KCyU95_@D}?h1^dp29t_;WBIoR|*HYNmLe9Nj zKJ;)u zet=Rqsn2Us+kA~zHokQGypw@}Z^2bV*Wa021qMH}LGCpFA6qSng@MYS6|^BXGGMei zB=+?c6S{bz*@-LSOq|FQvsdNhOjFV!NoqW?<3#f4vB@c^m9ji!J8vrD#~$4{C{l%)@n5=PdBe$zA_{Ka(f`f`S>?1sH->t delta 2282 zcma)+KWG#|6vl5hcPGlJ0Tb`S#oR=TSV)+EJCnOuNs1sI1PmxFYLOhKa4&Ee3#$V| zkW|sgu9Xt75Gyfqf`y!5mBJ!|sD*`!m4$`2;>?^yB;e;3yRiIt-}m14X4>ssyPaE0 z_DC*RhO+gIV1AvD>4U8IWd3~Z|A$Y4B(NNph|60}2oWM~Uy`+)gu4B{o`Sjq|EXJY zoRSLp8+QJbfZWj@2m3hgIH?WN9e13;{#25897pv|x_Tk5cgk@BbJKp#m^oK^euN|lGx!m>~&h71TFeFu&;f!%@RA{)#FfLRGH|WE5wyNW( z97!2Z*td=^P+E@Iq!jVlxmKgmywYf1zPdo&Q;ztgG_n0o4c5z%-hA`%XK?$|>Y<)0 z=iIB}e7wKOGIX@Vn!Tf+_z<`rUS++q{z}D}^Gn z!{%YAm{8icjn}d>K#uffg)T?w%fn;z@wEc9=a#wAirKbJ^tFQ*HOOD!s@&&Gzx``{MMCBtN;D0caT*Jx*i l+#rF_>CFl`Hu7(8=~ji@-~X4X^cp3jJM3&wa;akN{03+^IbHw& diff --git a/lang/Language.xref b/lang/Language.xref index 6a0053d1..4e729fc9 100644 --- a/lang/Language.xref +++ b/lang/Language.xref @@ -62,7 +62,7 @@ 61 mail.c misc.c file.c YN=|More (Y/n/=) 62 newuser.c YN|Would you like Hot-Keyed menus? [Y/n]: 63 newuser.c |Please answer Y or N -64 change.c |Please enter your Screen Length? [24]: +64 | 65 newuser.c |None 66 offline.c |Tag Offline Reader message areas 67 newuser.c |Your user account has been created: @@ -78,8 +78,8 @@ 77 mail.c |Message doesn't exist 78 change.c |News bulletins turned ON 79 change.c |News bulletins turned OFF -80 change.c |Screen length is 24 -81 change.c |Screen length is now set to: +80 | +81 | 82 mail.c |Private message, not owner 83 change.c |Please enter the correct date format 84 misc.c |Todays Callers to diff --git a/lang/chinese.txt b/lang/chinese.txt index a20b689e..d4048368 100644 --- a/lang/chinese.txt +++ b/lang/chinese.txt @@ -62,7 +62,7 @@ MF|What is your sex? (M)ale or (F)emale: YN=|More (Y/n/=) YN|Would you like Hot-Keyed menus? [Y/n]: |Please answer Y or N -|Please enter your Screen Length? [24]: +| |None |Tag Offline Reader message areas |Your user account has been created: @@ -78,8 +78,8 @@ YN|Would you like Hot-Keyed menus? [Y/n]: |Message doesn't exist |News bulletins turned ON |News bulletins turned OFF -|Screen length is 24 -|Screen length is now set to: +| +| |Private message, not owner |Please enter the correct date format |Todays Callers to diff --git a/lang/dutch.txt b/lang/dutch.txt index 2e03d4b0..9fa1d6c3 100644 --- a/lang/dutch.txt +++ b/lang/dutch.txt @@ -62,7 +62,7 @@ MV|Wat is Uw geslacht? (M)an of (V)rouw: JN=|Meer (J/n/=) JN|Wilt U sneltoets menus? [J/n]: |Antwoord met J of N -|Wat is Uw scherm lengte? [24]: +| |Geen |Selecteer Offline Reader berichten gebieden |Uw gebruikers account is gemaakt: @@ -78,8 +78,8 @@ JN|Wilt U sneltoets menus? [J/n]: |Bericht bestaat niet |News berichten staan nu AAN |News berichten staan nu UIT -|Scherm lengte is 24 -|De scherm lengte staat nu op: +| +| |Prive bericht, niet van U |Geef het juiste datum formaat |Bellers vandaag bij diff --git a/lang/english.txt b/lang/english.txt index bd2d96b1..3cbedccf 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -62,7 +62,7 @@ MF|What is your sex? (M)ale or (F)emale: YN=|More (Y/n/=) YN|Would you like Hot-Keyed menus? [Y/n]: |Please answer Y or N -|Please enter your Screen Length? [24]: +| |None |Tag Offline Reader message areas |Your user account has been created: @@ -78,8 +78,8 @@ YN|Would you like Hot-Keyed menus? [Y/n]: |Message doesn't exist |News bulletins turned ON |News bulletins turned OFF -|Screen length is 24 -|Screen length is now set to: +| +| |Private message, not owner |Please enter the correct date format |Todays Callers to diff --git a/lang/french.txt b/lang/french.txt index fc0f4024..1c396ea2 100644 --- a/lang/french.txt +++ b/lang/french.txt @@ -62,7 +62,7 @@ HF|(H)omme ou (F)emme ? : ON=|Plus (O/n/=) ON|Voulez vous les menus Hot-Keyed ? [O/n]: |Veuillez répondre O ou N -|Entrer la longueur de votre écran [24]: +| |Aucun |Tag Offline Reader message areas |Votre compte utilisateur a été créé: @@ -78,8 +78,8 @@ ON|Voulez vous les menus Hot-Keyed ? [O/n]: |Message n'existe pas |News bulletins est ON |News bulletins est OFF -|Longueur de l'écran : 24 -|Nouvelle longueur d'écran: +| +| |Message privé, pas le propriétaire |Veuillez entrer la date au format correct |Appels d'aujourd'hui pour diff --git a/lang/galego.txt b/lang/galego.txt index c1e5c291..7aa74295 100644 --- a/lang/galego.txt +++ b/lang/galego.txt @@ -62,7 +62,7 @@ HM| SN=|M is (S/n/=) SN|¨Queres men£s r pidos? [S/n]: |Por favor contesta S ou N -|Lonxitude en li¤as da tua pantalla [24]: +| |Nada |Marcar  reas para lectura Off-Line |Creouse a t£a conta de usuario: @@ -78,8 +78,8 @@ SN| |Non existe a mensaxe |Novas activadas |Novas desactivadas -|Li¤as de pantalla 24 -|Li¤as de pantalla : +| +| |Mensaxe privada, e non ‚ tua |Teclea o formato de data correcto |Hoxe chamaron a diff --git a/lang/german.txt b/lang/german.txt index f6b39cc4..5fb6d84e 100644 --- a/lang/german.txt +++ b/lang/german.txt @@ -62,7 +62,7 @@ MW|Sind Sie (m)aennlich oder (w)eiblich ? : JN=|Weiter (J/n/=) JN|Moechten Sie Menues mit "Hot-Keys" verwenden? [J/n]: |Bitte druecken Sie J oder N -|Geben Sie bitte die Zeilenanzahl Ihres Bildschirms an [24]: +| |Keine(r) |Mitteilungsbereiche fuer den Offline Reader markieren |Ihr Benutzeraccount wurde wie folgt eingerichtet: @@ -78,8 +78,8 @@ JN|Moechten Sie Menues mit "Hot-Keys" verwenden? [J/n]: |Die Mitteilung existiert nicht |System-Mitteilungen sind jetzt EIN |System-Mitteilungen sind jetzt AUS -|Die Zeilenanzahl ist 24 -|Die Zeilenanzahl ist jetzt gesetzt auf: +| +| |Private Mitteilung - Sie sind weder Absender noch Empfaenger |Bitte verwenden Sie das vorgegebene Datumsformat |Logins heute bis diff --git a/lang/germandu.txt b/lang/germandu.txt index e1944fb7..158cb2b6 100644 --- a/lang/germandu.txt +++ b/lang/germandu.txt @@ -62,7 +62,7 @@ MW|Bist Du aennlich oder eiblich ? : JN=|Weiter (a/ein/<=>) JN|Moechtest Du Menues mit "Hot-Keys" verwenden? [a/ein]: |Bitte druecke "J" oder "N" -|Gib bitte die Zeilenanzahl Deines Bildschirms an [24]: +| |Keine(r) |Mitteilungsbereiche fuer den Offline Reader markieren |Dein Benutzeraccount wurde wie folgt eingerichtet: @@ -78,8 +78,8 @@ JN|Moechtest Du Menues mit "Hot-Keys" verwenden? [a/ein]: |Die Mitteilung existiert nicht |System-Mitteilungen sind jetzt EIN |System-Mitteilungen sind jetzt AUS -|Die Zeilenanzahl ist 24 -|Die Zeilenanzahl ist jetzt gesetzt auf: +| +| |Private Mitteilung - Du bist weder Absender noch Empfaenger |Bitte verwende das vorgegebene Datumsformat |Logins heute bis diff --git a/lang/spanish.txt b/lang/spanish.txt index 1079d04e..173e3db7 100644 --- a/lang/spanish.txt +++ b/lang/spanish.txt @@ -62,7 +62,7 @@ HM| SN=|M s (S/n/=) SN|¨Quieres men£s r pidos? [S/n]: |Por favor contesta S ¢ N -|Longitud en l¡neas de tu pantalla [24]: +| |Nada |Marcar  reas para lectura Off-Line |Tu cuenta de usuario ha sido creada: @@ -78,8 +78,8 @@ SN| |No existe el mensaje |Noticias activadas |Noticias desactivadas -|Lineas de pantalla 24 -|Lineas de pantalla : +| +| |Mensaje privado, y no es tuyo |Teclee el formato de fecha correcto |Hoy llamaron a diff --git a/mbsebbs/change.c b/mbsebbs/change.c index 44e3fee9..f024bc7e 100644 --- a/mbsebbs/change.c +++ b/mbsebbs/change.c @@ -44,6 +44,12 @@ #include "term.h" #include "ttyio.h" + +extern int cols; +extern int rows; + + + int Chg_Language(int NewMode) { FILE *pLang; @@ -616,7 +622,7 @@ void Chg_Graphics() Syslog('+', "Graphics mode now %s", exitinfo.GraphMode?"On":"Off"); Enter(2); - TermInit(exitinfo.GraphMode, 80, exitinfo.iScreenLen); + TermInit(exitinfo.GraphMode); WriteExitinfo(); sleep(2); } @@ -712,38 +718,6 @@ void Chg_News() -void Chg_ScreenLen() -{ - char *temp; - - ReadExitinfo(); - temp = calloc(81, sizeof(char)); - Syslog('+', "Old screenlen %d", exitinfo.iScreenLen); - - Enter(1); - /* Please enter your Screen Length? [24]: */ - pout(LIGHTMAGENTA, BLACK, (char *) Language(64)); - colour(CFG.InputColourF, CFG.InputColourB); - Getnum(temp, 2); - - if((strcmp(temp, "")) == 0) { - exitinfo.iScreenLen = 24; - snprintf(temp, 81, "\r\n%s\r\n\r\n", (char *) Language(80)); - } else { - exitinfo.iScreenLen = atoi(temp); - snprintf(temp, 81, "\r\n%s%d\r\n\r\n", (char *) Language(81), exitinfo.iScreenLen); - } - PUTSTR(temp); - - TermInit(exitinfo.GraphMode, 80, exitinfo.iScreenLen); - Syslog('+', "New screenlen %d", exitinfo.iScreenLen); - WriteExitinfo(); - Pause(); - free(temp); -} - - - /* * Check users Date of Birth, if it is ok, we calculate his age. */ diff --git a/mbsebbs/change.h b/mbsebbs/change.h index c21c170d..67b7a1dc 100644 --- a/mbsebbs/change.h +++ b/mbsebbs/change.h @@ -18,7 +18,6 @@ void Chg_Graphics(void); /* Toggle graphics */ void Chg_VoicePhone(void); /* Change voicephone */ void Chg_DataPhone(void); /* Change dataphone */ void Chg_News(void); /* Toggle News Bulletins */ -void Chg_ScreenLen(void); /* Change screen len */ int Test_DOB(char *); /* Test of Date of Birth is valid */ void Chg_DOB(void); /* Change Date of Birth */ void Chg_Protocol(void); /* Change default transfer protocol. */ diff --git a/mbsebbs/input.c b/mbsebbs/input.c index 1add0058..01af34b3 100644 --- a/mbsebbs/input.c +++ b/mbsebbs/input.c @@ -40,15 +40,35 @@ +extern int cols; +extern int rows; + + + +void CheckScreen(void) +{ + struct winsize ws; + + if (ioctl(1, TIOCGWINSZ, &ws) != -1 && (ws.ws_col > 0) && (ws.ws_row > 0)) { + if ((ws.ws_col != cols) || (ws.ws_row != rows)) { + cols = ws.ws_col; + rows = ws.ws_row; + Syslog('+', "User screensize changed to %dx%d", cols, rows); + } + } +} + + /* * Wait for a character for a maximum of wtime * 10 mSec. */ int Waitchar(unsigned char *ch, int wtime) { - int i, rc = TIMEOUT; + int i, rc = TIMEOUT; for (i = 0; i < wtime; i++) { + CheckScreen(); rc = GETCHAR(0); if (tty_status == STAT_SUCCESS) { *ch = (unsigned char)rc; diff --git a/mbsebbs/input.h b/mbsebbs/input.h index 36807c37..7f75252f 100644 --- a/mbsebbs/input.h +++ b/mbsebbs/input.h @@ -4,6 +4,7 @@ #define _INPUT_H +void CheckScreen(void); /* Detect screensize changes */ long Speed(void); /* Get (locked) tty speed */ int Waitchar(unsigned char *, int); /* Wait n* 10mSec for char */ int Escapechar(unsigned char *); /* Escape sequence test */ diff --git a/mbsebbs/mbnewusr.c b/mbsebbs/mbnewusr.c index 3f308780..0431c4cc 100644 --- a/mbsebbs/mbnewusr.c +++ b/mbsebbs/mbnewusr.c @@ -109,7 +109,6 @@ int main(int argc, char **argv) Syslog(' ', "MBNEWUSR v%s", VERSION); if (ioctl(1, TIOCGWINSZ, &ws) != -1 && (ws.ws_col > 0) && (ws.ws_row > 0)) { - Syslog('b', "columns=%d lines=%d", ws.ws_col, ws.ws_row); cols = ws.ws_col; rows = ws.ws_row; } @@ -131,7 +130,9 @@ int main(int argc, char **argv) if ((p = getenv("REMOTEHOST")) != NULL) Syslog('+', "REMOTEHOST %s", p); if ((p = getenv("TERM")) != NULL) - Syslog('+', "TERM=%s", p); + Syslog('+', "TERM=%s %dx%d", p, cols, rows); + else + Syslog('+', "TERM=invalid %dx%d", cols, rows); sUnixName[0] = '\0'; @@ -171,7 +172,7 @@ int main(int argc, char **argv) * Default set the terminal to ANSI mode. If your logo * is in color, the user will see color no mather what. */ - TermInit(1, cols, rows); + TermInit(1); /* * Now it's time to check if the bbs is open. If not, we diff --git a/mbsebbs/mbsebbs.c b/mbsebbs/mbsebbs.c index 5980d087..55d862b3 100644 --- a/mbsebbs/mbsebbs.c +++ b/mbsebbs/mbsebbs.c @@ -103,7 +103,6 @@ int main(int argc, char **argv) Syslog(' ', "MBSEBBS v%s", VERSION); if (ioctl(1, TIOCGWINSZ, &ws) != -1 && (ws.ws_col > 0) && (ws.ws_row > 0)) { - Syslog('b', "columns=%d lines=%d", ws.ws_col, ws.ws_row); cols = ws.ws_col; rows = ws.ws_row; } @@ -124,7 +123,9 @@ int main(int argc, char **argv) if ((p = getenv("REMOTEHOST")) != NULL) Syslog('+', "REMOTEHOST %s", p); if ((p = getenv("TERM")) != NULL) - Syslog('+', "TERM=%s", p); + Syslog('+', "TERM=%s %dx%d", p, cols, rows); + else + Syslog('+', "TERM=invalid %dx%d", cols, rows); if ((p = getenv("LANG")) != NULL) Syslog('+', "LANG=%s", p); if ((p = getenv("LC_ALL")) != NULL) @@ -169,7 +170,7 @@ int main(int argc, char **argv) * Default set the terminal to ANSI mode. If your logo * is in color, the user will see color no mather what. */ - TermInit(1, ws.ws_col, ws.ws_row); + TermInit(1); /* * Now it's time to check if the bbs is open. If not, we diff --git a/mbsebbs/menu.c b/mbsebbs/menu.c index 61eb696c..da62e428 100644 --- a/mbsebbs/menu.c +++ b/mbsebbs/menu.c @@ -607,10 +607,6 @@ void DoMenu(int Type) Chg_News(); break; - case 308: - Chg_ScreenLen(); - break; - case 309: Chg_DOB(); break; diff --git a/mbsebbs/newuser.c b/mbsebbs/newuser.c index 154ecbab..7b9055d1 100644 --- a/mbsebbs/newuser.c +++ b/mbsebbs/newuser.c @@ -211,7 +211,7 @@ int newuser(void) usrconfig.GraphMode = FALSE; } exitinfo.GraphMode = usrconfig.GraphMode; - TermInit(exitinfo.GraphMode, 80, 24); + TermInit(exitinfo.GraphMode); if (CFG.iVoicePhone) { while (1) { @@ -447,27 +447,6 @@ int newuser(void) usrconfig.HotKeys = TRUE; /* Default set it to Hotkeys */ usrconfig.iTimeLeft = 20; /* Set Timeleft in users file to 20 */ - - if ((rows > 18) && (rows < 100)) { - usrconfig.iScreenLen = rows; - Syslog('+', "Using detected screenlength %d", rows); - } else if (CFG.AskScreenlen) { - Enter(1); - /* Please enter your Screen Length [24]: */ - pout(LIGHTMAGENTA, BLACK, (char *) Language(64)); - colour(CFG.InputColourF, CFG.InputColourB); - alarm_on(); - Getnum(temp, 3); - - if(strlen(temp) == 0) - usrconfig.iScreenLen = 24; - else - usrconfig.iScreenLen = atoi(temp); - } else { - usrconfig.iScreenLen = 24; - } - rows = usrconfig.iScreenLen; - TermInit(usrconfig.GraphMode, cols, rows); alarm_on(); usrconfig.tLastPwdChange = ltime; /* Days Since Last Password Change */ diff --git a/mbsebbs/term.c b/mbsebbs/term.c index a072c967..6ae61237 100644 --- a/mbsebbs/term.c +++ b/mbsebbs/term.c @@ -36,16 +36,14 @@ #include "ttyio.h" -int termmode; /* 0 = tty, 1 = ANSI */ -int termx = 80; -int termy = 24; +int termmode; /* 0 = tty, 1 = ANSI */ +extern int cols; +extern int rows; -void TermInit(int mode, int x, int y) +void TermInit(int mode) { termmode = mode; - termx = x; - termy = y; } @@ -147,7 +145,7 @@ void colour(int fg, int bg) void Center(char *string) { int Strlen; - int Maxlen = termx; + int Maxlen = cols; int i, x, z; char *Str; @@ -191,7 +189,7 @@ void locate(int y, int x) char temp[61]; if (termmode > 0) { - if (y > termy || x > termx) { + if (y > rows || x > cols) { snprintf(temp, 61, "ANSI: Invalid screen coordinates: %i, %i\n", y, x); } else { snprintf(temp, 61, "\x1B[%i;%iH", y, x); @@ -222,7 +220,7 @@ void fLine(int Len) void sLine() { - fLine(termx -1); + fLine(cols -1); } diff --git a/mbsebbs/term.h b/mbsebbs/term.h index de533168..4ca78d26 100644 --- a/mbsebbs/term.h +++ b/mbsebbs/term.h @@ -3,7 +3,7 @@ /* $Id$ */ -void TermInit(int, int, int); +void TermInit(int); void Enter(int); void pout(int, int, char *); void poutCR(int, int, char *); diff --git a/mbsebbs/user.c b/mbsebbs/user.c index 0dfe4339..e27109c9 100644 --- a/mbsebbs/user.c +++ b/mbsebbs/user.c @@ -259,7 +259,7 @@ void user(void) UserCity(mypid, usrconfig.Name, usrconfig.sLocation); else UserCity(mypid, usrconfig.Name, (char *)"N/A"); - TermInit(usrconfig.GraphMode, cols, rows); + TermInit(usrconfig.GraphMode); /* * Count simultaneous logins diff --git a/mbsetup/ledit.c b/mbsetup/ledit.c index 34d30efe..2e8be7fa 100644 --- a/mbsetup/ledit.c +++ b/mbsetup/ledit.c @@ -2201,7 +2201,6 @@ char *getmenutype(int val) case 305: return (char *)"Change voice phone"; case 306: return (char *)"Change data phone"; case 307: return (char *)"Change show news bulletins"; - case 308: return (char *)"Change screen length"; case 309: return (char *)"Change date of birth"; case 310: return (char *)"Change language"; case 311: return (char *)"Change hot-keys"; diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index 8cab7a29..de878622 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -453,9 +453,8 @@ void s_newuser(void) mbse_mvprintw( 9,46, "12. One word names"); mbse_mvprintw(10,46, "13. Ask Address"); mbse_mvprintw(11,46, "14. Give email"); - mbse_mvprintw(12,46, "15. Ask screenlen"); - mbse_mvprintw(13,46, "16. Do Newmail"); - mbse_mvprintw(14,46, "17. Do newfiles"); + mbse_mvprintw(12,46, "15. Do Newmail"); + mbse_mvprintw(13,46, "16. Do newfiles"); } @@ -480,11 +479,10 @@ void e_newuser(void) show_bool( 9,68, CFG.iOneName); show_bool(10,68, CFG.AskAddress); show_bool(11,68, CFG.GiveEmail); - show_bool(12,68, CFG.AskScreenlen); - show_asktype(13,68, CFG.AskNewmail); - show_asktype(14,68, CFG.AskNewfiles); + show_asktype(12,68, CFG.AskNewmail); + show_asktype(13,68, CFG.AskNewfiles); - switch(select_menu(17)) { + switch(select_menu(16)) { case 0: return; case 1: E_SEC( 7,28, CFG.newuser_access, "1.7.1 NEWUSER SECURITY", s_newuser) case 2: E_BOOL( 8,28, CFG.iCapUserName, "^Capitalize^ username") @@ -501,11 +499,10 @@ void e_newuser(void) case 12:E_BOOL( 9,68, CFG.iOneName, "Allow ^one word^ (not in Unixmode) usernames") case 13:E_BOOL(10,68, CFG.AskAddress, "Ask users ^home address^ in 3 lines") case 14:E_BOOL(11,68, CFG.GiveEmail, "Give new users an ^private email^ box") - case 15:E_BOOL(12,68, CFG.AskScreenlen, "Ask new user to set the ^screen length^") - case 16:CFG.AskNewmail = edit_asktype(13,68,CFG.AskNewmail, + case 15:CFG.AskNewmail = edit_asktype(12,68,CFG.AskNewmail, (char *)"Set ^new mail^ check at login, toggle wit space, Enter when done"); break; - case 17:CFG.AskNewfiles = edit_asktype(14,68,CFG.AskNewfiles, + case 16:CFG.AskNewfiles = edit_asktype(13,68,CFG.AskNewfiles, (char *)"Set ^new files^ check at login, toggle wit space, Enter when done"); break; } @@ -1996,7 +1993,6 @@ int global_doc(FILE *fp, FILE *toc, int page) add_webtable(wp, (char *)"Allow one word names", getboolean(CFG.iOneName)); add_webtable(wp, (char *)"Ask Address", getboolean(CFG.AskAddress)); add_webtable(wp, (char *)"Give email box", getboolean(CFG.GiveEmail)); - add_webtable(wp, (char *)"Ask Screenlen", getboolean(CFG.AskScreenlen)); add_webtable(wp, (char *)"Do newmail check", get_asktype(CFG.AskNewmail)); add_webtable(wp, (char *)"Do newfiles check", get_asktype(CFG.AskNewfiles)); fprintf(wp, "\n"); @@ -2019,7 +2015,6 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " One word names %s\n", getboolean(CFG.iOneName)); fprintf(fp, " Ask address %s\n", getboolean(CFG.AskAddress)); fprintf(fp, " Give email box %s\n", getboolean(CFG.GiveEmail)); - fprintf(fp, " Ask Screenlen %s\n", getboolean(CFG.AskScreenlen)); fprintf(fp, " Do newmail check %s\n", get_asktype(CFG.AskNewmail)); fprintf(fp, " Do newfiles check %s\n", get_asktype(CFG.AskNewfiles)); diff --git a/mbsetup/m_users.c b/mbsetup/m_users.c index ada2669e..cf5146ae 100644 --- a/mbsetup/m_users.c +++ b/mbsetup/m_users.c @@ -297,18 +297,17 @@ void Screen2(void) mbse_mvprintw(17, 2, "12. Archiver"); mbse_mvprintw(18, 2, "13. Charset"); - mbse_mvprintw( 7,63, "14. Screenlen"); - mbse_mvprintw( 8,63, "15. Language"); - mbse_mvprintw( 9,63, "16. Hotkeys"); - mbse_mvprintw(10,63, "17. Color"); - mbse_mvprintw(11,63, "18. Silent"); - mbse_mvprintw(12,63, "19. CLS"); - mbse_mvprintw(13,63, "20. More"); - mbse_mvprintw(14,63, "21. Editor"); - mbse_mvprintw(15,63, "22. MailScan"); - mbse_mvprintw(16,63, "23. ShowNews"); - mbse_mvprintw(17,63, "24. NewFiles"); - mbse_mvprintw(18,63, "25. Emacs"); + mbse_mvprintw( 7,63, "14. Language"); + mbse_mvprintw( 8,63, "15. Hotkeys"); + mbse_mvprintw( 9,63, "16. Color"); + mbse_mvprintw(10,63, "17. Silent"); + mbse_mvprintw(11,63, "18. CLS"); + mbse_mvprintw(12,63, "19. More"); + mbse_mvprintw(13,63, "20. Editor"); + mbse_mvprintw(14,63, "21. MailScan"); + mbse_mvprintw(15,63, "22. ShowNews"); + mbse_mvprintw(16,63, "23. NewFiles"); + mbse_mvprintw(17,63, "24. Emacs"); } @@ -332,19 +331,18 @@ void Fields2(void) show_str( 17,17, 5,usrconfig.Archiver); show_charset(18,17,usrconfig.Charset); - show_int( 7,76, usrconfig.iScreenLen); snprintf(temp, 4, "%c",usrconfig.iLanguage); - show_str( 8,76,1, temp); - show_bool( 9,76, usrconfig.HotKeys); - show_bool(10,76, usrconfig.GraphMode); - show_bool(11,76, usrconfig.DoNotDisturb); - show_bool(12,76, usrconfig.Cls); - show_bool(13,76, usrconfig.More); - show_msgeditor(14,76, usrconfig.MsgEditor); - show_bool(15,76, usrconfig.MailScan); - show_bool(16,76, usrconfig.ieNEWS); - show_bool(17,76, usrconfig.ieFILE); - show_bool(18,76, usrconfig.FSemacs); + show_str( 7,76,1, temp); + show_bool( 8,76, usrconfig.HotKeys); + show_bool( 9,76, usrconfig.GraphMode); + show_bool(10,76, usrconfig.DoNotDisturb); + show_bool(11,76, usrconfig.Cls); + show_bool(12,76, usrconfig.More); + show_msgeditor(13,76, usrconfig.MsgEditor); + show_bool(14,76, usrconfig.MailScan); + show_bool(15,76, usrconfig.ieNEWS); + show_bool(16,76, usrconfig.ieFILE); + show_bool(17,76, usrconfig.FSemacs); } @@ -357,7 +355,7 @@ int EditUsrRec2(void) Screen2(); for (;;) { Fields2(); - j = select_menu(25); + j = select_menu(24); switch(j) { case 0: return 0; case 1: E_STR( 6,17,35,usrconfig.sHandle, "The ^Handle^ of this user") @@ -426,22 +424,21 @@ int EditUsrRec2(void) break; case 13:usrconfig.Charset = edit_charset(18,17, usrconfig.Charset); break; - case 14:E_INT( 7,76,usrconfig.iScreenLen, "Users ^Screen length^ in lines (about 24)") - case 15:usrconfig.iLanguage = PickLanguage((char *)"15.15"); + case 14:usrconfig.iLanguage = PickLanguage((char *)"15.14"); clr_index(); Screen2(); break; - case 16:E_BOOL( 9,76,usrconfig.HotKeys, "Is user using ^HotKeys^ for menus") - case 17:E_BOOL(10,76,usrconfig.GraphMode, "Is user using ^ANSI^ colors") - case 18:E_BOOL(11,76,usrconfig.DoNotDisturb, "User will not be ^disturbed^") - case 19:E_BOOL(12,76,usrconfig.Cls, "Send ^ClearScreen code^ to users terminal") - case 20:E_BOOL(13,76,usrconfig.More, "User uses the ^More prompt^") - case 21:usrconfig.MsgEditor = edit_msgeditor(14,76,usrconfig.MsgEditor); + case 15:E_BOOL( 8,76,usrconfig.HotKeys, "Is user using ^HotKeys^ for menus") + case 16:E_BOOL( 9,76,usrconfig.GraphMode, "Is user using ^ANSI^ colors") + case 17:E_BOOL(10,76,usrconfig.DoNotDisturb, "User will not be ^disturbed^") + case 18:E_BOOL(11,76,usrconfig.Cls, "Send ^ClearScreen code^ to users terminal") + case 19:E_BOOL(12,76,usrconfig.More, "User uses the ^More prompt^") + case 20:usrconfig.MsgEditor = edit_msgeditor(13,76,usrconfig.MsgEditor); break; - case 22:E_BOOL(15,76,usrconfig.MailScan, "Don't check for ^new mail^") - case 23:E_BOOL(16,76,usrconfig.ieNEWS, "Show ^News Bulletins^ when logging in") - case 24:E_BOOL(17,76,usrconfig.ieFILE, "Show ^New Files^ when logging in") - case 25:E_BOOL(18,76,usrconfig.FSemacs, "Use ^Emacs^ or Wordstart shorcut keys in FS editor") + case 21:E_BOOL(14,76,usrconfig.MailScan, "Don't check for ^new mail^") + case 22:E_BOOL(15,76,usrconfig.ieNEWS, "Show ^News Bulletins^ when logging in") + case 23:E_BOOL(16,76,usrconfig.ieFILE, "Show ^New Files^ when logging in") + case 24:E_BOOL(17,76,usrconfig.FSemacs, "Use ^Emacs^ or Wordstart shorcut keys in FS editor") } } } @@ -747,7 +744,6 @@ void users_doc(void) add_webtable(wp, (char *)"Protocol", usrconfig.sProtocol); add_webtable(wp, (char *)"Archiver", usrconfig.Archiver); add_webtable(wp, (char *)"Character set", getftnchrs(usrconfig.Charset)); - add_webdigit(wp, (char *)"Screen length", usrconfig.iScreenLen); snprintf(temp, 4, "%c", usrconfig.iLanguage); add_webtable(wp, (char *)"Language", temp); add_webtable(wp, (char *)"Use hotkeys", getboolean(usrconfig.HotKeys)); diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index 9d80b86c..fbaf4776 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -225,7 +225,6 @@ void load_maincfg(void) CFG.iAttachLevel = 100; CFG.new_groups = 25; CFG.max_logins = 1; - CFG.AskScreenlen = TRUE; CFG.AskNewmail = YES; CFG.AskNewfiles = YES;