From: Arun Persaud Date: Sun, 21 Nov 2010 00:19:32 +0000 (-0800) Subject: Revert "bugfix: fixed readline support with icslogon option" X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=3b417f05cba6e7b573d351790ef28cc2476fc407;p=xboard.git Revert "bugfix: fixed readline support with icslogon option" This reverts commit b9cdd7422ad1037d7376bce4f8f2db2669396e83. Conflicts: backend.c better to use the (relatively) new ICS input box then add readline support. --- diff --git a/backend.c b/backend.c index 361fb86..bc35e34 100644 --- a/backend.c +++ b/backend.c @@ -1089,16 +1089,16 @@ ParseTimeControl(tc, ti, mps) if(mps) snprintf(buf, MSG_SIZ, ":%d/%s+%g", mps, mytc, ti); - else + else snprintf(buf, MSG_SIZ, ":%s+%g", mytc, ti); } else { if(mps) snprintf(buf, MSG_SIZ, ":%d/%s", mps, mytc); - else + else snprintf(buf, MSG_SIZ, ":%s", mytc); } fullTimeControlString = StrSave(buf); // this should now be in PGN format - + if( NextTimeControlFromString( &tc, &tc1 ) != 0 ) { return FALSE; } @@ -3116,25 +3116,17 @@ read_from_ics(isr, closure, data, count, error) if (!have_sent_ICS_logon && looking_at(buf, &i, "login:")) { ICSInitScript(); have_sent_ICS_logon = 1; - /* if we don't send the login/password via icsLogon, use special readline - code for it */ - if (strlen(appData.icsLogon)==0) - { - sending_ICS_password = 0; // in case we come back to login - sending_ICS_login = 1; - }; + sending_ICS_password = 0; // in case we come back to login + sending_ICS_login = 1; continue; } /* need to shadow the password */ if (!sending_ICS_password && looking_at(buf, &i, "password:")) { - /* if we don't send the login/password via icsLogon, use special readline - code for it */ - if (strlen(appData.icsLogon)==0) - sending_ICS_password = 1; + sending_ICS_password = 1; continue; } - - if (ics_getting_history != H_GETTING_MOVES /*smpos kludge*/ && + + if (ics_getting_history != H_GETTING_MOVES /*smpos kludge*/ && (looking_at(buf, &i, "\n<12> ") || looking_at(buf, &i, "<12> "))) { loggedOn = TRUE; @@ -6082,15 +6074,15 @@ UserMoveEvent(fromX, fromY, toX, toY, promoChar) pup = boards[currentMove][toY][toX]; /* [HGM] If move started in holdings, it means a drop. Convert to standard form */ - if( fromX == BOARD_LEFT-2 || fromX == BOARD_RGHT+1) { + if( fromX == BOARD_LEFT-2 || fromX == BOARD_RGHT+1) { if( pup != EmptySquare ) return; moveType = WhiteOnMove(currentMove) ? WhiteDrop : BlackDrop; - if(appData.debugMode) fprintf(debugFP, "Drop move %d, curr=%d, x=%d,y=%d, p=%d\n", + if(appData.debugMode) fprintf(debugFP, "Drop move %d, curr=%d, x=%d,y=%d, p=%d\n", moveType, currentMove, fromX, fromY, boards[currentMove][fromY][fromX]); // holdings might not be sent yet in ICS play; we have to figure out which piece belongs here if(fromX == 0) fromY = BOARD_HEIGHT-1 - fromY; // black holdings upside-down fromX = fromX ? WhitePawn : BlackPawn; // first piece type in selected holdings - while(PieceToChar(fromX) == '.' || PieceToNumber(fromX) != fromY && fromX != (int) EmptySquare) fromX++; + while(PieceToChar(fromX) == '.' || PieceToNumber(fromX) != fromY && fromX != (int) EmptySquare) fromX++; fromY = DROP_RANK; } @@ -8685,8 +8677,8 @@ ApplyMove(fromX, fromY, toX, toY, promoChar, board) } else if(!appData.testLegality && promoChar != NULLCHAR && promoChar != '=') { // without legality testing, unconditionally believe promoChar board[toY][toX] = CharToPiece(piece < BlackPawn ? ToUpper(promoChar) : ToLower(promoChar)); } - if((gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat) - && promoChar != NULLCHAR && gameInfo.holdingsSize) { + if((gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat) + && promoChar != NULLCHAR && gameInfo.holdingsSize) { // [HGM] superchess: take promotion piece out of holdings int k = PieceToNumber(CharToPiece(ToUpper(promoChar))); if((int)piece < (int)BlackPawn) { // determine stm from piece color diff --git a/xboard.c b/xboard.c index 3050105..e08a5f5 100644 --- a/xboard.c +++ b/xboard.c @@ -8180,8 +8180,7 @@ DoInputCallback(closure, source, xid) /* read from stdin */ rl_callback_read_char(); - - /* redisplay the current line, check special case for login and password */ + /* redisplay the current line */ if(sending_ICS_password) { int i; char buf[MSG_SIZ];