- Timestamp:
- Sep 29, 2010, 12:46:01 AM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibmisc.cpp
r21462 r21463 23 23 #include <malloc.h> /*PLF Wed 98-03-18 05:15:04*/ 24 24 #include "oslibmisc.h" 25 #include "win32api.h"26 25 #include <misc.h> 27 26 #include <odincrt.h> … … 347 346 void OSLibSetBeginLibpath(char *lpszBeginlibpath) 348 347 { 349 PSZ psz = NULL; 350 if (lpszBeginlibpath) { 351 psz = (PSZ)malloc(strlen(lpszBeginlibpath) + 1); 352 CharToOemA(lpszBeginlibpath, psz); 353 } 354 DosSetExtLIBPATH(psz, BEGIN_LIBPATH); 355 if (psz) { 356 free(psz); 357 } 348 DosSetExtLIBPATH(lpszBeginlibpath, BEGIN_LIBPATH); 358 349 } 359 350 //****************************************************************************** … … 362 353 { 363 354 DosQueryExtLIBPATH(lpszBeginlibpath, BEGIN_LIBPATH); 364 OemToCharA(lpszBeginlibpath, lpszBeginlibpath);365 355 } 366 356 //****************************************************************************** -
trunk/src/kernel32/wprocess.cpp
r21462 r21463 1984 1984 //****************************************************************************** 1985 1985 //****************************************************************************** 1986 static void OSLibSetBeginLibpathA(char *lpszBeginlibpath) 1987 { 1988 PSZ psz = NULL; 1989 if (lpszBeginlibpath) { 1990 psz = (PSZ)malloc(strlen(lpszBeginlibpath) + 1); 1991 CharToOemA(lpszBeginlibpath, psz); 1992 } 1993 OSLibSetBeginLibpath(psz); 1994 if (psz) { 1995 free(psz); 1996 } 1997 } 1998 //****************************************************************************** 1999 //****************************************************************************** 2000 static void OSLibQueryBeginLibpathA(char *lpszBeginlibpath, int size) 2001 { 2002 OSLibQueryBeginLibpath(lpszBeginlibpath, size); 2003 OemToCharA(lpszBeginlibpath, lpszBeginlibpath); 2004 } 2005 //****************************************************************************** 2006 //****************************************************************************** 1986 2007 BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine, 1987 2008 LPSECURITY_ATTRIBUTES lpProcessAttributes, … … 2200 2221 if(oldlibpath) 2201 2222 { 2202 OSLibQueryBeginLibpath (oldlibpath, 4096);2223 OSLibQueryBeginLibpathA(oldlibpath, 4096); 2203 2224 2204 2225 char *tmp = strrchr(szAppName, '\\'); 2205 2226 if(tmp) *tmp = 0; 2206 2227 2207 OSLibSetBeginLibpath (szAppName);2228 OSLibSetBeginLibpathA(szAppName); 2208 2229 if(tmp) *tmp = '\\'; 2209 2230 … … 2358 2379 2359 2380 if(oldlibpath) { 2360 OSLibSetBeginLibpath (oldlibpath);2381 OSLibSetBeginLibpathA(oldlibpath); 2361 2382 free(oldlibpath); 2362 2383 } -
trunk/src/user32/oslibwin.cpp
r21461 r21463 562 562 LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz) 563 563 { 564 LONG retLen = WinQueryWindowText(hwnd, length, lpsz); 565 OemToCharBuffA(lpsz, lpsz, retLen); 566 lpsz[retLen] = '\0'; 567 return retLen; 564 return WinQueryWindowText(hwnd, length, lpsz); 568 565 } 569 566 //****************************************************************************** … … 571 568 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz) 572 569 { 573 PSZ psz = NULL; 574 if(lpsz) { 575 psz = (PSZ)_smalloc(strlen(lpsz) + 1); 576 CharToOemA(lpsz, psz); 577 } 578 BOOL rc = WinSetWindowText(hwnd, psz); 579 if (psz) { 580 _sfree(psz); 581 } 582 return rc; 570 return WinSetWindowText(hwnd, lpsz); 583 571 } 584 572 //****************************************************************************** … … 586 574 BOOL OSLibWinSetTitleBarText(HWND hwnd, LPSTR lpsz) 587 575 { 588 PSZ psz = NULL; 589 if(lpsz) { 590 psz = (PSZ)_smalloc(strlen(lpsz) + 1); 591 CharToOemA(lpsz, psz); 592 } 593 BOOL rc = WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), psz); 594 if (psz) { 595 _sfree(psz); 596 } 597 return rc; 576 return WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), lpsz); 598 577 } 599 578 //****************************************************************************** -
trunk/src/user32/win32wbase.cpp
r21372 r21463 528 528 //****************************************************************************** 529 529 //****************************************************************************** 530 static BOOL OSLibWinSetTitleBarTextA(HWND hwnd, LPSTR lpsz) 531 { 532 LPSTR psz = NULL; 533 if(lpsz) { 534 psz = (LPSTR)_smalloc(strlen(lpsz) + 1); 535 CharToOemA(lpsz, psz); 536 } 537 BOOL rc = OSLibWinSetTitleBarText(hwnd, psz); 538 if (psz) { 539 _sfree(psz); 540 } 541 return rc; 542 } 543 //****************************************************************************** 544 //****************************************************************************** 530 545 BOOL Win32BaseWindow::MsgCreate(HWND hwndOS2) 531 546 { … … 620 635 621 636 if(fOS2Look) { 622 OSLibWinSetTitleBarText (OS2HwndFrame, windowNameA);637 OSLibWinSetTitleBarTextA(OS2HwndFrame, windowNameA); 623 638 } 624 639 } … … 1635 1650 } 1636 1651 if(fOS2Look) { 1637 OSLibWinSetTitleBarText (OS2HwndFrame, getWindowNameA());1652 OSLibWinSetTitleBarTextA(OS2HwndFrame, getWindowNameA()); 1638 1653 } 1639 1654 } … … 2211 2226 } 2212 2227 if(fOS2Look) { 2213 OSLibWinSetTitleBarText (OS2HwndFrame, getWindowNameA());2228 OSLibWinSetTitleBarTextA(OS2HwndFrame, getWindowNameA()); 2214 2229 } 2215 2230 }
Note:
See TracChangeset
for help on using the changeset viewer.