changeset 16588:481b7874a1e9

Change identifiers of the form win32* to w32*.
author Geoff Voelker <voelker@cs.washington.edu>
date Tue, 19 Nov 1996 04:59:23 +0000
parents 13cda507257c
children ec300a10e407
files lisp/term/w32-win.el src/emacs.c src/frame.c src/frame.h src/keyboard.c src/s/ms-w32.h src/termhooks.h src/unexw32.c src/w32.c src/w32.h src/w32console.c src/w32faces.c src/w32fns.c src/w32heap.c src/w32heap.h src/w32inevt.c src/w32inevt.h src/w32menu.c src/w32proc.c src/w32reg.c src/w32select.c src/w32term.c src/w32term.h src/w32xfns.c
diffstat 24 files changed, 1117 insertions(+), 1117 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/w32-win.el	Tue Nov 19 04:46:30 1996 +0000
+++ b/lisp/term/w32-win.el	Tue Nov 19 04:59:23 1996 +0000
@@ -81,7 +81,7 @@
 ;; with the standard X scroll-bars, we don't try to use the normal
 ;; scroll bar routines.
 
-(defun win32-handle-scroll-bar-event (event)
+(defun w32-handle-scroll-bar-event (event)
   "Handle Win32 scroll bar events to do normal Window style scrolling."
   (interactive "e")
   (let ((old-window (selected-window)))
@@ -107,9 +107,9 @@
       (select-window old-window))))
 
 ;; The following definition is used for debugging.
-;(defun win32-handle-scroll-bar-event (event) (interactive "e") (princ event))
+;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))
 
-(global-set-key [vertical-scroll-bar mouse-1] 'win32-handle-scroll-bar-event)
+(global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event)
 
 ;; (scroll-bar-mode nil)
 
@@ -521,7 +521,7 @@
 
 (defun x-select-text (text &optional push)
   (if x-select-enable-clipboard 
-      (win32-set-clipboard-data text))
+      (w32-set-clipboard-data text))
   (setq x-last-selected-text text))
     
 ;;; Return the value of the current selection.
@@ -532,8 +532,8 @@
       (let (text)
 	;; Don't die if x-get-selection signals an error.
 	(condition-case c
-	    (setq text (win32-get-clipboard-data))
-	  (error (message "win32-get-clipboard-data:%s" c)))
+	    (setq text (w32-get-clipboard-data))
+	  (error (message "w32-get-clipboard-data:%s" c)))
 	(if (string= text "") (setq text nil))
 	(cond
 	 ((not text) nil)
@@ -576,7 +576,7 @@
 (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
 			    x-cut-buffer-max))
 
-;; Win32 expects the menu bar cut and paste commands to use the clipboard.
+;; W32 expects the menu bar cut and paste commands to use the clipboard.
 ;; This has ,? to match both on Sunos and on Solaris.
 (menu-bar-enable-clipboard)
 
@@ -628,7 +628,7 @@
 (setq interprogram-cut-function 'x-select-text)
 (setq interprogram-paste-function 'x-get-selection-value)
 
-;;; Turn off window-splitting optimization; win32 is usually fast enough
+;;; Turn off window-splitting optimization; w32 is usually fast enough
 ;;; that this is only annoying.
 (setq split-window-keep-point t)
 
@@ -638,7 +638,7 @@
 ;;; Set to a system sound if you want a fancy bell.
 (set-message-beep 'ok)
 
-;; Remap some functions to call win32 common dialogs
+;; Remap some functions to call w32 common dialogs
 
 (defun internal-face-interactive (what &optional bool)
   (let* ((fn (intern (concat "face-" what)))
@@ -658,10 +658,10 @@
 			   default)))))
 	 (list face (if (equal value "") nil value))))
 
-;; Redefine the font selection to use the Win32 dialog
+;; Redefine the font selection to use the standard Win32 dialog
 
 (defun mouse-set-font (&rest fonts)
   (interactive)
-  (set-default-font (win32-select-font)))
+  (set-default-font (w32-select-font)))
 
 ;;; win32-win.el ends here
--- a/src/emacs.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/emacs.c	Tue Nov 19 04:59:23 1996 +0000
@@ -979,11 +979,11 @@
 #endif
 
 #ifdef HAVE_NTGUI
-      syms_of_win32term ();
-      syms_of_win32fns ();
-      syms_of_win32faces ();
-      syms_of_win32select ();
-      syms_of_win32menu ();
+      syms_of_w32term ();
+      syms_of_w32fns ();
+      syms_of_w32faces ();
+      syms_of_w32select ();
+      syms_of_w32menu ();
 #endif /* HAVE_NTGUI */
 
 #ifdef SYMS_SYSTEM
--- a/src/frame.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/frame.c	Tue Nov 19 04:59:23 1996 +0000
@@ -75,7 +75,7 @@
 Lisp_Object Qmenu_bar_lines;
 Lisp_Object Qwidth;
 Lisp_Object Qx;
-Lisp_Object Qwin32;
+Lisp_Object Qw32;
 Lisp_Object Qpc;
 Lisp_Object Qvisible;
 Lisp_Object Qbuffer_predicate;
@@ -112,8 +112,8 @@
   staticpro (&Qwidth);
   Qx = intern ("x");
   staticpro (&Qx);
-  Qwin32 = intern ("win32");
-  staticpro (&Qwin32);
+  Qw32 = intern ("w32");
+  staticpro (&Qw32);
   Qpc = intern ("pc");
   staticpro (&Qpc);
   Qvisible = intern ("visible");
@@ -221,8 +221,8 @@
       return Qt;
     case output_x_window:
       return Qx;
-    case output_win32:
-      return Qwin32;
+    case output_w32:
+      return Qw32;
     case output_msdos_raw:
       return Qpc;
     default:
--- a/src/frame.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/frame.h	Tue Nov 19 04:59:23 1996 +0000
@@ -33,7 +33,7 @@
 /* The structure representing a frame.  */
 
 enum output_method
-{ output_termcap, output_x_window, output_msdos_raw, output_win32 };
+{ output_termcap, output_x_window, output_msdos_raw, output_w32 };
 
 enum vertical_scroll_bar_type
 { vertical_scroll_bar_none, vertical_scroll_bar_left, vertical_scroll_bar_right };
@@ -181,9 +181,9 @@
   /* A structure of auxiliary data used for displaying the contents.
      struct x_output is used for X window frames;
      it is defined in xterm.h.  
-     struct win32_output is used for Win32 window frames;
+     struct w32_output is used for W32 window frames;
      it is defined in w32term.h.  */
-  union output_data { struct x_output *x; struct win32_output *win32; int nothing; } output_data;
+  union output_data { struct x_output *x; struct w32_output *w32; int nothing; } output_data;
 
 #ifdef MULTI_KBOARD
   /* A pointer to the kboard structure associated with this frame.
@@ -309,7 +309,7 @@
 #define WINDOW_FRAME(w) (w)->frame
 
 #define FRAME_X_P(f) ((f)->output_method == output_x_window)
-#define FRAME_WIN32_P(f) ((f)->output_method == output_win32)
+#define FRAME_W32_P(f) ((f)->output_method == output_w32)
 #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
 
 /* FRAME_WINDOW_P tests whether the frame is a window, and is
@@ -318,7 +318,7 @@
 #define FRAME_WINDOW_P(f) FRAME_X_P (f)
 #endif
 #ifdef HAVE_NTGUI
-#define FRAME_WINDOW_P(f) FRAME_WIN32_P (f)
+#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
 #endif
 #ifndef FRAME_WINDOW_P
 #define FRAME_WINDOW_P(f) (0)
--- a/src/keyboard.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/keyboard.c	Tue Nov 19 04:59:23 1996 +0000
@@ -3920,7 +3920,7 @@
       }
 
 #ifdef WINDOWSNT
-    case win32_scroll_bar_click:
+    case w32_scroll_bar_click:
       {
 	int button = event->code;
 	int is_double;
@@ -3948,7 +3948,7 @@
 					Fcons (part, Qnil)))));
 	}
 
-	/* Always treat Win32 scroll bar events as clicks. */
+	/* Always treat W32 scroll bar events as clicks. */
 	event->modifiers |= click_modifier;
 
 	{
--- a/src/s/ms-w32.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/s/ms-w32.h	Tue Nov 19 04:59:23 1996 +0000
@@ -319,7 +319,7 @@
 #define rindex    strrchr
 
 #ifdef HAVE_NTGUI
-#define abort	win32_abort
+#define abort	w32_abort
 #endif
 
 /* Defines that we need that aren't in the standard signal.h  */
--- a/src/termhooks.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/termhooks.h	Tue Nov 19 04:59:23 1996 +0000
@@ -248,7 +248,7 @@
 				   .timestamp gives a timestamp (in
 				   milliseconds) for the click.  */
 #ifdef WINDOWSNT
-  win32_scroll_bar_click,	/* as for scroll_bar_click, but only generated
+  w32_scroll_bar_click,	/* as for scroll_bar_click, but only generated
 				   by MS-Windows scroll bar controls. */
 #endif
   selection_request_event,	/* Another X client wants a selection from us.
--- a/src/unexw32.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/unexw32.c	Tue Nov 19 04:59:23 1996 +0000
@@ -314,7 +314,7 @@
 get_section_size (PIMAGE_SECTION_HEADER p_section)
 {
   /* The section size is in different locations in the different versions.  */
-  switch (get_nt_minor_version ()) 
+  switch (get_w32_minor_version ()) 
     {
     case 10:
       return p_section->SizeOfRawData;
--- a/src/w32.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32.c	Tue Nov 19 04:59:23 1996 +0000
@@ -122,7 +122,7 @@
 static int    dir_is_fat;
 static char   dir_pathname[MAXPATHLEN+1];
 
-extern Lisp_Object Vwin32_downcase_file_names;
+extern Lisp_Object Vw32_downcase_file_names;
 
 DIR *
 opendir (char *filename)
@@ -199,7 +199,7 @@
   strcpy (dir_static.d_name, find_data.cFileName);
   if (dir_is_fat)
     _strlwr (dir_static.d_name);
-  else if (!NILP (Vwin32_downcase_file_names))
+  else if (!NILP (Vw32_downcase_file_names))
     {
       register char *p;
       for (p = dir_static.d_name; *p; p++)
@@ -412,7 +412,7 @@
       fp += 2;
     }
 
-  if (NILP (Vwin32_downcase_file_names))
+  if (NILP (Vw32_downcase_file_names))
     {
       while (*fp)
 	{
@@ -536,7 +536,7 @@
 #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
 
 LPBYTE 
-nt_get_resource (key, lpdwtype)
+w32_get_resource (key, lpdwtype)
     char *key;
     LPDWORD lpdwtype;
 {
@@ -610,7 +610,7 @@
     for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++) 
       {
 	if (!getenv (env_vars[i]) &&
-	    (lpval = nt_get_resource (env_vars[i], &dwType)) != NULL)
+	    (lpval = w32_get_resource (env_vars[i], &dwType)) != NULL)
 	  {
 	    if (dwType == REG_EXPAND_SZ)
 	      {
@@ -691,7 +691,7 @@
   os = (GetVersion () & 0x80000000) ? "win95" : "nt";
 
   sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os,
-	   get_nt_major_version (), get_nt_minor_version ());
+	   get_w32_major_version (), get_w32_minor_version ());
   return configuration_buffer;
 }
 
@@ -714,7 +714,7 @@
 }
 
 /* ------------------------------------------------------------------------- */
-/* IO support and wrapper functions for Win32 API. */
+/* IO support and wrapper functions for W32 API. */
 /* ------------------------------------------------------------------------- */
 
 /* Place a wrapper around the MSVC version of ctime.  It returns NULL
@@ -818,7 +818,7 @@
 
 /* Map filename to a legal 8.3 name if necessary. */
 const char *
-map_win32_filename (const char * name, const char ** pPath)
+map_w32_filename (const char * name, const char ** pPath)
 {
   static char shortname[MAX_PATH];
   char * str = shortname;
@@ -922,25 +922,25 @@
 int
 sys_access (const char * path, int mode)
 {
-  return _access (map_win32_filename (path, NULL), mode);
+  return _access (map_w32_filename (path, NULL), mode);
 }
 
 int
 sys_chdir (const char * path)
 {
-  return _chdir (map_win32_filename (path, NULL));
+  return _chdir (map_w32_filename (path, NULL));
 }
 
 int
 sys_chmod (const char * path, int mode)
 {
-  return _chmod (map_win32_filename (path, NULL), mode);
+  return _chmod (map_w32_filename (path, NULL), mode);
 }
 
 int
 sys_creat (const char * path, int mode)
 {
-  return _creat (map_win32_filename (path, NULL), mode);
+  return _creat (map_w32_filename (path, NULL), mode);
 }
 
 FILE *
@@ -980,7 +980,7 @@
       }
     else break;
 
-  fd = _open (map_win32_filename (path, NULL), oflag | _O_NOINHERIT, 0644);
+  fd = _open (map_w32_filename (path, NULL), oflag | _O_NOINHERIT, 0644);
   if (fd < 0)
     return NULL;
 
@@ -997,7 +997,7 @@
 int
 sys_mkdir (const char * path)
 {
-  return _mkdir (map_win32_filename (path, NULL));
+  return _mkdir (map_w32_filename (path, NULL));
 }
 
 /* Because of long name mapping issues, we need to implement this
@@ -1054,7 +1054,7 @@
 sys_open (const char * path, int oflag, int mode)
 {
   /* Force all file handles to be non-inheritable. */
-  return _open (map_win32_filename (path, NULL), oflag | _O_NOINHERIT, mode);
+  return _open (map_w32_filename (path, NULL), oflag | _O_NOINHERIT, mode);
 }
 
 int
@@ -1076,7 +1076,7 @@
      So, on Win95 we always rename through a temp name, and we make sure
      the temp name has a long extension to ensure correct renaming.  */
 
-  strcpy (temp, map_win32_filename (oldname, NULL));
+  strcpy (temp, map_w32_filename (oldname, NULL));
 
   if (GetVersion () & 0x80000000)
     {
@@ -1091,7 +1091,7 @@
       /* Force temp name to require a manufactured 8.3 alias - this
 	 seems to make the second rename work properly. */
       strcat (temp, ".long");
-      if (rename (map_win32_filename (oldname, NULL), temp) < 0)
+      if (rename (map_w32_filename (oldname, NULL), temp) < 0)
 	return -1;
     }
 
@@ -1099,7 +1099,7 @@
      (at least if it is a file; don't do this for directories).
      However, don't do this if we are just changing the case of the file
      name - we will end up deleting the file we are trying to rename!  */
-  newname = map_win32_filename (newname, NULL);
+  newname = map_w32_filename (newname, NULL);
   if (stricmp (newname, temp) != 0
       && (attr = GetFileAttributes (newname)) != -1
       && (attr & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -1114,13 +1114,13 @@
 int
 sys_rmdir (const char * path)
 {
-  return _rmdir (map_win32_filename (path, NULL));
+  return _rmdir (map_w32_filename (path, NULL));
 }
 
 int
 sys_unlink (const char * path)
 {
-  return _unlink (map_win32_filename (path, NULL));
+  return _unlink (map_w32_filename (path, NULL));
 }
 
 static FILETIME utc_base_ft;
@@ -1218,7 +1218,7 @@
 
   GetFullPathName (name, sizeof (fullname), fullname, &p);
   get_volume_info (fullname, &p);
-  /* Normal Win32 filesystems are still case insensitive. */
+  /* Normal W32 filesystems are still case insensitive. */
   _strlwr (p);
   hash = hashval (p);
   return (_ino_t) (hash ^ (hash >> 16));
@@ -1243,7 +1243,7 @@
       return -1;
     }
 
-  name = (char *) map_win32_filename (path, &path);
+  name = (char *) map_w32_filename (path, &path);
   /* must be valid filename, no wild cards */
   if (strchr (name, '*') || strchr (name, '?'))
     {
@@ -1340,7 +1340,7 @@
   buf->st_uid = the_passwd.pw_uid;
   buf->st_gid = the_passwd.pw_gid;
 
-  /* volume_info is set indirectly by map_win32_filename */
+  /* volume_info is set indirectly by map_w32_filename */
   buf->st_dev = volume_info.serialnum;
   buf->st_rdev = volume_info.serialnum;
 
@@ -1932,7 +1932,7 @@
 }
 
 /* From ntproc.c */
-extern Lisp_Object Vwin32_pipe_read_delay;
+extern Lisp_Object Vw32_pipe_read_delay;
 
 /* Function to do blocking read of one byte, needed to implement
    select.  It is only allowed on sockets and pipes. */
@@ -1969,11 +1969,11 @@
 	 connects DOS programs to pipes by making the pipe appear to be
 	 the normal console stdout - as a result most DOS programs will
 	 write to stdout without buffering, ie.  one character at a
-	 time.  Even some Win32 programs do this - "dir" in a command
+	 time.  Even some W32 programs do this - "dir" in a command
 	 shell on NT is very slow if we don't do this. */
       if (rc > 0)
 	{
-	  int wait = XINT (Vwin32_pipe_read_delay);
+	  int wait = XINT (Vw32_pipe_read_delay);
 
 	  if (wait > 0)
 	    Sleep (wait);
@@ -2165,7 +2165,7 @@
 #ifdef HAVE_SOCKETS
   /* Initialise the socket interface now if available and requested by
      the user by defining PRELOAD_WINSOCK; otherwise loading will be
-     delayed until open-network-stream is called (win32-has-winsock can
+     delayed until open-network-stream is called (w32-has-winsock can
      also be used to dynamically load or reload winsock).
 
      Conveniently, init_environment is called before us, so
@@ -2238,7 +2238,7 @@
   }
 
   /* Restrict Emacs to running only one DOS program at a time (with any
-     number of Win32 programs).  This is to prevent the user from
+     number of W32 programs).  This is to prevent the user from
      running into problems with DOS programs being run in the same VDM
      under both Windows 95 and Windows NT.
 
--- a/src/w32.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32.h	Tue Nov 19 04:59:23 1996 +0000
@@ -119,7 +119,7 @@
 				    int err, HANDLE handles[4]);
 
 /* Return the string resource associated with KEY of type TYPE.  */
-extern LPBYTE nt_get_resource (char * key, LPDWORD type);
+extern LPBYTE w32_get_resource (char * key, LPDWORD type);
 
 extern void init_ntproc ();
 extern void term_ntproc ();
--- a/src/w32console.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32console.c	Tue Nov 19 04:59:23 1996 +0000
@@ -58,7 +58,7 @@
 static void insert_glyphs (GLYPH *start, int len);
 static void write_glyphs (GLYPH *string, int len);
 static void delete_glyphs (int n);
-void nt_ring_bell (void);
+void w32_sys_ring_bell (void);
 static void reset_terminal_modes (void);
 static void set_terminal_modes (void);
 static void set_terminal_window (int size);
@@ -193,7 +193,7 @@
   
   ScrollConsoleScreenBuffer (cur_screen, &scroll, NULL, dest, &fill);
 
-  /* Here we have to deal with a win32 console flake: If the scroll
+  /* Here we have to deal with a w32 console flake: If the scroll
      region looks like abc and we scroll c to a and fill with d we get
      cbd... if we scroll block c one line at a time to a, we get cdd...
      Emacs expects cdd consistently... So we have to deal with that
@@ -418,7 +418,7 @@
 static unsigned int sound_type = 0xFFFFFFFF;
 
 void
-nt_ring_bell (void)
+w32_sys_ring_bell (void)
 {
   if (sound_type == 0xFFFFFFFF) 
       Beep (666, 100);
@@ -554,15 +554,15 @@
   insert_glyphs_hook		= (term_hook) insert_glyphs;
   write_glyphs_hook		= (term_hook) write_glyphs;
   delete_glyphs_hook		= (term_hook) delete_glyphs;
-  ring_bell_hook		= (term_hook) nt_ring_bell;
+  ring_bell_hook		= (term_hook) w32_sys_ring_bell;
   reset_terminal_modes_hook	= (term_hook) reset_terminal_modes;
   set_terminal_modes_hook	= (term_hook) set_terminal_modes;
   set_terminal_window_hook	= (term_hook) set_terminal_window;
   update_begin_hook		= (term_hook) update_begin;
   update_end_hook		= (term_hook) update_end;
   
-  read_socket_hook = win32_read_socket;
-  mouse_position_hook = win32_mouse_position;
+  read_socket_hook = w32_console_read_socket;
+  mouse_position_hook = w32_mouse_position;
   
   prev_screen = GetStdHandle (STD_OUTPUT_HANDLE);
   
--- a/src/w32faces.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32faces.c	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* "Face" primitives.
+/* "Face" primitives under the Win32 API.
    Copyright (C) 1993, 1994, 1995 Free Software Foundation.
 
 This file is part of GNU Emacs.
@@ -18,7 +18,7 @@
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Ported xfaces.c for win32 - Kevin Gallo */
+/* Ported xfaces.c for w32 - Kevin Gallo */
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -227,7 +227,7 @@
 
   CHECK_STRING (name, 0);
   BLOCK_INPUT;
-  font = win32_load_font (FRAME_WIN32_DISPLAY_INFO (f), (char *) XSTRING (name)->data);
+  font = w32_load_font (FRAME_W32_DISPLAY_INFO (f), (char *) XSTRING (name)->data);
   UNBLOCK_INPUT;
 
   if (! font)
@@ -245,7 +245,7 @@
     return;
 
   BLOCK_INPUT;
-  win32_unload_font (FRAME_WIN32_DISPLAY_INFO (f), font);
+  w32_unload_font (FRAME_W32_DISPLAY_INFO (f), font);
   UNBLOCK_INPUT;
 }
 
@@ -379,7 +379,7 @@
     
     result = Qnil;
     FOR_EACH_FRAME (tail, frame)
-      if (FRAME_WIN32_P (XFRAME (frame))
+      if (FRAME_W32_P (XFRAME (frame))
 	  && XFRAME (frame) != f)
 	{
 	  result = frame;
@@ -546,21 +546,21 @@
      FRAME_PTR f;
 {
   int i;
-  int biggest = FONT_HEIGHT (f->output_data.win32->font);
+  int biggest = FONT_HEIGHT (f->output_data.w32->font);
 
-  for (i = 0; i < f->output_data.win32->n_param_faces; i++)
-    if (f->output_data.win32->param_faces[i] != 0
-	&& f->output_data.win32->param_faces[i]->font != (XFontStruct *) FACE_DEFAULT)
+  for (i = 0; i < f->output_data.w32->n_param_faces; i++)
+    if (f->output_data.w32->param_faces[i] != 0
+	&& f->output_data.w32->param_faces[i]->font != (XFontStruct *) FACE_DEFAULT)
       {
-	int height = FONT_HEIGHT (f->output_data.win32->param_faces[i]->font);
+	int height = FONT_HEIGHT (f->output_data.w32->param_faces[i]->font);
 	if (height > biggest)
 	  biggest = height;
       }
 
-  if (biggest == f->output_data.win32->line_height)
+  if (biggest == f->output_data.w32->line_height)
     return 0;
 
-  f->output_data.win32->line_height = biggest;
+  f->output_data.w32->line_height = biggest;
   return 1;
 }
 
@@ -902,7 +902,7 @@
 
   FOR_EACH_FRAME (rest, frame)
     {
-      if (FRAME_WIN32_P (XFRAME (frame)))
+      if (FRAME_W32_P (XFRAME (frame)))
 	ensure_face_ready (XFRAME (frame), id);
     }
   return Qnil;
@@ -929,7 +929,7 @@
   if (id < 0 || id >= next_face_id)
     error ("Face id out of range");
 
-  if (! FRAME_WIN32_P (f))
+  if (! FRAME_W32_P (f))
     return Qnil;
 
   ensure_face_ready (f, id);
@@ -938,7 +938,7 @@
   if (EQ (attr_name, intern ("font")))
     {
       XFontStruct *font = load_font (f, attr_value);
-      if (face->font != f->output_data.win32->font)
+      if (face->font != f->output_data.w32->font)
 	unload_font (f, face->font);
       face->font = font;
       if (frame_update_line_height (f))
@@ -1024,7 +1024,7 @@
 /* Emacs initialization.  */
 
 void
-syms_of_win32faces ()
+syms_of_w32faces ()
 {
   Qface = intern ("face");
   staticpro (&Qface);
--- a/src/w32fns.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32fns.c	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Functions for the Win32 window system.
+/* Functions for the MS Win32 window system API.
    Copyright (C) 1989, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -44,33 +44,33 @@
 extern int quit_char;
 
 /* The colormap for converting color names to RGB values */
-Lisp_Object Vwin32_color_map;
+Lisp_Object Vw32_color_map;
 
 /* Non nil if alt key presses are passed on to Windows.  */
-Lisp_Object Vwin32_pass_alt_to_system;
+Lisp_Object Vw32_pass_alt_to_system;
 
 /* Non nil if alt key is translated to meta_modifier, nil if it is translated
    to alt_modifier.  */
-Lisp_Object Vwin32_alt_is_meta;
+Lisp_Object Vw32_alt_is_meta;
 
 /* Non nil if left window, right window, and application key events
    are passed on to Windows.  */
-Lisp_Object Vwin32_pass_optional_keys_to_system;
+Lisp_Object Vw32_pass_optional_keys_to_system;
 
 /* Switch to control whether we inhibit requests for italicised fonts (which
    are synthesized, look ugly, and are trashed by cursor movement under NT). */
-Lisp_Object Vwin32_enable_italics;
+Lisp_Object Vw32_enable_italics;
 
 /* Enable palette management. */
-Lisp_Object Vwin32_enable_palette;
+Lisp_Object Vw32_enable_palette;
 
 /* Control how close left/right button down events must be to
    be converted to a middle button down event. */
-Lisp_Object Vwin32_mouse_button_tolerance;
+Lisp_Object Vw32_mouse_button_tolerance;
 
 /* Minimum interval between mouse movement (and scroll bar drag)
    events that are passed on to the event loop. */
-Lisp_Object Vwin32_mouse_move_interval;
+Lisp_Object Vw32_mouse_move_interval;
 
 /* The name we're using in resource queries.  */
 Lisp_Object Vx_resource_name;
@@ -165,9 +165,9 @@
 #define RMOUSE 4
 
 static int button_state = 0;
-static Win32Msg saved_mouse_button_msg;
+static W32Msg saved_mouse_button_msg;
 static unsigned mouse_button_timer;	/* non-zero when timer is active */
-static Win32Msg saved_mouse_move_msg;
+static W32Msg saved_mouse_move_msg;
 static unsigned mouse_move_timer;
 
 #define MOUSE_BUTTON_ID	1
@@ -182,14 +182,14 @@
 extern Lisp_Object last_mouse_scroll_bar;
 extern int last_mouse_scroll_bar_pos;
 
-/* From win32term.c. */
-extern Lisp_Object Vwin32_num_mouse_buttons;
+/* From w32term.c. */
+extern Lisp_Object Vw32_num_mouse_buttons;
 
 Time last_mouse_movement_time;
 
 
 /* Extract a frame as a FRAME_PTR, defaulting to the selected frame
-   and checking validity for Win32.  */
+   and checking validity for W32.  */
 
 FRAME_PTR
 check_x_frame (frame)
@@ -204,25 +204,25 @@
       CHECK_LIVE_FRAME (frame, 0);
       f = XFRAME (frame);
     }
-  if (! FRAME_WIN32_P (f))
-    error ("non-win32 frame used");
+  if (! FRAME_W32_P (f))
+    error ("non-w32 frame used");
   return f;
 }
 
 /* Let the user specify an display with a frame.
-   nil stands for the selected frame--or, if that is not a win32 frame,
+   nil stands for the selected frame--or, if that is not a w32 frame,
    the first display on the list.  */
 
-static struct win32_display_info *
+static struct w32_display_info *
 check_x_display_info (frame)
      Lisp_Object frame;
 {
   if (NILP (frame))
     {
-      if (FRAME_WIN32_P (selected_frame))
-	return FRAME_WIN32_DISPLAY_INFO (selected_frame);
+      if (FRAME_W32_P (selected_frame))
+	return FRAME_W32_DISPLAY_INFO (selected_frame);
       else
-	return &one_win32_display_info;
+	return &one_w32_display_info;
     }
   else if (STRINGP (frame))
     return x_display_info_for_name (frame);
@@ -232,20 +232,20 @@
 
       CHECK_LIVE_FRAME (frame, 0);
       f = XFRAME (frame);
-      if (! FRAME_WIN32_P (f))
-	error ("non-win32 frame used");
-      return FRAME_WIN32_DISPLAY_INFO (f);
+      if (! FRAME_W32_P (f))
+	error ("non-w32 frame used");
+      return FRAME_W32_DISPLAY_INFO (f);
     }
 }
 
-/* Return the Emacs frame-object corresponding to an win32 window.
+/* Return the Emacs frame-object corresponding to an w32 window.
    It could be the frame's main window or an icon window.  */
 
 /* This function can be called during GC, so use GC_xxx type test macros.  */
 
 struct frame *
 x_window_to_frame (dpyinfo, wdesc)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
      HWND wdesc;
 {
   Lisp_Object tail, frame;
@@ -258,9 +258,9 @@
         continue;
       f = XFRAME (frame);
       if (f->output_data.nothing == 1 
-	  || FRAME_WIN32_DISPLAY_INFO (f) != dpyinfo)
+	  || FRAME_W32_DISPLAY_INFO (f) != dpyinfo)
 	continue;
-      if (FRAME_WIN32_WINDOW (f) == wdesc)
+      if (FRAME_W32_WINDOW (f) == wdesc)
         return f;
     }
   return 0;
@@ -287,7 +287,7 @@
      FRAME_PTR f;
      int id;
 {
-  return FRAME_WIN32_DISPLAY_INFO (f)->bitmaps[id - 1].height;
+  return FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].height;
 }
 
 int
@@ -295,7 +295,7 @@
      FRAME_PTR f;
      int id;
 {
-  return FRAME_WIN32_DISPLAY_INFO (f)->bitmaps[id - 1].width;
+  return FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].width;
 }
 
 int
@@ -303,7 +303,7 @@
      FRAME_PTR f;
      int id;
 {
-  return (int) FRAME_WIN32_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
+  return (int) FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
 }
 
 
@@ -313,14 +313,14 @@
 x_allocate_bitmap_record (f)
      FRAME_PTR f;
 {
-  struct win32_display_info *dpyinfo = FRAME_WIN32_DISPLAY_INFO (f);
+  struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
   int i;
 
   if (dpyinfo->bitmaps == NULL)
     {
       dpyinfo->bitmaps_size = 10;
       dpyinfo->bitmaps
-	= (struct win32_bitmap_record *) xmalloc (dpyinfo->bitmaps_size * sizeof (struct win32_bitmap_record));
+	= (struct w32_bitmap_record *) xmalloc (dpyinfo->bitmaps_size * sizeof (struct w32_bitmap_record));
       dpyinfo->bitmaps_last = 1;
       return 1;
     }
@@ -334,8 +334,8 @@
 
   dpyinfo->bitmaps_size *= 2;
   dpyinfo->bitmaps
-    = (struct win32_bitmap_record *) xrealloc (dpyinfo->bitmaps,
-					   dpyinfo->bitmaps_size * sizeof (struct win32_bitmap_record));
+    = (struct w32_bitmap_record *) xrealloc (dpyinfo->bitmaps,
+					   dpyinfo->bitmaps_size * sizeof (struct w32_bitmap_record));
   return ++dpyinfo->bitmaps_last;
 }
 
@@ -346,7 +346,7 @@
      FRAME_PTR f;
      int id;
 {
-  ++FRAME_WIN32_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
+  ++FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
 }
 
 /* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS.  */
@@ -357,13 +357,13 @@
      char *bits;
      unsigned int width, height;
 {
-  struct win32_display_info *dpyinfo = FRAME_WIN32_DISPLAY_INFO (f);
+  struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
   Pixmap bitmap;
   int id;
 
   bitmap = CreateBitmap (width, height,
-			 FRAME_WIN32_DISPLAY_INFO (XFRAME (frame))->n_planes,
-			 FRAME_WIN32_DISPLAY_INFO (XFRAME (frame))->n_cbits,
+			 FRAME_W32_DISPLAY_INFO (XFRAME (frame))->n_planes,
+			 FRAME_W32_DISPLAY_INFO (XFRAME (frame))->n_cbits,
 			 bits);
 
   if (! bitmap)
@@ -390,7 +390,7 @@
 {
   return -1;
 #if 0
-  struct win32_display_info *dpyinfo = FRAME_WIN32_DISPLAY_INFO (f);
+  struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
   unsigned int width, height;
   Pixmap bitmap;
   int xhot, yhot, result, id;
@@ -425,7 +425,7 @@
       return -1;
 
   
-  result = XReadBitmapFile (FRAME_WIN32_DISPLAY (f), FRAME_WIN32_WINDOW (f),
+  result = XReadBitmapFile (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f),
 			    filename, &width, &height, &bitmap, &xhot, &yhot);
   if (result != BitmapSuccess)
     return -1;
@@ -450,7 +450,7 @@
      FRAME_PTR f;
      int id;
 {
-  struct win32_display_info *dpyinfo = FRAME_WIN32_DISPLAY_INFO (f);
+  struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
 
   if (id > 0)
     {
@@ -473,7 +473,7 @@
 
 static void
 x_destroy_all_bitmaps (dpyinfo)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
 {
   int i;
   for (i = 0; i < dpyinfo->bitmaps_last; i++)
@@ -486,7 +486,7 @@
   dpyinfo->bitmaps_last = 0;
 }
 
-/* Connect the frame-parameter names for Win32 frames
+/* Connect the frame-parameter names for W32 frames
    to the ways of passing the parameter values to the window system.
 
    The name of a parameter, as a Lisp symbol,
@@ -563,7 +563,7 @@
 };
 
 /* Attach the `x-frame-parameter' properties to
-   the Lisp symbol names of parameters relevant to Win32.  */
+   the Lisp symbol names of parameters relevant to W32.  */
 
 init_x_parm_symbols ()
 {
@@ -668,18 +668,18 @@
   if (EQ (left, Qunbound))
     {
       left_no_change = 1;
-      if (f->output_data.win32->left_pos < 0)
-	left = Fcons (Qplus, Fcons (make_number (f->output_data.win32->left_pos), Qnil));
+      if (f->output_data.w32->left_pos < 0)
+	left = Fcons (Qplus, Fcons (make_number (f->output_data.w32->left_pos), Qnil));
       else
-	XSETINT (left, f->output_data.win32->left_pos);
+	XSETINT (left, f->output_data.w32->left_pos);
     }
   if (EQ (top, Qunbound))
     {
       top_no_change = 1;
-      if (f->output_data.win32->top_pos < 0)
-	top = Fcons (Qplus, Fcons (make_number (f->output_data.win32->top_pos), Qnil));
+      if (f->output_data.w32->top_pos < 0)
+	top = Fcons (Qplus, Fcons (make_number (f->output_data.w32->top_pos), Qnil));
       else
-	XSETINT (top, f->output_data.win32->top_pos);
+	XSETINT (top, f->output_data.w32->top_pos);
     }
 
   /* If one of the icon positions was not set, preserve or default it.  */
@@ -719,28 +719,28 @@
 
     if ((!NILP (left) || !NILP (top))
 	&& ! (left_no_change && top_no_change)
-	&& ! (NUMBERP (left) && XINT (left) == f->output_data.win32->left_pos
-	      && NUMBERP (top) && XINT (top) == f->output_data.win32->top_pos))
+	&& ! (NUMBERP (left) && XINT (left) == f->output_data.w32->left_pos
+	      && NUMBERP (top) && XINT (top) == f->output_data.w32->top_pos))
       {
 	int leftpos = 0;
 	int toppos = 0;
 
 	/* Record the signs.  */
-	f->output_data.win32->size_hint_flags &= ~ (XNegative | YNegative);
+	f->output_data.w32->size_hint_flags &= ~ (XNegative | YNegative);
 	if (EQ (left, Qminus))
-	  f->output_data.win32->size_hint_flags |= XNegative;
+	  f->output_data.w32->size_hint_flags |= XNegative;
 	else if (INTEGERP (left))
 	  {
 	    leftpos = XINT (left);
 	    if (leftpos < 0)
-	      f->output_data.win32->size_hint_flags |= XNegative;
+	      f->output_data.w32->size_hint_flags |= XNegative;
 	  }
 	else if (CONSP (left) && EQ (XCONS (left)->car, Qminus)
 		 && CONSP (XCONS (left)->cdr)
 		 && INTEGERP (XCONS (XCONS (left)->cdr)->car))
 	  {
 	    leftpos = - XINT (XCONS (XCONS (left)->cdr)->car);
-	    f->output_data.win32->size_hint_flags |= XNegative;
+	    f->output_data.w32->size_hint_flags |= XNegative;
 	  }
 	else if (CONSP (left) && EQ (XCONS (left)->car, Qplus)
 		 && CONSP (XCONS (left)->cdr)
@@ -750,19 +750,19 @@
 	  }
 
 	if (EQ (top, Qminus))
-	  f->output_data.win32->size_hint_flags |= YNegative;
+	  f->output_data.w32->size_hint_flags |= YNegative;
 	else if (INTEGERP (top))
 	  {
 	    toppos = XINT (top);
 	    if (toppos < 0)
-	      f->output_data.win32->size_hint_flags |= YNegative;
+	      f->output_data.w32->size_hint_flags |= YNegative;
 	  }
 	else if (CONSP (top) && EQ (XCONS (top)->car, Qminus)
 		 && CONSP (XCONS (top)->cdr)
 		 && INTEGERP (XCONS (XCONS (top)->cdr)->car))
 	  {
 	    toppos = - XINT (XCONS (XCONS (top)->cdr)->car);
-	    f->output_data.win32->size_hint_flags |= YNegative;
+	    f->output_data.w32->size_hint_flags |= YNegative;
 	  }
 	else if (CONSP (top) && EQ (XCONS (top)->car, Qplus)
 		 && CONSP (XCONS (top)->cdr)
@@ -773,10 +773,10 @@
 
 
 	/* Store the numeric value of the position.  */
-	f->output_data.win32->top_pos = toppos;
-	f->output_data.win32->left_pos = leftpos;
-
-	f->output_data.win32->win_gravity = NorthWestGravity;
+	f->output_data.w32->top_pos = toppos;
+	f->output_data.w32->left_pos = leftpos;
+
+	f->output_data.w32->win_gravity = NorthWestGravity;
 
 	/* Actually set that position, and convert to absolute.  */
 	x_set_offset (f, leftpos, toppos, -1);
@@ -802,14 +802,14 @@
   {
       RECT rect;
       
-      GetClientRect(FRAME_WIN32_WINDOW(f), &rect);
-      AdjustWindowRect(&rect, f->output_data.win32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f));
+      GetClientRect(FRAME_W32_WINDOW(f), &rect);
+      AdjustWindowRect(&rect, f->output_data.w32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f));
       
       pt.x = rect.left;
       pt.y = rect.top;
   }
 
-  ClientToScreen (FRAME_WIN32_WINDOW(f), &pt);
+  ClientToScreen (FRAME_W32_WINDOW(f), &pt);
 
   *xptr = pt.x;
   *yptr = pt.y;
@@ -817,7 +817,7 @@
 
 /* Insert a description of internally-recorded parameters of frame X
    into the parameter alist *ALISTPTR that is to be given to the user.
-   Only parameters that are specific to Win32
+   Only parameters that are specific to W32
    and whose values are not correctly recorded in the frame's
    param_alist need to be considered here.  */
 
@@ -830,23 +830,23 @@
 
   /* Represent negative positions (off the top or left screen edge)
      in a way that Fmodify_frame_parameters will understand correctly.  */
-  XSETINT (tem, f->output_data.win32->left_pos);
-  if (f->output_data.win32->left_pos >= 0)
+  XSETINT (tem, f->output_data.w32->left_pos);
+  if (f->output_data.w32->left_pos >= 0)
     store_in_alist (alistptr, Qleft, tem);
   else
     store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil)));
 
-  XSETINT (tem, f->output_data.win32->top_pos);
-  if (f->output_data.win32->top_pos >= 0)
+  XSETINT (tem, f->output_data.w32->top_pos);
+  if (f->output_data.w32->top_pos >= 0)
     store_in_alist (alistptr, Qtop, tem);
   else
     store_in_alist (alistptr, Qtop, Fcons (Qplus, Fcons (tem, Qnil)));
 
   store_in_alist (alistptr, Qborder_width,
-       	   make_number (f->output_data.win32->border_width));
+       	   make_number (f->output_data.w32->border_width));
   store_in_alist (alistptr, Qinternal_border_width,
-       	   make_number (f->output_data.win32->internal_border_width));
-  sprintf (buf, "%ld", (long) FRAME_WIN32_WINDOW (f));
+       	   make_number (f->output_data.w32->internal_border_width));
+  sprintf (buf, "%ld", (long) FRAME_W32_WINDOW (f));
   store_in_alist (alistptr, Qwindow_id,
        	   build_string (buf));
   store_in_alist (alistptr, Qicon_name, f->icon_name);
