winefile: Do not use the TEXT() macro on character constants. The implicit cast from char to WCHAR works as well in UNICODE mode.
This commit is contained in:
parent
699df04e85
commit
fa684a717a
|
@ -455,7 +455,7 @@ static Entry* find_entry_win(Entry* dir, LPCTSTR name)
|
||||||
LPCTSTR q = entry->data.cFileName;
|
LPCTSTR q = entry->data.cFileName;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!*p || *p==TEXT('\\') || *p==TEXT('/'))
|
if (!*p || *p == '\\' || *p == '/')
|
||||||
return entry;
|
return entry;
|
||||||
} while(tolower(*p++) == tolower(*q++));
|
} while(tolower(*p++) == tolower(*q++));
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ static Entry* find_entry_win(Entry* dir, LPCTSTR name)
|
||||||
q = entry->data.cAlternateFileName;
|
q = entry->data.cAlternateFileName;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!*p || *p==TEXT('\\') || *p==TEXT('/'))
|
if (!*p || *p == '\\' || *p == '/')
|
||||||
return entry;
|
return entry;
|
||||||
} while(tolower(*p++) == tolower(*q++));
|
} while(tolower(*p++) == tolower(*q++));
|
||||||
}
|
}
|
||||||
|
@ -486,14 +486,14 @@ static Entry* read_tree_win(Root* root, LPCTSTR path, SORT_ORDER sortOrder, HWND
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while(entry) {
|
while(entry) {
|
||||||
while(*s && *s!=TEXT('\\') && *s!=TEXT('/'))
|
while(*s && *s != '\\' && *s != '/')
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
||||||
while(*s==TEXT('\\') || *s==TEXT('/'))
|
while(*s == '\\' || *s == '/')
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
*d++ = TEXT('\\');
|
*d++ = '\\';
|
||||||
*d = TEXT('\0');
|
*d = '\0';
|
||||||
|
|
||||||
read_directory(entry, buffer, sortOrder, hwnd);
|
read_directory(entry, buffer, sortOrder, hwnd);
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ static Entry* find_entry_unix(Entry* dir, LPCTSTR name)
|
||||||
LPCTSTR q = entry->data.cFileName;
|
LPCTSTR q = entry->data.cFileName;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!*p || *p==TEXT('/'))
|
if (!*p || *p == '/')
|
||||||
return entry;
|
return entry;
|
||||||
} while(*p++ == *q++);
|
} while(*p++ == *q++);
|
||||||
}
|
}
|
||||||
|
@ -654,14 +654,14 @@ static Entry* read_tree_unix(Root* root, LPCTSTR path, SORT_ORDER sortOrder, HWN
|
||||||
entry->etype = ET_UNIX;
|
entry->etype = ET_UNIX;
|
||||||
|
|
||||||
while(entry) {
|
while(entry) {
|
||||||
while(*s && *s!=TEXT('/'))
|
while(*s && *s != '/')
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
||||||
while(*s == TEXT('/'))
|
while(*s == '/')
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
*d++ = TEXT('/');
|
*d++ = '/';
|
||||||
*d = TEXT('\0');
|
*d = '\0';
|
||||||
|
|
||||||
read_directory(entry, buffer, sortOrder, hwnd);
|
read_directory(entry, buffer, sortOrder, hwnd);
|
||||||
|
|
||||||
|
@ -1195,8 +1195,8 @@ static int compareExt(const void* arg1, const void* arg2)
|
||||||
name1 = fd1->cFileName;
|
name1 = fd1->cFileName;
|
||||||
name2 = fd2->cFileName;
|
name2 = fd2->cFileName;
|
||||||
|
|
||||||
ext1 = _tcsrchr(name1, TEXT('.'));
|
ext1 = _tcsrchr(name1, '.');
|
||||||
ext2 = _tcsrchr(name2, TEXT('.'));
|
ext2 = _tcsrchr(name2, '.');
|
||||||
|
|
||||||
if (ext1)
|
if (ext1)
|
||||||
ext1++;
|
ext1++;
|
||||||
|
@ -1308,7 +1308,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
|
||||||
while(*s)
|
while(*s)
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
||||||
*d++ = TEXT('\\');
|
*d++ = '\\';
|
||||||
|
|
||||||
for(entry=dir->down; entry; entry=entry->next)
|
for(entry=dir->down; entry; entry=entry->next)
|
||||||
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
|
@ -1331,7 +1331,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
|
||||||
while(*s)
|
while(*s)
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
||||||
*d++ = TEXT('/');
|
*d++ = '/';
|
||||||
|
|
||||||
for(entry=dir->down; entry; entry=entry->next)
|
for(entry=dir->down; entry; entry=entry->next)
|
||||||
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
|
@ -1353,7 +1353,7 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
|
||||||
while(*s)
|
while(*s)
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
||||||
*d++ = TEXT('\\');
|
*d++ = '\\';
|
||||||
|
|
||||||
for(entry=dir->down; entry; entry=entry->next)
|
for(entry=dir->down; entry; entry=entry->next)
|
||||||
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
|
@ -1521,7 +1521,7 @@ static void get_path(Entry* dir, PTSTR path)
|
||||||
SFGAOF attribs;
|
SFGAOF attribs;
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
path[0] = TEXT('\0');
|
path[0] = '\0';
|
||||||
|
|
||||||
attribs = 0;
|
attribs = 0;
|
||||||
|
|
||||||
|
@ -1546,7 +1546,7 @@ static void get_path(Entry* dir, PTSTR path)
|
||||||
name = entry->data.cFileName;
|
name = entry->data.cFileName;
|
||||||
s = name;
|
s = name;
|
||||||
|
|
||||||
for(l=0; *s && *s!=TEXT('/') && *s!=TEXT('\\'); s++)
|
for(l=0; *s && *s != '/' && *s != '\\'; s++)
|
||||||
l++;
|
l++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1558,10 +1558,10 @@ static void get_path(Entry* dir, PTSTR path)
|
||||||
|
|
||||||
#ifndef _NO_EXTENSIONS
|
#ifndef _NO_EXTENSIONS
|
||||||
if (entry->etype == ET_UNIX)
|
if (entry->etype == ET_UNIX)
|
||||||
path[0] = TEXT('/');
|
path[0] = '/';
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
path[0] = TEXT('\\');
|
path[0] = '\\';
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = entry->up;
|
entry = entry->up;
|
||||||
|
@ -1576,13 +1576,13 @@ static void get_path(Entry* dir, PTSTR path)
|
||||||
if (!level) {
|
if (!level) {
|
||||||
#ifndef _NO_EXTENSIONS
|
#ifndef _NO_EXTENSIONS
|
||||||
if (entry->etype == ET_UNIX)
|
if (entry->etype == ET_UNIX)
|
||||||
path[len++] = TEXT('/');
|
path[len++] = '/';
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
path[len++] = TEXT('\\');
|
path[len++] = '\\';
|
||||||
}
|
}
|
||||||
|
|
||||||
path[len] = TEXT('\0');
|
path[len] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2651,7 +2651,7 @@ static void init_output(HWND hwnd)
|
||||||
if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, s1000, 0, b, 16) > 4)
|
if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, s1000, 0, b, 16) > 4)
|
||||||
Globals.num_sep = b[1];
|
Globals.num_sep = b[1];
|
||||||
else
|
else
|
||||||
Globals.num_sep = TEXT('.');
|
Globals.num_sep = '.';
|
||||||
|
|
||||||
old_font = SelectObject(hdc, Globals.hfont);
|
old_font = SelectObject(hdc, Globals.hfont);
|
||||||
GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize);
|
GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize);
|
||||||
|
@ -2877,12 +2877,12 @@ static int insert_entries(Pane* pane, Entry* dir, LPCTSTR pattern, int filter_fl
|
||||||
|
|
||||||
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
/* don't display entries "." and ".." in the left pane */
|
/* don't display entries "." and ".." in the left pane */
|
||||||
if (pane->treePane && entry->data.cFileName[0]==TEXT('.'))
|
if (pane->treePane && entry->data.cFileName[0] == '.')
|
||||||
if (
|
if (
|
||||||
#ifndef _NO_EXTENSIONS
|
#ifndef _NO_EXTENSIONS
|
||||||
entry->data.cFileName[1]==TEXT('\0') ||
|
entry->data.cFileName[1] == '\0' ||
|
||||||
#endif
|
#endif
|
||||||
(entry->data.cFileName[1]==TEXT('.') && entry->data.cFileName[2]==TEXT('\0')))
|
(entry->data.cFileName[1] == '.' && entry->data.cFileName[2] == '\0'))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* filter directories in right pane */
|
/* filter directories in right pane */
|
||||||
|
@ -3015,7 +3015,7 @@ static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols)
|
||||||
FILETIME lft;
|
FILETIME lft;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
*buffer = TEXT('\0');
|
*buffer = '\0';
|
||||||
|
|
||||||
if (!ft->dwLowDateTime && !ft->dwHighDateTime)
|
if (!ft->dwLowDateTime && !ft->dwHighDateTime)
|
||||||
return;
|
return;
|
||||||
|
@ -3039,7 +3039,7 @@ static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols)
|
||||||
buffer[len++] = ' ';
|
buffer[len++] = ' ';
|
||||||
|
|
||||||
if (!GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, buffer+len, BUFFER_LEN-len))
|
if (!GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, buffer+len, BUFFER_LEN-len))
|
||||||
buffer[len] = TEXT('\0');
|
buffer[len] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3200,11 +3200,11 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
|
||||||
attrs = entry->data.dwFileAttributes;
|
attrs = entry->data.dwFileAttributes;
|
||||||
|
|
||||||
if (attrs & FILE_ATTRIBUTE_DIRECTORY) {
|
if (attrs & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
if (entry->data.cFileName[0]==TEXT('.') && entry->data.cFileName[1]==TEXT('.')
|
if (entry->data.cFileName[0] == '.' && entry->data.cFileName[1] == '.'
|
||||||
&& entry->data.cFileName[2]==TEXT('\0'))
|
&& entry->data.cFileName[2] == '\0')
|
||||||
img = IMG_FOLDER_UP;
|
img = IMG_FOLDER_UP;
|
||||||
#ifndef _NO_EXTENSIONS
|
#ifndef _NO_EXTENSIONS
|
||||||
else if (entry->data.cFileName[0]==TEXT('.') && entry->data.cFileName[1]==TEXT('\0'))
|
else if (entry->data.cFileName[0] == '.' && entry->data.cFileName[1] == '\0')
|
||||||
img = IMG_FOLDER_CUR;
|
img = IMG_FOLDER_CUR;
|
||||||
#endif
|
#endif
|
||||||
else if (
|
else if (
|
||||||
|
|
Loading…
Reference in New Issue