Changeset 8777 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Jun 26, 2002, 9:42:35 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r8600 r8777 1 /* $Id: oslibdos.cpp,v 1.10 4 2002-06-08 11:40:15sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.105 2002-06-26 07:42:34 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 860 860 BOOL OSLibDosDelete(char *lpszFileName) 861 861 { 862 APIRET rc;863 char lOemFileName[260];864 865 CharToOemA(lpszFileName, lOemFileName);866 867 rc = DosDelete(lOemFileName);868 if(rc) {869 SetLastError(error2WinError(rc));870 return FALSE;871 }872 return TRUE;862 APIRET rc; 863 char lOemFileName[260]; 864 865 CharToOemA(lpszFileName, lOemFileName); 866 867 rc = DosDelete(lOemFileName); 868 if(rc) { 869 SetLastError(error2WinError(rc)); 870 return FALSE; 871 } 872 return TRUE; 873 873 } 874 874 //****************************************************************************** … … 876 876 BOOL pmDateTimeToFileTime(FDATE *pDate,FTIME *pTime,FILETIME *pFT) 877 877 { 878 register USHORT dosTime, dosDate; 879 880 dosTime = *(USHORT*)pTime; 881 dosDate = *(USHORT*)pDate; 882 883 // PH: probably replace with faster implementation than calling Open32 884 // through the external interface! 885 return DosDateTimeToFileTime(dosDate,dosTime,pFT); 878 USHORT dosTime, dosDate; 879 BOOL ret; 880 FILETIME dummy; 881 882 dosTime = *(USHORT*)pTime; 883 dosDate = *(USHORT*)pDate; 884 885 ret = DosDateTimeToFileTime(dosDate, dosTime, &dummy); 886 if(ret == FALSE) { 887 return FALSE; 888 } 889 //time we get from OS2 is local time; win32 expects file time (UTC) 890 ret = LocalFileTimeToFileTime(&dummy, pFT); 891 return ret; 886 892 } 887 893 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.