@@ -855,13 +855,13 @@
 		  (FRAME_VISIBLE_P (f) ? Qt
 		   : FRAME_ICONIFIED_P (f) ? Qicon : Qnil));
   store_in_alist (alistptr, Qdisplay,
-		  XCONS (FRAME_WIN32_DISPLAY_INFO (f)->name_list_element)->car);
+		  XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->car);
 }
 
 
-DEFUN ("win32-define-rgb-color", Fwin32_define_rgb_color, Swin32_define_rgb_color, 4, 4, 0,
+DEFUN ("w32-define-rgb-color", Fw32_define_rgb_color, Sw32_define_rgb_color, 4, 4, 0,
   "Convert RGB numbers to a windows color reference and associate with NAME (a string).\n\
-This adds or updates a named color to win32-color-map, making it available for use.\n\
+This adds or updates a named color to w32-color-map, making it available for use.\n\
 The original entry's RGB ref is returned, or nil if the entry is new.")
     (red, green, blue, name)
     Lisp_Object red, green, blue, name;
@@ -879,12 +879,12 @@
 
   BLOCK_INPUT;
 
-  /* replace existing entry in win32-color-map or add new entry. */
-  entry = Fassoc (name, Vwin32_color_map);
+  /* replace existing entry in w32-color-map or add new entry. */
+  entry = Fassoc (name, Vw32_color_map);
   if (NILP (entry))
     {
       entry = Fcons (name, rgb);
-      Vwin32_color_map = Fcons (entry, Vwin32_color_map);
+      Vw32_color_map = Fcons (entry, Vw32_color_map);
     }
   else
     {
@@ -897,9 +897,9 @@
   return (oldrgb);
 }
 
-DEFUN ("win32-load-color-file", Fwin32_load_color_file, Swin32_load_color_file, 1, 1, 0,
+DEFUN ("w32-load-color-file", Fw32_load_color_file, Sw32_load_color_file, 1, 1, 0,
   "Create an alist of color entries from an external file (ie. rgb.txt).\n\
-Assign this value to win32-color-map to replace the existing color map.\n\
+Assign this value to w32-color-map to replace the existing color map.\n\
 \
 The file should define one named RGB color per line like so:\
   R G B   name\n\
@@ -943,14 +943,14 @@
   return cmap;
 }
 
-/* The default colors for the win32 color map */
+/* The default colors for the w32 color map */
 typedef struct colormap_t 
 {
   char *name;
   COLORREF colorref;
 } colormap_t;
 
-colormap_t win32_color_map[] = 
+colormap_t w32_color_map[] = 
 {
   {"snow"                      , PALETTERGB (255,250,250)},
   {"ghost white"               , PALETTERGB (248,248,255)},
@@ -1194,19 +1194,19 @@
   {"LightGreen"                , PALETTERGB (144,238,144)},
 };
 
-DEFUN ("win32-default-color-map", Fwin32_default_color_map, Swin32_default_color_map,
+DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
        0, 0, 0, "Return the default color map.")
      ()
 {
   int i;
-  colormap_t *pc = win32_color_map;
+  colormap_t *pc = w32_color_map;
   Lisp_Object cmap;
   
   BLOCK_INPUT;
   
   cmap = Qnil;
   
-  for (i = 0; i < sizeof (win32_color_map) / sizeof (win32_color_map[0]); 
+  for (i = 0; i < sizeof (w32_color_map) / sizeof (w32_color_map[0]); 
        pc++, i++)
     cmap = Fcons (Fcons (build_string (pc->name),
 			 make_number (pc->colorref)),
@@ -1218,7 +1218,7 @@
 }
 
 Lisp_Object 
-win32_to_x_color (rgb)
+w32_to_x_color (rgb)
      Lisp_Object rgb;
 {
   Lisp_Object color;
@@ -1227,7 +1227,7 @@
   
   BLOCK_INPUT;
   
-  color = Frassq (rgb, Vwin32_color_map);
+  color = Frassq (rgb, Vw32_color_map);
   
   UNBLOCK_INPUT;
   
@@ -1238,14 +1238,14 @@
 }
 
 COLORREF 
-x_to_win32_color (colorname)
+x_to_w32_color (colorname)
      char * colorname;
 {
   register Lisp_Object tail, ret = Qnil;
   
   BLOCK_INPUT;
   
-  for (tail = Vwin32_color_map; !NILP (tail); tail = Fcdr (tail))
+  for (tail = Vw32_color_map; !NILP (tail); tail = Fcdr (tail))
     {
       register Lisp_Object elt, tem;
 
@@ -1270,26 +1270,26 @@
 
 
 void
-win32_regenerate_palette (FRAME_PTR f)
+w32_regenerate_palette (FRAME_PTR f)
 {
-  struct win32_palette_entry * list;
+  struct w32_palette_entry * list;
   LOGPALETTE *          log_palette;
   HPALETTE              new_palette;
   int                   i;
 
   /* don't bother trying to create palette if not supported */
-  if (! FRAME_WIN32_DISPLAY_INFO (f)->has_palette)
+  if (! FRAME_W32_DISPLAY_INFO (f)->has_palette)
     return;
 
   log_palette = (LOGPALETTE *)
     alloca (sizeof (LOGPALETTE) +
-	     FRAME_WIN32_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY));
+	     FRAME_W32_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY));
   log_palette->palVersion = 0x300;
-  log_palette->palNumEntries = FRAME_WIN32_DISPLAY_INFO (f)->num_colors;
-
-  list = FRAME_WIN32_DISPLAY_INFO (f)->color_list;
+  log_palette->palNumEntries = FRAME_W32_DISPLAY_INFO (f)->num_colors;
+
+  list = FRAME_W32_DISPLAY_INFO (f)->color_list;
   for (i = 0;
-       i < FRAME_WIN32_DISPLAY_INFO (f)->num_colors;
+       i < FRAME_W32_DISPLAY_INFO (f)->num_colors;
        i++, list = list->next)
     log_palette->palPalEntry[i] = list->entry;
 
@@ -1297,9 +1297,9 @@
 
   enter_crit ();
 
-  if (FRAME_WIN32_DISPLAY_INFO (f)->palette)
-    DeleteObject (FRAME_WIN32_DISPLAY_INFO (f)->palette);
-  FRAME_WIN32_DISPLAY_INFO (f)->palette = new_palette;
+  if (FRAME_W32_DISPLAY_INFO (f)->palette)
+    DeleteObject (FRAME_W32_DISPLAY_INFO (f)->palette);
+  FRAME_W32_DISPLAY_INFO (f)->palette = new_palette;
 
   /* Realize display palette and garbage all frames. */
   release_frame_dc (f, get_frame_dc (f));
@@ -1307,8 +1307,8 @@
   leave_crit ();
 }
 
-#define WIN32_COLOR(pe)  RGB (pe.peRed, pe.peGreen, pe.peBlue)
-#define SET_WIN32_COLOR(pe, color) \
+#define W32_COLOR(pe)  RGB (pe.peRed, pe.peGreen, pe.peBlue)
+#define SET_W32_COLOR(pe, color) \
   do \
     { \
       pe.peRed = GetRValue (color); \
@@ -1320,17 +1320,17 @@
 #if 0
 /* Keep these around in case we ever want to track color usage. */
 void
-win32_map_color (FRAME_PTR f, COLORREF color)
+w32_map_color (FRAME_PTR f, COLORREF color)
 {
-  struct win32_palette_entry * list = FRAME_WIN32_DISPLAY_INFO (f)->color_list;
-
-  if (NILP (Vwin32_enable_palette))
+  struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list;
+
+  if (NILP (Vw32_enable_palette))
     return;
 
   /* check if color is already mapped */
   while (list)
     {
-      if (WIN32_COLOR (list->entry) == color)
+      if (W32_COLOR (list->entry) == color)
         {
 	  ++list->refcount;
 	  return;
@@ -1339,37 +1339,37 @@
     }
 
   /* not already mapped, so add to list and recreate Windows palette */
-  list = (struct win32_palette_entry *)
-    xmalloc (sizeof (struct win32_palette_entry));
-  SET_WIN32_COLOR (list->entry, color);
+  list = (struct w32_palette_entry *)
+    xmalloc (sizeof (struct w32_palette_entry));
+  SET_W32_COLOR (list->entry, color);
   list->refcount = 1;
-  list->next = FRAME_WIN32_DISPLAY_INFO (f)->color_list;
-  FRAME_WIN32_DISPLAY_INFO (f)->color_list = list;
-  FRAME_WIN32_DISPLAY_INFO (f)->num_colors++;
+  list->next = FRAME_W32_DISPLAY_INFO (f)->color_list;
+  FRAME_W32_DISPLAY_INFO (f)->color_list = list;
+  FRAME_W32_DISPLAY_INFO (f)->num_colors++;
 
   /* set flag that palette must be regenerated */
-  FRAME_WIN32_DISPLAY_INFO (f)->regen_palette = TRUE;
+  FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
 }
 
 void
-win32_unmap_color (FRAME_PTR f, COLORREF color)
+w32_unmap_color (FRAME_PTR f, COLORREF color)
 {
-  struct win32_palette_entry * list = FRAME_WIN32_DISPLAY_INFO (f)->color_list;
-  struct win32_palette_entry **prev = &FRAME_WIN32_DISPLAY_INFO (f)->color_list;
-
-  if (NILP (Vwin32_enable_palette))
+  struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list;
+  struct w32_palette_entry **prev = &FRAME_W32_DISPLAY_INFO (f)->color_list;
+
+  if (NILP (Vw32_enable_palette))
     return;
 
   /* check if color is already mapped */
   while (list)
     {
-      if (WIN32_COLOR (list->entry) == color)
+      if (W32_COLOR (list->entry) == color)
         {
 	  if (--list->refcount == 0)
 	    {
 	      *prev = list->next;
 	      xfree (list);
-	      FRAME_WIN32_DISPLAY_INFO (f)->num_colors--;
+	      FRAME_W32_DISPLAY_INFO (f)->num_colors--;
 	      break;
 	    }
 	  else
@@ -1380,7 +1380,7 @@
     }
 
   /* set flag that palette must be regenerated */
-  FRAME_WIN32_DISPLAY_INFO (f)->regen_palette = TRUE;
+  FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
 }
 #endif
 
@@ -1397,21 +1397,21 @@
 {
   register Lisp_Object tem;
 
-  tem = x_to_win32_color (color);
+  tem = x_to_w32_color (color);
 
   if (!NILP (tem)) 
     {
-      if (!NILP (Vwin32_enable_palette))
+      if (!NILP (Vw32_enable_palette))
 	{
-	  struct win32_palette_entry * entry =
-	    FRAME_WIN32_DISPLAY_INFO (f)->color_list;
-	  struct win32_palette_entry ** prev =
-	    &FRAME_WIN32_DISPLAY_INFO (f)->color_list;
+	  struct w32_palette_entry * entry =
+	    FRAME_W32_DISPLAY_INFO (f)->color_list;
+	  struct w32_palette_entry ** prev =
+	    &FRAME_W32_DISPLAY_INFO (f)->color_list;
       
 	  /* check if color is already mapped */
 	  while (entry)
 	    {
-	      if (WIN32_COLOR (entry->entry) == XUINT (tem))
+	      if (W32_COLOR (entry->entry) == XUINT (tem))
 		break;
 	      prev = &entry->next;
 	      entry = entry->next;
@@ -1420,15 +1420,15 @@
 	  if (entry == NULL && alloc)
 	    {
 	      /* not already mapped, so add to list */
-	      entry = (struct win32_palette_entry *)
-		xmalloc (sizeof (struct win32_palette_entry));
-	      SET_WIN32_COLOR (entry->entry, XUINT (tem));
+	      entry = (struct w32_palette_entry *)
+		xmalloc (sizeof (struct w32_palette_entry));
+	      SET_W32_COLOR (entry->entry, XUINT (tem));
 	      entry->next = NULL;
 	      *prev = entry;
-	      FRAME_WIN32_DISPLAY_INFO (f)->num_colors++;
+	      FRAME_W32_DISPLAY_INFO (f)->num_colors++;
 
 	      /* set flag that palette must be regenerated */
-	      FRAME_WIN32_DISPLAY_INFO (f)->regen_palette = TRUE;
+	      FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
 	    }
 	}
       /* Ensure COLORREF value is snapped to nearest color in (default)
@@ -1463,7 +1463,7 @@
   else if (strcmp (XSTRING (arg)->data, "white") == 0)
     return WHITE_PIX_DEFAULT (f);
 
-  if ((FRAME_WIN32_DISPLAY_INFO (f)->n_planes * FRAME_WIN32_DISPLAY_INFO (f)->n_cbits) == 1)
+  if ((FRAME_W32_DISPLAY_INFO (f)->n_planes * FRAME_W32_DISPLAY_INFO (f)->n_cbits) == 1)
     return def;
 
   /* defined_color is responsible for coping with failures
@@ -1478,7 +1478,7 @@
 /* Functions called only from `x_set_frame_param'
    to set individual parameters.
 
-   If FRAME_WIN32_WINDOW (f) is 0,
+   If FRAME_W32_WINDOW (f) is 0,
    the frame is being created and its window does not exist yet.
    In that case, just record the parameter's new value
    in the standard place; do not attempt to change the window.  */
@@ -1488,10 +1488,10 @@
      struct frame *f;
      Lisp_Object arg, oldval;
 {
-  f->output_data.win32->foreground_pixel
+  f->output_data.w32->foreground_pixel
     = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
 
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  if (FRAME_W32_WINDOW (f) != 0)
     {
       recompute_basic_faces (f);
       if (FRAME_VISIBLE_P (f))
@@ -1507,12 +1507,12 @@
   Pixmap temp;
   int mask;
 
-  f->output_data.win32->background_pixel
+  f->output_data.w32->background_pixel
     = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
 
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  if (FRAME_W32_WINDOW (f) != 0)
     {
-      SetWindowLong (FRAME_WIN32_WINDOW (f), WND_BACKGROUND_INDEX, f->output_data.win32->background_pixel);
+      SetWindowLong (FRAME_W32_WINDOW (f), WND_BACKGROUND_INDEX, f->output_data.w32->background_pixel);
 
       recompute_basic_faces (f);
 
@@ -1532,110 +1532,110 @@
   int mask_color;
 
   if (!EQ (Qnil, arg))
-    f->output_data.win32->mouse_pixel
+    f->output_data.w32->mouse_pixel
       = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
-  mask_color = f->output_data.win32->background_pixel;
+  mask_color = f->output_data.w32->background_pixel;
 				/* No invisible pointers.  */
-  if (mask_color == f->output_data.win32->mouse_pixel
-	&& mask_color == f->output_data.win32->background_pixel)
-    f->output_data.win32->mouse_pixel = f->output_data.win32->foreground_pixel;
+  if (mask_color == f->output_data.w32->mouse_pixel
+	&& mask_color == f->output_data.w32->background_pixel)
+    f->output_data.w32->mouse_pixel = f->output_data.w32->foreground_pixel;
 
 #if 0
   BLOCK_INPUT;
 
   /* It's not okay to crash if the user selects a screwy cursor.  */
-  x_catch_errors (FRAME_WIN32_DISPLAY (f));
+  x_catch_errors (FRAME_W32_DISPLAY (f));
 
   if (!EQ (Qnil, Vx_pointer_shape))
     {
       CHECK_NUMBER (Vx_pointer_shape, 0);
-      cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f), XINT (Vx_pointer_shape));
+      cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape));
     }
   else
-    cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f), XC_xterm);
-  x_check_errors (FRAME_WIN32_DISPLAY (f), "bad text pointer cursor: %s");
+    cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm);
+  x_check_errors (FRAME_W32_DISPLAY (f), "bad text pointer cursor: %s");
 
   if (!EQ (Qnil, Vx_nontext_pointer_shape))
     {
       CHECK_NUMBER (Vx_nontext_pointer_shape, 0);
-      nontext_cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f),
+      nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
 					  XINT (Vx_nontext_pointer_shape));
     }
   else
-    nontext_cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f), XC_left_ptr);
-  x_check_errors (FRAME_WIN32_DISPLAY (f), "bad nontext pointer cursor: %s");
+    nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_left_ptr);
+  x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s");
 
   if (!EQ (Qnil, Vx_mode_pointer_shape))
     {
       CHECK_NUMBER (Vx_mode_pointer_shape, 0);
-      mode_cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f),
+      mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
 				       XINT (Vx_mode_pointer_shape));
     }
   else
-    mode_cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f), XC_xterm);
-  x_check_errors (FRAME_WIN32_DISPLAY (f), "bad modeline pointer cursor: %s");
+    mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm);
+  x_check_errors (FRAME_W32_DISPLAY (f), "bad modeline pointer cursor: %s");
 
   if (!EQ (Qnil, Vx_sensitive_text_pointer_shape))
     {
       CHECK_NUMBER (Vx_sensitive_text_pointer_shape, 0);
       cross_cursor
-	= XCreateFontCursor (FRAME_WIN32_DISPLAY (f),
+	= XCreateFontCursor (FRAME_W32_DISPLAY (f),
 			     XINT (Vx_sensitive_text_pointer_shape));
     }
   else
-    cross_cursor = XCreateFontCursor (FRAME_WIN32_DISPLAY (f), XC_crosshair);
+    cross_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair);
 
   /* Check and report errors with the above calls.  */
