Changeset 7342 for trunk/src/kernel32


Ignore:
Timestamp:
Nov 14, 2001, 7:39:52 PM (24 years ago)
Author:
sandervl
Message:

removed unnecessary changes

Location:
trunk/src/kernel32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/Fileio.cpp

    r7334 r7342  
    1 /* $Id: Fileio.cpp,v 1.54 2001-11-14 12:30:35 phaller Exp $ */
     1/* $Id: Fileio.cpp,v 1.55 2001-11-14 18:39:52 sandervl Exp $ */
    22
    33/*
     
    531531                           DWORD              dwCopyFlags)
    532532{
    533 #ifdef __WIN32OS2__
    534   LPSTR sourceA;
    535   LPSTR destA;
    536   STACK_strdupWtoA(lpExistingFileName, sourceA)
    537   STACK_strdupWtoA(lpNewFileName, destA)
    538 #else
    539   LPSTR sourceA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpExistingFileName );
    540   LPSTR destA   = HEAP_strdupWtoA( GetProcessHeap(), 0, lpNewFileName );
    541 #endif
    542  
    543   BOOL ret = CopyFileExA(sourceA,
    544                          destA,
    545                          lpProgressRoutine,
    546                          lpData,
    547                          pbCancel,
    548                          dwCopyFlags);
    549  
    550 #ifndef __WIN32OS2__
    551   HeapFree( GetProcessHeap(), 0, sourceA );
    552   HeapFree( GetProcessHeap(), 0, destA );
    553 #endif
    554  
    555   return ret;
     533    LPSTR sourceA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpExistingFileName );
     534    LPSTR destA   = HEAP_strdupWtoA( GetProcessHeap(), 0, lpNewFileName );
     535
     536    BOOL ret = CopyFileExA(sourceA,
     537                           destA,
     538                           lpProgressRoutine,
     539                           lpData,
     540                           pbCancel,
     541                           dwCopyFlags);
     542
     543    HeapFree( GetProcessHeap(), 0, sourceA );
     544    HeapFree( GetProcessHeap(), 0, destA );
     545
     546    return ret;
    556547}
    557548//******************************************************************************
     
    13921383              LPVOID, lpFileInformation)
    13931384{
    1394 #ifdef __WIN32OS2__
    1395   LPSTR nameA;
    1396   STACK_strdupWtoA(lpFileName, nameA)
    1397 #else
    13981385  LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName );
    1399 #endif
    1400  
    14011386  BOOL res = GetFileAttributesExA( nameA, fInfoLevelId, lpFileInformation);
    1402  
    1403 #ifndef __WIN32OS2__
    14041387  HeapFree( GetProcessHeap(), 0, nameA );
    1405 #endif
    14061388  return res;
    14071389}
  • trunk/src/kernel32/directory.cpp

    r7334 r7342  
    1 /* $Id: directory.cpp,v 1.41 2001-11-14 12:30:30 phaller Exp $ */
     1/* $Id: directory.cpp,v 1.42 2001-11-14 18:38:45 sandervl Exp $ */
    22
    33/*
     
    350350 *****************************************************************************/
    351351
    352 ODINFUNCTION3(BOOL, CreateDirectoryExA,
    353               LPCSTR, lpTemplateDirectory,
    354               LPCSTR, lpNewDirectory,
    355               LPSECURITY_ATTRIBUTES, lpSecurityAttributes)
    356 {
    357 
    358   dprintf(("KERNEL32:CreateDirectoryExA(%s,%s,%08xh) not properly implemented\n",
     352BOOL WIN32API CreateDirectoryExA( LPCSTR lpTemplateDirectory,
     353                                  LPCSTR lpNewDirectory,
     354                                  LPSECURITY_ATTRIBUTES lpSecurityAttributes)
     355{
     356
     357  dprintf(("KERNEL32:CreateDirectoryExA(%08x,%08x,%08x) not properly implemented\n",
    359358           lpTemplateDirectory,lpNewDirectory,lpSecurityAttributes
    360359          ));
     
    390389 *****************************************************************************/
    391390
    392 ODINFUNCTION3(BOOL, CreateDirectoryExW,
    393               LPCWSTR, lpTemplateDirectory,
    394               LPCWSTR, lpNewDirectory,
    395               LPSECURITY_ATTRIBUTES, lpSecurityAttributes)
     391BOOL WIN32API CreateDirectoryExW( LPCWSTR lpTemplateDirectory,
     392                                  LPCWSTR lpNewDirectory,
     393                                  LPSECURITY_ATTRIBUTES lpSecurityAttributes)
    396394{
    397395
     
    723721 *    Should call SetLastError(but currently doesn't).
    724722 */
    725 ODINFUNCTION6(DWORD, SearchPathA,
    726               LPCSTR, path,
    727               LPCSTR, name,
    728               LPCSTR, ext,
    729               DWORD, buflen,
    730               LPSTR, buffer,
    731               LPSTR *, lastpart )
     723DWORD WINAPI SearchPathA(LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
     724                         LPSTR buffer, LPSTR *lastpart )
    732725{
    733726    char full_name[MAX_PATHNAME_LEN];
     
    743736 *           SearchPath32W   (KERNEL32.448)
    744737 */
    745 ODINFUNCTION6(DWORD, SearchPathW,
    746               LPCWSTR, path,
    747               LPCWSTR, name,
    748               LPCWSTR, ext,
    749               DWORD, buflen,
    750               LPWSTR, buffer,
    751               LPWSTR *, lastpart )
     738DWORD WINAPI SearchPathW(LPCWSTR path, LPCWSTR name, LPCWSTR ext,
     739                         DWORD buflen, LPWSTR buffer, LPWSTR *lastpart )
    752740{
    753741    char full_name[MAX_PATHNAME_LEN];
    754  
    755 #ifdef __WIN32OS2__
    756     LPSTR pathA;
    757     LPSTR nameA;
    758     LPSTR extA;
    759     STACK_strdupWtoA(path, pathA)
    760     STACK_strdupWtoA(name, nameA)
    761     STACK_strdupWtoA(ext,  extA)
    762 #else
     742
    763743    LPSTR pathA = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
    764744    LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
    765745    LPSTR extA  = HEAP_strdupWtoA( GetProcessHeap(), 0, ext );
    766 #endif
    767  
    768746    DWORD ret = DIR_SearchPath( pathA, nameA, extA, (LPSTR)full_name );
    769  
    770 #ifndef __WIN32OS2__
    771747    HeapFree( GetProcessHeap(), 0, extA );
    772748    HeapFree( GetProcessHeap(), 0, nameA );
    773749    HeapFree( GetProcessHeap(), 0, pathA );
    774 #endif
    775  
    776750    if (!ret) return 0;
    777751
  • trunk/src/kernel32/environ.cpp

    r7334 r7342  
    1 /* $Id: environ.cpp,v 1.12 2001-11-14 12:30:34 phaller Exp $ */
     1/* $Id: environ.cpp,v 1.13 2001-11-14 18:38:48 sandervl Exp $ */
    22
    33/*
     
    283283              DWORD,   nSize)
    284284{
    285 #ifdef __WIN32OS2__
    286   LPSTR srcA;
    287   STACK_strdupWtoA(lpSrc, srcA)
    288 #else
    289285  LPSTR srcA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpSrc );
    290 #endif
    291  
    292286  LPSTR dstA = lpDst ? (LPSTR)HeapAlloc( GetProcessHeap(), 0, nSize ) : NULL;
    293287
     
    300294      HeapFree( GetProcessHeap(), 0, dstA );
    301295    }
    302 #ifndef __WIN32OS2__
    303296  HeapFree( GetProcessHeap(), 0, srcA );
    304 #endif
    305297  return ret;
    306298}
  • trunk/src/kernel32/module.cpp

    r7334 r7342  
    1 /* $Id: module.cpp,v 1.4 2001-11-14 12:30:38 phaller Exp $
     1/* $Id: module.cpp,v 1.5 2001-11-14 18:38:49 sandervl Exp $
    22 *
    33 * GetBinaryTypeA/W (Wine Port)
     
    262262{
    263263    BOOL ret = FALSE;
     264    LPSTR strNew = NULL;
    264265
    265266    dprintf(("KERNEL32: GetBinaryTypeW %x %x", lpApplicationName, lpBinaryType));
     
    275276    /* Convert the wide string to a ascii string.
    276277     */
    277 #ifdef __WIN32OS2__
    278   LPSTR strNew;
    279   STACK_strdupWtoA(lpApplicationName, strNew)
    280 #else
    281   LPSTR strNew = HEAP_strdupWtoA( GetProcessHeap(), 0, lpApplicationName );
    282 #endif
     278    strNew = HEAP_strdupWtoA( GetProcessHeap(), 0, lpApplicationName );
    283279
    284280    if ( strNew != NULL )
     
    288284        /* Free the allocated string.
    289285         */
    290 #ifndef __WIN32OS2__
    291       HeapFree( GetProcessHeap(), 0, strNew );
    292 #endif
     286        HeapFree( GetProcessHeap(), 0, strNew );
    293287    }
    294288
  • trunk/src/kernel32/virtual.cpp

    r7334 r7342  
    1 /* $Id: virtual.cpp,v 1.41 2001-11-14 12:30:46 phaller Exp $ */
     1/* $Id: virtual.cpp,v 1.42 2001-11-14 18:38:51 sandervl Exp $ */
    22
    33/*
     
    6969                                      DWORD size_low, LPCWSTR name )
    7070{
    71 #ifdef __WIN32OS2__
    72   LPSTR nameA;
    73   STACK_strdupWtoA(name, nameA)
    74 #else
    75   LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
    76 #endif
    77  
     71    LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
    7872    HANDLE ret = CreateFileMappingA( hFile, attr, protect,
    79                                     size_high, size_low, nameA );
    80  
    81 #ifndef __WIN32OS2__
    82   HeapFree( GetProcessHeap(), 0, nameA );
    83 #endif
    84   return ret;
     73                                         size_high, size_low, nameA );
     74    HeapFree( GetProcessHeap(), 0, nameA );
     75    return ret;
    8576}
    8677
     
    110101HANDLE WINAPI OpenFileMappingW( DWORD access, BOOL inherit, LPCWSTR name)
    111102{
    112 #ifdef __WIN32OS2__
    113   LPSTR nameA;
    114   STACK_strdupWtoA(name, nameA)
    115 #else
    116103    LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
    117 #endif
    118  
    119   HANDLE ret = OpenFileMappingA( access, inherit, nameA );
    120  
    121 #ifndef __WIN32OS2__
    122   HeapFree( GetProcessHeap(), 0, nameA );
    123 #endif
    124   return ret;
     104    HANDLE ret = OpenFileMappingA( access, inherit, nameA );
     105    HeapFree( GetProcessHeap(), 0, nameA );
     106    return ret;
    125107}
    126108
Note: See TracChangeset for help on using the changeset viewer.