updated for version 7.0f01
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index 9c11aa0..afc05d5 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -1046,8 +1046,16 @@
 	proto/window.pro \
 	$(NETBEANS_PRO)
 
-.cod.c:
-	$(CC) $(CFLAGS) /FAc $<
+.SUFFIXES: .cod
+
+# Generate foo.cod (mixed source and assembly listing) from foo.c via "nmake
+# foo.cod"
+.c.cod:
+	$(CC) $(CFLAGS) /FAcs $<
+
+# Generate foo.i (preprocessor listing) from foo.c via "nmake foo.i"
+.c.i:
+	$(CC) $(CFLAGS) /P /C $<
 
 
 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
diff --git a/src/gui.c b/src/gui.c
index 0fdcabe..4006891 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -1160,7 +1160,7 @@
 # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
 	|| defined(FEAT_GUI_MOTIF))
     if (gui_has_tabline())
-	text_area_y += TABLINE_HEIGHT;
+	text_area_y += gui.tabline_height;
 #endif
 
 #if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
@@ -1247,7 +1247,7 @@
 # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
 	|| defined(FEAT_GUI_MOTIF))
     if (gui_has_tabline())
-	base_height += TABLINE_HEIGHT;
+	base_height += gui.tabline_height;
 # endif
 # ifdef FEAT_FOOTER
     if (vim_strchr(p_go, GO_FOOTER) != NULL)
@@ -3992,7 +3992,7 @@
 
 #if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN)
 	    if (gui_has_tabline())
-		y += TABLINE_HEIGHT;
+		y += gui.tabline_height;
 #endif
 
 #ifdef FEAT_WINDOWS
diff --git a/src/gui.h b/src/gui.h
index 36156f9..e654a21 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -412,6 +412,11 @@
     char_u	*browse_fname;	    /* file name from filedlg */
 #endif	/* FEAT_GUI_GTK */
 
+#if defined(FEAT_GUI_TABLINE) \
+	&& (defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF))
+    int		tabline_height;
+#endif
+
 #ifdef FEAT_FOOTER
     int		footer_height;	    /* height of the message footer */
 #endif
diff --git a/src/gui_motif.c b/src/gui_motif.c
index ccc9778..69399b0 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -493,6 +493,8 @@
     XtAddEventHandler(tabLine, ButtonPressMask, False,
 			(XtEventHandler)tabline_menu_cb, NULL);
 
+    gui.tabline_height = TABLINE_HEIGHT;
+
     /*
      * Set the size of the minor next/prev scrollers to zero, so
      * that they are not displayed. Due to a bug in OpenMotif 2.3,
diff --git a/src/gui_w32.c b/src/gui_w32.c
index d671879..4b4e9a9 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -181,7 +181,9 @@
 # define ID_BEVAL_TOOLTIP   200
 # define BEVAL_TEXT_LEN	    MAXPATHL
 
-#ifndef UINT_PTR
+#if _MSC_VER < 1300
+/* Work around old versions of basetsd.h which wrongly declare
+ * UINT_PTR as unsigned long */
 # define UINT_PTR UINT
 #endif
 
@@ -195,7 +197,7 @@
 
 /*
  * excerpts from headers since this may not be presented
- * in the extremelly old compilers
+ * in the extremely old compilers
  */
 #include <pshpack1.h>
 
@@ -568,6 +570,70 @@
 	_OnScroll(hwnd, hwndCtl, zDelta >= 0 ? SB_PAGEUP : SB_PAGEDOWN, 0);
 }
 
