Ignore:
Timestamp:
Nov 14, 2001, 1:30:46 PM (24 years ago)
Author:
phaller
Message:

replaced heap alloc by stack alloc

File:
1 edited

Legend:

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

    r7063 r7334  
    1 /* $Id: directory.cpp,v 1.40 2001-10-15 17:10:54 sandervl Exp $ */
     1/* $Id: directory.cpp,v 1.41 2001-11-14 12:30:30 phaller Exp $ */
    22
    33/*
     
    350350 *****************************************************************************/
    351351
    352 BOOL WIN32API CreateDirectoryExA( LPCSTR lpTemplateDirectory,
    353                                   LPCSTR lpNewDirectory,
    354                                   LPSECURITY_ATTRIBUTES lpSecurityAttributes)
    355 {
    356 
    357   dprintf(("KERNEL32:CreateDirectoryExA(%08x,%08x,%08x) not properly implemented\n",
     352ODINFUNCTION3(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",
    358359           lpTemplateDirectory,lpNewDirectory,lpSecurityAttributes
    359360          ));
     
    389390 *****************************************************************************/
    390391
    391 BOOL WIN32API CreateDirectoryExW( LPCWSTR lpTemplateDirectory,
    392                                   LPCWSTR lpNewDirectory,
    393                                   LPSECURITY_ATTRIBUTES lpSecurityAttributes)
     392ODINFUNCTION3(BOOL, CreateDirectoryExW,
     393              LPCWSTR, lpTemplateDirectory,
     394              LPCWSTR, lpNewDirectory,
     395              LPSECURITY_ATTRIBUTES, lpSecurityAttributes)
    394396{
    395397
     
    721723 *    Should call SetLastError(but currently doesn't).
    722724 */
    723 DWORD WINAPI SearchPathA(LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen,
    724                          LPSTR buffer, LPSTR *lastpart )
     725ODINFUNCTION6(DWORD, SearchPathA,
     726              LPCSTR, path,
     727              LPCSTR, name,
     728              LPCSTR, ext,
     729              DWORD, buflen,
     730              LPSTR, buffer,
     731              LPSTR *, lastpart )
    725732{
    726733    char full_name[MAX_PATHNAME_LEN];
     
    736743 *           SearchPath32W   (KERNEL32.448)
    737744 */
    738 DWORD WINAPI SearchPathW(LPCWSTR path, LPCWSTR name, LPCWSTR ext,
    739                          DWORD buflen, LPWSTR buffer, LPWSTR *lastpart )
     745ODINFUNCTION6(DWORD, SearchPathW,
     746              LPCWSTR, path,
     747              LPCWSTR, name,
     748              LPCWSTR, ext,
     749              DWORD, buflen,
     750              LPWSTR, buffer,
     751              LPWSTR *, lastpart )
    740752{
    741753    char full_name[MAX_PATHNAME_LEN];
    742 
     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
    743763    LPSTR pathA = HEAP_strdupWtoA( GetProcessHeap(), 0, path );
    744764    LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
    745765    LPSTR extA  = HEAP_strdupWtoA( GetProcessHeap(), 0, ext );
     766#endif
     767 
    746768    DWORD ret = DIR_SearchPath( pathA, nameA, extA, (LPSTR)full_name );
     769 
     770#ifndef __WIN32OS2__
    747771    HeapFree( GetProcessHeap(), 0, extA );
    748772    HeapFree( GetProcessHeap(), 0, nameA );
    749773    HeapFree( GetProcessHeap(), 0, pathA );
     774#endif
     775 
    750776    if (!ret) return 0;
    751777
Note: See TracChangeset for help on using the changeset viewer.