diff options
Diffstat (limited to 'cord/tests/de_win.c')
-rw-r--r-- | cord/tests/de_win.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/cord/tests/de_win.c b/cord/tests/de_win.c index 2715c413..4a43801d 100644 --- a/cord/tests/de_win.c +++ b/cord/tests/de_win.c @@ -160,9 +160,9 @@ char * control_chars(char * text, size_t len) int char_width; int char_height; -void get_line_rect(int line, int win_width, RECT * rectp) +void get_line_rect(int line_arg, int win_width, RECT * rectp) { - rectp -> top = line * (LONG)char_height; + rectp -> top = line_arg * (LONG)char_height; rectp -> bottom = rectp->top + char_height; rectp -> left = 0; rectp -> right = win_width; @@ -201,7 +201,7 @@ INT_PTR CALLBACK AboutBoxCallback( HWND hDlg, UINT message, return FALSE; } -LRESULT CALLBACK WndProc (HWND hwnd, UINT message, +LRESULT CALLBACK WndProc (HWND hwnd_arg, UINT message, WPARAM wParam, LPARAM lParam) { static HINSTANCE hInstance; @@ -218,13 +218,13 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, { case WM_CREATE: hInstance = ( (LPCREATESTRUCT) lParam)->hInstance; - dc = GetDC(hwnd); + dc = GetDC(hwnd_arg); SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); GetTextMetrics(dc, &tm); - ReleaseDC(hwnd, dc); + ReleaseDC(hwnd_arg, dc); char_width = tm.tmAveCharWidth; char_height = tm.tmHeight + tm.tmExternalLeading; - GetClientRect(hwnd, &client_area); + GetClientRect(hwnd_arg, &client_area); COLS = (client_area.right - client_area.left)/char_width; LINES = (client_area.bottom - client_area.top)/char_height; generic_init(); @@ -232,21 +232,21 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, case WM_CHAR: if (wParam == QUIT) { - SendMessage( hwnd, WM_CLOSE, 0, 0L ); + SendMessage(hwnd_arg, WM_CLOSE, 0, 0L); } else { do_command((int)wParam); } return(0); case WM_SETFOCUS: - CreateCaret(hwnd, NULL, char_width, char_height); - ShowCaret(hwnd); + CreateCaret(hwnd_arg, NULL, char_width, char_height); + ShowCaret(hwnd_arg); caret_visible = 1; update_cursor(); return(0); case WM_KILLFOCUS: - HideCaret(hwnd); + HideCaret(hwnd_arg); DestroyCaret(); caret_visible = 0; return(0); @@ -270,13 +270,13 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, } else { switch(id) { case IDM_FILEEXIT: - SendMessage( hwnd, WM_CLOSE, 0, 0L ); + SendMessage(hwnd_arg, WM_CLOSE, 0, 0L); return( 0 ); case IDM_HELPABOUT: if( DialogBox( hInstance, TEXT("ABOUTBOX"), - hwnd, AboutBoxCallback ) ) - InvalidateRect( hwnd, NULL, TRUE ); + hwnd_arg, AboutBoxCallback ) ) + InvalidateRect(hwnd_arg, NULL, TRUE); return( 0 ); case IDM_HELPCONTENTS: de_error( @@ -289,7 +289,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, break; case WM_CLOSE: - DestroyWindow( hwnd ); + DestroyWindow(hwnd_arg); return 0; case WM_DESTROY: @@ -298,8 +298,8 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, return 0; case WM_PAINT: - dc = BeginPaint(hwnd, &ps); - GetClientRect(hwnd, &client_area); + dc = BeginPaint(hwnd_arg, &ps); + GetClientRect(hwnd_arg, &client_area); COLS = (client_area.right - client_area.left)/char_width; LINES = (client_area.bottom - client_area.top)/char_height; SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); @@ -335,11 +335,11 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, control, (int)strlen(control)); } } - EndPaint(hwnd, &ps); + EndPaint(hwnd_arg, &ps); screen_was_painted = 1; return 0; } - return DefWindowProc (hwnd, message, wParam, lParam); + return DefWindowProc(hwnd_arg, message, wParam, lParam); } int last_col; @@ -361,11 +361,11 @@ void update_cursor(void) void invalidate_line(int i) { - RECT line; + RECT line_r; if (!screen_was_painted) return; /* Invalidating a rectangle before painting seems result in a */ /* major performance problem. */ - get_line_rect(i, COLS*char_width, &line); - InvalidateRect(hwnd, &line, FALSE); + get_line_rect(i, COLS*char_width, &line_r); + InvalidateRect(hwnd, &line_r, FALSE); } |