From: H.G. Muller Date: Tue, 13 Sep 2011 17:52:19 +0000 (+0200) Subject: Move HistorySet to back-end X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=4103b43cdbc7412da6a2a95e0e1882a3872a2d12;p=xboard.git Move HistorySet to back-end This existed in exact duplicates in both front-ends. --- diff --git a/backend.c b/backend.c index cb36909..64b5f3d 100644 --- a/backend.c +++ b/backend.c @@ -1662,6 +1662,16 @@ InitBackEnd3 P((void)) } } +void +HistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current ) +{ + MoveHistorySet( movelist, first, last, current, pvInfoList ); + + EvalGraphSet( first, last, current, pvInfoList ); + + MakeEngineOutputTitle(); +} + /* * Establish will establish a contact to a remote host.port. * Sets icsPR to a ProcRef for a process (or pseudo-process) diff --git a/backend.h b/backend.h index b1f7500..6f08f91 100644 --- a/backend.h +++ b/backend.h @@ -422,5 +422,8 @@ void SettingsPopUp P((ChessProgramState *cps)); // [HGM] really in front-end, bu int WaitForEngine P((ChessProgramState *cps, DelayedEventCallback x)); void Load P((ChessProgramState *cps, int n)); int MultiPV P((ChessProgramState *cps)); +void MoveHistorySet P(( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo )); +void EvalGraphSet P(( int first, int last, int current, ChessProgramStats_Move * pvInfo )); +void MakeEngineOutputTitle P((void)); #endif /* _BACKEND */ diff --git a/winboard/winboard.c b/winboard/winboard.c index 7c97f6c..388bcc5 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -9866,16 +9866,6 @@ Tween(start, mid, finish, factor, frames, nFrames) } void -HistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current ) -{ - MoveHistorySet( movelist, first, last, current, pvInfoList ); - - EvalGraphSet( first, last, current, pvInfoList ); - - MakeEngineOutputTitle(); -} - -void SettingsPopUp(ChessProgramState *cps) { // [HGM] wrapper needed because handles must not be passed through back-end EngineOptionsPopup(savedHwnd, cps); diff --git a/winboard/winboard.h b/winboard/winboard.h index 115dd86..2dc1659 100644 --- a/winboard/winboard.h +++ b/winboard/winboard.h @@ -200,10 +200,8 @@ BOOL GetActualPlacement( HWND hWnd, WindowPlacement * wp ); VOID MoveHistoryPopUp(); VOID MoveHistoryPopDown(); -VOID MoveHistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo ); extern HWND moveHistoryDialog; -VOID EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo ); VOID EvalGraphPopUp(); VOID EvalGraphPopDown(); extern HWND evalGraphDialog; diff --git a/xhistory.c b/xhistory.c index 0d18bf2..7bd3cb7 100644 --- a/xhistory.c +++ b/xhistory.c @@ -63,7 +63,6 @@ void RefreshMemoContent P((void)); void MemoContentUpdated P((void)); void FindMoveByCharIndex P(( int char_index )); -void MoveHistorySet P(( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo )); // variables in xoptions.c extern Option historyOptions[]; @@ -163,18 +162,3 @@ HistoryShowProc(w, event, prms, nprms) } else PopDown(7); ToNrEvent(currentMove); } - -// duplicate of code in winboard.c, so an move to back-end! -void EvalGraphSet P(( int first, int last, int current, ChessProgramStats_Move * pvInfo )); -void MakeEngineOutputTitle P(()); - -void -HistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current ) -{ - MoveHistorySet( movelist, first, last, current, pvInfoList ); - - EvalGraphSet( first, last, current, pvInfoList ); - - MakeEngineOutputTitle(); -} -