static void GotoLine( a_window *wnd ) { long line; mad_radix old_radix; wnd_row curr_row; int curr_piece; old_radix = NewCurrRadix( 10 ); WndGetCurrent( wnd, &curr_row, &curr_piece ); if( curr_row < 0 || curr_row == WND_NO_ROW ) { line = WndTop( wnd ); } else { line = curr_row; } ++line; if( DlgLongExpr( LIT_DUI( New_Line ), &line ) ) { --line; WndDirtyCurr( wnd ); Centre( wnd, line ); WndNewCurrent( wnd, line, PIECE_SOURCE ); } NewCurrRadix( old_radix ); }
static void GotoLine( a_window *wnd ) { long line; unsigned old; wnd_row row; int piece; old = NewCurrRadix( 10 ); WndGetCurrent( wnd, &row, &piece ); if( row < 0 || row == WND_NO_ROW ) { line = WndTop( wnd ); } else { line = row; } ++line; if( DlgLongExpr( LIT( New_Line ), &line ) ) { --line; WndDirtyCurr( wnd ); Centre( wnd, line ); WndNewCurrent( wnd, line, PIECE_SOURCE ); } NewCurrRadix( old ); }