Ignore:
Timestamp:
Aug 26, 1999, 2:56:02 PM (26 years ago)
Author:
sandervl
Message:

Cleanup

File:
1 edited

Legend:

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

    r678 r705  
    1 /* $Id: wprocess.cpp,v 1.28 1999-08-25 10:28:41 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.29 1999-08-26 12:55:38 sandervl Exp $ */
    22
    33/*
     
    2424
    2525#include "exceptutil.h"
    26 #include "os2util.h"
     26#include "oslibmisc.h"
    2727
    2828#include "console.h"
     
    7575
    7676   //Allocate one dword to store the flat address of our TEB
    77    TIBFlatPtr = (DWORD *)OS2AllocThreadLocalMemory(1);
     77   TIBFlatPtr = (DWORD *)OSLibAllocThreadLocalMemory(1);
    7878   if(TIBFlatPtr == 0) {
    7979        dprintf(("InitializeTIB: local thread memory alloc failed!!"));
     
    8181        return NULL;
    8282   }
    83    if(OS2AllocSel(PAGE_SIZE, &tibsel) == FALSE)
     83   if(OSLibAllocSel(PAGE_SIZE, &tibsel) == FALSE)
    8484   {
    8585        dprintf(("InitializeTIB: selector alloc failed!!"));
     
    8787        return NULL;
    8888   }
    89    winteb = (TEB *)OS2SelToFlat(tibsel);
     89   winteb = (TEB *)OSLibSelToFlat(tibsel);
    9090   if(winteb == NULL)
    9191   {
     
    9999
    100100   winteb->except      = (PVOID)-1;               /* 00 Head of exception handling chain */
    101    winteb->stack_top   = (PVOID)OS2GetTIB(TIB_STACKTOP); /* 04 Top of thread stack */
    102    winteb->stack_low   = (PVOID)OS2GetTIB(TIB_STACKLOW); /* 08 Stack low-water mark */
    103    winteb->htask16     = (USHORT)OS2GetPIB(PIB_TASKHNDL); /* 0c Win16 task handle */
     101   winteb->stack_top   = (PVOID)OSLibGetTIB(TIB_STACKTOP); /* 04 Top of thread stack */
     102   winteb->stack_low   = (PVOID)OSLibGetTIB(TIB_STACKLOW); /* 08 Stack low-water mark */
     103   winteb->htask16     = (USHORT)OSLibGetPIB(PIB_TASKHNDL); /* 0c Win16 task handle */
    104104   winteb->stack_sel   = getSS();                 /* 0e 16-bit stack selector */
    105105   winteb->self        = winteb;                  /* 18 Pointer to this structure */
     
    115115   thdb->OrgTIBSel       = GetFS();
    116116
    117    if(OS2GetPIB(PIB_TASKTYPE) == TASKTYPE_PM)
     117   if(OSLibGetPIB(PIB_TASKTYPE) == TASKTYPE_PM)
    118118   {
    119119        thdb->flags      = 0;  //todo gui
     
    153153
    154154        //And free our own
    155         OS2FreeSel(thdb->teb_sel);
     155        OSLibFreeSel(thdb->teb_sel);
    156156   }
    157157   else dprintf(("Already destroyed TIB"));
     
    210210        delete(WinExe);
    211211
    212   CheckVersion(Pe2lxVersion, OS2GetDllName(hinstance));
     212  CheckVersion(Pe2lxVersion, OSLibGetDllName(hinstance));
    213213
    214214  if(getenv("WIN32_IOPL2")) {
     
    265265                io_init1();
    266266        }
    267         name = OS2GetDllName(hinstance);
     267        name = OSLibGetDllName(hinstance);
    268268        CheckVersion(Pe2lxVersion, name);
    269269
     
    362362    return(TRUE);
    363363  }
    364   dprintf(("KERNEL32: FreeLibrary %s %X\n", OS2GetDllName(hinstance), hinstance));
     364  dprintf(("KERNEL32: FreeLibrary %s %X\n", OSLibGetDllName(hinstance), hinstance));
    365365
    366366  //TODO: Not thread safe
     
    435435  if (hDll == 0)
    436436  {
    437     PSZ pszName;
     437    char * pszName;
    438438
    439439    // remove path from the image name
    440     pszName = strrchr((PSZ)lpszLibFile,
     440    pszName = strrchr((char *)lpszLibFile,
    441441                      '\\');
    442442    if (pszName != NULL)
     
    602602 DWORD rc;
    603603
    604     dprintf(("KERNEL32:  OS2GetModuleFileNameW\n"));
     604    dprintf(("KERNEL32:  OSLibGetModuleFileNameW\n"));
    605605    rc = GetModuleFileNameA(hModule, asciifilename, nSize);
    606606    if(rc)      AsciiToUnicode(asciifilename, lpFileName);
     
    623623  }
    624624  else {
    625         strcpy(szModule, StripPath((char *)lpszModule));
     625        strcpy(szModule, OSLibStripPath((char *)lpszModule));
    626626        strupr(szModule);
    627627        if(strstr(szModule, ".DLL")) {
     
    647647                        hMod = windll->getInstanceHandle();
    648648                }
    649                 else    hMod = OS2iGetModuleHandleA( (PSZ) lpszModule);
     649                else    hMod = OSLibiGetModuleHandleA((char *)lpszModule);
    650650        }
    651651  }
     
    754754
    755755  dprintf(("GetVersionStruct"));
    756   hinstance = OS2QueryModuleHandle(modname);
     756  hinstance = OSLibQueryModuleHandle(modname);
    757757  if(hinstance == 0) {
    758758        dprintf(("GetVersionStruct can't find handle for %s\n", modname));
     
    773773    return(FALSE);
    774774  }
    775   return OS2GetResource(hinstance, winimage->getVersionId(), verstruct, bufLength);
     775  return OSLibGetResource(hinstance, winimage->getVersionId(), verstruct, bufLength);
    776776}
    777777//******************************************************************************
     
    783783
    784784  dprintf(("GetVersionSize of %s\n", modname));
    785   hinstance = OS2QueryModuleHandle(modname);
     785  hinstance = OSLibQueryModuleHandle(modname);
    786786  if(hinstance == 0) {
    787787    dprintf(("GetVersionSize can't find handle for %s\n", modname));
     
    803803        return(FALSE);
    804804  }
    805   ULONG size = OS2GetResourceSize(hinstance, winimage->getVersionId());
     805  ULONG size = OSLibGetResourceSize(hinstance, winimage->getVersionId());
    806806
    807807  dprintf(("Version resource size = %d, id %d\n", size, winimage->getVersionId()));
Note: See TracChangeset for help on using the changeset viewer.