+#ifdef USE_SYSMENU_FONT
+/*
+ * Get Menu Font.
+ * Return OK or FAIL.
+ */
+    static int
+gui_w32_get_menu_font(LOGFONT *lf)
+{
+    NONCLIENTMETRICS nm;
+
+    nm.cbSize = sizeof(NONCLIENTMETRICS);
+    if (!SystemParametersInfo(
+	    SPI_GETNONCLIENTMETRICS,
+	    sizeof(NONCLIENTMETRICS),
+	    &nm,
+	    0))
+	return FAIL;
+    *lf = nm.lfMenuFont;
+    return OK;
+}
+#endif
+
+
+#if defined(FEAT_GUI_TABLINE) && defined(USE_SYSMENU_FONT)
+/*
+ * Set the GUI tabline font to the system menu font
+ */
+    static void
+set_tabline_font(void)
+{
+    LOGFONT	lfSysmenu;
+    HFONT	font;
+    HWND	hwnd;
+    HDC		hdc;
+    HFONT	hfntOld;
+    TEXTMETRIC	tm;
+
+    if (gui_w32_get_menu_font(&lfSysmenu) != OK)
+	return;
+
+    font = CreateFontIndirect(&lfSysmenu);
+
+    SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM)font, TRUE);
+
+    /*
+     * Compute the height of the font used for the tab text
+     */
+    hwnd = GetDesktopWindow();
+    hdc = GetWindowDC(hwnd);
+    hfntOld = SelectFont(hdc, font);
+
+    GetTextMetrics(hdc, &tm);
+
+    SelectFont(hdc, hfntOld);
+    ReleaseDC(hwnd, hdc);
+
+    /*
+     * The space used by the tab border and the space between the tab label
+     * and the tab border is included as 7.
+     */
+    gui.tabline_height = tm.tmHeight + tm.tmInternalLeading + 7;
+}
+#endif
+
 /*
  * Invoked when a setting was changed.
  */
@@ -577,6 +643,10 @@
     if (n == SPI_SETWHEELSCROLLLINES)
 	SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0,
 		&mouse_scroll_lines, 0);
+#if defined(FEAT_GUI_TABLINE) && defined(USE_SYSMENU_FONT)
+    if (n == SPI_SETNONCLIENTMETRICS)
+	set_tabline_font();
+#endif
     return 0;
 }
 
@@ -873,7 +943,7 @@
 				    {
 					int wlen;
 
-					wlen = (wcslen(wstr) + 1)
+					wlen = ((int)wcslen(wstr) + 1)
 							      * sizeof(WCHAR);
 					if (tt_text_len < wlen)
 					{
@@ -893,7 +963,7 @@
 				{
 				    int len;
 
-				    len = STRLEN(NameBuff) + 1;
+				    len = (int)STRLEN(NameBuff) + 1;
 				    if (tt_text_len < len)
 				    {
 					tt_text = vim_realloc(tt_text, len);
@@ -2870,28 +2940,6 @@
     "IDR_VIM_QUESTION"
 };
 
-#ifdef USE_SYSMENU_FONT
-/*
- * Get Menu Font.
- * Return OK or FAIL.
- */
-    static int
-gui_w32_get_menu_font(LOGFONT *lf)
-{
-    NONCLIENTMETRICS nm;
-
-    nm.cbSize = sizeof(NONCLIENTMETRICS);
-    if (!SystemParametersInfo(
-	    SPI_GETNONCLIENTMETRICS,
-	    sizeof(NONCLIENTMETRICS),
-	    &nm,
-	    0))
-	return FAIL;
-    *lf = nm.lfMenuFont;
-    return OK;
-}
-#endif
-
     int
 gui_mch_dialog(
     int		 type,
@@ -4070,10 +4118,6 @@
     static void
 initialise_tabline(void)
 {
-# ifdef USE_SYSMENU_FONT
-    LOGFONT    lfSysmenu;
-# endif
-
     InitCommonControls();
 
     s_tabhwnd = CreateWindow(WC_TABCONTROL, "Vim tabline",
@@ -4081,12 +4125,10 @@
 	    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
 	    CW_USEDEFAULT, s_hwnd, NULL, s_hinst, NULL);
 
+    gui.tabline_height = TABLINE_HEIGHT;
+
 # ifdef USE_SYSMENU_FONT
-    if (gui_w32_get_menu_font(&lfSysmenu) == OK)
-    {
-	HFONT font = CreateFontIndirect(&lfSysmenu);
-	SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM) font, TRUE);
-    }
+    set_tabline_font();
 # endif
 }
 #endif
@@ -4559,8 +4601,7 @@
     if (beval == NULL)
 	return;
     // TRACE0("gui_mch_enable_beval_area {{{");
-    BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2,
-						   (TIMERPROC)BevalTimerProc);
+    BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2, BevalTimerProc);
     // TRACE0("gui_mch_enable_beval_area }}}");
 }
 
