To: vim-dev@vim.org Subject: Patch 7.0.015 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.0.015 Problem: Athena: compilation problems with modern compiler. Solution: Avoid type casts for lvalue. (Alexey Froloff) Files: src/gui_at_fs.c *** ../vim-7.0.014/src/gui_at_fs.c Wed May 10 15:22:49 2006 --- src/gui_at_fs.c Fri May 12 11:26:24 2006 *************** *** 1861,1887 **** XtPointer pnew; { SFDir *dir; ! int nw; dir = &(SFdirs[SFdirPtr + (int)(long)n]); #ifdef FEAT_GUI_NEXTAW ! if ((int)(long)pnew < 0) { ! if ((int)(long)pnew > -SFvScrollHeight) ! (int)(long)pnew = -1; else ! (int)(long)pnew = -SFlistSize; } ! else if ((int)(long)pnew > 0) { ! if ((int)(long)pnew < SFvScrollHeight) ! (int)(long)pnew = 1; else ! (int)(long)pnew = SFlistSize; } #endif ! nw = dir->vOrigin + (int)(long)pnew; if (nw > dir->nEntries - SFlistSize) nw = dir->nEntries - SFlistSize; --- 1861,1887 ---- XtPointer pnew; { SFDir *dir; ! int nw = (int)(long)pnew; dir = &(SFdirs[SFdirPtr + (int)(long)n]); #ifdef FEAT_GUI_NEXTAW ! if (nw < 0) { ! if (nw > -SFvScrollHeight) ! nw = -1; else ! nw = -SFlistSize; } ! else if (nw > 0) { ! if (nw < SFvScrollHeight) ! nw = 1; else ! nw = SFlistSize; } #endif ! nw += dir->vOrigin; if (nw > dir->nEntries - SFlistSize) nw = dir->nEntries - SFlistSize; *************** *** 1941,1967 **** XtPointer pnew; { SFDir *dir; ! int nw; dir = &(SFdirs[SFdirPtr + (int)(long)n]); #ifdef FEAT_GUI_NEXTAW ! if ((int)(long)pnew < 0) { ! if ((int)(long)pnew > -SFhScrollWidth) ! (int)(long)pnew = -1; else ! (int)(long)pnew = -SFcharsPerEntry; } ! else if ((int)(long)pnew > 0) { ! if ((int)(long)pnew < SFhScrollWidth) ! (int)(long)pnew = 1; else ! (int)(long)pnew = SFcharsPerEntry; } #endif ! nw = dir->hOrigin + (int)(long)pnew; if (nw > dir->nChars - SFcharsPerEntry) nw = dir->nChars - SFcharsPerEntry; --- 1941,1967 ---- XtPointer pnew; { SFDir *dir; ! int nw = (int)(long)pnew; dir = &(SFdirs[SFdirPtr + (int)(long)n]); #ifdef FEAT_GUI_NEXTAW ! if (nw < 0) { ! if (nw > -SFhScrollWidth) ! nw = -1; else ! nw = -SFcharsPerEntry; } ! else if (nw > 0) { ! if (nw < SFhScrollWidth) ! nw = 1; else ! nw = SFcharsPerEntry; } #endif ! nw += dir->hOrigin; if (nw > dir->nChars - SFcharsPerEntry) nw = dir->nChars - SFcharsPerEntry; *************** *** 2038,2063 **** XtPointer client_data; XtPointer pnew; { ! int nw; float f; #ifdef FEAT_GUI_NEXTAW ! if ((int)(long)pnew < 0) { ! if ((int)(long)pnew > -SFpathScrollWidth) ! (int)(long)pnew = -1; else ! (int)(long)pnew = -3; } ! else if ((int)(long)pnew > 0) { ! if ((int)(long)pnew < SFpathScrollWidth) ! (int)(long)pnew = 1; else ! (int)(long)pnew = 3; } #endif ! nw = SFdirPtr + (int)(long)pnew; if (nw > SFdirEnd - 3) nw = SFdirEnd - 3; --- 2038,2063 ---- XtPointer client_data; XtPointer pnew; { ! int nw = (int)(long)pnew; float f; #ifdef FEAT_GUI_NEXTAW ! if (nw < 0) { ! if (nw > -SFpathScrollWidth) ! nw = -1; else ! nw = -3; } ! else if (nw > 0) { ! if (nw < SFpathScrollWidth) ! nw = 1; else ! nw = 3; } #endif ! nw += SFdirPtr; if (nw > SFdirEnd - 3) nw = SFdirEnd - 3; *** ../vim-7.0.014/src/version.c Fri May 12 19:24:33 2006 --- src/version.c Fri May 12 19:25:57 2006 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 15, /**/ -- hundred-and-one symptoms of being an internet addict: 127. You bring your laptop and cellular phone to church. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///