- Timestamp:
- Nov 14, 2001, 7:39:52 PM (24 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/comctl32.c
r7334 r7342 441 441 DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style) 442 442 { 443 #ifdef __WIN32OS2__444 LPSTR p;445 STACK_strdupWtoA(text, p)446 #else447 443 LPSTR p = HEAP_strdupWtoA (GetProcessHeap (), 0, text); 448 #endif449 444 DrawStatusTextA (hdc, lprc, p, style); 450 #ifndef __WIN32OS2__451 445 HeapFree (GetProcessHeap (), 0, p ); 452 #endif453 446 } 454 447 -
trunk/src/comctl32/listview.c
r7334 r7342 6763 6763 lvca.pszText = LPSTR_TEXTCALLBACKA; 6764 6764 else 6765 #ifdef __WIN32OS2__6766 {6767 LPSTR pszText;6768 STACK_strdupWtoA(lpColumn->pszText, pszText)6769 lvca.pszText = pszText;6770 }6771 #else6772 6765 lvca.pszText = HEAP_strdupWtoA(GetProcessHeap(),0,lpColumn->pszText); 6773 #endif6774 6766 } 6775 6767 lres = LISTVIEW_InsertColumnA(hwnd,nColumn,&lvca); 6776 6777 #ifndef __WIN32OS2__6778 6768 if (lpColumn->mask & LVCF_TEXT) { 6779 6769 if (lpColumn->pszText != LPSTR_TEXTCALLBACKW) 6780 6770 HeapFree(GetProcessHeap(),0,lvca.pszText); 6781 6771 } 6782 #endif6783 6772 return lres; 6784 6773 } … … 6957 6946 lvia.pszText = LPSTR_TEXTCALLBACKA; 6958 6947 else 6959 #ifdef __WIN32OS2__6960 {6961 LPSTR pszText;6962 STACK_strdupWtoA(lpLVItem->pszText, pszText)6963 lvia.pszText = pszText;6964 }6965 #else6966 6948 lvia.pszText = HEAP_strdupWtoA(GetProcessHeap(),0,lpLVItem->pszText); 6967 #endif6968 6949 } 6969 6950 lres = LISTVIEW_InsertItemA(hwnd, &lvia); 6970 #ifndef __WIN32OS2__6971 6951 if (lvia.mask & LVIF_TEXT) { 6972 6952 if (lpLVItem->pszText != LPSTR_TEXTCALLBACKW) 6973 6953 HeapFree(GetProcessHeap(),0,lvia.pszText); 6974 6954 } 6975 #endif6976 6955 return lres; 6977 6956 } -
trunk/src/kernel32/Fileio.cpp
r7334 r7342 1 /* $Id: Fileio.cpp,v 1.5 4 2001-11-14 12:30:35 phallerExp $ */1 /* $Id: Fileio.cpp,v 1.55 2001-11-14 18:39:52 sandervl Exp $ */ 2 2 3 3 /* … … 531 531 DWORD dwCopyFlags) 532 532 { 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; 556 547 } 557 548 //****************************************************************************** … … 1392 1383 LPVOID, lpFileInformation) 1393 1384 { 1394 #ifdef __WIN32OS2__1395 LPSTR nameA;1396 STACK_strdupWtoA(lpFileName, nameA)1397 #else1398 1385 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName ); 1399 #endif1400 1401 1386 BOOL res = GetFileAttributesExA( nameA, fInfoLevelId, lpFileInformation); 1402 1403 #ifndef __WIN32OS2__1404 1387 HeapFree( GetProcessHeap(), 0, nameA ); 1405 #endif1406 1388 return res; 1407 1389 } -
trunk/src/kernel32/directory.cpp
r7334 r7342 1 /* $Id: directory.cpp,v 1.4 1 2001-11-14 12:30:30 phallerExp $ */1 /* $Id: directory.cpp,v 1.42 2001-11-14 18:38:45 sandervl Exp $ */ 2 2 3 3 /* … … 350 350 *****************************************************************************/ 351 351 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", 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", 359 358 lpTemplateDirectory,lpNewDirectory,lpSecurityAttributes 360 359 )); … … 390 389 *****************************************************************************/ 391 390 392 ODINFUNCTION3(BOOL, CreateDirectoryExW, 393 LPCWSTR, lpTemplateDirectory, 394 LPCWSTR, lpNewDirectory, 395 LPSECURITY_ATTRIBUTES, lpSecurityAttributes) 391 BOOL WIN32API CreateDirectoryExW( LPCWSTR lpTemplateDirectory, 392 LPCWSTR lpNewDirectory, 393 LPSECURITY_ATTRIBUTES lpSecurityAttributes) 396 394 { 397 395 … … 723 721 * Should call SetLastError(but currently doesn't). 724 722 */ 725 ODINFUNCTION6(DWORD, SearchPathA, 726 LPCSTR, path, 727 LPCSTR, name, 728 LPCSTR, ext, 729 DWORD, buflen, 730 LPSTR, buffer, 731 LPSTR *, lastpart ) 723 DWORD WINAPI SearchPathA(LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen, 724 LPSTR buffer, LPSTR *lastpart ) 732 725 { 733 726 char full_name[MAX_PATHNAME_LEN]; … … 743 736 * SearchPath32W (KERNEL32.448) 744 737 */ 745 ODINFUNCTION6(DWORD, SearchPathW, 746 LPCWSTR, path, 747 LPCWSTR, name, 748 LPCWSTR, ext, 749 DWORD, buflen, 750 LPWSTR, buffer, 751 LPWSTR *, lastpart ) 738 DWORD WINAPI SearchPathW(LPCWSTR path, LPCWSTR name, LPCWSTR ext, 739 DWORD buflen, LPWSTR buffer, LPWSTR *lastpart ) 752 740 { 753 741 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 763 743 LPSTR pathA = HEAP_strdupWtoA( GetProcessHeap(), 0, path ); 764 744 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name ); 765 745 LPSTR extA = HEAP_strdupWtoA( GetProcessHeap(), 0, ext ); 766 #endif767 768 746 DWORD ret = DIR_SearchPath( pathA, nameA, extA, (LPSTR)full_name ); 769 770 #ifndef __WIN32OS2__771 747 HeapFree( GetProcessHeap(), 0, extA ); 772 748 HeapFree( GetProcessHeap(), 0, nameA ); 773 749 HeapFree( GetProcessHeap(), 0, pathA ); 774 #endif775 776 750 if (!ret) return 0; 777 751 -
trunk/src/kernel32/environ.cpp
r7334 r7342 1 /* $Id: environ.cpp,v 1.1 2 2001-11-14 12:30:34 phallerExp $ */1 /* $Id: environ.cpp,v 1.13 2001-11-14 18:38:48 sandervl Exp $ */ 2 2 3 3 /* … … 283 283 DWORD, nSize) 284 284 { 285 #ifdef __WIN32OS2__286 LPSTR srcA;287 STACK_strdupWtoA(lpSrc, srcA)288 #else289 285 LPSTR srcA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpSrc ); 290 #endif291 292 286 LPSTR dstA = lpDst ? (LPSTR)HeapAlloc( GetProcessHeap(), 0, nSize ) : NULL; 293 287 … … 300 294 HeapFree( GetProcessHeap(), 0, dstA ); 301 295 } 302 #ifndef __WIN32OS2__303 296 HeapFree( GetProcessHeap(), 0, srcA ); 304 #endif305 297 return ret; 306 298 } -
trunk/src/kernel32/module.cpp
r7334 r7342 1 /* $Id: module.cpp,v 1. 4 2001-11-14 12:30:38 phallerExp $1 /* $Id: module.cpp,v 1.5 2001-11-14 18:38:49 sandervl Exp $ 2 2 * 3 3 * GetBinaryTypeA/W (Wine Port) … … 262 262 { 263 263 BOOL ret = FALSE; 264 LPSTR strNew = NULL; 264 265 265 266 dprintf(("KERNEL32: GetBinaryTypeW %x %x", lpApplicationName, lpBinaryType)); … … 275 276 /* Convert the wide string to a ascii string. 276 277 */ 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 ); 283 279 284 280 if ( strNew != NULL ) … … 288 284 /* Free the allocated string. 289 285 */ 290 #ifndef __WIN32OS2__ 291 HeapFree( GetProcessHeap(), 0, strNew ); 292 #endif 286 HeapFree( GetProcessHeap(), 0, strNew ); 293 287 } 294 288 -
trunk/src/kernel32/virtual.cpp
r7334 r7342 1 /* $Id: virtual.cpp,v 1.4 1 2001-11-14 12:30:46 phallerExp $ */1 /* $Id: virtual.cpp,v 1.42 2001-11-14 18:38:51 sandervl Exp $ */ 2 2 3 3 /* … … 69 69 DWORD size_low, LPCWSTR name ) 70 70 { 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 ); 78 72 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; 85 76 } 86 77 … … 110 101 HANDLE WINAPI OpenFileMappingW( DWORD access, BOOL inherit, LPCWSTR name) 111 102 { 112 #ifdef __WIN32OS2__113 LPSTR nameA;114 STACK_strdupWtoA(name, nameA)115 #else116 103 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; 125 107 } 126 108 -
trunk/src/user32/mdi.c
r7337 r7342 1521 1521 case WM_SETTEXT: 1522 1522 { 1523 #ifdef __WIN32OS2__1524 LPWSTR text;1525 STACK_strdupAtoW( (LPSTR)lParam, text)1526 MDI_UpdateFrameText(hwnd, hwndMDIClient, MDI_REPAINTFRAME, text );1527 #else1528 1523 LPWSTR text = HEAP_strdupAtoW( GetProcessHeap(), 0, (LPSTR)lParam ); 1529 1524 MDI_UpdateFrameText(hwnd, hwndMDIClient, MDI_REPAINTFRAME, text ); 1530 1525 HeapFree( GetProcessHeap(), 0, text ); 1531 #endif1532 1526 } 1533 1527 return 1; /* success. FIXME: check text length */ -
trunk/src/user32/msgbox.c
r7337 r7342 1 /* $Id: msgbox.c,v 1. 5 2001-11-14 12:57:28 phallerExp $ */1 /* $Id: msgbox.c,v 1.6 2001-11-14 18:33:03 sandervl Exp $ */ 2 2 /* 3 3 * Message boxes (based on Wine code) … … 298 298 UINT type ) 299 299 { 300 INT ret;301 302 #ifdef __WIN32OS2__303 LPSTR titleA;304 LPSTR textA;305 STACK_strdupWtoA(title, titleA)306 STACK_strdupWtoA(text, textA)307 #else308 300 LPSTR titleA = HEAP_strdupWtoA( GetProcessHeap(), 0, title ); 309 301 LPSTR textA = HEAP_strdupWtoA( GetProcessHeap(), 0, text ); 310 #endif 302 INT ret; 311 303 312 304 ret = MessageBoxA( hwnd, textA, titleA, type ); 313 314 #ifndef __WIN32OS2__315 305 HeapFree( GetProcessHeap(), 0, titleA ); 316 306 HeapFree( GetProcessHeap(), 0, textA ); 317 #endif318 307 return ret; 319 308 }
Note:
See TracChangeset
for help on using the changeset viewer.