Mercurial > hg > xemacs-beta
changeset 4867:7822019c5d98
Revert cast in check_writable() and fix up macros to use const.
author | Vin Shelton <acs@xemacs.org> |
---|---|
date | Sun, 17 Jan 2010 22:08:56 -0500 |
parents | 6c0bb4d2c23a |
children | 0dd76c7b7846 |
files | src/ChangeLog src/fileio.c src/syswindows.h |
diffstat | 3 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Jan 16 19:04:52 2010 +0000 +++ b/src/ChangeLog Sun Jan 17 22:08:56 2010 -0500 @@ -1,3 +1,10 @@ +2010-01-17 Vin Shelton <acs@xemacs.org> + + * fileio.c (check_writable): Remove cast from 2010-01-14 + + * syswindows.h: Use consts in macros where appropriate in lieu of + cast in check_writable(). Patch from Ben Wing. + 2010-01-16 Aidan Kehoe <kehoea@parhasard.net> * config.h.in:
--- a/src/fileio.c Sat Jan 16 19:04:52 2010 +0000 +++ b/src/fileio.c Sun Jan 17 22:08:56 2010 -0500 @@ -2344,7 +2344,7 @@ DWORD dwAccessAllowed; Extbyte *fnameext; - LOCAL_FILE_FORMAT_TO_TSTR ((Ibyte *)filename, fnameext); + LOCAL_FILE_FORMAT_TO_TSTR (filename, fnameext); // First check for a normal file with the old-style readonly bit attributes = qxeGetFileAttributes(fnameext);
--- a/src/syswindows.h Sat Jan 16 19:04:52 2010 +0000 +++ b/src/syswindows.h Sun Jan 17 22:08:56 2010 -0500 @@ -977,14 +977,14 @@ #else /* not HAVE_CYGWIN_CONV_PATH */ #define LOCAL_FILE_FORMAT_TO_TSTR(path, out) \ do { \ - Ibyte *lfftt; \ + const Ibyte *lfftt; \ \ LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN (path, lfftt); \ PATHNAME_CONVERT_OUT_TSTR (lfftt, out); \ } while (0) #define TSTR_TO_LOCAL_FILE_FORMAT(path, out) \ do { \ - Ibyte *ttlff; \ + const Ibyte *ttlff; \ \ TSTR_TO_C_STRING (path, ttlff); \ INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT (ttlff, out); \ @@ -1012,7 +1012,7 @@ #define LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN(path, pathout) \ do \ { \ - Extbyte *lfftiwp; \ + const Extbyte *lfftiwp; \ \ LOCAL_FILE_FORMAT_TO_TSTR (path, lfftiwp); \ TSTR_TO_C_STRING (lfftiwp, pathout); \ @@ -1020,7 +1020,7 @@ while (0) #define INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT(path, pathout) \ do { \ - Extbyte *iwtlffp; \ + const Extbyte *iwtlffp; \ C_STRING_TO_TSTR (path, iwtlffp); \ TSTR_TO_LOCAL_FILE_FORMAT (iwtlffp, pathout); \ } while (0) @@ -1034,7 +1034,7 @@ get 7-bit ISO2022-encoded data. We know that our internal format \ is ASCII-compatible, and so these functions will work fine with \ this data. */ \ - Ibyte *lfftiwp = (path); \ + const Ibyte *lfftiwp = (path); \ if (isalpha (lfftiwp[0]) && (IS_DEVICE_SEP (lfftiwp[1]))) \ pathout = lfftiwp; \ else \ @@ -1047,7 +1047,7 @@ } while (0) #define INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT(path, pathout) \ do { \ - Ibyte *wtlff1 = (path); \ + const Ibyte *wtlff1 = (path); \ int wtlff2 = \ cygwin_win32_to_posix_path_list_buf_size ((char *) wtlff1); \ Ibyte *wtlff3 = alloca_ibytes (wtlff2); \