-  x_check_errors (FRAME_WIN32_DISPLAY (f), "can't set cursor shape: %s");
-  x_uncatch_errors (FRAME_WIN32_DISPLAY (f));
+  x_check_errors (FRAME_W32_DISPLAY (f), "can't set cursor shape: %s");
+  x_uncatch_errors (FRAME_W32_DISPLAY (f));
 
   {
     XColor fore_color, back_color;
 
-    fore_color.pixel = f->output_data.win32->mouse_pixel;
+    fore_color.pixel = f->output_data.w32->mouse_pixel;
     back_color.pixel = mask_color;
-    XQueryColor (FRAME_WIN32_DISPLAY (f),
-		 DefaultColormap (FRAME_WIN32_DISPLAY (f),
-				  DefaultScreen (FRAME_WIN32_DISPLAY (f))),
+    XQueryColor (FRAME_W32_DISPLAY (f),
+		 DefaultColormap (FRAME_W32_DISPLAY (f),
+				  DefaultScreen (FRAME_W32_DISPLAY (f))),
 		 &fore_color);
-    XQueryColor (FRAME_WIN32_DISPLAY (f),
-		 DefaultColormap (FRAME_WIN32_DISPLAY (f),
-				  DefaultScreen (FRAME_WIN32_DISPLAY (f))),
+    XQueryColor (FRAME_W32_DISPLAY (f),
+		 DefaultColormap (FRAME_W32_DISPLAY (f),
+				  DefaultScreen (FRAME_W32_DISPLAY (f))),
 		 &back_color);
-    XRecolorCursor (FRAME_WIN32_DISPLAY (f), cursor,
+    XRecolorCursor (FRAME_W32_DISPLAY (f), cursor,
 		    &fore_color, &back_color);
-    XRecolorCursor (FRAME_WIN32_DISPLAY (f), nontext_cursor,
+    XRecolorCursor (FRAME_W32_DISPLAY (f), nontext_cursor,
 		    &fore_color, &back_color);
-    XRecolorCursor (FRAME_WIN32_DISPLAY (f), mode_cursor,
+    XRecolorCursor (FRAME_W32_DISPLAY (f), mode_cursor,
 		    &fore_color, &back_color);
-    XRecolorCursor (FRAME_WIN32_DISPLAY (f), cross_cursor,
+    XRecolorCursor (FRAME_W32_DISPLAY (f), cross_cursor,
                     &fore_color, &back_color);
   }
 
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  if (FRAME_W32_WINDOW (f) != 0)
     {
-      XDefineCursor (FRAME_WIN32_DISPLAY (f), FRAME_WIN32_WINDOW (f), cursor);
+      XDefineCursor (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), cursor);
     }
 
-  if (cursor != f->output_data.win32->text_cursor && f->output_data.win32->text_cursor != 0)
-    XFreeCursor (FRAME_WIN32_DISPLAY (f), f->output_data.win32->text_cursor);
-  f->output_data.win32->text_cursor = cursor;
-
-  if (nontext_cursor != f->output_data.win32->nontext_cursor
-      && f->output_data.win32->nontext_cursor != 0)
-    XFreeCursor (FRAME_WIN32_DISPLAY (f), f->output_data.win32->nontext_cursor);
-  f->output_data.win32->nontext_cursor = nontext_cursor;
-
-  if (mode_cursor != f->output_data.win32->modeline_cursor
-      && f->output_data.win32->modeline_cursor != 0)
-    XFreeCursor (FRAME_WIN32_DISPLAY (f), f->output_data.win32->modeline_cursor);
-  f->output_data.win32->modeline_cursor = mode_cursor;
-  if (cross_cursor != f->output_data.win32->cross_cursor
-      && f->output_data.win32->cross_cursor != 0)
-    XFreeCursor (FRAME_WIN32_DISPLAY (f), f->output_data.win32->cross_cursor);
-  f->output_data.win32->cross_cursor = cross_cursor;
-
-  XFlush (FRAME_WIN32_DISPLAY (f));
+  if (cursor != f->output_data.w32->text_cursor && f->output_data.w32->text_cursor != 0)
+    XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->text_cursor);
+  f->output_data.w32->text_cursor = cursor;
+
+  if (nontext_cursor != f->output_data.w32->nontext_cursor
+      && f->output_data.w32->nontext_cursor != 0)
+    XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->nontext_cursor);
+  f->output_data.w32->nontext_cursor = nontext_cursor;
+
+  if (mode_cursor != f->output_data.w32->modeline_cursor
+      && f->output_data.w32->modeline_cursor != 0)
+    XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->modeline_cursor);
+  f->output_data.w32->modeline_cursor = mode_cursor;
+  if (cross_cursor != f->output_data.w32->cross_cursor
+      && f->output_data.w32->cross_cursor != 0)
+    XFreeCursor (FRAME_W32_DISPLAY (f), f->output_data.w32->cross_cursor);
+  f->output_data.w32->cross_cursor = cross_cursor;
+
+  XFlush (FRAME_W32_DISPLAY (f));
   UNBLOCK_INPUT;
 #endif
 }
@@ -1651,19 +1651,19 @@
     fore_pixel = x_decode_color (f, Vx_cursor_fore_pixel,
 				 WHITE_PIX_DEFAULT (f));
   else
-    fore_pixel = f->output_data.win32->background_pixel;
-  f->output_data.win32->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
+    fore_pixel = f->output_data.w32->background_pixel;
+  f->output_data.w32->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
   
   /* Make sure that the cursor color differs from the background color.  */
-  if (f->output_data.win32->cursor_pixel == f->output_data.win32->background_pixel)
+  if (f->output_data.w32->cursor_pixel == f->output_data.w32->background_pixel)
     {
-      f->output_data.win32->cursor_pixel = f->output_data.win32->mouse_pixel;
-      if (f->output_data.win32->cursor_pixel == fore_pixel)
-	fore_pixel = f->output_data.win32->background_pixel;
+      f->output_data.w32->cursor_pixel = f->output_data.w32->mouse_pixel;
+      if (f->output_data.w32->cursor_pixel == fore_pixel)
+	fore_pixel = f->output_data.w32->background_pixel;
     }
-  f->output_data.win32->cursor_foreground_pixel = fore_pixel;
-
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  f->output_data.w32->cursor_foreground_pixel = fore_pixel;
+
+  if (FRAME_W32_WINDOW (f) != 0)
     {
       if (FRAME_VISIBLE_P (f))
 	{
@@ -1703,9 +1703,9 @@
      struct frame *f;
      int pix;
 {
-  f->output_data.win32->border_pixel = pix;
-
-  if (FRAME_WIN32_WINDOW (f) != 0 && f->output_data.win32->border_width > 0)
+  f->output_data.w32->border_pixel = pix;
+
+  if (FRAME_W32_WINDOW (f) != 0 && f->output_data.w32->border_width > 0)
     {
       if (FRAME_VISIBLE_P (f))
         redraw_frame (f);
@@ -1720,13 +1720,13 @@
   if (EQ (arg, Qbar))
     {
       FRAME_DESIRED_CURSOR (f) = bar_cursor;
-      f->output_data.win32->cursor_width = 2;
+      f->output_data.w32->cursor_width = 2;
     }
   else if (CONSP (arg) && EQ (XCONS (arg)->car, Qbar)
 	   && INTEGERP (XCONS (arg)->cdr))
     {
       FRAME_DESIRED_CURSOR (f) = bar_cursor;
-      f->output_data.win32->cursor_width = XINT (XCONS (arg)->cdr);
+      f->output_data.w32->cursor_width = XINT (XCONS (arg)->cdr);
     }
   else
     /* Treat anything unknown as "box cursor".
@@ -1776,12 +1776,12 @@
   if (FRAME_VISIBLE_P (f))
     {
 #ifdef USE_X_TOOLKIT
-      XtPopup (f->output_data.win32->widget, XtGrabNone);
+      XtPopup (f->output_data.w32->widget, XtGrabNone);
 #endif
-      XMapWindow (FRAME_WIN32_DISPLAY (f), FRAME_WIN32_WINDOW (f));
+      XMapWindow (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f));
     }
 
-  XFlush (FRAME_WIN32_DISPLAY (f));
+  XFlush (FRAME_W32_DISPLAY (f));
   UNBLOCK_INPUT;
 #endif
 }
@@ -1820,7 +1820,7 @@
   f->icon_name = arg;
 
 #if 0
-  if (f->output_data.win32->icon_bitmap != 0)
+  if (f->output_data.w32->icon_bitmap != 0)
     return;
 
   BLOCK_INPUT;
@@ -1841,12 +1841,12 @@
   if (FRAME_VISIBLE_P (f))
     {
 #ifdef USE_X_TOOLKIT
-      XtPopup (f->output_data.win32->widget, XtGrabNone);
+      XtPopup (f->output_data.w32->widget, XtGrabNone);
 #endif
-      XMapWindow (FRAME_WIN32_DISPLAY (f), FRAME_WIN32_WINDOW (f));
+      XMapWindow (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f));
     }
 
-  XFlush (FRAME_WIN32_DISPLAY (f));
+  XFlush (FRAME_W32_DISPLAY (f));
   UNBLOCK_INPUT;
 #endif
 }
@@ -1886,13 +1886,13 @@
 {
   CHECK_NUMBER (arg, 0);
 
-  if (XINT (arg) == f->output_data.win32->border_width)
+  if (XINT (arg) == f->output_data.w32->border_width)
     return;
 
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  if (FRAME_W32_WINDOW (f) != 0)
     error ("Cannot change the border width of a window");
 
-  f->output_data.win32->border_width = XINT (arg);
+  f->output_data.w32->border_width = XINT (arg);
 }
 
 void
@@ -1901,17 +1901,17 @@
      Lisp_Object arg, oldval;
 {
   int mask;
-  int old = f->output_data.win32->internal_border_width;
+  int old = f->output_data.w32->internal_border_width;
 
   CHECK_NUMBER (arg, 0);
-  f->output_data.win32->internal_border_width = XINT (arg);
-  if (f->output_data.win32->internal_border_width < 0)
-    f->output_data.win32->internal_border_width = 0;
-
-  if (f->output_data.win32->internal_border_width == old)
+  f->output_data.w32->internal_border_width = XINT (arg);
+  if (f->output_data.w32->internal_border_width < 0)
+    f->output_data.w32->internal_border_width = 0;
+
+  if (f->output_data.w32->internal_border_width == old)
     return;
 
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  if (FRAME_W32_WINDOW (f) != 0)
     {
       BLOCK_INPUT;
       x_set_window_size (f, 0, f->width, f->height);
@@ -1968,7 +1968,7 @@
 }
 
 /* Change the name of frame F to NAME.  If NAME is nil, set F's name to
-       win32_id_name.
+       w32_id_name.
 
    If EXPLICIT is non-zero, that indicates that lisp code is setting the
        name; if NAME is a string, set F's name to NAME and set
@@ -1998,15 +1998,15 @@
   else if (f->explicit_name)
     return;
 
-  /* If NAME is nil, set the name to the win32_id_name.  */
+  /* If NAME is nil, set the name to the w32_id_name.  */
   if (NILP (name))
     {
       /* Check for no change needed in this very common case
 	 before we do any consing.  */
-      if (!strcmp (FRAME_WIN32_DISPLAY_INFO (f)->win32_id_name,
+      if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->w32_id_name,
 		   XSTRING (f->name)->data))
 	return;
-      name = build_string (FRAME_WIN32_DISPLAY_INFO (f)->win32_id_name);
+      name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name);
     }
   else
     CHECK_STRING (name, 0);
@@ -2015,10 +2015,10 @@
   if (! NILP (Fstring_equal (name, f->name)))
     return;
 
-  if (FRAME_WIN32_WINDOW (f))
+  if (FRAME_W32_WINDOW (f))
     {
       BLOCK_INPUT;
-      SetWindowText(FRAME_WIN32_WINDOW (f), XSTRING (name)->data);
+      SetWindowText(FRAME_W32_WINDOW (f), XSTRING (name)->data);
       UNBLOCK_INPUT;
     }
 
@@ -2091,7 +2091,7 @@
 	 frame, so we can get the geometry right from the start.
 	 However, if the window hasn't been created yet, we shouldn't
 	 call x_set_window_size.  */
-      if (FRAME_WIN32_WINDOW (f))
+      if (FRAME_W32_WINDOW (f))
 	x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f));
     }
 }
@@ -2109,10 +2109,10 @@
   else if (INTEGERP (arg) && XINT (arg) > 0
 	   && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f))
     {
-      int wid = FONT_WIDTH (f->output_data.win32->font);
+      int wid = FONT_WIDTH (f->output_data.w32->font);
       FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg);
       FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid;
-      if (FRAME_WIN32_WINDOW (f))
+      if (FRAME_W32_WINDOW (f))
 	x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f));
     }
 }
@@ -2474,8 +2474,8 @@
   f->height = DEFAULT_ROWS;
   /* Window managers expect that if program-specified
      positions are not (0,0), they're intentional, not defaults.  */
-  f->output_data.win32->top_pos = 0;
-  f->output_data.win32->left_pos = 0;
+  f->output_data.w32->top_pos = 0;
+  f->output_data.w32->left_pos = 0;
 
   tem0 = x_get_arg (parms, Qheight, 0, 0, number);
   tem1 = x_get_arg (parms, Qwidth, 0, 0, number);
@@ -2498,14 +2498,14 @@
 	window_prompting |= PSize;
     }
 
-  f->output_data.win32->vertical_scroll_bar_extra
+  f->output_data.w32->vertical_scroll_bar_extra
     = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
        ? 0
        : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.win32->font)));
-  f->output_data.win32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
-  f->output_data.win32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font)));
+  f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
+  f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
 
   tem0 = x_get_arg (parms, Qtop, 0, 0, number);
   tem1 = x_get_arg (parms, Qleft, 0, 0, number);
@@ -2514,57 +2514,57 @@
     {
       if (EQ (tem0, Qminus))
 	{
-	  f->output_data.win32->top_pos = 0;
+	  f->output_data.w32->top_pos = 0;
 	  window_prompting |= YNegative;
 	}
       else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qminus)
 	       && CONSP (XCONS (tem0)->cdr)
 	       && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
 	{
-	  f->output_data.win32->top_pos = - XINT (XCONS (XCONS (tem0)->cdr)->car);
+	  f->output_data.w32->top_pos = - XINT (XCONS (XCONS (tem0)->cdr)->car);
 	  window_prompting |= YNegative;
 	}
       else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qplus)
 	       && CONSP (XCONS (tem0)->cdr)
 	       && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
 	{
-	  f->output_data.win32->top_pos = XINT (XCONS (XCONS (tem0)->cdr)->car);
+	  f->output_data.w32->top_pos = XINT (XCONS (XCONS (tem0)->cdr)->car);
 	}
       else if (EQ (tem0, Qunbound))
-	f->output_data.win32->top_pos = 0;
+	f->output_data.w32->top_pos = 0;
       else
 	{
 	  CHECK_NUMBER (tem0, 0);
-	  f->output_data.win32->top_pos = XINT (tem0);
-	  if (f->output_data.win32->top_pos < 0)
+	  f->output_data.w32->top_pos = XINT (tem0);
+	  if (f->output_data.w32->top_pos < 0)
 	    window_prompting |= YNegative;
 	}
 
       if (EQ (tem1, Qminus))
 	{
-	  f->output_data.win32->left_pos = 0;
+	  f->output_data.w32->left_pos = 0;
 	  window_prompting |= XNegative;
 	}
       else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qminus)
 	       && CONSP (XCONS (tem1)->cdr)
 	       && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
 	{
-	  f->output_data.win32->left_pos = - XINT (XCONS (XCONS (tem1)->cdr)->car);
+	  f->output_data.w32->left_pos = - XINT (XCONS (XCONS (tem1)->cdr)->car);
 	  window_prompting |= XNegative;
 	}
       else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qplus)
 	       && CONSP (XCONS (tem1)->cdr)
 	       && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
 	{
-	  f->output_data.win32->left_pos = XINT (XCONS (XCONS (tem1)->cdr)->car);
+	  f->output_data.w32->left_pos = XINT (XCONS (XCONS (tem1)->cdr)->car);
 	}
       else if (EQ (tem1, Qunbound))
-	f->output_data.win32->left_pos = 0;
+	f->output_data.w32->left_pos = 0;
       else
 	{
 	  CHECK_NUMBER (tem1, 0);
-	  f->output_data.win32->left_pos = XINT (tem1);
-	  if (f->output_data.win32->left_pos < 0)
+	  f->output_data.w32->left_pos = XINT (tem1);
+	  if (f->output_data.w32->left_pos < 0)
 	    window_prompting |= XNegative;
 	}
 
@@ -2579,16 +2579,16 @@
 
 
 
-extern LRESULT CALLBACK win32_wnd_proc ();
+extern LRESULT CALLBACK w32_wnd_proc ();
 
 BOOL 
-win32_init_class (hinst)
+w32_init_class (hinst)
      HINSTANCE hinst;
 {
   WNDCLASS wc;
 
   wc.style = CS_HREDRAW | CS_VREDRAW;
-  wc.lpfnWndProc = (WNDPROC) win32_wnd_proc;
+  wc.lpfnWndProc = (WNDPROC) w32_wnd_proc;
   wc.cbClsExtra = 0;
   wc.cbWndExtra = WND_EXTRA_BYTES;
   wc.hInstance = hinst;
@@ -2602,7 +2602,7 @@
 }
 
 HWND 
-win32_createscrollbar (f, bar)
+w32_createscrollbar (f, bar)
      struct frame *f;
      struct scroll_bar * bar;
 {
@@ -2610,14 +2610,14 @@
 			/* Position and size of scroll bar.  */
 			XINT(bar->left), XINT(bar->top), 
 			XINT(bar->width), XINT(bar->height),
-			FRAME_WIN32_WINDOW (f),
+			FRAME_W32_WINDOW (f),
 			NULL,
 			hinst,
 			NULL));
 }
 
 void 
-win32_createwindow (f)
+w32_createwindow (f)
      struct frame *f;
 {
   HWND hwnd;
@@ -2626,14 +2626,14 @@
   
   if (!hprevinst)
     {
-      win32_init_class (hinst);
+      w32_init_class (hinst);
     }
   
-  FRAME_WIN32_WINDOW (f) = hwnd = CreateWindow (EMACS_CLASS,
+  FRAME_W32_WINDOW (f) = hwnd = CreateWindow (EMACS_CLASS,
 						f->namebuf,
-						f->output_data.win32->dwStyle | WS_CLIPCHILDREN,
-						f->output_data.win32->left_pos,
-						f->output_data.win32->top_pos,
+						f->output_data.w32->dwStyle | WS_CLIPCHILDREN,
+						f->output_data.w32->left_pos,
+						f->output_data.w32->top_pos,
 						PIXEL_WIDTH (f),
 						PIXEL_HEIGHT (f),
 						NULL,
@@ -2643,29 +2643,29 @@
   
   if (hwnd)
     {
-      SetWindowLong (hwnd, WND_X_UNITS_INDEX, FONT_WIDTH (f->output_data.win32->font));
-      SetWindowLong (hwnd, WND_Y_UNITS_INDEX, f->output_data.win32->line_height);
-      SetWindowLong (hwnd, WND_BACKGROUND_INDEX, f->output_data.win32->background_pixel);
+      SetWindowLong (hwnd, WND_X_UNITS_INDEX, FONT_WIDTH (f->output_data.w32->font));
+      SetWindowLong (hwnd, WND_Y_UNITS_INDEX, f->output_data.w32->line_height);
+      SetWindowLong (hwnd, WND_BACKGROUND_INDEX, f->output_data.w32->background_pixel);
 
       /* Do this to discard the default setting specified by our parent. */
       ShowWindow (hwnd, SW_HIDE);
     }
 }
 
-/* Convert between the modifier bits Win32 uses and the modifier bits
+/* Convert between the modifier bits W32 uses and the modifier bits
    Emacs uses.  */
 unsigned int
-win32_get_modifiers ()
+w32_get_modifiers ()
 {
   return (((GetKeyState (VK_SHIFT)&0x8000)   ? shift_modifier  : 0) |
 	  ((GetKeyState (VK_CONTROL)&0x8000) ? ctrl_modifier   : 0) |
           ((GetKeyState (VK_MENU)&0x8000)    ? 
-	   ((NILP (Vwin32_alt_is_meta)) ? alt_modifier : meta_modifier) : 0));
+	   ((NILP (Vw32_alt_is_meta)) ? alt_modifier : meta_modifier) : 0));
 }
 
 void 
 my_post_msg (wmsg, hwnd, msg, wParam, lParam)
-     Win32Msg * wmsg;
+     W32Msg * wmsg;
      HWND hwnd;
      UINT msg;
      WPARAM wParam;
@@ -2897,12 +2897,12 @@
 	  switch (msg.message)
 	    {
 	    case WM_EMACS_CREATEWINDOW:
-	      win32_createwindow ((struct frame *) msg.wParam);
+	      w32_createwindow ((struct frame *) msg.wParam);
 	      PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0);
 	      break;
 	    case WM_EMACS_CREATESCROLLBAR:
 	      {
-		HWND hwnd = win32_createscrollbar ((struct frame *) msg.wParam,
+		HWND hwnd = w32_createscrollbar ((struct frame *) msg.wParam,
 						   (struct scroll_bar *) msg.lParam);
 		PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, (WPARAM)hwnd, 0);
 	      }
@@ -2925,7 +2925,7 @@
 extern char *lispy_function_keys[];
 
 LRESULT CALLBACK 
-win32_wnd_proc (hwnd, msg, wParam, lParam)
+w32_wnd_proc (hwnd, msg, wParam, lParam)
      HWND hwnd;
      UINT msg;
      WPARAM wParam;
@@ -2933,8 +2933,8 @@
 {
   struct frame *f;
   LRESULT ret = 1;
-  struct win32_display_info *dpyinfo = &one_win32_display_info;
-  Win32Msg wmsg;
+  struct w32_display_info *dpyinfo = &one_w32_display_info;
+  W32Msg wmsg;
   int windows_translate;
 
   /* Note that it is okay to call x_window_to_frame, even though we are
@@ -2950,7 +2950,7 @@
      delete-frame has synchronized with this thread.
 
      It is also safe to use functions that make GDI calls, such as
-     win32_clear_rect, because these functions must obtain a DC handle
+     w32_clear_rect, because these functions must obtain a DC handle
      from the frame struct using get_frame_dc which is thread-aware.  */
 
   switch (msg) 
@@ -2960,7 +2960,7 @@
       if (f)
 	{
 	  GetUpdateRect (hwnd, &wmsg.rect, FALSE);
-	  win32_clear_rect (f, NULL, &wmsg.rect);
+	  w32_clear_rect (f, NULL, &wmsg.rect);
 	}
       return 1;
     case WM_PALETTECHANGED:
@@ -3009,11 +3009,11 @@
       case VK_RWIN:
       case VK_APPS:
 	/* More support for these keys will likely be necessary.  */
-	if (!NILP (Vwin32_pass_optional_keys_to_system))
+	if (!NILP (Vw32_pass_optional_keys_to_system))
 	  windows_translate = 1;
 	break;
       case VK_MENU:
-	if (NILP (Vwin32_pass_alt_to_system)) 
+	if (NILP (Vw32_pass_alt_to_system)) 
 	  return 0;
 	windows_translate = 1;
 	break;
@@ -3070,7 +3070,7 @@
 	 are used together, but only if user has two button mouse. */
     case WM_LBUTTONDOWN:
     case WM_RBUTTONDOWN:
-      if (XINT (Vwin32_num_mouse_buttons) == 3)
+      if (XINT (Vw32_num_mouse_buttons) == 3)
 	goto handle_plain_button;
 
       {
@@ -3109,7 +3109,7 @@
 		/* Flush out saved message. */
 		post_msg (&saved_mouse_button_msg);
 	      }
-	    wmsg.dwModifiers = win32_get_modifiers ();
+	    wmsg.dwModifiers = w32_get_modifiers ();
 	    my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
 
 	    /* Clear message buffer. */
@@ -3119,20 +3119,20 @@
 	  {
 	    /* Hold onto message for now. */
 	    mouse_button_timer =
-	      SetTimer (hwnd, MOUSE_BUTTON_ID, XINT (Vwin32_mouse_button_tolerance), NULL);
+	      SetTimer (hwnd, MOUSE_BUTTON_ID, XINT (Vw32_mouse_button_tolerance), NULL);
 	    saved_mouse_button_msg.msg.hwnd = hwnd;
 	    saved_mouse_button_msg.msg.message = msg;
 	    saved_mouse_button_msg.msg.wParam = wParam;
 	    saved_mouse_button_msg.msg.lParam = lParam;
 	    saved_mouse_button_msg.msg.time = GetMessageTime ();
-	    saved_mouse_button_msg.dwModifiers = win32_get_modifiers ();
+	    saved_mouse_button_msg.dwModifiers = w32_get_modifiers ();
 	  }
       }
       return 0;
 
     case WM_LBUTTONUP:
     case WM_RBUTTONUP:
-      if (XINT (Vwin32_num_mouse_buttons) == 3)
+      if (XINT (Vw32_num_mouse_buttons) == 3)
 	goto handle_plain_button;
 
       {
@@ -3165,7 +3165,7 @@
 		post_msg (&saved_mouse_button_msg);
 	      }
 	  }
-	wmsg.dwModifiers = win32_get_modifiers ();
+	wmsg.dwModifiers = w32_get_modifiers ();
 	my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
 
 	/* Always clear message buffer and cancel timer. */
@@ -3191,16 +3191,16 @@
 	  }
       }
       
-      wmsg.dwModifiers = win32_get_modifiers ();
+      wmsg.dwModifiers = w32_get_modifiers ();
       my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
       return 0;
 
     case WM_VSCROLL:
     case WM_MOUSEMOVE:
-      if (XINT (Vwin32_mouse_move_interval) <= 0
+      if (XINT (Vw32_mouse_move_interval) <= 0
 	  || (msg == WM_MOUSEMOVE && button_state == 0))
   	{
-	  wmsg.dwModifiers = win32_get_modifiers ();
+	  wmsg.dwModifiers = w32_get_modifiers ();
 	  my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
 	  return 0;
   	}
@@ -3212,7 +3212,7 @@
 
       if (saved_mouse_move_msg.msg.hwnd == 0)
 	mouse_move_timer =
-	  SetTimer (hwnd, MOUSE_MOVE_ID, XINT (Vwin32_mouse_move_interval), NULL);
+	  SetTimer (hwnd, MOUSE_MOVE_ID, XINT (Vw32_mouse_move_interval), NULL);
 
       /* Hold onto message for now. */
       saved_mouse_move_msg.msg.hwnd = hwnd;
@@ -3220,7 +3220,7 @@
       saved_mouse_move_msg.msg.wParam = wParam;
       saved_mouse_move_msg.msg.lParam = lParam;
       saved_mouse_move_msg.msg.time = GetMessageTime ();
-      saved_mouse_move_msg.dwModifiers = win32_get_modifiers ();
+      saved_mouse_move_msg.dwModifiers = w32_get_modifiers ();
   
       return 0;
 
@@ -3264,12 +3264,12 @@
     case WM_SIZE:
     case WM_SYSCOMMAND:
     case WM_COMMAND:
-      wmsg.dwModifiers = win32_get_modifiers ();
+      wmsg.dwModifiers = w32_get_modifiers ();
       my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
       goto dflt;
 
     case WM_CLOSE:
-      wmsg.dwModifiers = win32_get_modifiers ();
+      wmsg.dwModifiers = w32_get_modifiers ();
       my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
       return 0;
 
@@ -3343,7 +3343,7 @@
       return ShowWindow (hwnd, wParam);
     case WM_EMACS_SETWINDOWPOS:
       {
-	Win32WindowPos * pos = (Win32WindowPos *) wParam;
+	W32WindowPos * pos = (W32WindowPos *) wParam;
 	return SetWindowPos (hwnd, pos->hwndAfter,
 			     pos->x, pos->y, pos->cx, pos->cy, pos->flags);
       }
@@ -3368,10 +3368,10 @@
   GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
 }
 
-/* Create and set up the win32 window for frame F.  */
+/* Create and set up the w32 window for frame F.  */
 
 static void
-win32_window (f, window_prompting, minibuffer_only)
+w32_window (f, window_prompting, minibuffer_only)
      struct frame *f;
      long window_prompting;
      int minibuffer_only;
@@ -3413,7 +3413,7 @@
   if (!minibuffer_only && FRAME_EXTERNAL_MENU_BAR (f))
     initialize_frame_menubar (f);
 
-  if (FRAME_WIN32_WINDOW (f) == 0)
+  if (FRAME_W32_WINDOW (f) == 0)
     error ("Unable to create window");
 }
 
@@ -3471,7 +3471,7 @@
   int count = specpdl_ptr - specpdl;
   struct gcpro gcpro1;
   Lisp_Object display;
-  struct win32_display_info *dpyinfo;
+  struct w32_display_info *dpyinfo;
   Lisp_Object parent;
   struct kboard *kb;
 
@@ -3526,11 +3526,11 @@
   XSETFRAME (frame, f);
   GCPRO1 (frame);
 
-  f->output_method = output_win32;
-  f->output_data.win32 = (struct win32_output *) xmalloc (sizeof (struct win32_output));
-  bzero (f->output_data.win32, sizeof (struct win32_output));
-
-/*  FRAME_WIN32_DISPLAY_INFO (f) = dpyinfo; */
+  f->output_method = output_w32;
+  f->output_data.w32 = (struct w32_output *) xmalloc (sizeof (struct w32_output));
+  bzero (f->output_data.w32, sizeof (struct w32_output));
+
+/*  FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */
 #ifdef MULTI_KBOARD
   FRAME_KBOARD (f) = kb;
 #endif
@@ -3539,13 +3539,13 @@
 
   if (!NILP (parent))
     {
-      f->output_data.win32->parent_desc = (Window) parent;
-      f->output_data.win32->explicit_parent = 1;
+      f->output_data.w32->parent_desc = (Window) parent;
+      f->output_data.w32->explicit_parent = 1;
     }
   else
     {
-      f->output_data.win32->parent_desc = FRAME_WIN32_DISPLAY_INFO (f)->root_window;
-      f->output_data.win32->explicit_parent = 0;
+      f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
+      f->output_data.w32->explicit_parent = 0;
     }
 
   /* Note that the frame has no physical cursor right now.  */
@@ -3555,7 +3555,7 @@
      be set.  */
   if (EQ (name, Qunbound) || NILP (name))
     {
-      f->name = build_string (dpyinfo->win32_id_name);
+      f->name = build_string (dpyinfo->w32_id_name);
       f->explicit_name = 0;
     }
   else
@@ -3639,28 +3639,28 @@
   x_default_parameter (f, parms, Qscroll_bar_width, Qnil,
 		       "scrollBarWidth", "ScrollBarWidth", number);
 
-  f->output_data.win32->dwStyle = WS_OVERLAPPEDWINDOW;
-  f->output_data.win32->parent_desc = FRAME_WIN32_DISPLAY_INFO (f)->root_window;
+  f->output_data.w32->dwStyle = WS_OVERLAPPEDWINDOW;
+  f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
   window_prompting = x_figure_window_size (f, parms);
 
   if (window_prompting & XNegative)
     {
       if (window_prompting & YNegative)
-	f->output_data.win32->win_gravity = SouthEastGravity;
+	f->output_data.w32->win_gravity = SouthEastGravity;
       else
-	f->output_data.win32->win_gravity = NorthEastGravity;
+	f->output_data.w32->win_gravity = NorthEastGravity;
     }
   else
     {
       if (window_prompting & YNegative)
-	f->output_data.win32->win_gravity = SouthWestGravity;
+	f->output_data.w32->win_gravity = SouthWestGravity;
       else
-	f->output_data.win32->win_gravity = NorthWestGravity;
+	f->output_data.w32->win_gravity = NorthWestGravity;
     }
 
