Commit 9d4f32e8 authored by Juanma Barranquero's avatar Juanma Barranquero

src/w32*.c: Whitespace fixes and typos.

parent 9650fc61
This diff is collapsed.
......@@ -286,7 +286,7 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start, register in
}
}
extern unsigned char *encode_terminal_code P_ ((struct glyph *, int,
extern unsigned char *encode_terminal_code P_ ((struct glyph *, int,
struct coding_system *));
static void
......@@ -438,7 +438,7 @@ w32con_reset_terminal_modes (struct terminal *t)
FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r);
/* Now that the screen is clear, put the cursor at the top. */
SetConsoleCursorPosition (cur_screen, dest);
#ifdef USE_SEPARATE_SCREEN
SetConsoleActiveScreenBuffer (prev_screen);
#else
......@@ -562,19 +562,19 @@ initialize_w32_display (struct terminal *term)
term->rif = 0; /* No window based redisplay on the console. */
term->cursor_to_hook = w32con_move_cursor;
term->raw_cursor_to_hook = w32con_move_cursor;
term->clear_to_end_hook = w32con_clear_to_end;
term->clear_frame_hook = w32con_clear_frame;
term->raw_cursor_to_hook = w32con_move_cursor;
term->clear_to_end_hook = w32con_clear_to_end;
term->clear_frame_hook = w32con_clear_frame;
term->clear_end_of_line_hook = w32con_clear_end_of_line;
term->ins_del_lines_hook = w32con_ins_del_lines;
term->insert_glyphs_hook = w32con_insert_glyphs;
term->write_glyphs_hook = w32con_write_glyphs;
term->delete_glyphs_hook = w32con_delete_glyphs;
term->ins_del_lines_hook = w32con_ins_del_lines;
term->insert_glyphs_hook = w32con_insert_glyphs;
term->write_glyphs_hook = w32con_write_glyphs;
term->delete_glyphs_hook = w32con_delete_glyphs;
term->ring_bell_hook = w32_sys_ring_bell;
term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
term->set_terminal_modes_hook = w32con_set_terminal_modes;
term->set_terminal_window_hook = w32con_set_terminal_window;
term->update_begin_hook = w32con_update_begin;
term->set_terminal_window_hook = w32con_set_terminal_window;
term->update_begin_hook = w32con_update_begin;
term->update_end_hook = w32con_update_end;
term->read_socket_hook = w32_console_read_socket;
......@@ -618,8 +618,8 @@ initialize_w32_display (struct terminal *term)
/* Respect setting of LINES and COLUMNS environment variables. */
{
char * lines = getenv("LINES");
char * columns = getenv("COLUMNS");
char * lines = getenv ("LINES");
char * columns = getenv ("COLUMNS");
if (lines != NULL && columns != NULL)
{
......
......@@ -245,7 +245,7 @@ struct MONITOR_INFO
};
/* Reportedly, VS 6 does not have this in its headers. */
#if defined(_MSC_VER) && _MSC_VER < 1300
#if defined (_MSC_VER) && _MSC_VER < 1300
DECLARE_HANDLE(HMONITOR);
#endif
......@@ -1941,7 +1941,6 @@ x_set_title (f, name, old_name)
}
}
void x_set_scroll_bar_default_width (f)
struct frame *f;
{
......@@ -3169,7 +3168,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
/* Get buffer size. */
size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0);
buffer = alloca(size);
buffer = alloca (size);
size = get_composition_string_fn (context, GCS_RESULTSTR,
buffer, size);
release_ime_context_fn (hwnd, context);
......@@ -4007,7 +4006,6 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
return DefWindowProc (hwnd, msg, wParam, lParam);
}
/* The most common default return code for handled messages is 0. */
return 0;
}
......@@ -4460,7 +4458,6 @@ This function is an internal primitive--use `make-frame' instead. */)
x_default_parameter (f, parameters, Qright_fringe, Qnil,
"rightFringe", "RightFringe", RES_TYPE_NUMBER);
/* Init faces before x_default_parameter is called for scroll-bar
parameters because that function calls x_set_scroll_bar_width,
which calls change_frame_size, which calls Fset_window_buffer,
......
......@@ -568,7 +568,7 @@ w32font_draw (s, from, to, x, y, with_background)
/* Save clip region for later restoration. */
orig_clip = CreateRectRgn (0, 0, 0, 0);
if (!GetClipRgn(s->hdc, orig_clip))
if (!GetClipRgn (s->hdc, orig_clip))
{
DeleteObject (orig_clip);
orig_clip = NULL;
......@@ -1833,7 +1833,7 @@ w32_registry (w32_charset, font_type)
return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown;
charset = w32_to_x_charset (w32_charset, NULL);
return font_intern_prop (charset, strlen(charset), 1);
return font_intern_prop (charset, strlen (charset), 1);
}
static int
......@@ -1847,7 +1847,7 @@ w32_decode_weight (fnweight)
if (fnweight >= FW_NORMAL) return 100;
if (fnweight >= FW_LIGHT) return 50;
if (fnweight >= FW_EXTRALIGHT) return 40;
if (fnweight > FW_THIN) return 20;
if (fnweight > FW_THIN) return 20;
return 0;
}
......@@ -1862,7 +1862,7 @@ w32_encode_weight (n)
if (n >= 100) return FW_NORMAL;
if (n >= 50) return FW_LIGHT;
if (n >= 40) return FW_EXTRALIGHT;
if (n >= 20) return FW_THIN;
if (n >= 20) return FW_THIN;
return 0;
}
......@@ -1873,9 +1873,9 @@ w32_to_fc_weight (n)
int n;
{
if (n >= FW_EXTRABOLD) return intern ("black");
if (n >= FW_BOLD) return intern ("bold");
if (n >= FW_SEMIBOLD) return intern ("demibold");
if (n >= FW_NORMAL) return intern ("medium");
if (n >= FW_BOLD) return intern ("bold");
if (n >= FW_SEMIBOLD) return intern ("demibold");
if (n >= FW_NORMAL) return intern ("medium");
return intern ("light");
}
......@@ -1966,7 +1966,6 @@ fill_in_logfont (f, logfont, font_spec)
logfont->lfPitchAndFamily = family | DEFAULT_PITCH;
}
/* Set pitch based on the spacing property. */
tmp = AREF (font_spec, FONT_SPACING_INDEX);
if (INTEGERP (tmp))
......@@ -2317,7 +2316,8 @@ w32font_full_name (font, font_obj, pixel_size, name, nbytes)
is written. If the buffer is not large enough to contain the name,
the function returns -1, otherwise it returns the number of bytes
written to FCNAME. */
static int logfont_to_fcname(font, pointsize, fcname, size)
static int
logfont_to_fcname (font, pointsize, fcname, size)
LOGFONT* font;
int pointsize;
char *fcname;
......
......@@ -279,7 +279,7 @@ round_heap (unsigned long align)
sbrk (need_to_alloc);
}
#if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined(USE_CRT_DLL))
#if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined (USE_CRT_DLL))
/* MSVC 4.2 invokes these functions from mainCRTStartup to initialize
a heap via HeapCreate. They are normally defined by the runtime,
......
......@@ -582,8 +582,8 @@ w32_console_mouse_position (FRAME_PTR *f,
*part = 0;
SELECTED_FRAME ()->mouse_moved = 0;
XSETINT(*x, movement_pos.X);
XSETINT(*y, movement_pos.Y);
XSETINT (*x, movement_pos.X);
XSETINT (*y, movement_pos.Y);
*time = movement_time;
UNBLOCK_INPUT;
......
......@@ -99,7 +99,7 @@ static int is_simple_dialog P_ ((Lisp_Object));
static Lisp_Object simple_dialog_show P_ ((FRAME_PTR, Lisp_Object, Lisp_Object));
#endif
void w32_free_menu_strings P_((HWND));
void w32_free_menu_strings P_ ((HWND));
/* This is set nonzero after the user activates the menu bar, and set
......@@ -1026,7 +1026,7 @@ w32_dialog_show (f, keymaps, title, header, error)
Lisp_Object title, header;
char **error;
{
int i, nb_buttons=0;
int i, nb_buttons = 0;
char dialog_name[6];
int menu_item_selection;
......@@ -1127,7 +1127,7 @@ w32_dialog_show (f, keymaps, title, header, error)
/* Frame title: 'Q' = Question, 'I' = Information.
Can also have 'E' = Error if, one day, we want
a popup for errors. */
if (NILP(header))
if (NILP (header))
dialog_name[0] = 'Q';
else
dialog_name[0] = 'I';
......@@ -1213,7 +1213,8 @@ w32_dialog_show (f, keymaps, title, header, error)
anywhere in Emacs that uses the other specific dialog choices that
MessageBox provides. */
static int is_simple_dialog (contents)
static int
is_simple_dialog (contents)
Lisp_Object contents;
{
Lisp_Object options = XCDR (contents);
......@@ -1249,7 +1250,8 @@ static int is_simple_dialog (contents)
return !(CONSP (options));
}
static Lisp_Object simple_dialog_show (f, contents, header)
static Lisp_Object
simple_dialog_show (f, contents, header)
FRAME_PTR f;
Lisp_Object contents, header;
{
......@@ -1328,7 +1330,6 @@ name_is_separator (name)
return (*name == '\0' || start + 2 == name);
}
/* Indicate boundary between left and right. */
static int
add_left_right_boundary (HMENU menu)
......@@ -1712,7 +1713,8 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
#endif /* HAVE_MENUS */
}
void syms_of_w32menu ()
void
syms_of_w32menu ()
{
globals_of_w32menu ();
......@@ -1734,9 +1736,10 @@ void syms_of_w32menu ()
variable initialized is 0 and directly from main when initialized
is non zero.
*/
void globals_of_w32menu ()
void
globals_of_w32menu ()
{
/* See if Get/SetMenuItemInfo functions are available. */
/* See if Get/SetMenuItemInfo functions are available. */
HMODULE user32 = GetModuleHandle ("user32.dll");
get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA");
set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA");
......
......@@ -46,7 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <windows.h>
#ifdef __GNUC__
/* This definition is missing from mingw32 headers. */
extern BOOL WINAPI IsValidLocale(LCID, DWORD);
extern BOOL WINAPI IsValidLocale (LCID, DWORD);
#endif
#ifdef HAVE_LANGINFO_CODESET
......@@ -167,7 +167,7 @@ new_child (void)
child_process *cp;
DWORD id;
for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--)
for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
if (!CHILD_ACTIVE (cp))
goto Initialise;
if (child_proc_count == MAX_CHILDREN)
......@@ -175,7 +175,7 @@ new_child (void)
cp = &child_procs[child_proc_count++];
Initialise:
memset (cp, 0, sizeof(*cp));
memset (cp, 0, sizeof (*cp));
cp->fd = -1;
cp->pid = -1;
cp->procinfo.hProcess = NULL;
......@@ -267,7 +267,7 @@ find_child_pid (DWORD pid)
{
child_process *cp;
for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--)
for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
if (CHILD_ACTIVE (cp) && pid == cp->pid)
return cp;
return NULL;
......@@ -398,7 +398,7 @@ create_child (char *exe, char *cmdline, char *env, int is_gui_app,
return TRUE;
EH_Fail:
DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError()););
DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError ()););
return FALSE;
}
......@@ -494,7 +494,7 @@ sys_wait (int *status)
}
else
{
for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--)
for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
/* some child_procs might be sockets; ignore them */
if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess
&& (cp->fd < 0 || (fd_info[cp->fd].flags & FILE_AT_EOF) != 0))
......@@ -891,7 +891,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
escape_char = is_cygnus_app ? '"' : '\\';
}
/* Cygwin apps needs quoting a bit more often */
/* Cygwin apps needs quoting a bit more often. */
if (escape_char == '"')
sepchars = "\r\n\t\f '";
......@@ -1241,7 +1241,7 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
count_children:
/* Add handles of child processes. */
nc = 0;
for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--)
for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--)
/* Some child_procs might be sockets; ignore them. Also some
children may have died already, but we haven't finished reading
the process output; ignore them too. */
......@@ -1719,7 +1719,7 @@ also loaded immediately if not already loaded. If winsock is loaded,
the winsock local hostname is returned (since this may be different from
the value of `system-name' and should supplant it), otherwise t is
returned to indicate winsock support is present. */)
(load_now)
(load_now)
Lisp_Object load_now;
{
int have_winsock;
......@@ -1797,7 +1797,7 @@ DEFUN ("w32-long-file-name", Fw32_long_file_name, Sw32_long_file_name,
doc: /* Return the long file name version of the full path of FILENAME.
If FILENAME does not exist, return nil.
All path elements in FILENAME are converted to their long names. */)
(filename)
(filename)
Lisp_Object filename;
{
char longname[ MAX_PATH ];
......@@ -1835,7 +1835,7 @@ PRIORITY should be one of the symbols high, normal, or low;
any other symbol will be interpreted as normal.
If successful, the return value is t, otherwise nil. */)
(process, priority)
(process, priority)
Lisp_Object process, priority;
{
HANDLE proc_handle = GetCurrentProcess ();
......@@ -1881,7 +1881,8 @@ If successful, the return value is t, otherwise nil. */)
#ifdef HAVE_LANGINFO_CODESET
/* Emulation of nl_langinfo. Used in fns.c:Flocale_info. */
char *nl_langinfo (nl_item item)
char *
nl_langinfo (nl_item item)
{
/* Conversion of Posix item numbers to their Windows equivalents. */
static const LCTYPE w32item[] = {
......@@ -2009,13 +2010,14 @@ human-readable form. */)
return make_number (GetThreadLocale ());
}
DWORD int_from_hex (char * s)
DWORD
int_from_hex (char * s)
{
DWORD val = 0;
static char hex[] = "0123456789abcdefABCDEF";
char * p;
while (*s && (p = strchr(hex, *s)) != NULL)
while (*s && (p = strchr (hex, *s)) != NULL)
{
unsigned digit = p - hex;
if (digit > 15)
......@@ -2030,7 +2032,8 @@ DWORD int_from_hex (char * s)
function isn't given a context pointer. */
Lisp_Object Vw32_valid_locale_ids;
BOOL CALLBACK enum_locale_fn (LPTSTR localeNum)
BOOL CALLBACK
enum_locale_fn (LPTSTR localeNum)
{
DWORD id = int_from_hex (localeNum);
Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids);
......@@ -2095,7 +2098,8 @@ If successful, the new locale id is returned, otherwise nil. */)
function isn't given a context pointer. */
Lisp_Object Vw32_valid_codepages;
BOOL CALLBACK enum_codepage_fn (LPTSTR codepageNum)
BOOL CALLBACK
enum_codepage_fn (LPTSTR codepageNum)
{
DWORD id = atoi (codepageNum);
Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages);
......@@ -2271,6 +2275,7 @@ If successful, the new layout id is returned, otherwise nil. */)
}
void
syms_of_ntproc ()
{
DEFSYM (Qhigh, "high");
......
......@@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
* (CF_UNICODETEXT), when a well-known console codepage is given, they
* apply to the console version of the clipboard data (CF_OEMTEXT),
* else they apply to the normal 8-bit text clipboard (CF_TEXT).
*
*
* When pasting (getting data from the OS), the clipboard format that
* matches the {next-}selection-coding-system is retrieved. If
* Unicode is requested, but not available, 8-bit text (CF_TEXT) is
......@@ -45,13 +45,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*
* Scenarios to use the facilities for customizing the selection
* coding system are:
*
*
* ;; Generally use KOI8-R instead of the russian MS codepage for
* ;; the 8-bit clipboard.
* (set-selection-coding-system 'koi8-r-dos)
*
*
* Or
*
*
* ;; Create a special clipboard copy function that uses codepage
* ;; 1253 (Greek) to copy Greek text to a specific non-Unicode
* ;; application.
......@@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
* types should be supported is also moved to Lisp, functionality
* could be expanded to CF_HTML, CF_RTF and maybe other types.
*/
#include <config.h>
#include <setjmp.h>
#include "lisp.h"
......@@ -220,11 +220,11 @@ convert_to_handle_as_coded (Lisp_Object coding_system)
unsigned char *dst = NULL;
struct coding_system coding;
ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",
ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",
SDATA (SYMBOL_NAME (coding_system))));
setup_windows_coding_system (coding_system, &coding);
coding.dst_bytes = SBYTES(current_text) * 2;
coding.dst_bytes = SBYTES (current_text) * 2;
coding.destination = (unsigned char *) xmalloc (coding.dst_bytes);
encode_coding_object (&coding, current_text, 0, 0,
SCHARS (current_text), SBYTES (current_text), Qnil);
......@@ -290,7 +290,7 @@ render (Lisp_Object oformat)
if (SetClipboardData (format, htext) == NULL)
{
GlobalFree(htext);
GlobalFree (htext);
return Qnil;
}
......@@ -314,7 +314,7 @@ render_locale (void)
if ((lcid_ptr = (LCID *) GlobalLock (hlocale)) == NULL)
{
GlobalFree(hlocale);
GlobalFree (hlocale);
return Qnil;
}
......@@ -323,7 +323,7 @@ render_locale (void)
if (SetClipboardData (CF_LOCALE, hlocale) == NULL)
{
GlobalFree(hlocale);
GlobalFree (hlocale);
return Qnil;
}
......@@ -380,7 +380,7 @@ render_all (void)
automatic conversions anywhere else, so to get consistent
results, we probably don't want to rely on it here either. */
render_locale();
render_locale ();
if (current_clipboard_type == CF_UNICODETEXT)
render (make_number (CF_TEXT));
......@@ -514,7 +514,7 @@ setup_config (void)
&& EQ (cfg_coding_system, dos_coding_system))
return;
cfg_coding_system = dos_coding_system;
/* Set some sensible fallbacks */
cfg_codepage = ANSICP;
cfg_lcid = LOCALE_NEUTRAL;
......@@ -583,7 +583,7 @@ enum_locale_callback (/*const*/ char* loc_string)
cfg_clipboard_type = CF_TEXT;
return FALSE; /* Stop enumeration */
}
/* Is the wanted codepage the OEM codepage for this locale? */
codepage = cp_from_locale (lcid, CF_OEMTEXT);
if (codepage == cfg_codepage)
......@@ -704,7 +704,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
current_lcid = cfg_lcid;
current_num_nls = 0;
current_requires_encoding = 0;
BLOCK_INPUT;
/* Check for non-ASCII characters. While we are at it, count the
......@@ -744,7 +744,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
/* If we have something non-ASCII we may want to set a locale. We
do that directly (non-delayed), as it's just a small bit. */
if (ok)
ok = !NILP(render_locale());
ok = !NILP (render_locale ());
if (ok)
{
......@@ -753,7 +753,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
/* If for some reason we don't have a clipboard_owner, we
just set the text format as chosen by the configuration
and than forget about the whole thing. */
ok = !NILP(render (make_number (current_clipboard_type)));
ok = !NILP (render (make_number (current_clipboard_type)));
current_text = Qnil;
current_coding_system = Qnil;
}
......@@ -884,7 +884,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data,
struct coding_system coding;
Lisp_Object coding_system = Qnil;
Lisp_Object dos_coding_system;
/* `next-selection-coding-system' should override everything,
even when the locale passed by the system disagrees. The
only exception is when `next-selection-coding-system'
......@@ -1027,7 +1027,7 @@ the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
\(Those are literal upper-case symbol names, since that's what X expects.)
For convenience, the symbol nil is the same as `PRIMARY',
and t is the same as `SECONDARY'. */)
(selection)
(selection)
Lisp_Object selection;
{
CHECK_SYMBOL (selection);
......@@ -1076,7 +1076,7 @@ syms_of_w32select ()
When sending or receiving text via cut_buffer, selection, and
clipboard, the text is encoded or decoded by this coding system.
The default value is the current system default encoding on 9x/Me and
`utf-16le-dos' (Unicode) on NT/W2K/XP. */);
`utf-16le-dos' (Unicode) on NT/W2K/XP. */);
/* The actual value is set dynamically in the dumped Emacs, see
below. */
Vselection_coding_system = Qnil;
......
......@@ -325,8 +325,9 @@ XChangeGC (void * ignore, XGCValues* gc, unsigned long mask,
gc->font = xgcv->font;
}
XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask,
XGCValues *xgcv)
XGCValues *
XCreateGC (void * ignore, Window window, unsigned long mask,
XGCValues *xgcv)
{
XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues));
bzero (gc, sizeof (XGCValues));
......@@ -338,7 +339,7 @@ XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask,
void
XGetGCValues (void* ignore, XGCValues *gc,
unsigned long mask, XGCValues *xgcv)
unsigned long mask, XGCValues *xgcv)
{
XChangeGC (ignore, xgcv, mask, gc);
}
......@@ -920,7 +921,7 @@ w32_set_terminal_modes (struct terminal *term)
{
}
/* This is called when exiting or suspending Emacs. Exiting will make
/* This is called when exiting or suspending Emacs. Exiting will make
the W32 windows go away, and suspending requires no action. */
static void
......@@ -2410,7 +2411,7 @@ x_draw_glyph_string (s)
/* Draw strike-through. */
if (s->face->strike_through_p
&& !FONT_TEXTMETRIC(s->font).tmStruckOut)
&& !FONT_TEXTMETRIC (s->font).tmStruckOut)
{
unsigned long h = 1;
unsigned long dy = (s->height - h) / 2;
......@@ -2889,7 +2890,8 @@ x_get_keysym_name (keysym)
return value;
}
static int codepage_for_locale(LCID locale)
static int
codepage_for_locale (LCID locale)
{
char cp[20];
......@@ -3388,7 +3390,7 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole)
BLOCK_INPUT;
si.cbSize = sizeof (si);
si.fMask = SIF_POS | SIF_PAGE;
GetScrollInfo(w, SB_CTL, &si);
GetScrollInfo (w, SB_CTL, &si);
near_bottom_p = si.nPos + si.nPage >= range;
UNBLOCK_INPUT;
if (!near_bottom_p)
......@@ -4284,7 +4286,7 @@ w32_read_socket (sd, expected, hold_quit)
temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam;
inev.kind = MULTIMEDIA_KEY_EVENT;
inev.code = GET_APPCOMMAND_LPARAM(msg.msg.lParam);
inev.code = GET_APPCOMMAND_LPARAM (msg.msg.lParam);
inev.modifiers = msg.dwModifiers;
XSETFRAME (inev.frame_or_window, f);
inev.timestamp = msg.msg.time;
......@@ -4332,7 +4334,7 @@ w32_read_socket (sd, expected, hold_quit)
selected now and last mouse movement event was
not in it. Minibuffer window will be selected
only when it is active. */
if (WINDOWP(window)
if (WINDOWP (window)
&& !EQ (window, last_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
......@@ -4346,7 +4348,7 @@ w32_read_socket (sd, expected, hold_quit)
inev.frame_or_window = window;
}
last_window=window;
last_window = window;
}
if (!note_mouse_movement (f, &msg.msg))
help_echo_string = previous_help_echo_string;
......@@ -5485,8 +5487,8 @@ x_set_window_size (f, change_gravity, cols, rows)
rect.right = pixelwidth;
rect.bottom = pixelheight;
AdjustWindowRect(&rect, f->output_data.w32->dwStyle,
FRAME_EXTERNAL_MENU_BAR (f));
AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
FRAME_EXTERNAL_MENU_BAR (f));
my_set_window_pos (FRAME_W32_WINDOW (f),
NULL,
......@@ -5739,8 +5741,8 @@ x_make_frame_visible (f)
/* Adjust vertical window position in order to avoid being
covered by a task bar placed at the bottom of the desktop. */
SystemParametersInfo(SPI_GETWORKAREA, 0, &workarea_rect, 0);
GetWindowRect(FRAME_W32_WINDOW(f), &window_rect);
SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0);
GetWindowRect (FRAME_W32_WINDOW (f), &window_rect);
if (window_rect.bottom > workarea_rect.bottom
&& window_rect.top > workarea_rect.top)
f->top_pos = max (window_rect.top
......@@ -6310,7 +6312,7 @@ x_delete_display (dpyinfo)
}
dpyinfo->color_list = NULL;
if (dpyinfo->palette)
DeleteObject(dpyinfo->palette);
DeleteObject (dpyinfo->palette);
}
xfree (dpyinfo->w32_id_name);
......
......@@ -175,7 +175,7 @@ uniscribe_otf_capability (font)
f = XFRAME (selected_frame);
context = get_frame_dc (f);
old_font = SelectObject (context, FONT_HANDLE(font));
old_font = SelectObject (context, FONT_HANDLE (font));
features = otf_features (context, "GSUB");
XSETCAR (capability, features);
......@@ -287,7 +287,7 @@ uniscribe_shape (lgstring)
passed in. */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
old_font = SelectObject (context, FONT_HANDLE(font));
old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptShape (context, &(uniscribe_font->cache),
chars + items[i].iCharPos, nchars_in_run,
......@@ -322,7 +322,7 @@ uniscribe_shape (lgstring)
/* Cache not complete... */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
old_font = SelectObject (context, FONT_HANDLE(font));
old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptPlace (context, &(uniscribe_font->cache),
glyphs, nglyphs, attributes, &(items[i].a),
......@@ -397,7 +397,7 @@ uniscribe_shape (lgstring)
/* Cache incomplete... */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
old_font = SelectObject (context, FONT_HANDLE(font));
old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptGetGlyphABCWidth (context,
&(uniscribe_font->cache),
glyphs[j], &char_metric);
......@@ -509,7 +509,7 @@ uniscribe_encode_char (font, c)
the frame. */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
old_font = SelectObject (context, FONT_HANDLE(font));
old_font = SelectObject (context, FONT_HANDLE (font));
result = ScriptShape (context, &(uniscribe_font->cache),
ch, len, 2, &(items[0].a),
glyphs, clusters, attrs, &nglyphs);