diff --git a/src/gui_w48.c b/src/gui_w48.c
index 2e43557..44d03d0 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -1122,12 +1122,12 @@
 	int	top = 0;
 	RECT	rect;
 
-#ifdef FEAT_TOOLBAR
+# ifdef FEAT_TOOLBAR
 	if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
 	    top = TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
-#endif
+# endif
 	GetClientRect(s_hwnd, &rect);
-	MoveWindow(s_tabhwnd, 0, top, rect.right, TABLINE_HEIGHT, TRUE);
+	MoveWindow(s_tabhwnd, 0, top, rect.right, gui.tabline_height, TRUE);
     }
 #endif
 
@@ -2379,8 +2379,8 @@
     if (s_tabhwnd == NULL)
 	return;
 
-    if (TabCtrl_GetCurSel(s_tabhwnd) != nr)
-	TabCtrl_SetCurSel(s_tabhwnd, nr);
+    if (TabCtrl_GetCurSel(s_tabhwnd) != nr -1)
+	TabCtrl_SetCurSel(s_tabhwnd, nr -1);
 }
 
 #endif
diff --git a/src/hardcopy.c b/src/hardcopy.c
index bc5a219..3b4c2d12 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -53,11 +53,11 @@
  * void mch_print_set_font(int Bold, int Italic, int Underline);
  * Called whenever the font style changes.
  *
- * void mch_print_set_bg(long bgcol);
+ * void mch_print_set_bg(long_u bgcol);
  * Called to set the background color for the following text. Parameter is an
  * RGB value.
  *
- * void mch_print_set_fg(long fgcol);
+ * void mch_print_set_fg(long_u fgcol);
  * Called to set the foreground color for the following text. Parameter is an
  * RGB value.
  *
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 9e8b64d..efbd01d 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2323,9 +2323,10 @@
 }
 
     void
-mch_print_set_bg(unsigned long bgcol)
+mch_print_set_bg(long_u bgcol)
 {
-    SetBkColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC, swap_me(bgcol)));
+    SetBkColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC,
+						   swap_me((COLORREF)bgcol)));
     /*
      * With a white background we can draw characters transparent, which is
      * good for italic characters that overlap to the next char cell.
@@ -2337,9 +2338,10 @@
 }
 
     void
-mch_print_set_fg(unsigned long fgcol)
+mch_print_set_fg(long_u fgcol)
 {
-    SetTextColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC, swap_me(fgcol)));
+    SetTextColor(prt_dlg.hDC, GetNearestColor(prt_dlg.hDC,
+						   swap_me((COLORREF)fgcol)));
 }
 
 #endif /*FEAT_PRINTER && !FEAT_POSTSCRIPT*/
diff --git a/src/proto/os_mswin.pro b/src/proto/os_mswin.pro
index aaef05b..f46a3f8 100644
--- a/src/proto/os_mswin.pro
+++ b/src/proto/os_mswin.pro
@@ -46,8 +46,8 @@
 extern void mch_print_start_line __ARGS((int margin, int page_line));
 extern int mch_print_text_out __ARGS((char_u *p, int len));
 extern void mch_print_set_font __ARGS((int iBold, int iItalic, int iUnderline));
-extern void mch_print_set_bg __ARGS((unsigned long bgcol));
-extern void mch_print_set_fg __ARGS((unsigned long fgcol));
+extern void mch_print_set_bg __ARGS((long_u bgcol));
+extern void mch_print_set_fg __ARGS((long_u fgcol));
 extern char_u *mch_resolve_shortcut __ARGS((char_u *fname));
 extern void win32_set_foreground __ARGS((void));
 extern void serverInitMessaging __ARGS((void));
diff --git a/src/version.h b/src/version.h
index faaa755..216f604 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
  */
 #define VIM_VERSION_NODOT	"vim70f"
 #define VIM_VERSION_SHORT	"7.0f"
-#define VIM_VERSION_MEDIUM	"7.0f BETA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0f BETA (2006 Apr 24)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0f BETA (2006 Apr 24, compiled "
+#define VIM_VERSION_MEDIUM	"7.0f01 BETA"
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0f01 BETA (2006 Apr 25)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0f01 BETA (2006 Apr 25, compiled "