Changeset 21463 for trunk/src/kernel32


Ignore:
Timestamp:
Sep 29, 2010, 12:46:01 AM (15 years ago)
Author:
dmik
Message:

Undo interpreting strings as ANSI for certain OSLib APIs modified in the previous commits as it breaks the common logic where many other OSLib calls (e.g. all dealig with file names) seem to expect the OEM (OS/2) encoding.

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

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

    r21462 r21463  
    2323#include <malloc.h>  /*PLF Wed  98-03-18 05:15:04*/
    2424#include "oslibmisc.h"
    25 #include "win32api.h"
    2625#include <misc.h>
    2726#include <odincrt.h>
     
    347346void OSLibSetBeginLibpath(char *lpszBeginlibpath)
    348347{
    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);
    358349}
    359350//******************************************************************************
     
    362353{
    363354    DosQueryExtLIBPATH(lpszBeginlibpath, BEGIN_LIBPATH);
    364     OemToCharA(lpszBeginlibpath, lpszBeginlibpath);
    365355}
    366356//******************************************************************************
  • trunk/src/kernel32/wprocess.cpp

    r21462 r21463  
    19841984//******************************************************************************
    19851985//******************************************************************************
     1986static 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//******************************************************************************
     2000static void OSLibQueryBeginLibpathA(char *lpszBeginlibpath, int size)
     2001{
     2002    OSLibQueryBeginLibpath(lpszBeginlibpath, size);
     2003    OemToCharA(lpszBeginlibpath, lpszBeginlibpath);
     2004}
     2005//******************************************************************************
     2006//******************************************************************************
    19862007BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
    19872008                            LPSECURITY_ATTRIBUTES lpProcessAttributes,
     
    22002221            if(oldlibpath)
    22012222            {
    2202                 OSLibQueryBeginLibpath(oldlibpath, 4096);
     2223                OSLibQueryBeginLibpathA(oldlibpath, 4096);
    22032224
    22042225                char *tmp = strrchr(szAppName, '\\');
    22052226                if(tmp) *tmp = 0;
    22062227
    2207                 OSLibSetBeginLibpath(szAppName);
     2228                OSLibSetBeginLibpathA(szAppName);
    22082229                if(tmp) *tmp = '\\';
    22092230
     
    23582379
    23592380    if(oldlibpath) {
    2360         OSLibSetBeginLibpath(oldlibpath);
     2381        OSLibSetBeginLibpathA(oldlibpath);
    23612382        free(oldlibpath);
    23622383    }
Note: See TracChangeset for help on using the changeset viewer.