-  f->output_data.win32->size_hint_flags = window_prompting;
-
-  win32_window (f, window_prompting, minibuffer_only);
+  f->output_data.w32->size_hint_flags = window_prompting;
+
+  w32_window (f, window_prompting, minibuffer_only);
   x_icon (f, parms);
   init_frame_faces (f);
 
@@ -3704,12 +3704,12 @@
 
   /* Now that the frame is official, it counts as a reference to
      its display.  */
-  FRAME_WIN32_DISPLAY_INFO (f)->reference_count++;
+  FRAME_W32_DISPLAY_INFO (f)->reference_count++;
 
   /* Make the window appear on the frame and enable display,
      unless the caller says not to.  However, with explicit parent,
      Emacs cannot control visibility, so don't try.  */
-  if (! f->output_data.win32->explicit_parent)
+  if (! f->output_data.w32->explicit_parent)
     {
       Lisp_Object visibility;
 
@@ -3736,18 +3736,18 @@
 x_get_focus_frame (frame)
      struct frame *frame;
 {
-  struct win32_display_info *dpyinfo = FRAME_WIN32_DISPLAY_INFO (frame);
+  struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
   Lisp_Object xfocus;
-  if (! dpyinfo->win32_focus_frame)
+  if (! dpyinfo->w32_focus_frame)
     return Qnil;
 
-  XSETFRAME (xfocus, dpyinfo->win32_focus_frame);
+  XSETFRAME (xfocus, dpyinfo->w32_focus_frame);
   return xfocus;
 }
 
 XFontStruct *
-win32_load_font (dpyinfo,name)
-struct win32_display_info *dpyinfo;
+w32_load_font (dpyinfo,name)
+struct w32_display_info *dpyinfo;
 char * name;
 {
   XFontStruct * font = NULL;
@@ -3756,7 +3756,7 @@
   {
     LOGFONT lf;
 
-    if (!name || !x_to_win32_font (name, &lf))
+    if (!name || !x_to_w32_font (name, &lf))
       return (NULL);
 
     font = (XFontStruct *) xmalloc (sizeof (XFontStruct));
@@ -3788,13 +3788,13 @@
 
   if (ok) return (font);
 
-  win32_unload_font (dpyinfo, font);
+  w32_unload_font (dpyinfo, font);
   return (NULL);
 }
 
 void 
-win32_unload_font (dpyinfo, font)
-     struct win32_display_info *dpyinfo;
+w32_unload_font (dpyinfo, font)
+     struct w32_display_info *dpyinfo;
      XFontStruct * font;
 {
   if (font) 
@@ -3804,7 +3804,7 @@
     }
 }
 
-/* The font conversion stuff between x and win32 */
+/* The font conversion stuff between x and w32 */
 
 /* X font string is as follows (from faces.el)
  * (let ((- 		"[-?]")
@@ -3879,7 +3879,7 @@
 #define FONT_REGEXP_WEIGHT "-" FONT_WEIGHT "-"
 
 LONG 
-x_to_win32_weight (lpw)
+x_to_w32_weight (lpw)
      char * lpw;
 {
   if (!lpw) return (FW_DONTCARE);
@@ -3899,7 +3899,7 @@
 
 
 char * 
-win32_to_x_weight (fnweight)
+w32_to_x_weight (fnweight)
      int fnweight;
 {
   if (fnweight >= FW_HEAVY)      return "heavy";
@@ -3916,7 +3916,7 @@
 }
 
 LONG
-x_to_win32_charset (lpcs)
+x_to_w32_charset (lpcs)
     char * lpcs;
 {
   if (!lpcs) return (0);
@@ -3934,7 +3934,7 @@
 }
 
 char *
-win32_to_x_charset (fncharset)
+w32_to_x_charset (fncharset)
     int fncharset;
 {
   switch (fncharset)
@@ -3950,7 +3950,7 @@
 }
 
 BOOL 
-win32_to_x_font (lplogfont, lpxstr, len)
+w32_to_x_font (lplogfont, lpxstr, len)
      LOGFONT * lplogfont;
      char * lpxstr;
      int len;
@@ -3968,7 +3968,7 @@
     {
       sprintf (height_pixels, "%u", abs (lplogfont->lfHeight));
       sprintf (height_dpi, "%u",
-	       (abs (lplogfont->lfHeight) * 720) / one_win32_display_info.height_in);
+	       (abs (lplogfont->lfHeight) * 720) / one_w32_display_info.height_in);
     }
   else
     {
@@ -3983,13 +3983,13 @@
   _snprintf (lpxstr, len - 1,
 	     "-*-%s-%s-%c-*-*-%s-%s-*-*-%c-%s-*-%s-",
 	     lplogfont->lfFaceName,
-	     win32_to_x_weight (lplogfont->lfWeight),
+	     w32_to_x_weight (lplogfont->lfWeight),
 	     lplogfont->lfItalic?'i':'r',
 	     height_pixels,
 	     height_dpi,
 	     ((lplogfont->lfPitchAndFamily & 0x3) == VARIABLE_PITCH) ? 'p' : 'c',
 	     width_pixels,
-	     win32_to_x_charset (lplogfont->lfCharSet)
+	     w32_to_x_charset (lplogfont->lfCharSet)
 	     );
 
   lpxstr[len - 1] = 0;		/* just to be sure */
@@ -3997,7 +3997,7 @@
 }
 
 BOOL 
-x_to_win32_font (lpxstr, lplogfont)
+x_to_w32_font (lpxstr, lplogfont)
      char * lpxstr;
      LOGFONT * lplogfont;
 {
@@ -4049,11 +4049,11 @@
 
       fields--;
 
-      lplogfont->lfWeight = x_to_win32_weight ((fields > 0 ? weight : ""));
+      lplogfont->lfWeight = x_to_w32_weight ((fields > 0 ? weight : ""));
 
       fields--;
 
-      if (!NILP (Vwin32_enable_italics))
+      if (!NILP (Vw32_enable_italics))
 	lplogfont->lfItalic = (fields > 0 && slant == 'i');
 
       fields--;
@@ -4065,7 +4065,7 @@
 
       if (fields > 0 && lplogfont->lfHeight == 0 && height[0] != '*')
 	lplogfont->lfHeight = (atoi (height)
-			       * one_win32_display_info.height_in) / 720;
+			       * one_w32_display_info.height_in) / 720;
 
       fields--;
 
@@ -4090,7 +4090,7 @@
       encoding = remainder;
       if (strncmp (encoding, "*-", 2) == 0)
 	encoding += 2;
-      lplogfont->lfCharSet = x_to_win32_charset (fields > 0 ? encoding : "");
+      lplogfont->lfCharSet = x_to_w32_charset (fields > 0 ? encoding : "");
     }
   else
     {
@@ -4125,7 +4125,7 @@
 
       fields--;
 
-      lplogfont->lfWeight = x_to_win32_weight ((fields > 0 ? weight : ""));
+      lplogfont->lfWeight = x_to_w32_weight ((fields > 0 ? weight : ""));
     }
 
   /* This makes TrueType fonts work better. */
@@ -4135,7 +4135,7 @@
 }
 
 BOOL 
-win32_font_match (lpszfont1, lpszfont2)
+w32_font_match (lpszfont1, lpszfont2)
     char * lpszfont1;
     char * lpszfont2;
 {
@@ -4200,9 +4200,9 @@
 	lplf->elfLogFont.lfWidth = lpef->logfont.lfWidth;
       }
 
-    if (!win32_to_x_font (lplf, buf, 100)) return (0);
-
-    if (NILP (*(lpef->pattern)) || win32_font_match (buf, XSTRING (*(lpef->pattern))->data))
+    if (!w32_to_x_font (lplf, buf, 100)) return (0);
+
+    if (NILP (*(lpef->pattern)) || w32_font_match (buf, XSTRING (*(lpef->pattern))->data))
       {
 	*lpef->tail = Fcons (build_string (buf), Qnil);
 	lpef->tail = &XCONS (*lpef->tail)->cdr;
@@ -4270,25 +4270,25 @@
       int face_id;
 
       /* Don't die if we get called with a terminal frame.  */
-      if (! FRAME_WIN32_P (f))
-	error ("non-win32 frame used in `x-list-fonts'");
+      if (! FRAME_W32_P (f))
+	error ("non-w32 frame used in `x-list-fonts'");
 
       face_id = face_name_id_number (f, face);
 
       if (face_id < 0 || face_id >= FRAME_N_PARAM_FACES (f)
 	  || FRAME_PARAM_FACES (f) [face_id] == 0)
-	size_ref = f->output_data.win32->font;
+	size_ref = f->output_data.w32->font;
       else
 	{
 	  size_ref = FRAME_PARAM_FACES (f) [face_id]->font;
 	  if (size_ref == (XFontStruct *) (~0))
-	    size_ref = f->output_data.win32->font;
+	    size_ref = f->output_data.w32->font;
 	}
     }
 
   /* See if we cached the result for this particular query.  */
   list = Fassoc (pattern,
-		 XCONS (FRAME_WIN32_DISPLAY_INFO (f)->name_list_element)->cdr);
+		 XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->cdr);
 
   /* We have info in the cache for this PATTERN.  */
   if (!NILP (list))
@@ -4309,12 +4309,12 @@
 	{
 	  XFontStruct *thisinfo;
 
-          thisinfo = win32_load_font (FRAME_WIN32_DISPLAY_INFO (f), XSTRING (XCONS (tem)->car)->data);
+          thisinfo = w32_load_font (FRAME_W32_DISPLAY_INFO (f), XSTRING (XCONS (tem)->car)->data);
 
           if (thisinfo && same_size_fonts (thisinfo, size_ref))
 	    newlist = Fcons (XCONS (tem)->car, newlist);
 
-	  win32_unload_font (FRAME_WIN32_DISPLAY_INFO (f), thisinfo);
+	  w32_unload_font (FRAME_W32_DISPLAY_INFO (f), thisinfo);
         }
 
       UNBLOCK_INPUT;
@@ -4328,14 +4328,14 @@
   ef.pattern = &pattern;
   ef.tail = ef.head = &namelist;
   ef.numFonts = 0;
-  x_to_win32_font (STRINGP (pattern) ? XSTRING (pattern)->data : NULL, &ef.logfont);
+  x_to_w32_font (STRINGP (pattern) ? XSTRING (pattern)->data : NULL, &ef.logfont);
 
   {
-    ef.hdc = GetDC (FRAME_WIN32_WINDOW (f));
+    ef.hdc = GetDC (FRAME_W32_WINDOW (f));
 
     EnumFontFamilies (ef.hdc, NULL, (FONTENUMPROC) enum_font_cb1, (LPARAM)&ef);
     
-    ReleaseDC  (FRAME_WIN32_WINDOW (f), ef.hdc);
+    ReleaseDC  (FRAME_W32_WINDOW (f), ef.hdc);
   }
 
   UNBLOCK_INPUT;
@@ -4347,9 +4347,9 @@
 
       /* Make a list of all the fonts we got back.
 	 Store that in the font cache for the display.  */
-      XCONS (FRAME_WIN32_DISPLAY_INFO (f)->name_list_element)->cdr
+      XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->cdr
 	= Fcons (Fcons (pattern, namelist),
-		 XCONS (FRAME_WIN32_DISPLAY_INFO (f)->name_list_element)->cdr);
+		 XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->cdr);
 
       /* Make a list of the fonts that have the right width.  */
       list = Qnil;
@@ -4365,11 +4365,11 @@
 	      XFontStruct *thisinfo;
 
 	      BLOCK_INPUT;
-	      thisinfo = win32_load_font (FRAME_WIN32_DISPLAY_INFO (f), XSTRING (Fcar (cur))->data);
+	      thisinfo = w32_load_font (FRAME_W32_DISPLAY_INFO (f), XSTRING (Fcar (cur))->data);
 
 	      keeper = thisinfo && same_size_fonts (thisinfo, size_ref);
 
-	      win32_unload_font (FRAME_WIN32_DISPLAY_INFO (f), thisinfo);
+	      w32_unload_font (FRAME_W32_DISPLAY_INFO (f), thisinfo);
 
 	      UNBLOCK_INPUT;
 	    }
@@ -4436,7 +4436,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 2)
     return Qnil;
@@ -4454,7 +4454,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 1)
     return Qnil;
@@ -4471,7 +4471,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return make_number (dpyinfo->width);
 }
@@ -4485,7 +4485,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return make_number (dpyinfo->height);
 }
@@ -4499,7 +4499,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return make_number (dpyinfo->n_planes * dpyinfo->n_cbits);
 }
@@ -4513,7 +4513,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
   HDC hdc;
   int cap;
 
@@ -4538,20 +4538,20 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return make_number (1);
 }
 
 DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
-  "Returns the vendor ID string of the Win32 system (Microsoft).\n\
+  "Returns the vendor ID string of the W32 system (Microsoft).\n\
 The optional argument DISPLAY specifies which display to ask about.\n\
 DISPLAY should be either a frame or a display name (a string).\n\
 If omitted or nil, that stands for the selected frame's display.")
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
   char *vendor = "Microsoft Corp.";
 
   if (! vendor) vendor = "";
@@ -4569,10 +4569,10 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
-
-  return Fcons (make_number (nt_major_version),
-		Fcons (make_number (nt_minor_version), Qnil));
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
+
+  return Fcons (make_number (w32_major_version),
+		Fcons (make_number (w32_minor_version), Qnil));
 }
 
 DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0,
@@ -4583,7 +4583,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return make_number (1);
 }
@@ -4596,7 +4596,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
   HDC hdc;
   int cap;
 
@@ -4617,7 +4617,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   HDC hdc;
   int cap;
@@ -4655,7 +4655,7 @@
 	(display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
 #if 0
   switch (dpyinfo->visual->class)
@@ -4683,7 +4683,7 @@
   (display)
      Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return Qnil;
 }
@@ -4706,37 +4706,37 @@
 x_char_width (f)
      register struct frame *f;
 {
-  return FONT_WIDTH (f->output_data.win32->font);
+  return FONT_WIDTH (f->output_data.w32->font);
 }
 
 int
 x_char_height (f)
      register struct frame *f;
 {
-  return f->output_data.win32->line_height;
+  return f->output_data.w32->line_height;
 }
 
 int
 x_screen_planes (frame)
      Lisp_Object frame;
 {
-  return (FRAME_WIN32_DISPLAY_INFO (XFRAME (frame))->n_planes * 
-	  FRAME_WIN32_DISPLAY_INFO (XFRAME (frame))->n_cbits);
+  return (FRAME_W32_DISPLAY_INFO (XFRAME (frame))->n_planes * 
+	  FRAME_W32_DISPLAY_INFO (XFRAME (frame))->n_cbits);
 }
 
 /* Return the display structure for the display named NAME.
    Open a new connection if necessary.  */
 
