Mercurial > dwindows
comparison win/dirent.c @ 1601:71e0a3ad07f7
Enable level 3 warnings in DEBUG mode with Visual C to show deprecation warnings.
Source code cleanup to eliminate the warnings now generated on this level.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 26 Feb 2012 09:21:35 +0000 |
parents | 6baf177f335c |
children | f8d1da63fb77 |
comparison
equal
deleted
inserted
replaced
1600:cbfdd56e3e72 | 1601:71e0a3ad07f7 |
---|---|
28 */ | 28 */ |
29 static char API getFSType(const char *path) | 29 static char API getFSType(const char *path) |
30 { | 30 { |
31 static char cache[1+26]; | 31 static char cache[1+26]; |
32 char drive[3]; | 32 char drive[3]; |
33 ULONG unit; | 33 UCHAR unit; |
34 char r; | 34 char r; |
35 | 35 |
36 if (isalpha(path[0]) && path[1] == ':') { | 36 if (isalpha(path[0]) && path[1] == ':') { |
37 unit = toupper(path[0]) - '@'; | 37 unit = toupper(path[0]) - '@'; |
38 path += 2; | 38 path += 2; |
65 int drive = _getdrive(); | 65 int drive = _getdrive(); |
66 char newdrive = toupper(name[0]); | 66 char newdrive = toupper(name[0]); |
67 | 67 |
68 _chdrive((newdrive - 'A')+1); | 68 _chdrive((newdrive - 'A')+1); |
69 | 69 |
70 if(getcwd(buffer, len)) | 70 if(_getcwd(buffer, len)) |
71 { | 71 { |
72 _chdrive(drive); | 72 _chdrive(drive); |
73 return buffer; | 73 return buffer; |
74 } | 74 } |
75 _chdrive(drive); | 75 _chdrive(drive); |
147 dir->index = 0; | 147 dir->index = 0; |
148 } | 148 } |
149 | 149 |
150 strcpy(dir->entry.d_name, dir->data.cFileName); | 150 strcpy(dir->entry.d_name, dir->data.cFileName); |
151 dir->entry.d_ino = dummy_ino++; | 151 dir->entry.d_ino = dummy_ino++; |
152 dir->entry.d_reclen = strlen(dir->data.cFileName); | 152 dir->entry.d_reclen = (int)strlen(dir->data.cFileName); |
153 dir->entry.d_namlen = strlen(dir->data.cFileName); | 153 dir->entry.d_namlen = (int)strlen(dir->data.cFileName); |
154 dir->entry.d_size = dir->data.nFileSizeLow; | 154 dir->entry.d_size = dir->data.nFileSizeLow; |
155 dir->entry.d_attribute = dir->data.dwFileAttributes; | 155 dir->entry.d_attribute = dir->data.dwFileAttributes; |
156 #if 0 | 156 #if 0 |
157 dir->entry.d_time = *(USHORT *)&dir->next->ftimeLastWrite; | 157 dir->entry.d_time = *(USHORT *)&dir->next->ftimeLastWrite; |
158 dir->entry.d_date = *(USHORT *)&dir->next->fdateLastWrite; | 158 dir->entry.d_date = *(USHORT *)&dir->next->fdateLastWrite; |