-struct win32_display_info *
+struct w32_display_info *
 x_display_info_for_name (name)
      Lisp_Object name;
 {
   Lisp_Object names;
-  struct win32_display_info *dpyinfo;
+  struct w32_display_info *dpyinfo;
 
   CHECK_STRING (name, 0);
 
-  for (dpyinfo = &one_win32_display_info, names = win32_display_name_list;
+  for (dpyinfo = &one_w32_display_info, names = w32_display_name_list;
        dpyinfo;
        dpyinfo = dpyinfo->next, names = XCONS (names)->cdr)
     {
@@ -4751,7 +4751,7 @@
 
   validate_x_resource_name ();
 
-  dpyinfo = win32_term_init (name, (unsigned char *)0,
+  dpyinfo = w32_term_init (name, (unsigned char *)0,
 			     (char *) XSTRING (Vx_resource_name)->data);
 
   if (dpyinfo == 0)
@@ -4773,7 +4773,7 @@
 {
   unsigned int n_planes;
   unsigned char *xrm_option;
-  struct win32_display_info *dpyinfo;
+  struct w32_display_info *dpyinfo;
 
   CHECK_STRING (display, 0);
   if (! NILP (xrm_string))
@@ -4794,12 +4794,12 @@
 	Fexpand_file_name (build_string ("rgb.txt"),
 			   Fsymbol_value (intern ("data-directory")));
 
-    Vwin32_color_map = Fwin32_load_color_file (color_file);
+    Vw32_color_map = Fw32_load_color_file (color_file);
 
     UNGCPRO;
   }
-  if (NILP (Vwin32_color_map))
-    Vwin32_color_map = Fwin32_default_color_map ();
+  if (NILP (Vw32_color_map))
+    Vw32_color_map = Fw32_default_color_map ();
 
   if (! NILP (xrm_string))
     xrm_option = (unsigned char *) XSTRING (xrm_string)->data;
@@ -4822,7 +4822,7 @@
 
   /* This is what opens the connection and sets x_current_display.
      This also initializes many symbols, such as those used for input.  */
-  dpyinfo = win32_term_init (display, xrm_option,
+  dpyinfo = w32_term_init (display, xrm_option,
 			     (char *) XSTRING (Vx_resource_name)->data);
 
   if (dpyinfo == 0)
@@ -4846,8 +4846,8 @@
   (display)
   Lisp_Object display;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
-  struct win32_display_info *tail;
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *tail;
   int i;
 
   if (dpyinfo->reference_count > 0)
@@ -4861,7 +4861,7 @@
 	free (dpyinfo->font_table[i].name);
       /* Don't free the full_name string;
 	 it is always shared with something else.  */
-      win32_unload_font (dpyinfo, dpyinfo->font_table[i].font);
+      w32_unload_font (dpyinfo, dpyinfo->font_table[i].font);
     }
   x_destroy_all_bitmaps (dpyinfo);
 
@@ -4878,7 +4878,7 @@
   Lisp_Object tail, result;
 
   result = Qnil;
-  for (tail = win32_display_name_list; ! NILP (tail); tail = XCONS (tail)->cdr)
+  for (tail = w32_display_name_list; ! NILP (tail); tail = XCONS (tail)->cdr)
     result = Fcons (XCONS (XCONS (tail)->car)->car, result);
 
   return result;
@@ -4887,23 +4887,23 @@
 DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0,
    "If ON is non-nil, report errors as soon as the erring request is made.\n\
 If ON is nil, allow buffering of requests.\n\
-This is a noop on Win32 systems.\n\
+This is a noop on W32 systems.\n\
 The optional second argument DISPLAY specifies which display to act on.\n\
 DISPLAY should be either a frame or a display name (a string).\n\
 If DISPLAY is omitted or nil, that stands for the selected frame's display.")
   (on, display)
     Lisp_Object display, on;
 {
-  struct win32_display_info *dpyinfo = check_x_display_info (display);
+  struct w32_display_info *dpyinfo = check_x_display_info (display);
 
   return Qnil;
 }
 
 
-/* These are the win32 specialized functions */
-
-DEFUN ("win32-select-font", Fwin32_select_font, Swin32_select_font, 0, 1, 0,
-   "This will display the Win32 font dialog and return an X font string corresponding to the selection.")
+/* These are the w32 specialized functions */
+
+DEFUN ("w32-select-font", Fw32_select_font, Sw32_select_font, 0, 1, 0,
+   "This will display the W32 font dialog and return an X font string corresponding to the selection.")
   (frame)
      Lisp_Object frame;
 {
@@ -4915,18 +4915,18 @@
   bzero (&cf, sizeof (cf));
 
   cf.lStructSize = sizeof (cf);
-  cf.hwndOwner = FRAME_WIN32_WINDOW (f);
+  cf.hwndOwner = FRAME_W32_WINDOW (f);
   cf.Flags = CF_FIXEDPITCHONLY | CF_FORCEFONTEXIST | CF_SCREENFONTS;
   cf.lpLogFont = &lf;
 
-  if (!ChooseFont (&cf) || !win32_to_x_font (&lf, buf, 100))
+  if (!ChooseFont (&cf) || !w32_to_x_font (&lf, buf, 100))
       return Qnil;
 
   return build_string (buf);
 }
 
 
-syms_of_win32fns ()
+syms_of_w32fns ()
 {
   /* The section below is built by the lisp expression at the top of the file,
      just above where these variables are declared.  */
@@ -5004,56 +5004,56 @@
   Fput (Qundefined_color, Qerror_message,
 	build_string ("Undefined color"));
 
-  DEFVAR_LISP ("win32-color-map", &Vwin32_color_map,
+  DEFVAR_LISP ("w32-color-map", &Vw32_color_map,
 	       "A array of color name mappings for windows.");
-  Vwin32_color_map = Qnil;
-
-  DEFVAR_LISP ("win32-pass-alt-to-system", &Vwin32_pass_alt_to_system,
+  Vw32_color_map = Qnil;
+
+  DEFVAR_LISP ("w32-pass-alt-to-system", &Vw32_pass_alt_to_system,
 	       "Non-nil if alt key presses are passed on to Windows.\n\
 When non-nil, for example, alt pressed and released and then space will\n\
 open the System menu.  When nil, Emacs silently swallows alt key events.");
-  Vwin32_pass_alt_to_system = Qnil;
-
-  DEFVAR_LISP ("win32-alt-is-meta", &Vwin32_alt_is_meta,
+  Vw32_pass_alt_to_system = Qnil;
+
+  DEFVAR_LISP ("w32-alt-is-meta", &Vw32_alt_is_meta,
 	       "Non-nil if the alt key is to be considered the same as the meta key.\n\
 When nil, Emacs will translate the alt key to the Alt modifier, and not Meta.");
-  Vwin32_alt_is_meta = Qt;
-
-  DEFVAR_LISP ("win32-pass-optional-keys-to-system", 
-	       &Vwin32_pass_optional_keys_to_system,
+  Vw32_alt_is_meta = Qt;
+
+  DEFVAR_LISP ("w32-pass-optional-keys-to-system", 
+	       &Vw32_pass_optional_keys_to_system,
 	       "Non-nil if the 'optional' keys (left window, right window,\n\
 and application keys) are passed on to Windows.");
-  Vwin32_pass_optional_keys_to_system = Qnil;
-
-  DEFVAR_LISP ("win32-enable-italics", &Vwin32_enable_italics,
+  Vw32_pass_optional_keys_to_system = Qnil;
+
+  DEFVAR_LISP ("w32-enable-italics", &Vw32_enable_italics,
 	       "Non-nil enables selection of artificially italicized fonts.");
-  Vwin32_enable_italics = Qnil;
-
-  DEFVAR_LISP ("win32-enable-palette", &Vwin32_enable_palette,
+  Vw32_enable_italics = Qnil;
+
+  DEFVAR_LISP ("w32-enable-palette", &Vw32_enable_palette,
 	       "Non-nil enables Windows palette management to map colors exactly.");
-  Vwin32_enable_palette = Qt;
-
-  DEFVAR_INT ("win32-mouse-button-tolerance",
-	      &Vwin32_mouse_button_tolerance,
+  Vw32_enable_palette = Qt;
+
+  DEFVAR_INT ("w32-mouse-button-tolerance",
+	      &Vw32_mouse_button_tolerance,
 	      "Analogue of double click interval for faking middle mouse events.\n\
 The value is the minimum time in milliseconds that must elapse between\n\
 left/right button down events before they are considered distinct events.\n\
 If both mouse buttons are depressed within this interval, a middle mouse\n\
 button down event is generated instead.");
-  XSETINT (Vwin32_mouse_button_tolerance, GetDoubleClickTime () / 2);
-
-  DEFVAR_INT ("win32-mouse-move-interval",
-	      &Vwin32_mouse_move_interval,
+  XSETINT (Vw32_mouse_button_tolerance, GetDoubleClickTime () / 2);
+
+  DEFVAR_INT ("w32-mouse-move-interval",
+	      &Vw32_mouse_move_interval,
 	      "Minimum interval between mouse move events.\n\
 The value is the minimum time in milliseconds that must elapse between\n\
 successive mouse move (or scroll bar drag) events before they are\n\
 reported as lisp events.");
-  XSETINT (Vwin32_mouse_move_interval, 50);
+  XSETINT (Vw32_mouse_move_interval, 50);
 
   init_x_parm_symbols ();
 
   DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path,
-    "List of directories to search for bitmap files for win32.");
+    "List of directories to search for bitmap files for w32.");
   Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH");
 
   DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape,
@@ -5122,18 +5122,18 @@
   defsubr (&Sx_display_list);
   defsubr (&Sx_synchronize);
 
-  /* Win32 specific functions */
-
-  defsubr (&Swin32_select_font);
-  defsubr (&Swin32_define_rgb_color);
-  defsubr (&Swin32_default_color_map);
-  defsubr (&Swin32_load_color_file);
+  /* W32 specific functions */
+
+  defsubr (&Sw32_select_font);
+  defsubr (&Sw32_define_rgb_color);
+  defsubr (&Sw32_default_color_map);
+  defsubr (&Sw32_load_color_file);
 }
 
 #undef abort
 
 void 
-win32_abort()
+w32_abort()
 {
   int button;
   button = MessageBox (NULL,
--- a/src/w32heap.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32heap.c	Tue Nov 19 04:59:23 1996 +0000
@@ -38,8 +38,8 @@
 int etext;
 
 /* The major and minor versions of NT.  */
-int nt_major_version;
-int nt_minor_version;
+int w32_major_version;
+int w32_minor_version;
 
 /* Cache information describing the NT system for later use.  */
 void
@@ -58,8 +58,8 @@
 
   /* Cache the version of the operating system.  */
   version.data = GetVersion ();
-  nt_major_version = version.info.major;
-  nt_minor_version = version.info.minor;
+  w32_major_version = version.info.major;
+  w32_minor_version = version.info.minor;
 
   /* Cache page size, allocation unit, processor type, etc.  */
   GetSystemInfo (&sysinfo_cache);
--- a/src/w32heap.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32heap.h	Tue Nov 19 04:59:23 1996 +0000
@@ -36,8 +36,8 @@
 #define get_page_size()			sysinfo_cache.dwPageSize
 #define get_allocation_unit()		sysinfo_cache.dwAllocationGranularity
 #define get_processor_type()		sysinfo_cache.dwProcessorType
-#define get_nt_major_version()  	nt_major_version
-#define get_nt_minor_version()  	nt_minor_version
+#define get_w32_major_version()  	w32_major_version
+#define get_w32_minor_version()  	w32_minor_version
 
 extern unsigned char *get_data_start();
 extern unsigned char *get_data_end();
@@ -45,8 +45,8 @@
 extern unsigned long  reserved_heap_size;
 extern SYSTEM_INFO    sysinfo_cache;
 extern BOOL   	      need_to_recreate_heap;
-extern int    	      nt_major_version;
-extern int    	      nt_minor_version;
+extern int    	      w32_major_version;
+extern int    	      w32_minor_version;
 
 /* Emulation of Unix sbrk().  */
 extern void *sbrk (unsigned long size);
--- a/src/w32inevt.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32inevt.c	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Input event support for Windows NT port of GNU Emacs.
+/* Input event support for Emacs under Win32 API.
    Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -48,7 +48,7 @@
 extern int change_frame_size (FRAME_PTR, int, int, int, int);
 
 /* from w32fns.c */
-extern Lisp_Object Vwin32_alt_is_meta;
+extern Lisp_Object Vw32_alt_is_meta;
 
 /* Event queue */
 #define EVENT_QUEUE_SIZE 50
@@ -96,7 +96,7 @@
 /* Translate console modifiers to emacs modifiers.  
    German keyboard support (Kai Morgan Zeise 2/18/95).  */
 int
-win32_kbd_mods_to_emacs (DWORD mods)
+w32_kbd_mods_to_emacs (DWORD mods)
 {
   int retval = 0;
 
@@ -106,7 +106,7 @@
     mods &= ~ (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED);
 
   if (mods & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED))
-    retval = ((NILP (Vwin32_alt_is_meta)) ? alt_modifier : meta_modifier);
+    retval = ((NILP (Vw32_alt_is_meta)) ? alt_modifier : meta_modifier);
   
   if (mods & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED))
     {
@@ -125,7 +125,7 @@
 
 /* The return code indicates key code size. */
 int
-win32_kbd_patch_key (KEY_EVENT_RECORD *event)
+w32_kbd_patch_key (KEY_EVENT_RECORD *event)
 {
   unsigned int key_code = event->wVirtualKeyCode;
   unsigned int mods = event->dwControlKeyState;
@@ -331,7 +331,7 @@
     {
       /* ASCII */
       emacs_ev->kind = ascii_keystroke;
-      key_flag = win32_kbd_patch_key (event); /* 95.7.25 by himi */
+      key_flag = w32_kbd_patch_key (event); /* 95.7.25 by himi */
       if (key_flag == 0) 
 	return 0;
       XSETINT (emacs_ev->code, event->uChar.AsciiChar);
@@ -375,7 +375,7 @@
 #else
   XSETFRAME (emacs_ev->frame_or_window, get_frame ());
 #endif
-  emacs_ev->modifiers = win32_kbd_mods_to_emacs (event->dwControlKeyState);
+  emacs_ev->modifiers = w32_kbd_mods_to_emacs (event->dwControlKeyState);
   emacs_ev->timestamp = GetTickCount ();
   if (key_flag == 2) return -1; /* 95.7.25 by himi */
   return 1;
@@ -383,7 +383,7 @@
 
 /* Mouse position hook.  */
 void 
-win32_mouse_position (FRAME_PTR *f,
+w32_mouse_position (FRAME_PTR *f,
 #ifndef MULE
 		      int insist,
 #endif
@@ -482,7 +482,7 @@
   
   button_state = event->dwButtonState;
   emacs_ev->timestamp = GetTickCount ();
-  emacs_ev->modifiers = win32_kbd_mods_to_emacs (event->dwControlKeyState) |
+  emacs_ev->modifiers = w32_kbd_mods_to_emacs (event->dwControlKeyState) |
     ((event->dwButtonState & mask) ? down_modifier : up_modifier);
   
   XSETFASTINT (emacs_ev->x, event->dwMousePosition.X);
@@ -507,8 +507,8 @@
 }
 
 int 
-win32_read_socket (int sd, struct input_event *bufp, int numchars,
-		   int waitp, int expected)
+w32_console_read_socket (int sd, struct input_event *bufp, int numchars,
+			 int waitp, int expected)
 {
   BOOL no_events = TRUE;
   int nev, ret = 0, add;
--- a/src/w32inevt.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32inevt.h	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Win32 input routines.
+/* Input routines for Emacs on Win32 API.
    Copyright (C) 1995 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -21,9 +21,9 @@
 #ifndef __NTINEVT_H__
 #define __NTINEVT_H__
 
-int win32_read_socket (/* int sd, struct input_event *bufp, int numchars,
-			  int waitp, int expected */);
-void win32_mouse_position (/* FRAME_PTR *f,
+int w32_console_read_socket (/* int sd, struct input_event *bufp, int numchars,
+				int waitp, int expected */);
+void w32_mouse_position (/* FRAME_PTR *f,
 			      Lisp_Object *bar_window,
 			      enum scroll_bar_part *part,
 			      Lisp_Object *x,
--- a/src/w32menu.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32menu.c	Tue Nov 19 04:59:23 1996 +0000
@@ -66,8 +66,8 @@
 
 extern Lisp_Object Qmenu_bar_update_hook;
 
-static Lisp_Object win32_dialog_show ();
-static Lisp_Object win32menu_show ();
+static Lisp_Object w32_dialog_show ();
+static Lisp_Object w32menu_show ();
 
 static HMENU keymap_panes ();
 static HMENU single_keymap_panes ();
@@ -576,7 +576,7 @@
       eltcdr = XCONS (elt)->cdr;
       string = XCONS (eltcdr)->car;
       /* We no longer discard the @ from the beginning of the string here.
-	 Instead, we do this in win32menu_show.  */
+	 Instead, we do this in w32menu_show.  */
       {
 	HMENU new_hmenu = single_keymap_panes (lpmm,
 					       Fcar (elt),
@@ -946,7 +946,7 @@
       eltcdr = XCONS (elt)->cdr;
       string = XCONS (eltcdr)->car;
       /* We no longer discard the @ from the beginning of the string here.
-	 Instead, we do this in win32menu_show.  */
+	 Instead, we do this in w32menu_show.  */
       {
 	Lisp_Object event = get_single_keymap_event (Fcar (elt), lpnum);
 
@@ -1212,8 +1212,8 @@
 	  CHECK_LIVE_WINDOW (window, 0);
 	  f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
 	  
-	  xpos = (FONT_WIDTH (f->output_data.win32->font) * XWINDOW (window)->left);
-	  ypos = (f->output_data.win32->line_height * XWINDOW (window)->top);
+	  xpos = (FONT_WIDTH (f->output_data.w32->font) * XWINDOW (window)->left);
+	  ypos = (f->output_data.w32->line_height * XWINDOW (window)->top);
 	}
       else
 	/* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,
@@ -1240,7 +1240,7 @@
   /* Display them in a menu.  */
   BLOCK_INPUT;
   
-  selection = win32menu_show (f, xpos, ypos, menu, &hmenu, &error_name);
+  selection = w32menu_show (f, xpos, ypos, menu, &hmenu, &error_name);
   
   UNBLOCK_INPUT;
   
@@ -1337,7 +1337,7 @@
 
     /* Display them in a dialog box.  */
     BLOCK_INPUT;
-    selection = win32_dialog_show (f, 0, 0, title, &error_name);
+    selection = w32_dialog_show (f, 0, 0, title, &error_name);
     UNBLOCK_INPUT;
 
     discard_menu_items ();
@@ -1465,8 +1465,8 @@
   
   BLOCK_INPUT;
   {
-    HMENU old = GetMenu (FRAME_WIN32_WINDOW (f));
-    SetMenu (FRAME_WIN32_WINDOW (f), hmenu);
+    HMENU old = GetMenu (FRAME_W32_WINDOW (f));
+    SetMenu (FRAME_W32_WINDOW (f), hmenu);
     DestroyMenu (old);
   }
   
@@ -1484,14 +1484,14 @@
   BLOCK_INPUT;
 
   {
-    HMENU old = GetMenu (FRAME_WIN32_WINDOW (f));
-    SetMenu (FRAME_WIN32_WINDOW (f), NULL);
+    HMENU old = GetMenu (FRAME_W32_WINDOW (f));
+    SetMenu (FRAME_W32_WINDOW (f), NULL);
     DestroyMenu (old);
   }
     
   UNBLOCK_INPUT;
 }
-/* Called from Fwin32_create_frame to create the initial menubar of a frame
+/* Called from Fw32_create_frame to create the initial menubar of a frame
    before it is mapped, so that the window is mapped with the menubar already
    there instead of us tacking it on later and thrashing the window after it
    is visible.  */
@@ -1647,9 +1647,9 @@
 
 #endif
 
-/* win32menu_show actually displays a menu using the panes and items in 
+/* w32menu_show actually displays a menu using the panes and items in 
    menu_items and returns the value selected from it.
-   There are two versions of win32menu_show, one for Xt and one for Xlib.
+   There are two versions of w32menu_show, one for Xt and one for Xlib.
    Both assume input is blocked by the caller.  */
 
 /* F is the frame the menu is for.
@@ -1665,7 +1665,7 @@
 
 
 static Lisp_Object 
-win32menu_show (f, x, y, menu, hmenu, error)
+w32menu_show (f, x, y, menu, hmenu, error)
      FRAME_PTR f;
      int x;
      int y;
@@ -1688,7 +1688,7 @@
   pos.y = y;
     
   /* Offset the coordinates to root-relative.  */
-  ClientToScreen (FRAME_WIN32_WINDOW (f), &pos);
+  ClientToScreen (FRAME_W32_WINDOW (f), &pos);
   
 #if 0
   /* If the mouse moves out of the menu before we show the menu,
@@ -1705,7 +1705,7 @@
 				   0x10,
 				   pos.x, pos.y,
 				   0,
-				   FRAME_WIN32_WINDOW (f),
+				   FRAME_W32_WINDOW (f),
 				   NULL);
   if (menu_selection == -1)
     {
@@ -1739,7 +1739,7 @@
 };
 
 static Lisp_Object
-win32_dialog_show (f, menubarp, keymaps, title, error)
+w32_dialog_show (f, menubarp, keymaps, title, error)
      FRAME_PTR f;
      int menubarp;
      int keymaps;
@@ -1856,7 +1856,7 @@
   /* Actually create the dialog.  */
   dialog_id = ++popup_id_tick;
   menu = lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv,
-			   f->output_data.win32->widget, 1, 0,
+			   f->output_data.w32->widget, 1, 0,
 			   dialog_selection_callback, 0);
 #if 0 /* This causes crashes, and seems to be redundant -- rms.  */
   lw_modify_all_widgets (dialog_id, first_wv, True);
@@ -1903,7 +1903,7 @@
      That is not necessarily true, but the fiction leads to reasonable
      results, and it is a pain to ask which are actually held now
      or track this in the loop above.  */
-  win32_mouse_grabbed = 0;
+  w32_mouse_grabbed = 0;
   
   /* Unread any events that we got but did not handle.  */
   while (queue != NULL) 
@@ -1957,7 +1957,7 @@
 }
 #endif
 
-syms_of_win32menu ()
+syms_of_w32menu ()
 {
   Qdebug_on_next_call = intern ("debug-on-next-call");
   staticpro (&Qdebug_on_next_call);
--- a/src/w32proc.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32proc.c	Tue Nov 19 04:59:23 1996 +0000
@@ -49,21 +49,21 @@
    correct parsing by child process.  Because not all uses of spawnve
    are careful about constructing argv arrays, we make this behaviour
    conditional (off by default). */
-Lisp_Object Vwin32_quote_process_args;
+Lisp_Object Vw32_quote_process_args;
 
 /* Control whether create_child causes the process' window to be
    hidden.  The default is nil. */
-Lisp_Object Vwin32_start_process_show_window;
+Lisp_Object Vw32_start_process_show_window;
 
 /* Time to sleep before reading from a subprocess output pipe - this
    avoids the inefficiency of frequently reading small amounts of data.
    This is primarily necessary for handling DOS processes on Windows 95,
-   but is useful for Win32 processes on both Win95 and NT as well.  */
-Lisp_Object Vwin32_pipe_read_delay;
+   but is useful for W32 processes on both Win95 and NT as well.  */
+Lisp_Object Vw32_pipe_read_delay;
 
 /* Control conversion of upper case file names to lower case.
    nil means no, t means yes. */
-Lisp_Object Vwin32_downcase_file_names;
+Lisp_Object Vw32_downcase_file_names;
 
 /* Keep track of whether we have already started a DOS program. */
 BOOL dos_process_running;
@@ -288,7 +288,7 @@
   start.cb = sizeof (start);
   
 #ifdef HAVE_NTGUI
-  if (NILP (Vwin32_start_process_show_window))
+  if (NILP (Vw32_start_process_show_window))
     start.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
   else
     start.dwFlags = STARTF_USESTDHANDLES;
@@ -530,7 +530,7 @@
 }
 
 int
-win32_is_dos_binary (char * filename)
+w32_is_dos_binary (char * filename)
 {
   IMAGE_DOS_HEADER dos_header;
   DWORD signature;
@@ -553,7 +553,7 @@
 	     Therefore, we have to do the same here as well. */
 	  p = getenv ("COMSPEC");
 	  if (p)
-	    is_dos_binary = win32_is_dos_binary (p);
+	    is_dos_binary = w32_is_dos_binary (p);
 	}
       else
 	{
@@ -626,7 +626,7 @@
 
   /* Check if program is a DOS executable, and if so whether we are
      allowed to start it. */
-  is_dos_binary = win32_is_dos_binary (cmdname);
+  is_dos_binary = w32_is_dos_binary (cmdname);
   if (is_dos_binary && dos_process_running)
     {
       errno = EAGAIN;
@@ -641,10 +641,10 @@
      Additionally, zero-length args and args containing whitespace need
      to be wrapped in double quotes.  Args containing embedded double
      quotes (as opposed to enclosing quotes, which we leave alone) are
-     usually illegal (most Win32 programs do not implement escaping of
+     usually illegal (most W32 programs do not implement escaping of
      double quotes - sad but true, at least for programs compiled with
      MSVC), but we will escape quotes anyway for those programs that can
-     handle it.  The Win32 gcc library from Cygnus doubles quotes to
+     handle it.  The W32 gcc library from Cygnus doubles quotes to
      escape them, so we will use that convention.
    
      Since I have no idea how large argv and envp are likely to be
@@ -685,7 +685,7 @@
       if (*p == 0)
 	add_quotes = 1;
 
-      if (!NILP (Vwin32_quote_process_args))
+      if (!NILP (Vw32_quote_process_args))
 	{
 	  /* This is conditional because it sometimes causes more
 	     problems than it solves, since argv arrays are not always
@@ -1059,7 +1059,7 @@
     }
   else
     {
-      /* Kill the process.  On Win32 this doesn't kill child processes
+      /* Kill the process.  On W32 this doesn't kill child processes
 	 so it doesn't work very well for shells which is why it's not
 	 used in every case.  Also, don't try to terminate DOS processes
 	 (on Win95), because this will hang Emacs. */
@@ -1183,7 +1183,7 @@
 
 extern Lisp_Object Vsystem_name;
 
-DEFUN ("win32-has-winsock", Fwin32_has_winsock, Swin32_has_winsock, 0, 1, 0,
+DEFUN ("w32-has-winsock", Fw32_has_winsock, Sw32_has_winsock, 0, 1, 0,
   "Test for presence of the Windows socket library `winsock'.\n\
 Returns non-nil if winsock support is present, nil otherwise.\n\
 \n\
@@ -1218,7 +1218,7 @@
   return Qnil;
 }
 
-DEFUN ("win32-unload-winsock", Fwin32_unload_winsock, Swin32_unload_winsock,
+DEFUN ("w32-unload-winsock", Fw32_unload_winsock, Sw32_unload_winsock,
        0, 0, 0,
   "Unload the Windows socket library `winsock' if loaded.\n\
 This is provided to allow dial-up socket connections to be disconnected\n\
@@ -1235,11 +1235,11 @@
 syms_of_ntproc ()
 {
 #ifdef HAVE_SOCKETS
-  defsubr (&Swin32_has_winsock);
-  defsubr (&Swin32_unload_winsock);
+  defsubr (&Sw32_has_winsock);
+  defsubr (&Sw32_unload_winsock);
 #endif
 
-  DEFVAR_LISP ("win32-quote-process-args", &Vwin32_quote_process_args,
+  DEFVAR_LISP ("w32-quote-process-args", &Vw32_quote_process_args,
     "Non-nil enables quoting of process arguments to ensure correct parsing.\n\
 Because Windows does not directly pass argv arrays to child processes,\n\
 programs have to reconstruct the argv array by parsing the command\n\
@@ -1249,15 +1249,15 @@
 However, the argument list to call-process is not always correctly\n\
 constructed (or arguments have already been quoted), so enabling this\n\
 option may cause unexpected behavior.");
-  Vwin32_quote_process_args = Qnil;
+  Vw32_quote_process_args = Qnil;
 
-  DEFVAR_LISP ("win32-start-process-show-window",
-	       &Vwin32_start_process_show_window,
+  DEFVAR_LISP ("w32-start-process-show-window",
+	       &Vw32_start_process_show_window,
     "When nil, processes started via start-process hide their windows.\n\
 When non-nil, they show their window in the method of their choice.");
-  Vwin32_start_process_show_window = Qnil;
+  Vw32_start_process_show_window = Qnil;
 
-  DEFVAR_INT ("win32-pipe-read-delay", &Vwin32_pipe_read_delay,
+  DEFVAR_INT ("w32-pipe-read-delay", &Vw32_pipe_read_delay,
     "Forced delay before reading subprocess output.\n\
 This is done to improve the buffering of subprocess output, by\n\
 avoiding the inefficiency of frequently reading small amounts of data.\n\
@@ -1266,11 +1266,11 @@
 reading the subprocess output.  If negative, the magnitude is the number\n\
 of time slices to wait (effectively boosting the priority of the child\n\
 process temporarily).  A value of zero disables waiting entirely.");
-  Vwin32_pipe_read_delay = 50;
+  Vw32_pipe_read_delay = 50;
 
-  DEFVAR_LISP ("win32-downcase-file-names", &Vwin32_downcase_file_names,
+  DEFVAR_LISP ("w32-downcase-file-names", &Vw32_downcase_file_names,
     "Non-nil means convert all-upper case file names to lower case.\n\
 This applies when performing completions and file name expansion.");
-  Vwin32_downcase_file_names = Qnil;
+  Vw32_downcase_file_names = Qnil;
 }
 /* end of ntproc.c */
--- a/src/w32reg.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32reg.c	Tue Nov 19 04:59:23 1996 +0000
@@ -31,7 +31,7 @@
 #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
 
 LPBYTE 
-win32_get_string_resource (name, class, dwexptype)
+w32_get_string_resource (name, class, dwexptype)
      char *name, *class;
      DWORD dwexptype;
 {
@@ -93,5 +93,5 @@
      int rdb;
      char *name, *class;
 {
-  return (win32_get_string_resource (name, class, REG_SZ));
+  return (w32_get_string_resource (name, class, REG_SZ));
 }
--- a/src/w32select.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32select.c	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Win32 Selection processing for emacs
+/* Selection processing for Emacs using the Win32 API.
    Copyright (C) 1993, 1994 Free Software Foundation.
    
 This file is part of GNU Emacs.
@@ -22,7 +22,7 @@
 
 #include <config.h>
 #include "lisp.h"
-#include "w32term.h"	/* for all of the win32 includes */
+#include "w32term.h"	/* for all of the w32 includes */
 #include "dispextern.h"	/* frame.h seems to want this */
 #include "frame.h"	/* Need this to get the X window of selected_frame */
 #include "blockinput.h"
@@ -30,7 +30,7 @@
 Lisp_Object QCLIPBOARD;
 
 #if 0
-DEFUN ("win32-open-clipboard", Fwin32_open_clipboard, Swin32_open_clipboard, 0, 1, 0,
+DEFUN ("w32-open-clipboard", Fw32_open_clipboard, Sw32_open_clipboard, 0, 1, 0,
        "This opens the clipboard with the given frame pointer.")
      (frame)
      Lisp_Object frame;
@@ -42,14 +42,14 @@
   
   BLOCK_INPUT;
   
-  ok = OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL);
+  ok = OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL);
   
   UNBLOCK_INPUT;
   
   return (ok ? frame : Qnil);
 }
 
-DEFUN ("win32-empty-clipboard", Fwin32_empty_clipboard, Swin32_empty_clipboard, 0, 0, 0,
+DEFUN ("w32-empty-clipboard", Fw32_empty_clipboard, Sw32_empty_clipboard, 0, 0, 0,
        "This empties the clipboard and assigns ownership to the window which opened the clipboard.")
      ()
 {
@@ -64,7 +64,7 @@
   return (ok ? Qt : Qnil);
 }
 
-DEFUN ("win32-close-clipboard", Fwin32_close_clipboard, Swin32_close_clipboard, 0, 0, 0,
+DEFUN ("w32-close-clipboard", Fw32_close_clipboard, Sw32_close_clipboard, 0, 0, 0,
        "This closes the clipboard.")
      ()
 {
@@ -81,7 +81,7 @@
 
 #endif
 
-DEFUN ("win32-set-clipboard-data", Fwin32_set_clipboard_data, Swin32_set_clipboard_data, 1, 2, 0,
+DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_data, 1, 2, 0,
        "This sets the clipboard data to the given text.")
     (string, frame)
     Lisp_Object string, frame;
@@ -146,7 +146,7 @@
     
   GlobalUnlock (htext);
   
-  if (!OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL))
+  if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
     goto error;
   
   ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext);
@@ -166,7 +166,7 @@
   return (ok ? string : Qnil);
 }
 
-DEFUN ("win32-get-clipboard-data", Fwin32_get_clipboard_data, Swin32_get_clipboard_data, 0, 1, 0,
+DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, Sw32_get_clipboard_data, 0, 1, 0,
        "This gets the clipboard data in text format.")
      (frame)
      Lisp_Object frame;
@@ -179,7 +179,7 @@
   
   BLOCK_INPUT;
   
-  if (!OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL))
+  if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
     goto done;
   
   if ((htext = GetClipboardData (CF_TEXT)) == NULL)
@@ -284,15 +284,15 @@
 }
 
 void 
-syms_of_win32select ()
+syms_of_w32select ()
 {
 #if 0
-  defsubr (&Swin32_open_clipboard);
-  defsubr (&Swin32_empty_clipboard);
-  defsubr (&Swin32_close_clipboard);
+  defsubr (&Sw32_open_clipboard);
+  defsubr (&Sw32_empty_clipboard);
+  defsubr (&Sw32_close_clipboard);
 #endif
-  defsubr (&Swin32_set_clipboard_data);
-  defsubr (&Swin32_get_clipboard_data);
+  defsubr (&Sw32_set_clipboard_data);
+  defsubr (&Sw32_get_clipboard_data);
   defsubr (&Sx_selection_exists_p);
 
   QCLIPBOARD = intern ("CLIPBOARD");	staticpro (&QCLIPBOARD);
--- a/src/w32term.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32term.c	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Implementation of Win32 GUI terminal
+/* Implementation of GUI terminal on the Win32 API.
    Copyright (C) 1989, 1993, 1994, 1995 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -56,19 +56,19 @@
 #define x_top_window_to_frame x_window_to_frame
 
 
-/* This is display since win32 does not support multiple ones.  */
-struct win32_display_info one_win32_display_info;
+/* This is display since w32 does not support multiple ones.  */
+struct w32_display_info one_w32_display_info;
 
 /* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
-   one for each element of win32_display_list and in the same order.
+   one for each element of w32_display_list and in the same order.
    NAME is the name of the frame.
    FONT-LIST-CACHE records previous values returned by x-list-fonts.  */
-Lisp_Object win32_display_name_list;
+Lisp_Object w32_display_name_list;
 
 /* Frame being updated by update_frame.  This is declared in term.c.
    This is set by update_begin and looked at by all the
-   win32 functions.  It is zero while not inside an update.
-   In that case, the win32 functions assume that `selected_frame'
+   w32 functions.  It is zero while not inside an update.
+   In that case, the w32 functions assume that `selected_frame'
    is the frame to apply to.  */
 extern struct frame *updating_frame;
 
@@ -100,22 +100,22 @@
 static FRAME_PTR last_mouse_frame;
 static RECT last_mouse_glyph;
 
-Lisp_Object Vwin32_num_mouse_buttons;
-
-Lisp_Object Vwin32_swap_mouse_buttons;
+Lisp_Object Vw32_num_mouse_buttons;
+
+Lisp_Object Vw32_swap_mouse_buttons;
 
 /* The scroll bar in which the last motion event occurred.
 
    If the last motion event occurred in a scroll bar, we set this
-   so win32_mouse_position can know whether to report a scroll bar motion or
+   so w32_mouse_position can know whether to report a scroll bar motion or
    an ordinary motion.
 
    If the last motion event didn't occur in a scroll bar, we set this
-   to Qnil, to tell win32_mouse_position to return an ordinary motion event.  */
+   to Qnil, to tell w32_mouse_position to return an ordinary motion event.  */
 Lisp_Object last_mouse_scroll_bar;
 int last_mouse_scroll_bar_pos;
 
-/* This is a hack.  We would really prefer that win32_mouse_position would
+/* This is a hack.  We would really prefer that w32_mouse_position would
    return the time associated with the position it returns, but there
    doesn't seem to be any way to wrest the timestamp from the server
    along with the position query.  So, we just keep track of the time
@@ -141,11 +141,11 @@
 
 static Lisp_Object Qvendor_specific_keysyms;
 
-void win32_delete_display ();
+void w32_delete_display ();
 
 static void redraw_previous_char ();
 static void redraw_following_char ();
-static unsigned int win32_get_modifiers ();
+static unsigned int w32_get_modifiers ();
 
 static int fast_find_position ();
 static void note_mouse_highlight ();
@@ -153,8 +153,8 @@
 static void show_mouse_face ();
 static void do_line_dance ();
 
-static int win32_cursor_to ();
-static int win32_clear_end_of_line ();
+static int w32_cursor_to ();
+static int w32_clear_end_of_line ();
 
 #if 0
 /* This is a function useful for recording debugging information
@@ -184,16 +184,16 @@
 
 #endif /* 0 */
 
-/* Return the struct win32_display_info.  */
-
-struct win32_display_info *
-win32_display_info_for_display ()
+/* Return the struct w32_display_info.  */
+
+struct w32_display_info *
+w32_display_info_for_display ()
 {
-  return (&one_win32_display_info);
+  return (&one_w32_display_info);
 }
 
 void 
-win32_fill_rect (f, _hdc, pix, lprect)
+w32_fill_rect (f, _hdc, pix, lprect)
      FRAME_PTR f;
      HDC _hdc;
      COLORREF pix;
@@ -220,13 +220,13 @@
 }
 
 void 
-win32_clear_window (f)
+w32_clear_window (f)
      FRAME_PTR f;
 {
   RECT rect;
 
-  GetClientRect (FRAME_WIN32_WINDOW (f), &rect);
-  win32_clear_rect (f, NULL, &rect);
+  GetClientRect (FRAME_W32_WINDOW (f), &rect);
+  w32_clear_rect (f, NULL, &rect);
 }
 
 
@@ -234,13 +234,13 @@
 
    These hooks are called by update_frame at the beginning and end
    of a frame update.  We record in `updating_frame' the identity
-   of the frame being updated, so that the win32_... functions do not
-   need to take a frame as argument.  Most of the win32_... functions
+   of the frame being updated, so that the w32_... functions do not
+   need to take a frame as argument.  Most of the w32_... functions
    should never be called except during an update, the only exceptions
-   being win32_cursor_to, win32_write_glyphs and win32_reassert_line_highlight.  */
+   being w32_cursor_to, w32_write_glyphs and w32_reassert_line_highlight.  */
 
 static
-win32_update_begin (f)
+w32_update_begin (f)
      struct frame *f;
 {
   if (f == 0)
@@ -253,26 +253,26 @@
 
   /* Regenerate display palette before drawing if list of requested
      colors has changed. */
-  if (FRAME_WIN32_DISPLAY_INFO (f)->regen_palette)
+  if (FRAME_W32_DISPLAY_INFO (f)->regen_palette)
   {
-    win32_regenerate_palette (f);
-    FRAME_WIN32_DISPLAY_INFO (f)->regen_palette = FALSE;
+    w32_regenerate_palette (f);
+    FRAME_W32_DISPLAY_INFO (f)->regen_palette = FALSE;
   }
 
-  if (f == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_frame)
+  if (f == FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_frame)
     {
       /* Don't do highlighting for mouse motion during the update.  */
-      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_defer = 1;
+      FRAME_W32_DISPLAY_INFO (f)->mouse_face_defer = 1;
 
       /* If the frame needs to be redrawn,
 	 simply forget about any prior mouse highlighting.  */
       if (FRAME_GARBAGED_P (f))
-	FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window = Qnil;
-
-      if (!NILP (FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window))
+	FRAME_W32_DISPLAY_INFO (f)->mouse_face_window = Qnil;
+
+      if (!NILP (FRAME_W32_DISPLAY_INFO (f)->mouse_face_window))
 	{
 	  int firstline, lastline, i;
-	  struct window *w = XWINDOW (FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window);
+	  struct window *w = XWINDOW (FRAME_W32_DISPLAY_INFO (f)->mouse_face_window);
 
 	  /* Find the first, and the last+1, lines affected by redisplay.  */
 	  for (firstline = 0; firstline < f->height; firstline++)
@@ -295,7 +295,7 @@
 	     are all wrong, and we will redisplay that line anyway.  */
 	  if (! (firstline > (XFASTINT (w->top) + window_internal_height (w))
 		 || lastline < XFASTINT (w->top)))
-	    clear_mouse_face (FRAME_WIN32_DISPLAY_INFO (f));
+	    clear_mouse_face (FRAME_W32_DISPLAY_INFO (f));
 	}
     }
 
@@ -303,7 +303,7 @@
 }
 
 static
-win32_update_end (f)
+w32_update_end (f)
      struct frame *f;
 {
   BLOCK_INPUT;
@@ -311,8 +311,8 @@
   do_line_dance ();
   x_display_cursor (f, 1);
 
-  if (f == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_frame)
-    FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_defer = 0;
+  if (f == FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_frame)
+    FRAME_W32_DISPLAY_INFO (f)->mouse_face_defer = 0;
 
   UNBLOCK_INPUT;
 }
@@ -320,16 +320,16 @@
 /* This is called after a redisplay on frame F.  */
 
 static
-win32_frame_up_to_date (f)
+w32_frame_up_to_date (f)
      FRAME_PTR f;
 {
-  if (FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_deferred_gc
-      || f == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_frame)
+  if (FRAME_W32_DISPLAY_INFO (f)->mouse_face_deferred_gc
+      || f == FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_frame)
     {
-      note_mouse_highlight (FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_frame,
-			    FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_x,
-			    FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_y);
-      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_deferred_gc = 0;
+      note_mouse_highlight (FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_frame,
+			    FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_x,
+			    FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_y);
+      FRAME_W32_DISPLAY_INFO (f)->mouse_face_deferred_gc = 0;
     }
 }
 
@@ -337,7 +337,7 @@
    Call this when about to modify line at position VPOS
    and not change whether it is highlighted.  */
 
-win32_reassert_line_highlight (new, vpos)
+w32_reassert_line_highlight (new, vpos)
      int new, vpos;
 {
   highlight = new;
@@ -347,12 +347,12 @@
    and change whether it is highlighted.  */
 
 static
-win32_change_line_highlight (new_highlight, vpos, first_unused_hpos)
+w32_change_line_highlight (new_highlight, vpos, first_unused_hpos)
      int new_highlight, vpos, first_unused_hpos;
 {
   highlight = new_highlight;
-  win32_cursor_to (vpos, 0);
-  win32_clear_end_of_line (updating_frame->width);
+  w32_cursor_to (vpos, 0);
+  w32_clear_end_of_line (updating_frame->width);
 }
 
 /* This is used when starting Emacs and when restarting after suspend.
@@ -360,16 +360,16 @@
    to Emacs's own window if it is suspended (though that rarely happens).  */
 
 static
-win32_set_terminal_modes ()
+w32_set_terminal_modes ()
 {
 }
 
 /* This is called when exiting or suspending Emacs.
-   Exiting will make the Win32 windows go away, and suspending
+   Exiting will make the W32 windows go away, and suspending
    requires no action.  */
 
 static
-win32_reset_terminal_modes ()
+w32_reset_terminal_modes ()
 {
 }
 
@@ -378,7 +378,7 @@
    This does not affect the place where the cursor-box is displayed.  */
 
 static int
-win32_cursor_to (row, col)
+w32_cursor_to (row, col)
      register int row, col;
 {
   int orow = row;
@@ -424,7 +424,7 @@
   register char *cp;            /* Steps through buf[]. */
   register int tlen = GLYPH_TABLE_LENGTH;
   register Lisp_Object *tbase = GLYPH_TABLE_BASE;
-  Window window = FRAME_WIN32_WINDOW (f);
+  Window window = FRAME_W32_WINDOW (f);
   int orig_left = left;
   HDC hdc;
 
@@ -468,7 +468,7 @@
 
 	/* HL = 3 means use a mouse face previously chosen.  */
 	if (hl == 3)
-	  cf = FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_face_id;
+	  cf = FRAME_W32_DISPLAY_INFO (f)->mouse_face_face_id;
 
 	/* First look at the face of the text itself.  */
 	if (cf != 0)
@@ -510,24 +510,24 @@
 
 	    if ((!face->font
 		 || face->font == (XFontStruct *) FACE_DEFAULT
-		 || face->font == f->output_data.win32->font)
-		&& face->background == f->output_data.win32->background_pixel
-		&& face->foreground == f->output_data.win32->foreground_pixel)
+		 || face->font == f->output_data.w32->font)
+		&& face->background == f->output_data.w32->background_pixel
+		&& face->foreground == f->output_data.w32->foreground_pixel)
 	      {
-		bg = f->output_data.win32->cursor_pixel;
+		bg = f->output_data.w32->cursor_pixel;
 		fg = face->background;
 	      }
 	    /* Cursor on non-default face: must merge.  */
 	    else
 	      {
-		bg = f->output_data.win32->cursor_pixel;
+		bg = f->output_data.w32->cursor_pixel;
 		fg = face->background;
 		/* If the glyph would be invisible,
 		   try a different foreground.  */
 		if (fg == bg)
 		  fg = face->foreground;
 		if (fg == bg)
-		  fg = f->output_data.win32->cursor_foreground_pixel;
+		  fg = f->output_data.w32->cursor_foreground_pixel;
 		if (fg == bg)
 		  fg = face->foreground;
 		/* Make sure the cursor is distinct from text in this face.  */
@@ -541,7 +541,7 @@
 	  }
 
 	if (font == (XFontStruct *) FACE_DEFAULT)
-	  font = f->output_data.win32->font;
+	  font = f->output_data.w32->font;
 
 	SetBkMode (hdc, just_foreground ? TRANSPARENT : OPAQUE);
 
@@ -555,12 +555,12 @@
 	if (!just_foreground)
 	  {
 	    /* Clear the rest of the line's height.  */
-	    if (f->output_data.win32->line_height != FONT_HEIGHT (font))
-		win32_fill_area (f, hdc, bg,
+	    if (f->output_data.w32->line_height != FONT_HEIGHT (font))
+		w32_fill_area (f, hdc, bg,
 				 left,
 				 top + FONT_HEIGHT (font),
 				 FONT_WIDTH (font) * len,
-				 f->output_data.win32->line_height - FONT_HEIGHT (font));
+				 f->output_data.w32->line_height - FONT_HEIGHT (font));
 	  }
 
 	{
@@ -570,7 +570,7 @@
 	      underline_position = font->tm.tmDescent - 1;
 
 	  if (face->underline)
-	      win32_fill_area (f, hdc, fg,
+	      w32_fill_area (f, hdc, fg,
 			       left, (top
 				      + FONT_BASE (font)
 				      + underline_position),
@@ -589,11 +589,11 @@
    Advance the cursor over the text.
    Output LEN glyphs at START.
 
-   `highlight', set up by win32_reassert_line_highlight or win32_change_line_highlight,
+   `highlight', set up by w32_reassert_line_highlight or w32_change_line_highlight,
    controls the pixel values used for foreground and background.  */
 
 static
-win32_write_glyphs (start, len)
+w32_write_glyphs (start, len)
      register GLYPH *start;
      int len;
 {
@@ -642,7 +642,7 @@
    from FIRST_UNUSED onward is already erased.  */
 
 static
-win32_clear_end_of_line (first_unused)
+w32_clear_end_of_line (first_unused)
      register int first_unused;
 {
   struct frame *f = updating_frame;
@@ -668,17 +668,17 @@
       && f->phys_cursor_x < first_unused)
     f->phys_cursor_x = -1;
 
-  win32_clear_area (f, NULL,
+  w32_clear_area (f, NULL,
 		    CHAR_TO_PIXEL_COL (f, curs_x),
 		    CHAR_TO_PIXEL_ROW (f, curs_y),
-		    FONT_WIDTH (f->output_data.win32->font) * (first_unused - curs_x),
-		    f->output_data.win32->line_height);
+		    FONT_WIDTH (f->output_data.w32->font) * (first_unused - curs_x),
+		    f->output_data.w32->line_height);
 
   UNBLOCK_INPUT;
 }
 
 static
-win32_clear_frame ()
+w32_clear_frame ()
 {
   struct frame *f = updating_frame;
 
@@ -691,7 +691,7 @@
 
   BLOCK_INPUT;
 
-  win32_clear_window (f);
+  w32_clear_window (f);
 
   /* We have to clear the scroll bars, too.  If we have changed
      colors or something like that, then they should be notified.  */
@@ -702,14 +702,14 @@
 
 /* Make audible bell.  */
 
-win32_ring_bell ()
+w32_ring_bell ()
 {
   BLOCK_INPUT;
 
   if (visible_bell)
-      FlashWindow (FRAME_WIN32_WINDOW (selected_frame), FALSE);
+      FlashWindow (FRAME_W32_WINDOW (selected_frame), FALSE);
   else
-      nt_ring_bell ();
+      w32_sys_ring_bell ();
 
   UNBLOCK_INPUT;
 
@@ -721,7 +721,7 @@
    off the feature of using them.  */
 
 static
-win32_insert_glyphs (start, len)
+w32_insert_glyphs (start, len)
      register char *start;
      register int len;
 {
@@ -729,7 +729,7 @@
 }
 
 static
-win32_delete_glyphs (n)
+w32_delete_glyphs (n)
      register int n;
 {
   abort ();
@@ -738,10 +738,10 @@
 /* Specify how many text lines, from the top of the window,
    should be affected by insert-lines and delete-lines operations.
    This, and those operations, are used only within an update
-   that is bounded by calls to win32_update_begin and win32_update_end.  */
+   that is bounded by calls to w32_update_begin and w32_update_end.  */
 
 static
-win32_set_terminal_window (n)
+w32_set_terminal_window (n)
      register int n;
 {
   if (updating_frame == 0)
@@ -771,7 +771,7 @@
 
 /* Perform an insert-lines or delete-lines operation,
    inserting N lines or deleting -N lines at vertical position VPOS.  */
-win32_ins_del_lines (vpos, n)
+w32_ins_del_lines (vpos, n)
      int vpos, n;
 {
   register int fence, i;
@@ -834,7 +834,7 @@
     abort ();
 
   ht = f->height;
-  intborder = f->output_data.win32->internal_border_width;
+  intborder = f->output_data.w32->internal_border_width;
 
   x_display_cursor (updating_frame, 0);
 
@@ -848,8 +848,8 @@
 	/* Copy [i,j) upward from [i+distance, j+distance) */
 	BitBlt (hdc, 
 		intborder, CHAR_TO_PIXEL_ROW (f, i+distance),
-		f->width * FONT_WIDTH (f->output_data.win32->font),
-		(j-i) * f->output_data.win32->line_height, 
+		f->width * FONT_WIDTH (f->output_data.w32->font),
+		(j-i) * f->output_data.w32->line_height, 
 		hdc,
 		intborder, CHAR_TO_PIXEL_ROW (f, i),
 		SRCCOPY);
@@ -864,8 +864,8 @@
 	/* Copy (j, i] downward from (j+distance, i+distance] */
 	BitBlt (hdc,
 		intborder, CHAR_TO_PIXEL_ROW (f, j+1+distance),
-		f->width * FONT_WIDTH (f->output_data.win32->font),
-		(i-j) * f->output_data.win32->line_height, 
+		f->width * FONT_WIDTH (f->output_data.w32->font),
+		(i-j) * f->output_data.w32->line_height, 
 		hdc,
 		intborder, CHAR_TO_PIXEL_ROW (f, j+1),
 		SRCCOPY);
@@ -879,11 +879,11 @@
       {
 	for (j = i; j < ht && line_dance[j] == -1; ++j);
 	/* Clear [i,j) */
-	win32_clear_area (f, NULL,
+	w32_clear_area (f, NULL,
 			  intborder, 
 			  CHAR_TO_PIXEL_ROW (f, i),
-			  f->width * FONT_WIDTH (f->output_data.win32->font),
-			  (j-i) * f->output_data.win32->line_height);
+			  f->width * FONT_WIDTH (f->output_data.w32->font),
+			  (j-i) * f->output_data.w32->line_height);
 	i = j-1;
       }
   line_dance_in_progress = 0;
@@ -919,8 +919,8 @@
      Round down for left and top, up for right and bottom.  */
   top  = PIXEL_TO_CHAR_ROW (f, top);
   left = PIXEL_TO_CHAR_COL (f, left);
-  bottom += (f->output_data.win32->line_height - 1);
-  right += (FONT_WIDTH (f->output_data.win32->font) - 1);
+  bottom += (f->output_data.w32->line_height - 1);
+  right += (FONT_WIDTH (f->output_data.w32->font) - 1);
   bottom = PIXEL_TO_CHAR_ROW (f, bottom);
   right = PIXEL_TO_CHAR_COL (f, right);
 
@@ -987,7 +987,7 @@
   x_display_cursor (f, 1);
 }
 
-static void win32_frame_rehighlight ();
+static void w32_frame_rehighlight ();
 static void x_frame_rehighlight ();
 
 /* The focus has changed.  Update the frames as necessary to reflect
@@ -998,23 +998,23 @@
 
 void
 x_new_focus_frame (dpyinfo, frame)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
      struct frame *frame;
 {
-  struct frame *old_focus = dpyinfo->win32_focus_frame;
+  struct frame *old_focus = dpyinfo->w32_focus_frame;
   int events_enqueued = 0;
 
-  if (frame != dpyinfo->win32_focus_frame)
+  if (frame != dpyinfo->w32_focus_frame)
     {
       /* Set this before calling other routines, so that they see
-	 the correct value of win32_focus_frame.  */
-      dpyinfo->win32_focus_frame = frame;
+	 the correct value of w32_focus_frame.  */
+      dpyinfo->w32_focus_frame = frame;
 
       if (old_focus && old_focus->auto_lower)
 	x_lower_frame (old_focus);
 
-      if (dpyinfo->win32_focus_frame && dpyinfo->win32_focus_frame->auto_raise)
-	pending_autoraise_frame = dpyinfo->win32_focus_frame;
+      if (dpyinfo->w32_focus_frame && dpyinfo->w32_focus_frame->auto_raise)
+	pending_autoraise_frame = dpyinfo->w32_focus_frame;
       else
 	pending_autoraise_frame = 0;
     }
@@ -1026,9 +1026,9 @@
 
 void
 x_mouse_leave (dpyinfo)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
 {
-  x_new_focus_frame (dpyinfo, dpyinfo->win32_focus_event_frame);
+  x_new_focus_frame (dpyinfo, dpyinfo->w32_focus_event_frame);
 }
 
 /* The focus has changed, or we have redirected a frame's focus to
@@ -1039,39 +1039,39 @@
    frame is being highlighted or unhighlighted; we only use it to find
    the appropriate display info.  */
 static void
-win32_frame_rehighlight (frame)
+w32_frame_rehighlight (frame)
      struct frame *frame;
 {
-  x_frame_rehighlight (FRAME_WIN32_DISPLAY_INFO (frame));
+  x_frame_rehighlight (FRAME_W32_DISPLAY_INFO (frame));
 }
 
 static void
 x_frame_rehighlight (dpyinfo)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
 {
-  struct frame *old_highlight = dpyinfo->win32_highlight_frame;
-
-  if (dpyinfo->win32_focus_frame)
+  struct frame *old_highlight = dpyinfo->w32_highlight_frame;
+
+  if (dpyinfo->w32_focus_frame)
     {
-      dpyinfo->win32_highlight_frame
-	= ((GC_FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->win32_focus_frame)))
-	   ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->win32_focus_frame))
-	   : dpyinfo->win32_focus_frame);
-      if (! FRAME_LIVE_P (dpyinfo->win32_highlight_frame))
+      dpyinfo->w32_highlight_frame
+	= ((GC_FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame)))
+	   ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame))
+	   : dpyinfo->w32_focus_frame);
+      if (! FRAME_LIVE_P (dpyinfo->w32_highlight_frame))
 	{
-	  FRAME_FOCUS_FRAME (dpyinfo->win32_focus_frame) = Qnil;
-	  dpyinfo->win32_highlight_frame = dpyinfo->win32_focus_frame;
+	  FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame) = Qnil;
+	  dpyinfo->w32_highlight_frame = dpyinfo->w32_focus_frame;
 	}
     }
   else
-    dpyinfo->win32_highlight_frame = 0;
-
-  if (dpyinfo->win32_highlight_frame != old_highlight)
+    dpyinfo->w32_highlight_frame = 0;
+
+  if (dpyinfo->w32_highlight_frame != old_highlight)
     {
       if (old_highlight)
 	frame_unhighlight (old_highlight);
-      if (dpyinfo->win32_highlight_frame)
-	frame_highlight (dpyinfo->win32_highlight_frame);
+      if (dpyinfo->w32_highlight_frame)
+	frame_highlight (dpyinfo->w32_highlight_frame);
     }
 }
 
@@ -1119,9 +1119,9 @@
   /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to round down
      even for negative values.  */
   if (pix_x < 0)
-    pix_x -= FONT_WIDTH ((f)->output_data.win32->font) - 1;
+    pix_x -= FONT_WIDTH ((f)->output_data.w32->font) - 1;
   if (pix_y < 0)
-    pix_y -= (f)->output_data.win32->line_height - 1;
+    pix_y -= (f)->output_data.w32->line_height - 1;
 
   pix_x = PIXEL_TO_CHAR_COL (f, pix_x);
   pix_y = PIXEL_TO_CHAR_ROW (f, pix_y);
@@ -1130,8 +1130,8 @@
     {
       bounds->left = CHAR_TO_PIXEL_COL (f, pix_x);
       bounds->top = CHAR_TO_PIXEL_ROW (f, pix_y);
-      bounds->right  = bounds->left + FONT_WIDTH  (f->output_data.win32->font) - 1;
-      bounds->bottom = bounds->top + f->output_data.win32->line_height - 1;
+      bounds->right  = bounds->left + FONT_WIDTH  (f->output_data.w32->font) - 1;
+      bounds->bottom = bounds->top + f->output_data.w32->line_height - 1;
     }
 
   if (!noclip)
@@ -1189,28 +1189,28 @@
       up = 1;
       break;
     case WM_MBUTTONDOWN:
-      if (NILP (Vwin32_swap_mouse_buttons))
+      if (NILP (Vw32_swap_mouse_buttons))
 	button = 1;
       else
 	button = 2;
       up = 0;
       break;
     case WM_MBUTTONUP:
-      if (NILP (Vwin32_swap_mouse_buttons))
+      if (NILP (Vw32_swap_mouse_buttons))
 	button = 1;
       else
 	button = 2;
       up = 1;
       break;
     case WM_RBUTTONDOWN:
-      if (NILP (Vwin32_swap_mouse_buttons))
+      if (NILP (Vw32_swap_mouse_buttons))
 	button = 2;
       else
 	button = 1;
       up = 0;
       break;
     case WM_RBUTTONUP:
-      if (NILP (Vwin32_swap_mouse_buttons))
+      if (NILP (Vw32_swap_mouse_buttons))
 	button = 2;
       else
 	button = 1;
@@ -1235,7 +1235,7 @@
 static void
 construct_mouse_click (result, msg, f)
      struct input_event *result;
-     Win32Msg *msg;
+     W32Msg *msg;
      struct frame *f;
 {
   int button;
@@ -1278,7 +1278,7 @@
 {
   last_mouse_movement_time = msg->time;
 
-  if (msg->hwnd != FRAME_WIN32_WINDOW (frame))
+  if (msg->hwnd != FRAME_W32_WINDOW (frame))
     {
       frame->mouse_moved = 1;
       last_mouse_scroll_bar = Qnil;
@@ -1320,30 +1320,30 @@
   if (disable_mouse_highlight)
     return;
 
-  FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_x = x;
-  FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_y = y;
-  FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_frame = f;
-
-  if (FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_defer)
+  FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_x = x;
+  FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_y = y;
+  FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_frame = f;
+
+  if (FRAME_W32_DISPLAY_INFO (f)->mouse_face_defer)
     return;
 
   if (gc_in_progress)
     {
-      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_deferred_gc = 1;
+      FRAME_W32_DISPLAY_INFO (f)->mouse_face_deferred_gc = 1;
       return;
     }
 
   /* Find out which glyph the mouse is on.  */
   pixel_to_glyph_coords (f, x, y, &column, &row,
-			 &new_glyph, FRAME_WIN32_DISPLAY_INFO (f)->grabbed);
+			 &new_glyph, FRAME_W32_DISPLAY_INFO (f)->grabbed);
 
   /* Which window is that in?  */
   window = window_from_coordinates (f, column, row, &portion);
   w = XWINDOW (window);
 
   /* If we were displaying active text in another window, clear that.  */
-  if (! EQ (window, FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window))
-    clear_mouse_face (FRAME_WIN32_DISPLAY_INFO (f));
+  if (! EQ (window, FRAME_W32_DISPLAY_INFO (f)->mouse_face_window))
+    clear_mouse_face (FRAME_W32_DISPLAY_INFO (f));
 
   /* Are we in a window whose display is up to date?
      And verify the buffer's text has not changed.  */
@@ -1363,15 +1363,15 @@
       pos = ptr[i];
       /* Is it outside the displayed active region (if any)?  */
       if (pos <= 0)
-	clear_mouse_face (FRAME_WIN32_DISPLAY_INFO (f));
-      else if (! (EQ (window, FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window)
-		  && row >= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row
-		  && row <= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row
-		  && (row > FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row
-		      || column >= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_col)
-		  && (row < FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row
-		      || column < FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_col
-		      || FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_past_end)))
+	clear_mouse_face (FRAME_W32_DISPLAY_INFO (f));
+      else if (! (EQ (window, FRAME_W32_DISPLAY_INFO (f)->mouse_face_window)
+		  && row >= FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row
+		  && row <= FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row
+		  && (row > FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row
+		      || column >= FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_col)
+		  && (row < FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row
+		      || column < FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_col
+		      || FRAME_W32_DISPLAY_INFO (f)->mouse_face_past_end)))
 	{
 	  Lisp_Object mouse_face, overlay, position;
 	  Lisp_Object *overlay_vec;
@@ -1393,7 +1393,7 @@
 	  ZV = Z;
 
 	  /* Yes.  Clear the display of the old active region, if any.  */
-	  clear_mouse_face (FRAME_WIN32_DISPLAY_INFO (f));
+	  clear_mouse_face (FRAME_W32_DISPLAY_INFO (f));
 
 	  /* Is this char mouse-active?  */
 	  XSETINT (position, pos);
@@ -1435,19 +1435,19 @@
 	      after = Foverlay_end (overlay);
 	      /* Record this as the current active region.  */
 	      fast_find_position (window, before,
-				  &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_col,
-				  &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row);
-	      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_past_end
+				  &FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_col,
+				  &FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row);
+	      FRAME_W32_DISPLAY_INFO (f)->mouse_face_past_end
 		= !fast_find_position (window, after,
-				       &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_col,
-				       &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row);
-	      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window = window;
-	      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_face_id
+				       &FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_col,
+				       &FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row);
+	      FRAME_W32_DISPLAY_INFO (f)->mouse_face_window = window;
+	      FRAME_W32_DISPLAY_INFO (f)->mouse_face_face_id
 		= compute_char_face (f, w, pos, 0, 0,
 				     &ignore, pos + 1, 1);
 
 	      /* Display it as active.  */
-	      show_mouse_face (FRAME_WIN32_DISPLAY_INFO (f), 1);
+	      show_mouse_face (FRAME_W32_DISPLAY_INFO (f), 1);
 	    }
 	  /* Handle the text property case.  */
 	  else if (! NILP (mouse_face))
@@ -1469,19 +1469,19 @@
 						w->buffer, end);
 	      /* Record this as the current active region.  */
 	      fast_find_position (window, before,
-				  &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_col,
-				  &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row);
-	      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_past_end
+				  &FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_col,
+				  &FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row);
+	      FRAME_W32_DISPLAY_INFO (f)->mouse_face_past_end
 		= !fast_find_position (window, after,
-				       &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_col,
-				       &FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row);
-	      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_window = window;
-	      FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_face_id
+				       &FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_col,
+				       &FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row);
+	      FRAME_W32_DISPLAY_INFO (f)->mouse_face_window = window;
+	      FRAME_W32_DISPLAY_INFO (f)->mouse_face_face_id
 		= compute_char_face (f, w, pos, 0, 0,
 				     &ignore, pos + 1, 1);
 
 	      /* Display it as active.  */
-	      show_mouse_face (FRAME_WIN32_DISPLAY_INFO (f), 1);
+	      show_mouse_face (FRAME_W32_DISPLAY_INFO (f), 1);
 	    }
 	  BEGV = obegv;
 	  ZV = ozv;
@@ -1572,7 +1572,7 @@
 
 static void
 show_mouse_face (dpyinfo, hl)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
      int hl;
 {
   struct window *w = XWINDOW (dpyinfo->mouse_face_window);
@@ -1589,22 +1589,22 @@
   curs_x = f->phys_cursor_x;
   curs_y = f->phys_cursor_y;
 
-  for (i = FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row;
-       i <= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row; i++)
+  for (i = FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row;
+       i <= FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row; i++)
     {
-      int column = (i == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row
-		    ? FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_col
+      int column = (i == FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row
+		    ? FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_col
 		    : WINDOW_LEFT_MARGIN (w));
-      int endcolumn = (i == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row
-		       ? FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_col
+      int endcolumn = (i == FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row
+		       ? FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_col
 		       : WINDOW_LEFT_MARGIN (w) + width);
       endcolumn = min (endcolumn, FRAME_CURRENT_GLYPHS (f)->used[i]);
 
       /* If the cursor's in the text we are about to rewrite,
 	 turn the cursor off.  */
       if (i == curs_y
-	  && curs_x >= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_col - 1
-	  && curs_x <= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_col)
+	  && curs_x >= FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_col - 1
+	  && curs_x <= FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_col)
 	{
 	  x_display_cursor (f, 0);
 	  cursor_off = 1;
@@ -1628,9 +1628,9 @@
 
   /* Change the mouse cursor according to the value of HL.  */
   if (hl > 0)
-    SetCursor (f->output_data.win32->cross_cursor);
+    SetCursor (f->output_data.w32->cross_cursor);
   else
-    SetCursor (f->output_data.win32->text_cursor);
+    SetCursor (f->output_data.w32->text_cursor);
 }
 
 /* Clear out the mouse-highlighted active region.
@@ -1638,7 +1638,7 @@
 
 static void
 clear_mouse_face (dpyinfo)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
 {
   if (! NILP (dpyinfo->mouse_face_window))
     show_mouse_face (dpyinfo, 0);
@@ -1674,7 +1674,7 @@
    again. */
 
 static void
-win32_mouse_position (fp, insist, bar_window, part, x, y, time)
+w32_mouse_position (fp, insist, bar_window, part, x, y, time)
      FRAME_PTR *fp;
      int insist;
      Lisp_Object *bar_window;
@@ -1705,7 +1705,7 @@
       /* Now we have a position on the root; find the innermost window
 	 containing the pointer.  */
       {
-	if (FRAME_WIN32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
+	if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
 	    && FRAME_LIVE_P (last_mouse_frame))
 	  {
 	    f1 = last_mouse_frame;
@@ -1713,7 +1713,7 @@
 	else
 	  {
 	    /* Is win one of our frames?  */
-	    f1 = x_window_to_frame (FRAME_WIN32_DISPLAY_INFO (*fp), WindowFromPoint(pt));
+	    f1 = x_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp), WindowFromPoint(pt));
 	  }
 
 	/* If not, is it one of our scroll bars?  */
@@ -1734,13 +1734,13 @@
 	  {
 	    int ignore1, ignore2;
 
-	    ScreenToClient (FRAME_WIN32_WINDOW (f1), &pt);
+	    ScreenToClient (FRAME_W32_WINDOW (f1), &pt);
 
 	    /* Ok, we found a frame.  Store all the values.  */
 
 	    pixel_to_glyph_coords (f1, pt.x, pt.y, &ignore1, &ignore2,
 				   &last_mouse_glyph,
-				   FRAME_WIN32_DISPLAY_INFO (f1)->grabbed
+				   FRAME_W32_DISPLAY_INFO (f1)->grabbed
 				   || insist);
 
 	    *bar_window = Qnil;
@@ -1788,7 +1788,7 @@
 			       condemned = Qnil,
 			       ! GC_NILP (bar));
 	   bar = XSCROLL_BAR (bar)->next)
-	if (SCROLL_BAR_WIN32_WINDOW (XSCROLL_BAR (bar)) == window_id)
+	if (SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar)) == window_id)
 	  return XSCROLL_BAR (bar);
     }
 
@@ -1826,7 +1826,7 @@
 		   int x, int y, int cx, int cy, int flags)
 {
 #ifndef ATTACH_THREADS
-  Win32WindowPos pos;
+  W32WindowPos pos;
   pos.hwndAfter = hwndAfter;
   pos.x = x;
   pos.y = y;
@@ -1844,7 +1844,7 @@
      struct frame * f;
      HWND hwnd;
 {
-  SendMessage (FRAME_WIN32_WINDOW (f), WM_EMACS_DESTROYWINDOW, 
+  SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_DESTROYWINDOW, 
 	       (WPARAM) hwnd, 0);
 }
 
@@ -1878,7 +1878,7 @@
   SetScrollRange (hwnd, SB_CTL, 0, height, FALSE);
   SetScrollPos (hwnd, SB_CTL, 0, TRUE);
 
-  SET_SCROLL_BAR_WIN32_WINDOW (bar, hwnd);
+  SET_SCROLL_BAR_W32_WINDOW (bar, hwnd);
 
   /* Add bar to its frame's list of scroll bars.  */
   bar->next = FRAME_SCROLL_BARS (f);
@@ -1910,7 +1910,7 @@
      int rebuild;
 {
   int dragging = ! NILP (bar->dragging);
-  Window w = SCROLL_BAR_WIN32_WINDOW (bar);
+  Window w = SCROLL_BAR_W32_WINDOW (bar);
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
 
   /* If the display is already accurate, do nothing.  */
@@ -1937,7 +1937,7 @@
      struct scroll_bar *bar;
      int top, left, width, height;
 {
-  Window w = SCROLL_BAR_WIN32_WINDOW (bar);
+  Window w = SCROLL_BAR_W32_WINDOW (bar);
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
 
   BLOCK_INPUT;
@@ -1966,7 +1966,7 @@
   BLOCK_INPUT;
 
   /* Destroy the window.  */
-  my_destroy_window (f, SCROLL_BAR_WIN32_WINDOW (bar));
+  my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
 
   /* Disassociate this scroll bar from its window.  */
   XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
@@ -1979,7 +1979,7 @@
    characters, starting at POSITION.  If WINDOW has no scroll bar,
    create one.  */
 static void
-win32_set_vertical_scroll_bar (window, portion, whole, position)
+w32_set_vertical_scroll_bar (window, portion, whole, position)
      struct window *window;
      int portion, whole, position;
 {
@@ -1994,7 +1994,7 @@
   int pixel_width
     = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.win32->font)));
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font)));
   int pixel_height = VERTICAL_SCROLL_BAR_PIXEL_HEIGHT (f, height);
 
   struct scroll_bar *bar;
@@ -2044,7 +2044,7 @@
    to `*judge_scroll_bars_hook'.  A scroll bar may be spared if
    `*redeem_scroll_bar_hook' is applied to its window before the judgement.  */
 static void
-win32_condemn_scroll_bars (frame)
+w32_condemn_scroll_bars (frame)
      FRAME_PTR frame;
 {
   /* The condemned list should be empty at this point; if it's not,
@@ -2061,7 +2061,7 @@
 /* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
    Note that WINDOW isn't necessarily condemned at all.  */
 static void
-win32_redeem_scroll_bar (window)
+w32_redeem_scroll_bar (window)
      struct window *window;
 {
   struct scroll_bar *bar;
@@ -2108,7 +2108,7 @@
 /* Remove all scroll bars on FRAME that haven't been saved since the
    last call to `*condemn_scroll_bars_hook'.  */
 static void
-win32_judge_scroll_bars (f)
+w32_judge_scroll_bars (f)
      FRAME_PTR f;
 {
   Lisp_Object bar, next;
@@ -2142,13 +2142,13 @@
 static int
 x_scroll_bar_handle_click (bar, msg, emacs_event)
      struct scroll_bar *bar;
-     Win32Msg *msg;
+     W32Msg *msg;
      struct input_event *emacs_event;
 {
   if (! GC_WINDOWP (bar->window))
     abort ();
 
-  emacs_event->kind = win32_scroll_bar_click;
+  emacs_event->kind = w32_scroll_bar_click;
   emacs_event->code = 0;
   /* not really meaningful to distinguish up/down */
   emacs_event->modifiers = msg->dwModifiers;
@@ -2194,7 +2194,7 @@
 	break;
       case SB_ENDSCROLL:
       default:
-	SetScrollPos (SCROLL_BAR_WIN32_WINDOW (bar), SB_CTL, y, TRUE);
+	SetScrollPos (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, y, TRUE);
 	return FALSE;
       }
 
@@ -2216,7 +2216,7 @@
      unsigned long *time;
 {
   struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
-  Window w = SCROLL_BAR_WIN32_WINDOW (bar);
+  Window w = SCROLL_BAR_W32_WINDOW (bar);
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
   int pos;
 
@@ -2268,14 +2268,14 @@
   for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
        bar = XSCROLL_BAR (bar)->next)
     {
-      HWND window = SCROLL_BAR_WIN32_WINDOW (XSCROLL_BAR (bar));
+      HWND window = SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar));
       HDC hdc = GetDC (window);
       RECT rect;
 
       my_show_window (window, SW_HIDE);
       GetClientRect (window, &rect);
       select_palette (f, hdc);
-      win32_clear_rect (f, hdc, &rect);
+      w32_clear_rect (f, hdc, &rect);
       deselect_palette (f, hdc);
     }
 }
@@ -2289,13 +2289,13 @@
   for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
        bar = XSCROLL_BAR (bar)->next)
     {
-      HWND window = SCROLL_BAR_WIN32_WINDOW (XSCROLL_BAR (bar));
+      HWND window = SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar));
       my_show_window (window, how);
     }
 }
 
 
-/* The main Win32 event-reading loop - w32_read_socket.  */
+/* The main W32 event-reading loop - w32_read_socket.  */
 
 /* Timestamp of enter window event.  This is only used by w32_read_socket,
    but we have to put it out here, since static variables within functions
@@ -2309,12 +2309,12 @@
 
 extern int key_event (KEY_EVENT_RECORD *, struct input_event *);
 
-/* Map a Win32 WM_CHAR message into a KEY_EVENT_RECORD so that
+/* Map a W32 WM_CHAR message into a KEY_EVENT_RECORD so that
    we can use the same routines to handle input in both console
    and window modes.  */
 
 static void
-convert_to_key_event (Win32Msg *msgp, KEY_EVENT_RECORD *eventp)
+convert_to_key_event (W32Msg *msgp, KEY_EVENT_RECORD *eventp)
 {
   eventp->bKeyDown = TRUE;
   eventp->wRepeatCount = 1;
@@ -2338,7 +2338,7 @@
     return 0;
 }
 
-/* Read events coming from the Win32 shell.
+/* Read events coming from the W32 shell.
    This routine is called by the SIGIO handler.
    We return as soon as there are no more events to be read.
 
@@ -2368,12 +2368,12 @@
   int count = 0;
   int nbytes = 0;
   int items_pending;            /* How many items are in the X queue. */
-  Win32Msg msg;
+  W32Msg msg;
   struct frame *f;
   int event_found = 0;
   int prefix;
   Lisp_Object part;
-  struct win32_display_info *dpyinfo = &one_win32_display_info;
+  struct w32_display_info *dpyinfo = &one_w32_display_info;
 
   if (interrupt_input_blocked)
     {
@@ -2409,7 +2409,7 @@
 		else
 		  {
 		    /* Erase background again for safety.  */
-		    win32_clear_rect (f, NULL, &msg.rect);
+		    w32_clear_rect (f, NULL, &msg.rect);
 		    dumprectangle (f,
 				   msg.rect.left,
 				   msg.rect.top,
@@ -2430,7 +2430,7 @@
 	      temp_buffer[temp_index++] = msg.msg.wParam;
 	      bufp->kind = non_ascii_keystroke;
 	      bufp->code = msg.msg.wParam;
-	      bufp->modifiers = win32_kbd_mods_to_emacs (msg.dwModifiers);
+	      bufp->modifiers = w32_kbd_mods_to_emacs (msg.dwModifiers);
 	      XSETFRAME (bufp->frame_or_window, f);
 	      bufp->timestamp = msg.msg.time;
 	      bufp++;
@@ -2495,7 +2495,7 @@
 	  if (f)
 	    note_mouse_movement (f, &msg.msg);
 	  else
-	    clear_mouse_face (FRAME_WIN32_DISPLAY_INFO (f));
+	    clear_mouse_face (FRAME_W32_DISPLAY_INFO (f));
 	  
 	  break;
 	case WM_LBUTTONDOWN:
@@ -2516,7 +2516,7 @@
 	    
 	    if (f)
 	      {
-		if ((!dpyinfo->win32_focus_frame || f == dpyinfo->win32_focus_frame) 
+		if ((!dpyinfo->w32_focus_frame || f == dpyinfo->w32_focus_frame) 
 		    && (numchars >= 1))
 		  {
 		    construct_mouse_click (bufp, &msg, f);
@@ -2561,8 +2561,8 @@
 	  
 	  if (f && !f->async_iconified)
 	    {
-	      f->output_data.win32->left_pos = LOWORD (msg.msg.lParam);
-	      f->output_data.win32->top_pos = HIWORD (msg.msg.lParam);
+	      f->output_data.w32->left_pos = LOWORD (msg.msg.lParam);
+	      f->output_data.w32->top_pos = HIWORD (msg.msg.lParam);
 	    }
 	  
 	  break;
@@ -2591,17 +2591,17 @@
 	      
 	      if (columns != f->width
 		  || rows != f->height
-		  || width != f->output_data.win32->pixel_width
-		  || height != f->output_data.win32->pixel_height)
+		  || width != f->output_data.w32->pixel_width
+		  || height != f->output_data.w32->pixel_height)
 		{
 		  /* I had set this to 0, 0 - I am not sure why?? */
 		  
 		  change_frame_size (f, rows, columns, 0, 1);
 		  SET_FRAME_GARBAGED (f);
 		  
-		  f->output_data.win32->pixel_width = width;
-		  f->output_data.win32->pixel_height = height;
-		  f->output_data.win32->win_gravity = NorthWestGravity;
+		  f->output_data.w32->pixel_width = width;
+		  f->output_data.w32->pixel_height = height;
+		  f->output_data.w32->win_gravity = NorthWestGravity;
 		}
 	    }
 	  
@@ -2614,7 +2614,7 @@
 	    {
 	      x_new_focus_frame (dpyinfo, f);
 	    }
-	  else if (f == dpyinfo->win32_focus_frame)
+	  else if (f == dpyinfo->w32_focus_frame)
 	    x_new_focus_frame (dpyinfo, 0);
 	  
 	  break;
@@ -2772,12 +2772,12 @@
   
   hdc = get_frame_dc (f);
   
-  hb = CreateSolidBrush (f->output_data.win32->cursor_pixel);
+  hb = CreateSolidBrush (f->output_data.w32->cursor_pixel);
   
   rect.left = CHAR_TO_PIXEL_COL (f, curs_x);
   rect.top  = CHAR_TO_PIXEL_ROW (f, curs_y);
-  rect.right = rect.left + FONT_WIDTH (f->output_data.win32->font);
-  rect.bottom = rect.top + f->output_data.win32->line_height;
+  rect.right = rect.left + FONT_WIDTH (f->output_data.w32->font);
+  rect.bottom = rect.top + f->output_data.w32->line_height;
 
   FrameRect (hdc, &rect, hb);
   DeleteObject (hb);
@@ -2848,7 +2848,7 @@
       && (!on
 	  || f->phys_cursor_x != curs_x
 	  || f->phys_cursor_y != curs_y
-	  || f->output_data.win32->current_cursor != bar_cursor))
+	  || f->output_data.w32->current_cursor != bar_cursor))
     {
       /* Erase the cursor by redrawing the character underneath it.  */
       x_draw_single_glyph (f, f->phys_cursor_y, f->phys_cursor_x,
@@ -2860,23 +2860,23 @@
   /* If we now need a cursor in the new place or in the new form, do it so.  */
   if (on
       && (f->phys_cursor_x < 0
-	  || (f->output_data.win32->current_cursor != bar_cursor)))
+	  || (f->output_data.w32->current_cursor != bar_cursor)))
     {
       f->phys_cursor_glyph
 	= ((current_glyphs->enable[curs_y]
 	    && curs_x < current_glyphs->used[curs_y])
 	   ? current_glyphs->glyphs[curs_y][curs_x]
 	   : SPACEGLYPH);
-      win32_fill_area (f, NULL, f->output_data.win32->cursor_pixel,
+      w32_fill_area (f, NULL, f->output_data.w32->cursor_pixel,
 		       CHAR_TO_PIXEL_COL (f, curs_x),
 		       CHAR_TO_PIXEL_ROW (f, curs_y),
-		       max (f->output_data.win32->cursor_width, 1),
-		       f->output_data.win32->line_height);
+		       max (f->output_data.w32->cursor_width, 1),
+		       f->output_data.w32->line_height);
 
       f->phys_cursor_x = curs_x;
       f->phys_cursor_y = curs_y;
 
-      f->output_data.win32->current_cursor = bar_cursor;
+      f->output_data.w32->current_cursor = bar_cursor;
     }
 }
 
@@ -2918,23 +2918,23 @@
       && (!on
 	  || f->phys_cursor_x != curs_x
 	  || f->phys_cursor_y != curs_y
-	  || (f->output_data.win32->current_cursor != hollow_box_cursor
-	      && (f != FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame))))
+	  || (f->output_data.w32->current_cursor != hollow_box_cursor
+	      && (f != FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame))))
     {
       int mouse_face_here = 0;
       struct frame_glyphs *active_glyphs = FRAME_CURRENT_GLYPHS (f);
 
       /* If the cursor is in the mouse face area, redisplay that when
 	 we clear the cursor.  */
-      if (f == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_mouse_frame
+      if (f == FRAME_W32_DISPLAY_INFO (f)->mouse_face_mouse_frame
 	  &&
-	  (f->phys_cursor_y > FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row
-	   || (f->phys_cursor_y == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_row
-	       && f->phys_cursor_x >= FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_beg_col))
+	  (f->phys_cursor_y > FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row
+	   || (f->phys_cursor_y == FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_row
+	       && f->phys_cursor_x >= FRAME_W32_DISPLAY_INFO (f)->mouse_face_beg_col))
 	  &&
-	  (f->phys_cursor_y < FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row
-	   || (f->phys_cursor_y == FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_row
-	       && f->phys_cursor_x < FRAME_WIN32_DISPLAY_INFO (f)->mouse_face_end_col))
+	  (f->phys_cursor_y < FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row
+	   || (f->phys_cursor_y == FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_row
+	       && f->phys_cursor_x < FRAME_W32_DISPLAY_INFO (f)->mouse_face_end_col))
 	  /* Don't redraw the cursor's spot in mouse face
 	     if it is at the end of a line (on a newline).
 	     The cursor appears there, but mouse highlighting does not.  */
@@ -2943,12 +2943,12 @@
 
       /* If the font is not as tall as a whole line,
 	 we must explicitly clear the line's whole height.  */
-      if (FONT_HEIGHT (f->output_data.win32->font) != f->output_data.win32->line_height)
-	win32_clear_area (f, NULL,
+      if (FONT_HEIGHT (f->output_data.w32->font) != f->output_data.w32->line_height)
+	w32_clear_area (f, NULL,
 			  CHAR_TO_PIXEL_COL (f, f->phys_cursor_x),
 			  CHAR_TO_PIXEL_ROW (f, f->phys_cursor_y),
-			  FONT_WIDTH (f->output_data.win32->font),
-			  f->output_data.win32->line_height);
+			  FONT_WIDTH (f->output_data.w32->font),
+			  f->output_data.w32->line_height);
       /* Erase the cursor by redrawing the character underneath it.  */
       x_draw_single_glyph (f, f->phys_cursor_y, f->phys_cursor_x,
 			   f->phys_cursor_glyph,
@@ -2963,24 +2963,24 @@
      write it in the right place.  */
   if (on
       && (f->phys_cursor_x < 0
-	  || (f->output_data.win32->current_cursor != filled_box_cursor
-	      && f == FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame)))
+	  || (f->output_data.w32->current_cursor != filled_box_cursor
+	      && f == FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame)))
     {
       f->phys_cursor_glyph
 	= ((current_glyphs->enable[curs_y]
 	    && curs_x < current_glyphs->used[curs_y])
 	   ? current_glyphs->glyphs[curs_y][curs_x]
 	   : SPACEGLYPH);
-      if (f != FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame)
+      if (f != FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame)
 	{
 	  x_draw_box (f);
-	  f->output_data.win32->current_cursor = hollow_box_cursor;
+	  f->output_data.w32->current_cursor = hollow_box_cursor;
 	}
       else
 	{
 	  x_draw_single_glyph (f, curs_y, curs_x,
 			       f->phys_cursor_glyph, 2);
-	  f->output_data.win32->current_cursor = filled_box_cursor;
+	  f->output_data.w32->current_cursor = filled_box_cursor;
 	}
 
       f->phys_cursor_x = curs_x;
@@ -3026,8 +3026,8 @@
   {
       LOGFONT lf;
 
-      if (!x_to_win32_font(fontname, &lf)
-	  || !win32_to_x_font(&lf, new_font_name, 100))
+      if (!x_to_w32_font(fontname, &lf)
+	  || !w32_to_x_font(&lf, new_font_name, 100))
       {
 	  return Qnil;
       }
@@ -3039,25 +3039,25 @@
   {
       int i;
 
-      for (i = 0; i < FRAME_WIN32_DISPLAY_INFO (f)->n_fonts; i++)
-	  if (!strcmp (FRAME_WIN32_DISPLAY_INFO (f)->font_table[i].name, new_font_name))
+      for (i = 0; i < FRAME_W32_DISPLAY_INFO (f)->n_fonts; i++)
+	  if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->font_table[i].name, new_font_name))
 	  {
 	      already_loaded = i;
-	      fontname = FRAME_WIN32_DISPLAY_INFO (f)->font_table[i].name;
+	      fontname = FRAME_W32_DISPLAY_INFO (f)->font_table[i].name;
 	      break;
 	  }
   }
 
   /* If we have, just return it from the table.  */
   if (already_loaded >= 0)
-    f->output_data.win32->font = FRAME_WIN32_DISPLAY_INFO (f)->font_table[already_loaded].font;
+    f->output_data.w32->font = FRAME_W32_DISPLAY_INFO (f)->font_table[already_loaded].font;
   /* Otherwise, load the font and add it to the table.  */
   else
     {
       XFontStruct *font;
       int n_fonts;
 
-      font = win32_load_font(FRAME_WIN32_DISPLAY_INFO (f), fontname);
+      font = w32_load_font(FRAME_W32_DISPLAY_INFO (f), fontname);
 
       if (! font)
 	{
@@ -3065,42 +3065,42 @@
 	}
 
       /* Do we need to create the table?  */
-      if (FRAME_WIN32_DISPLAY_INFO (f)->font_table_size == 0)
+      if (FRAME_W32_DISPLAY_INFO (f)->font_table_size == 0)
 	{
-	  FRAME_WIN32_DISPLAY_INFO (f)->font_table_size = 16;
-	  FRAME_WIN32_DISPLAY_INFO (f)->font_table
-	    = (struct font_info *) xmalloc (FRAME_WIN32_DISPLAY_INFO (f)->font_table_size
+	  FRAME_W32_DISPLAY_INFO (f)->font_table_size = 16;
+	  FRAME_W32_DISPLAY_INFO (f)->font_table
+	    = (struct font_info *) xmalloc (FRAME_W32_DISPLAY_INFO (f)->font_table_size
 					    * sizeof (struct font_info));
 	}
       /* Do we need to grow the table?  */
-      else if (FRAME_WIN32_DISPLAY_INFO (f)->n_fonts
-	       >= FRAME_WIN32_DISPLAY_INFO (f)->font_table_size)
+      else if (FRAME_W32_DISPLAY_INFO (f)->n_fonts
+	       >= FRAME_W32_DISPLAY_INFO (f)->font_table_size)
 	{
-	  FRAME_WIN32_DISPLAY_INFO (f)->font_table_size *= 2;
-	  FRAME_WIN32_DISPLAY_INFO (f)->font_table
-	    = (struct font_info *) xrealloc (FRAME_WIN32_DISPLAY_INFO (f)->font_table,
-					     (FRAME_WIN32_DISPLAY_INFO (f)->font_table_size
+	  FRAME_W32_DISPLAY_INFO (f)->font_table_size *= 2;
+	  FRAME_W32_DISPLAY_INFO (f)->font_table
+	    = (struct font_info *) xrealloc (FRAME_W32_DISPLAY_INFO (f)->font_table,
+					     (FRAME_W32_DISPLAY_INFO (f)->font_table_size
 					      * sizeof (struct font_info)));
 	}
 
-      n_fonts = FRAME_WIN32_DISPLAY_INFO (f)->n_fonts;
-      FRAME_WIN32_DISPLAY_INFO (f)->font_table[n_fonts].name = (char *) xmalloc (strlen (fontname) + 1);
-      bcopy (fontname, FRAME_WIN32_DISPLAY_INFO (f)->font_table[n_fonts].name, strlen (fontname) + 1);
-      f->output_data.win32->font = FRAME_WIN32_DISPLAY_INFO (f)->font_table[n_fonts].font = font;
-      FRAME_WIN32_DISPLAY_INFO (f)->n_fonts++;
+      n_fonts = FRAME_W32_DISPLAY_INFO (f)->n_fonts;
+      FRAME_W32_DISPLAY_INFO (f)->font_table[n_fonts].name = (char *) xmalloc (strlen (fontname) + 1);
+      bcopy (fontname, FRAME_W32_DISPLAY_INFO (f)->font_table[n_fonts].name, strlen (fontname) + 1);
+      f->output_data.w32->font = FRAME_W32_DISPLAY_INFO (f)->font_table[n_fonts].font = font;
+      FRAME_W32_DISPLAY_INFO (f)->n_fonts++;
     }
 
   /* Compute the scroll bar width in character columns.  */
   if (f->scroll_bar_pixel_width > 0)
     {
-      int wid = FONT_WIDTH (f->output_data.win32->font);
+      int wid = FONT_WIDTH (f->output_data.w32->font);
       f->scroll_bar_cols = (f->scroll_bar_pixel_width + wid-1) / wid;
     }
   else
     f->scroll_bar_cols = 2;
 
   /* Now make the frame display the given font.  */
-  if (FRAME_WIN32_WINDOW (f) != 0)
+  if (FRAME_W32_WINDOW (f) != 0)
     {
       frame_update_line_height (f);
       x_set_window_size (f, 0, f->width, f->height);
@@ -3108,7 +3108,7 @@
   else
     /* If we are setting a new frame's font for the first time,
        there are no faces yet, so this font's height is the line height.  */
-    f->output_data.win32->line_height = FONT_HEIGHT (f->output_data.win32->font);
+    f->output_data.w32->line_height = FONT_HEIGHT (f->output_data.w32->font);
 
   {
     Lisp_Object lispy_name;
@@ -3124,17 +3124,17 @@
 {
   Window win, child;
   POINT pt;
-  int flags = f->output_data.win32->size_hint_flags;
+  int flags = f->output_data.w32->size_hint_flags;
 
   pt.x = pt.y = 0;
 
   /* Find the position of the outside upper-left corner of
      the inner window, with respect to the outer window.  */
-  if (f->output_data.win32->parent_desc != FRAME_WIN32_DISPLAY_INFO (f)->root_window)
+  if (f->output_data.w32->parent_desc != FRAME_W32_DISPLAY_INFO (f)->root_window)
     {
       BLOCK_INPUT;
-      MapWindowPoints (FRAME_WIN32_WINDOW (f),
-		       f->output_data.win32->parent_desc,
+      MapWindowPoints (FRAME_W32_WINDOW (f),
+		       f->output_data.w32->parent_desc,
 		       &pt, 1);
       UNBLOCK_INPUT;
     }
@@ -3144,7 +3144,7 @@
       rt.left = rt.right = rt.top = rt.bottom = 0;
       
       BLOCK_INPUT;
-      AdjustWindowRect(&rt, f->output_data.win32->dwStyle,
+      AdjustWindowRect(&rt, f->output_data.w32->dwStyle,
 		       FRAME_EXTERNAL_MENU_BAR (f));
       UNBLOCK_INPUT;
 
@@ -3155,20 +3155,20 @@
   /* Treat negative positions as relative to the leftmost bottommost
      position that fits on the screen.  */
   if (flags & XNegative)
-    f->output_data.win32->left_pos = (FRAME_WIN32_DISPLAY_INFO (f)->width
-			      - 2 * f->output_data.win32->border_width - pt.x
+    f->output_data.w32->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width
+			      - 2 * f->output_data.w32->border_width - pt.x
 			      - PIXEL_WIDTH (f)
-			      + f->output_data.win32->left_pos);
+			      + f->output_data.w32->left_pos);
 
   if (flags & YNegative)
-    f->output_data.win32->top_pos = (FRAME_WIN32_DISPLAY_INFO (f)->height
-			     - 2 * f->output_data.win32->border_width - pt.y
+    f->output_data.w32->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height
+			     - 2 * f->output_data.w32->border_width - pt.y
 			     - PIXEL_HEIGHT (f)
-			     + f->output_data.win32->top_pos);
+			     + f->output_data.w32->top_pos);
   /* The left_pos and top_pos
      are now relative to the top and left screen edges,
      so the flags should correspond.  */
-  f->output_data.win32->size_hint_flags &= ~ (XNegative | YNegative);
+  f->output_data.w32->size_hint_flags &= ~ (XNegative | YNegative);
 }
 
 /* CHANGE_GRAVITY is 1 when calling from Fset_frame_position,
@@ -3186,14 +3186,14 @@
 
   if (change_gravity > 0)
     {
-      f->output_data.win32->top_pos = yoff;
-      f->output_data.win32->left_pos = xoff;
-      f->output_data.win32->size_hint_flags &= ~ (XNegative | YNegative);
+      f->output_data.w32->top_pos = yoff;
+      f->output_data.w32->left_pos = xoff;
+      f->output_data.w32->size_hint_flags &= ~ (XNegative | YNegative);
       if (xoff < 0)
-	f->output_data.win32->size_hint_flags |= XNegative;
+	f->output_data.w32->size_hint_flags |= XNegative;
       if (yoff < 0)
-	f->output_data.win32->size_hint_flags |= YNegative;
-      f->output_data.win32->win_gravity = NorthWestGravity;
+	f->output_data.w32->size_hint_flags |= YNegative;
+      f->output_data.w32->win_gravity = NorthWestGravity;
     }
   x_calc_absolute_position (f);
 
@@ -3202,15 +3202,15 @@
 
   /* It is a mystery why we need to add the border_width here
      when the frame is already visible, but experiment says we do.  */
-  modified_left = f->output_data.win32->left_pos;
-  modified_top = f->output_data.win32->top_pos;
+  modified_left = f->output_data.w32->left_pos;
+  modified_top = f->output_data.w32->top_pos;
   if (change_gravity != 0)
     {
-      modified_left += f->output_data.win32->border_width;
-      modified_top += f->output_data.win32->border_width;
+      modified_left += f->output_data.w32->border_width;
+      modified_top += f->output_data.w32->border_width;
     }
 
-  my_set_window_pos (FRAME_WIN32_WINDOW (f),
+  my_set_window_pos (FRAME_W32_WINDOW (f),
 		     NULL,
 		     modified_left, modified_top,
 		     0,0,
@@ -3233,16 +3233,16 @@
   BLOCK_INPUT;
   
   check_frame_size (f, &rows, &cols);
-  f->output_data.win32->vertical_scroll_bar_extra
+  f->output_data.w32->vertical_scroll_bar_extra
     = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
        ? 0
        : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.win32->font)));
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font)));
   pixelwidth = CHAR_TO_PIXEL_WIDTH (f, cols);
   pixelheight = CHAR_TO_PIXEL_HEIGHT (f, rows);
   
-  f->output_data.win32->win_gravity = NorthWestGravity;
+  f->output_data.w32->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);
   
   {
@@ -3252,12 +3252,12 @@
     rect.right = pixelwidth;
     rect.bottom = pixelheight;
       
-    AdjustWindowRect(&rect, f->output_data.win32->dwStyle,
+    AdjustWindowRect(&rect, f->output_data.w32->dwStyle,
 		     FRAME_EXTERNAL_MENU_BAR (f));
       
     /* All windows have an extra pixel */
 
-    my_set_window_pos (FRAME_WIN32_WINDOW (f),
+    my_set_window_pos (FRAME_W32_WINDOW (f),
 		       NULL, 
 		       0, 0,
 		       rect.right - rect.left + 1,
@@ -3305,8 +3305,8 @@
 {
   BLOCK_INPUT;
 
-  pix_x += f->output_data.win32->left_pos;
-  pix_y += f->output_data.win32->top_pos;
+  pix_x += f->output_data.w32->left_pos;
+  pix_y += f->output_data.w32->top_pos;
 
   SetCursorPos (pix_x, pix_y);
 
@@ -3320,8 +3320,8 @@
 {
   int pix_x, pix_y;
 
-  pix_x = CHAR_TO_PIXEL_COL (f, x) + FONT_WIDTH  (f->output_data.win32->font) / 2;
-  pix_y = CHAR_TO_PIXEL_ROW (f, y) + f->output_data.win32->line_height / 2;
+  pix_x = CHAR_TO_PIXEL_COL (f, x) + FONT_WIDTH  (f->output_data.w32->font) / 2;
+  pix_y = CHAR_TO_PIXEL_ROW (f, y) + f->output_data.w32->line_height / 2;
 
   if (pix_x < 0) pix_x = 0;
   if (pix_x > PIXEL_WIDTH (f)) pix_x = PIXEL_WIDTH (f);
@@ -3352,7 +3352,7 @@
 //  if (f->async_visible)
     {
       BLOCK_INPUT;
-      my_set_window_pos (FRAME_WIN32_WINDOW (f),
+      my_set_window_pos (FRAME_W32_WINDOW (f),
 		         HWND_TOP,
 		         0, 0, 0, 0,
 		         SWP_NOSIZE | SWP_NOMOVE);
@@ -3368,7 +3368,7 @@
 //  if (f->async_visible)
     {
       BLOCK_INPUT;
-      my_set_window_pos (FRAME_WIN32_WINDOW (f),
+      my_set_window_pos (FRAME_W32_WINDOW (f),
 		         HWND_BOTTOM,
 		         0, 0, 0, 0,
 		         SWP_NOSIZE | SWP_NOMOVE);
@@ -3377,7 +3377,7 @@
 }
 
 static void
-win32_frame_raise_lower (f, raise)
+w32_frame_raise_lower (f, raise)
      FRAME_PTR f;
      int raise;
 {
@@ -3408,15 +3408,15 @@
 	 if we get to x_make_frame_visible a second time
 	 before the window gets really visible.  */
       if (! FRAME_ICONIFIED_P (f)
-	  && ! f->output_data.win32->asked_for_visible)
+	  && ! f->output_data.w32->asked_for_visible)
       {
-	x_set_offset (f, f->output_data.win32->left_pos, f->output_data.win32->top_pos, 0);
-//	SetForegroundWindow (FRAME_WIN32_WINDOW (f));
+	x_set_offset (f, f->output_data.w32->left_pos, f->output_data.w32->top_pos, 0);
+//	SetForegroundWindow (FRAME_W32_WINDOW (f));
       }
 
-      f->output_data.win32->asked_for_visible = 1;
-
-      my_show_window (FRAME_WIN32_WINDOW (f), SW_SHOWNORMAL);
+      f->output_data.w32->asked_for_visible = 1;
+
+      my_show_window (FRAME_W32_WINDOW (f), SW_SHOWNORMAL);
     }
 
   /* Synchronize to ensure Emacs knows the frame is visible
@@ -3474,12 +3474,12 @@
   Window window;
   
   /* Don't keep the highlight on an invisible frame.  */
-  if (FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame == f)
-    FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame = 0;
+  if (FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame == f)
+    FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame = 0;
   
   BLOCK_INPUT;
   
-  my_show_window (FRAME_WIN32_WINDOW (f), SW_HIDE);
+  my_show_window (FRAME_W32_WINDOW (f), SW_HIDE);
   
   /* We can't distinguish this from iconification
      just by the event that we get from the server.
@@ -3503,15 +3503,15 @@
   int result;
 
   /* Don't keep the highlight on an invisible frame.  */
-  if (FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame == f)
-    FRAME_WIN32_DISPLAY_INFO (f)->win32_highlight_frame = 0;
+  if (FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame == f)
+    FRAME_W32_DISPLAY_INFO (f)->w32_highlight_frame = 0;
 
   if (f->async_iconified)
     return;
 
   BLOCK_INPUT;
 
-  my_show_window (FRAME_WIN32_WINDOW (f), SW_SHOWMINIMIZED);
+  my_show_window (FRAME_W32_WINDOW (f), SW_SHOWMINIMIZED);
   /* The frame doesn't seem to be lowered automatically. */
   x_lower_frame (f);
 
@@ -3525,22 +3525,22 @@
 x_destroy_window (f)
      struct frame *f;
 {
-  struct win32_display_info *dpyinfo = FRAME_WIN32_DISPLAY_INFO (f);
+  struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
 
   BLOCK_INPUT;
 
-  my_destroy_window (f, FRAME_WIN32_WINDOW (f));
+  my_destroy_window (f, FRAME_W32_WINDOW (f));
   free_frame_menubar (f);
   free_frame_faces (f);
 
-  xfree (f->output_data.win32);
-  f->output_data.win32 = 0;
-  if (f == dpyinfo->win32_focus_frame)
-    dpyinfo->win32_focus_frame = 0;
-  if (f == dpyinfo->win32_focus_event_frame)
-    dpyinfo->win32_focus_event_frame = 0;
-  if (f == dpyinfo->win32_highlight_frame)
-    dpyinfo->win32_highlight_frame = 0;
+  xfree (f->output_data.w32);
+  f->output_data.w32 = 0;
+  if (f == dpyinfo->w32_focus_frame)
+    dpyinfo->w32_focus_frame = 0;
+  if (f == dpyinfo->w32_focus_event_frame)
+    dpyinfo->w32_focus_event_frame = 0;
+  if (f == dpyinfo->w32_highlight_frame)
+    dpyinfo->w32_highlight_frame = 0;
 
   dpyinfo->reference_count--;
 
@@ -3569,14 +3569,14 @@
      long flags;
      int user_position;
 {
-  Window window = FRAME_WIN32_WINDOW (f);
+  Window window = FRAME_W32_WINDOW (f);
 
   flexlines = f->height;
 
   enter_crit ();
 
-  SetWindowLong (window, WND_X_UNITS_INDEX, FONT_WIDTH (f->output_data.win32->font));
-  SetWindowLong (window, WND_Y_UNITS_INDEX, f->output_data.win32->line_height);
+  SetWindowLong (window, WND_X_UNITS_INDEX, FONT_WIDTH (f->output_data.w32->font));
+  SetWindowLong (window, WND_Y_UNITS_INDEX, f->output_data.w32->line_height);
 
   leave_crit ();
 }
@@ -3587,7 +3587,7 @@
      int icon_x, icon_y;
 {
 #if 0
-  Window window = FRAME_WIN32_WINDOW (f);
+  Window window = FRAME_W32_WINDOW (f);
 
   f->display.x->wm_hints.flags |= IconPositionHint;
   f->display.x->wm_hints.icon_x = icon_x;
@@ -3619,25 +3619,25 @@
 };
 #endif /* USE_X_TOOLKIT */
 
-static int win32_initialized = 0;
-
-struct win32_display_info *
-win32_term_init (display_name, xrm_option, resource_name)
+static int w32_initialized = 0;
+
+struct w32_display_info *
+w32_term_init (display_name, xrm_option, resource_name)
      Lisp_Object display_name;
      char *xrm_option;
      char *resource_name;
 {
   Lisp_Object frame;
   char *defaultvalue;
-  struct win32_display_info *dpyinfo;
+  struct w32_display_info *dpyinfo;
   HDC hdc;
   
   BLOCK_INPUT;
   
-  if (!win32_initialized)
+  if (!w32_initialized)
     {
-      win32_initialize ();
-      win32_initialized = 1;
+      w32_initialize ();
+      w32_initialized = 1;
     }
   
   {
@@ -3653,21 +3653,21 @@
       }
   }
   
-  dpyinfo = &one_win32_display_info;
+  dpyinfo = &one_w32_display_info;
   
   /* Put this display on the chain.  */
   dpyinfo->next = NULL;
   
-  /* Put it on win32_display_name_list as well, to keep them parallel.  */ 
-  win32_display_name_list = Fcons (Fcons (display_name, Qnil),
-				   win32_display_name_list);
-  dpyinfo->name_list_element = XCONS (win32_display_name_list)->car;
+  /* Put it on w32_display_name_list as well, to keep them parallel.  */ 
+  w32_display_name_list = Fcons (Fcons (display_name, Qnil),
+				   w32_display_name_list);
+  dpyinfo->name_list_element = XCONS (w32_display_name_list)->car;
   
-  dpyinfo->win32_id_name
+  dpyinfo->w32_id_name
     = (char *) xmalloc (XSTRING (Vinvocation_name)->size
 			+ XSTRING (Vsystem_name)->size
 			+ 2);
-  sprintf (dpyinfo->win32_id_name, "%s@%s",
+  sprintf (dpyinfo->w32_id_name, "%s@%s",
 	   XSTRING (Vinvocation_name)->data, XSTRING (Vsystem_name)->data);
 
 #if 0
@@ -3703,16 +3703,16 @@
   dpyinfo->mouse_face_window = Qnil;
   dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0;
   dpyinfo->mouse_face_defer = 0;
-  dpyinfo->win32_focus_frame = 0;
-  dpyinfo->win32_focus_event_frame = 0;
-  dpyinfo->win32_highlight_frame = 0;
+  dpyinfo->w32_focus_frame = 0;
+  dpyinfo->w32_focus_event_frame = 0;
+  dpyinfo->w32_highlight_frame = 0;
   
   ReleaseDC (GetDesktopWindow (), hdc);
 
   /* Determine if there is a middle mouse button, to allow parse_button
      to decide whether right mouse events should be mouse-2 or
      mouse-3. */
-  XSETINT (Vwin32_num_mouse_buttons, GetSystemMetrics (SM_CMOUSEBUTTONS));
+  XSETINT (Vw32_num_mouse_buttons, GetSystemMetrics (SM_CMOUSEBUTTONS));
 
   /* initialise palette with white and black */
   {
@@ -3746,18 +3746,18 @@
 
 void
 x_delete_display (dpyinfo)
-     struct win32_display_info *dpyinfo;
+     struct w32_display_info *dpyinfo;
 {
-  /* Discard this display from win32_display_name_list and win32_display_list.
+  /* Discard this display from w32_display_name_list and w32_display_list.
      We can't use Fdelq because that can quit.  */
-  if (! NILP (win32_display_name_list)
-      && EQ (XCONS (win32_display_name_list)->car, dpyinfo->name_list_element))
-    win32_display_name_list = XCONS (win32_display_name_list)->cdr;
+  if (! NILP (w32_display_name_list)
+      && EQ (XCONS (w32_display_name_list)->car, dpyinfo->name_list_element))
+    w32_display_name_list = XCONS (w32_display_name_list)->cdr;
   else
     {
       Lisp_Object tail;
 
-      tail = win32_display_name_list;
+      tail = w32_display_name_list;
       while (CONSP (tail) && CONSP (XCONS (tail)->cdr))
 	{
 	  if (EQ (XCONS (XCONS (tail)->cdr)->car,
@@ -3772,12 +3772,12 @@
 
   /* free palette table */
   {
-    struct win32_palette_entry * plist;
+    struct w32_palette_entry * plist;
 
     plist = dpyinfo->color_list;
     while (plist)
     {
-      struct win32_palette_entry * pentry = plist;
+      struct w32_palette_entry * pentry = plist;
       plist = plist->next;
       xfree(pentry);
     }
@@ -3786,39 +3786,39 @@
       DeleteObject(dpyinfo->palette);
   }
   xfree (dpyinfo->font_table);
-  xfree (dpyinfo->win32_id_name);
+  xfree (dpyinfo->w32_id_name);
 }
 
-/* Set up use of Win32.  */
+/* Set up use of W32.  */
 
 DWORD win_msg_worker ();
 
-win32_initialize ()
+w32_initialize ()
 {
-  clear_frame_hook = win32_clear_frame;
-  clear_end_of_line_hook = win32_clear_end_of_line;
-  ins_del_lines_hook = win32_ins_del_lines;
-  change_line_highlight_hook = win32_change_line_highlight;
-  insert_glyphs_hook = win32_insert_glyphs;
-  write_glyphs_hook = win32_write_glyphs;
-  delete_glyphs_hook = win32_delete_glyphs;
-  ring_bell_hook = win32_ring_bell;
-  reset_terminal_modes_hook = win32_reset_terminal_modes;
-  set_terminal_modes_hook = win32_set_terminal_modes;
-  update_begin_hook = win32_update_begin;
-  update_end_hook = win32_update_end;
-  set_terminal_window_hook = win32_set_terminal_window;
+  clear_frame_hook = w32_clear_frame;
+  clear_end_of_line_hook = w32_clear_end_of_line;
+  ins_del_lines_hook = w32_ins_del_lines;
+  change_line_highlight_hook = w32_change_line_highlight;
+  insert_glyphs_hook = w32_insert_glyphs;
+  write_glyphs_hook = w32_write_glyphs;
+  delete_glyphs_hook = w32_delete_glyphs;
+  ring_bell_hook = w32_ring_bell;
+  reset_terminal_modes_hook = w32_reset_terminal_modes;
+  set_terminal_modes_hook = w32_set_terminal_modes;
+  update_begin_hook = w32_update_begin;
+  update_end_hook = w32_update_end;
+  set_terminal_window_hook = w32_set_terminal_window;
   read_socket_hook = w32_read_socket;
-  frame_up_to_date_hook = win32_frame_up_to_date;
-  cursor_to_hook = win32_cursor_to;
-  reassert_line_highlight_hook = win32_reassert_line_highlight;
-  mouse_position_hook = win32_mouse_position;
-  frame_rehighlight_hook = win32_frame_rehighlight;
-  frame_raise_lower_hook = win32_frame_raise_lower;
-  set_vertical_scroll_bar_hook = win32_set_vertical_scroll_bar;
-  condemn_scroll_bars_hook = win32_condemn_scroll_bars;
-  redeem_scroll_bar_hook = win32_redeem_scroll_bar;
-  judge_scroll_bars_hook = win32_judge_scroll_bars;
+  frame_up_to_date_hook = w32_frame_up_to_date;
+  cursor_to_hook = w32_cursor_to;
+  reassert_line_highlight_hook = w32_reassert_line_highlight;
+  mouse_position_hook = w32_mouse_position;
+  frame_rehighlight_hook = w32_frame_rehighlight;
+  frame_raise_lower_hook = w32_frame_raise_lower;
+  set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar;
+  condemn_scroll_bars_hook = w32_condemn_scroll_bars;
+  redeem_scroll_bar_hook = w32_redeem_scroll_bar;
+  judge_scroll_bars_hook = w32_judge_scroll_bars;
 
   scroll_region_ok = 1;         /* we'll scroll partial frames */
   char_ins_del_ok = 0;          /* just as fast to write the line */
@@ -3867,10 +3867,10 @@
 }
 
 void
-syms_of_win32term ()
+syms_of_w32term ()
 {
-  staticpro (&win32_display_name_list);
-  win32_display_name_list = Qnil;
+  staticpro (&w32_display_name_list);
+  w32_display_name_list = Qnil;
 
   staticpro (&last_mouse_scroll_bar);
   last_mouse_scroll_bar = Qnil;
@@ -3878,14 +3878,14 @@
   staticpro (&Qvendor_specific_keysyms);
   Qvendor_specific_keysyms = intern ("vendor-specific-keysyms");
 
-  DEFVAR_INT ("win32-num-mouse-buttons",
-	      &Vwin32_num_mouse_buttons,
+  DEFVAR_INT ("w32-num-mouse-buttons",
+	      &Vw32_num_mouse_buttons,
 	      "Number of physical mouse buttons.");
-  Vwin32_num_mouse_buttons = Qnil;
-
-  DEFVAR_LISP ("win32-swap-mouse-buttons",
-	      &Vwin32_swap_mouse_buttons,
+  Vw32_num_mouse_buttons = Qnil;
+
+  DEFVAR_LISP ("w32-swap-mouse-buttons",
+	      &Vw32_swap_mouse_buttons,
 	      "Swap the mapping of middle and right mouse buttons.\n\
 When nil, middle button is mouse-2 and right button is mouse-3.");
-  Vwin32_swap_mouse_buttons = Qnil;
+  Vw32_swap_mouse_buttons = Qnil;
 }
--- a/src/w32term.h	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32term.h	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Definitions and headers for communication with Win32 GUI.
+/* Definitions and headers for communication under the Win32 API.
    Copyright (C) 1995 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -32,7 +32,7 @@
 #define FONT_HEIGHT(f)	((f)->tm.tmHeight)
 #define FONT_BASE(f)    ((f)->tm.tmAscent)
 
-#define CHECK_WIN32_FRAME(f, frame)		\
+#define CHECK_W32_FRAME(f, frame)		\
   if (NILP (frame))				\
     f = selected_frame;				\
   else						\
@@ -40,7 +40,7 @@
       CHECK_LIVE_FRAME (frame, 0);		\
       f = XFRAME (frame);			\
     }						\
-  if (! FRAME_WIN32_P (f))
+  if (! FRAME_W32_P (f))
 
 /* Indicates whether we are in the readsocket call and the message we
    are processing in the current loop */
@@ -55,7 +55,7 @@
 };
 
 /* This data type is used for the font_table field
-   of struct win32_display_info.  */
+   of struct w32_display_info.  */
 
 struct font_info 
 {
@@ -66,7 +66,7 @@
 /* Structure recording bitmaps and reference count.
    If REFCOUNT is 0 then this record is free to be reused.  */
 
-struct win32_bitmap_record 
+struct w32_bitmap_record 
 {
   Pixmap pixmap;
   char *file;
@@ -80,26 +80,26 @@
    system palette.  Keep a ref-counted list of requested colors and
    regenerate the app palette whenever the requested list changes. */
 
-extern Lisp_Object Vwin32_enable_palette;
+extern Lisp_Object Vw32_enable_palette;
 
-struct win32_palette_entry {
-  struct win32_palette_entry * next;
+struct w32_palette_entry {
+  struct w32_palette_entry * next;
   PALETTEENTRY entry;
 #if 0
   unsigned refcount;
 #endif
 };
 
-extern void win32_regenerate_palette(struct frame *f);
+extern void w32_regenerate_palette(struct frame *f);
 
 
-/* For each display (currently only one on win32), we have a structure that
+/* For each display (currently only one on w32), we have a structure that
    records information about it.  */
 
-struct win32_display_info
+struct w32_display_info
 {
-  /* Chain of all win32_display_info structures.  */
-  struct win32_display_info *next;
+  /* Chain of all w32_display_info structures.  */
+  struct w32_display_info *next;
   /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
      The same cons cell also appears in x_display_name_list.  */
   Lisp_Object name_list_element;
@@ -121,7 +121,7 @@
 
   /* color palette information */
   int has_palette;
-  struct win32_palette_entry * color_list;
+  struct w32_palette_entry * color_list;
   unsigned num_colors;
   HPALETTE palette;
 
@@ -156,15 +156,15 @@
   /* Nonzero means defer mouse-motion highlighting.  */
   int mouse_face_defer;
 
-  char *win32_id_name;
+  char *w32_id_name;
 
-  /* The number of fonts actually stored in win32_font_table.
+  /* The number of fonts actually stored in w32_font_table.
      font_table[n] is used and valid iff 0 <= n < n_fonts.
      0 <= n_fonts <= font_table_size.  */
   int n_fonts;
 
   /* Pointer to bitmap records.  */
-  struct win32_bitmap_record *bitmaps;
+  struct w32_bitmap_record *bitmaps;
 
   /* Allocated size of bitmaps field.  */
   int bitmaps_size;
@@ -176,54 +176,54 @@
      Zero if none.  This is examined by Ffocus_frame in w32fns.c.  Note
      that a mere EnterNotify event can set this; if you need to know the
      last frame specified in a FocusIn or FocusOut event, use
-     win32_focus_event_frame.  */
-  struct frame *win32_focus_frame;
+     w32_focus_event_frame.  */
+  struct frame *w32_focus_frame;
 
   /* The last frame mentioned in a FocusIn or FocusOut event.  This is
-     separate from win32_focus_frame, because whether or not LeaveNotify
+     separate from w32_focus_frame, because whether or not LeaveNotify
      events cause us to lose focus depends on whether or not we have
      received a FocusIn event for it.  */
-  struct frame *win32_focus_event_frame;
+  struct frame *w32_focus_event_frame;
 
   /* The frame which currently has the visual highlight, and should get
      keyboard input (other sorts of input have the frame encoded in the
      event).  It points to the focus frame's selected window's
-     frame.  It differs from win32_focus_frame when we're using a global
+     frame.  It differs from w32_focus_frame when we're using a global
      minibuffer.  */
-  struct frame *win32_highlight_frame;
+  struct frame *w32_highlight_frame;
 };
 
 /* This is a chain of structures for all the displays currently in use.  */
-extern struct win32_display_info one_win32_display_info;
+extern struct w32_display_info one_w32_display_info;
 
 /* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
-   one for each element of win32_display_list and in the same order.
+   one for each element of w32_display_list and in the same order.
    NAME is the name of the frame.
    FONT-LIST-CACHE records previous values returned by x-list-fonts.  */
-extern Lisp_Object win32_display_name_list;
+extern Lisp_Object w32_display_name_list;
 
-extern struct win32_display_info *x_display_info_for_display ();
-extern struct win32_display_info *x_display_info_for_name ();
+extern struct w32_display_info *x_display_info_for_display ();
+extern struct w32_display_info *x_display_info_for_name ();
 
-extern struct win32_display_info *win32_term_init ();
+extern struct w32_display_info *w32_term_init ();
 
-/* Each Win32 frame object points to its own struct win32_display object
-   in the output_data.win32 field.  The win32_display structure contains all
-   the information that is specific to Win32 windows.  */
+/* Each W32 frame object points to its own struct w32_display object
+   in the output_data.w32 field.  The w32_display structure contains all
+   the information that is specific to W32 windows.  */
 
-struct win32_output
+struct w32_output
 {
   /* Original palette (used to deselect real palette after drawing) */
   HPALETTE old_palette;
 
-  /* Position of the Win32 window (x and y offsets in root window).  */
+  /* Position of the W32 window (x and y offsets in root window).  */
   int left_pos;
   int top_pos;
 
-  /* Border width of the Win32 window as known by the window system.  */
+  /* Border width of the W32 window as known by the window system.  */
   int border_width;
 
-  /* Size of the Win32 window in pixels.  */
+  /* Size of the W32 window in pixels.  */
   int pixel_height, pixel_width;
 
   /* Height of a line, in pixels.  */
@@ -304,7 +304,7 @@
   int size_hint_flags;
 
   /* This is the Emacs structure for the display this frame is on.  */
-  /* struct win32_display_info *display_info; */
+  /* struct w32_display_info *display_info; */
 
   /* Nonzero means our parent is another application's window
      and was explicitly specified.  */
@@ -315,37 +315,37 @@
 };
 
 /* Get at the computed faces of an X window frame.  */
-#define FRAME_PARAM_FACES(f) ((f)->output_data.win32->param_faces)
-#define FRAME_N_PARAM_FACES(f) ((f)->output_data.win32->n_param_faces)
+#define FRAME_PARAM_FACES(f) ((f)->output_data.w32->param_faces)
+#define FRAME_N_PARAM_FACES(f) ((f)->output_data.w32->n_param_faces)
 #define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0])
 #define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1])
 
-#define FRAME_COMPUTED_FACES(f) ((f)->output_data.win32->computed_faces)
-#define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.win32->n_computed_faces)
-#define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.win32->size_computed_faces)
-#define FRAME_DEFAULT_FACE(f) ((f)->output_data.win32->computed_faces[0])
-#define FRAME_MODE_LINE_FACE(f) ((f)->output_data.win32->computed_faces[1])
+#define FRAME_COMPUTED_FACES(f) ((f)->output_data.w32->computed_faces)
+#define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.w32->n_computed_faces)
+#define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.w32->size_computed_faces)
+#define FRAME_DEFAULT_FACE(f) ((f)->output_data.w32->computed_faces[0])
+#define FRAME_MODE_LINE_FACE(f) ((f)->output_data.w32->computed_faces[1])
 
 /* Return the window associated with the frame F.  */
-#define FRAME_WIN32_WINDOW(f) ((f)->output_data.win32->window_desc)
+#define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc)
 
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.win32->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.win32->background_pixel)
-#define FRAME_FONT(f) ((f)->output_data.win32->font)
-#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.win32->internal_border_width)
+#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.w32->foreground_pixel)
+#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.w32->background_pixel)
+#define FRAME_FONT(f) ((f)->output_data.w32->font)
+#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.w32->internal_border_width)
 
-/* This gives the win32_display_info structure for the display F is on.  */
-#define FRAME_WIN32_DISPLAY_INFO(f) (&one_win32_display_info)
+/* This gives the w32_display_info structure for the display F is on.  */
+#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)
 
 /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}.  */
-#define PIXEL_WIDTH(f) ((f)->output_data.win32->pixel_width)
-#define PIXEL_HEIGHT(f) ((f)->output_data.win32->pixel_height)
-#define FRAME_LINE_HEIGHT(f) ((f)->output_data.win32->line_height)
+#define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width)
+#define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height)
+#define FRAME_LINE_HEIGHT(f) ((f)->output_data.w32->line_height)
 
-#define FRAME_DESIRED_CURSOR(f) ((f)->output_data.win32->desired_cursor)
+#define FRAME_DESIRED_CURSOR(f) ((f)->output_data.w32->desired_cursor)
 
 
-/* Win32-specific scroll bar stuff.  */
+/* W32-specific scroll bar stuff.  */
 
 /* We represent scroll bars as lisp vectors.  This allows us to place
    references to them in windows without worrying about whether we'll
@@ -369,7 +369,7 @@
 
   /* The window representing this scroll bar.  Since this is a full
      32-bit quantity, we store it split into two 32-bit values.  */
-  Lisp_Object win32_window_low, win32_window_high;
+  Lisp_Object w32_window_low, w32_window_high;
 
   /* The position and size of the scroll bar in pixels, relative to the
      frame.  */
@@ -415,18 +415,18 @@
 
 
 /* Extract the window id of the scroll bar from a struct scroll_bar.  */
-#define SCROLL_BAR_WIN32_WINDOW(ptr) \
-  ((Window) SCROLL_BAR_PACK ((ptr)->win32_window_low, (ptr)->win32_window_high))
+#define SCROLL_BAR_W32_WINDOW(ptr) \
+  ((Window) SCROLL_BAR_PACK ((ptr)->w32_window_low, (ptr)->w32_window_high))
 
 /* Store a window id in a struct scroll_bar.  */
-#define SET_SCROLL_BAR_WIN32_WINDOW(ptr, id) \
-  (SCROLL_BAR_UNPACK ((ptr)->win32_window_low, (ptr)->win32_window_high, (int) id))
+#define SET_SCROLL_BAR_W32_WINDOW(ptr, id) \
+  (SCROLL_BAR_UNPACK ((ptr)->w32_window_low, (ptr)->w32_window_high, (int) id))
 
 
 /* Return the outside pixel height for a vertical scroll bar HEIGHT
    rows high on frame F.  */
 #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \
-  ((height) * (f)->output_data.win32->line_height)
+  ((height) * (f)->output_data.w32->line_height)
 
 /* Return the inside width of a vertical scroll bar, given the outside
    width.  */
@@ -476,41 +476,41 @@
    Return the upper/left pixel position of the character cell on frame F
    at ROW/COL.  */
 #define CHAR_TO_PIXEL_ROW(f, row) \
-  ((f)->output_data.win32->internal_border_width \
-   + (row) * (f)->output_data.win32->line_height)
+  ((f)->output_data.w32->internal_border_width \
+   + (row) * (f)->output_data.w32->line_height)
 #define CHAR_TO_PIXEL_COL(f, col) \
-  ((f)->output_data.win32->internal_border_width \
-   + (col) * FONT_WIDTH ((f)->output_data.win32->font))
+  ((f)->output_data.w32->internal_border_width \
+   + (col) * FONT_WIDTH ((f)->output_data.w32->font))
 
 /* Return the pixel width/height of frame F if it has
    WIDTH columns/HEIGHT rows.  */
 #define CHAR_TO_PIXEL_WIDTH(f, width) \
   (CHAR_TO_PIXEL_COL (f, width) \
-   + (f)->output_data.win32->vertical_scroll_bar_extra \
-   + (f)->output_data.win32->internal_border_width)
+   + (f)->output_data.w32->vertical_scroll_bar_extra \
+   + (f)->output_data.w32->internal_border_width)
 #define CHAR_TO_PIXEL_HEIGHT(f, height) \
   (CHAR_TO_PIXEL_ROW (f, height) \
-   + (f)->output_data.win32->internal_border_width)
+   + (f)->output_data.w32->internal_border_width)
 
 
 /* Return the row/column (zero-based) of the character cell containing 
    the pixel on FRAME at ROW/COL.  */
 #define PIXEL_TO_CHAR_ROW(f, row) \
-  (((row) - (f)->output_data.win32->internal_border_width) \
-   / (f)->output_data.win32->line_height)
+  (((row) - (f)->output_data.w32->internal_border_width) \
+   / (f)->output_data.w32->line_height)
 #define PIXEL_TO_CHAR_COL(f, col) \
-  (((col) - (f)->output_data.win32->internal_border_width) \
-   / FONT_WIDTH ((f)->output_data.win32->font))
+  (((col) - (f)->output_data.w32->internal_border_width) \
+   / FONT_WIDTH ((f)->output_data.w32->font))
 
 /* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
    frame F?  */
 #define PIXEL_TO_CHAR_WIDTH(f, width) \
   (PIXEL_TO_CHAR_COL (f, ((width) \
-			  - (f)->output_data.win32->internal_border_width \
-			  - (f)->output_data.win32->vertical_scroll_bar_extra)))
+			  - (f)->output_data.w32->internal_border_width \
+			  - (f)->output_data.w32->vertical_scroll_bar_extra)))
 #define PIXEL_TO_CHAR_HEIGHT(f, height) \
   (PIXEL_TO_CHAR_ROW (f, ((height) \
-			  - (f)->output_data.win32->internal_border_width)))
+			  - (f)->output_data.w32->internal_border_width)))
 
 /* Interface to the face code functions.  */
 
@@ -555,27 +555,27 @@
    be BASIC_FACE.  F is the frame.  */
 extern int compute_glyph_face (/* FRAME_PTR, int */);
 
-extern void win32_fill_rect ();
-extern void win32_clear_window ();
+extern void w32_fill_rect ();
+extern void w32_clear_window ();
 
-#define win32_fill_area(f,hdc,pix,x,y,nx,ny) \
+#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \
 { \
     RECT rect; \
     rect.left = x; \
     rect.top = y; \
     rect.right = x + nx; \
     rect.bottom = y + ny; \
-    win32_fill_rect (f,hdc,pix,&rect); \
+    w32_fill_rect (f,hdc,pix,&rect); \
 }
 
-#define win32_clear_rect(f,hdc,lprect) \
-win32_fill_rect (f,hdc,f->output_data.win32->background_pixel,lprect)
+#define w32_clear_rect(f,hdc,lprect) \
+w32_fill_rect (f,hdc,f->output_data.w32->background_pixel,lprect)
 
-#define win32_clear_area(f,hdc,x,y,nx,ny) \
-win32_fill_area (f,hdc,f->output_data.win32->background_pixel,x,y,nx,ny)
+#define w32_clear_area(f,hdc,x,y,nx,ny) \
+w32_fill_area (f,hdc,f->output_data.w32->background_pixel,x,y,nx,ny)
 
-extern XFontStruct *win32_load_font ();
-extern void win32_unload_font ();
+extern XFontStruct *w32_load_font ();
+extern void w32_unload_font ();
 
 #define WM_EMACS_START                 (WM_USER + 1)
 #define WM_EMACS_KILL                  (WM_EMACS_START + 0x00)
@@ -594,7 +594,7 @@
   int cx;
   int cy;
   int flags;
-} Win32WindowPos;
+} W32WindowPos;
 
 #define WND_X_UNITS_INDEX      (0) 
 #define WND_Y_UNITS_INDEX      (4) 
@@ -608,11 +608,11 @@
 extern DWORD dwMainThreadId;
 extern HANDLE hMainThread;
 
-typedef struct Win32Msg {
+typedef struct W32Msg {
     MSG msg;
     DWORD dwModifiers;
     RECT rect;
-} Win32Msg;
+} W32Msg;
 
 extern CRITICAL_SECTION critsect;
 
@@ -633,7 +633,7 @@
 
 extern BOOL parse_button ();
 
-/* Keypad command key support.  Win32 doesn't have virtual keys defined
+/* Keypad command key support.  W32 doesn't have virtual keys defined
    for the function keys on the keypad (they are mapped to the standard
    fuction keys), so we define our own.  */
 #define VK_NUMPAD_BEGIN		0x92
--- a/src/w32xfns.c	Tue Nov 19 04:46:30 1996 +0000
+++ b/src/w32xfns.c	Tue Nov 19 04:59:23 1996 +0000
@@ -1,4 +1,4 @@
-/* Functions taken directly from X sources
+/* Functions taken directly from X sources for use with the Win32 API.
    Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation.
 
 This file is part of GNU Emacs.
@@ -59,11 +59,11 @@
 void
 select_palette (FRAME_PTR f, HDC hdc)
 {
-  if (!NILP (Vwin32_enable_palette))
-    f->output_data.win32->old_palette =
-      SelectPalette (hdc, one_win32_display_info.palette, FALSE);
+  if (!NILP (Vw32_enable_palette))
+    f->output_data.w32->old_palette =
+      SelectPalette (hdc, one_w32_display_info.palette, FALSE);
   else
-    f->output_data.win32->old_palette = NULL;
+    f->output_data.w32->old_palette = NULL;
 
   if (RealizePalette (hdc))
   {
@@ -78,8 +78,8 @@
 void
 deselect_palette (FRAME_PTR f, HDC hdc)
 {
-  if (f->output_data.win32->old_palette)
-    SelectPalette (hdc, f->output_data.win32->old_palette, FALSE);
+  if (f->output_data.w32->old_palette)
+    SelectPalette (hdc, f->output_data.w32->old_palette, FALSE);
 }
 
 /* Get a DC for frame and select palette for drawing; force an update of
@@ -91,7 +91,7 @@
 
   enter_crit ();
 
-  hdc = GetDC (f->output_data.win32->window_desc);
+  hdc = GetDC (f->output_data.w32->window_desc);
   select_palette (f, hdc);
 
   return hdc;
@@ -103,7 +103,7 @@
   int ret;
 
   deselect_palette (f, hdc);
-  ret = ReleaseDC (f->output_data.win32->window_desc, hdc);
+  ret = ReleaseDC (f->output_data.w32->window_desc, hdc);
 
   leave_crit ();
 
@@ -112,7 +112,7 @@
 
 typedef struct int_msg
 {
-  Win32Msg w32msg;
+  W32Msg w32msg;
   struct int_msg *lpNext;
 } int_msg;
 
@@ -122,7 +122,7 @@
 
 BOOL 
 get_next_msg (lpmsg, bWait)
-     Win32Msg * lpmsg;
+     W32Msg * lpmsg;
      BOOL bWait;
 {
   BOOL bRet = FALSE;
@@ -140,7 +140,7 @@
   
   if (nQueue)
     {
-      bcopy (&(lpHead->w32msg), lpmsg, sizeof (Win32Msg));
+      bcopy (&(lpHead->w32msg), lpmsg, sizeof (W32Msg));
 
       {
 	int_msg * lpCur = lpHead;
@@ -165,14 +165,14 @@
 
 BOOL 
 post_msg (lpmsg)
-     Win32Msg * lpmsg;
+     W32Msg * lpmsg;
 {
   int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg));
 
   if (!lpNew)
     return (FALSE);
 
-  bcopy (lpmsg, &(lpNew->w32msg), sizeof (Win32Msg));
+  bcopy (lpmsg, &(lpNew->w32msg), sizeof (W32Msg));
   lpNew->lpNext = NULL;
 
   enter_crit ();
@@ -195,14 +195,14 @@
 }
 
 BOOL
-prepend_msg (Win32Msg *lpmsg)
+prepend_msg (W32Msg *lpmsg)
 {
   int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg));
 
   if (!lpNew)
     return (FALSE);
 
-  bcopy (lpmsg, &(lpNew->w32msg), sizeof (Win32Msg));
+  bcopy (lpmsg, &(lpNew->w32msg), sizeof (W32Msg));
 
   enter_crit ();
 
@@ -357,7 +357,7 @@
   return 1;
 }
 
-/* x_sync is a no-op on Win32.  */
+/* x_sync is a no-op on W32.  */
 void
 x_sync (f)
      void *f;