Changeset 1490 for trunk/src/kernel32


Ignore:
Timestamp:
Oct 28, 1999, 2:01:12 PM (26 years ago)
Author:
sandervl
Message:

misc changes

Location:
trunk/src/kernel32
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.CPP

    r1481 r1490  
    1 /* $Id: KERNEL32.CPP,v 1.25 1999-10-27 18:11:38 sandervl Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.26 1999-10-28 12:01:11 sandervl Exp $ */
    22
    33/*
     
    840840
    841841//  return(WIN32OS2_VERSION);
    842   return (0x00000400);
     842  return (0x0000004);
    843843}
    844844//******************************************************************************
  • trunk/src/kernel32/KERNEL32.DEF

    r1476 r1490  
    1 ; $Id: KERNEL32.DEF,v 1.46 1999-10-27 12:38:44 phaller Exp $
     1; $Id: KERNEL32.DEF,v 1.47 1999-10-28 12:01:11 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    10401040    PROFILE_SetOdinIniBool     = _PROFILE_SetOdinIniBool@12       @1269
    10411041    PROFILE_SaveOdinIni        = _PROFILE_SaveOdinIni@0           @1270
     1042
     1043;shared memory allocation
     1044    _smalloc__FUi                                                 @1271
  • trunk/src/kernel32/directory.cpp

    r1410 r1490  
    1 /* $Id: directory.cpp,v 1.7 1999-10-23 12:34:46 sandervl Exp $ */
     1/* $Id: directory.cpp,v 1.8 1999-10-28 12:01:12 sandervl Exp $ */
    22
    33/*
     
    189189    len = PROFILE_GetOdinIniString(ODINDIRECTORIES,"SYSTEM","",lpBuffer,uSize);
    190190    if (len > 2) {
     191        if(lpBuffer[len-1] == '\\') {
     192                lpBuffer[len-1] = 0;
     193                len--;
     194        }
    191195        return len;
    192196    }
    193197    else {//SvL: Use path of kernel32.dll instead of calling Open32 api (which returns \OS2\SYSTEM)
    194198        lstrcpynA(lpBuffer, kernel32Path, uSize);
    195         return lstrlenA(lpBuffer);
     199        len = lstrlenA(lpBuffer);;
     200        if(lpBuffer[len-1] == '\\') {
     201                lpBuffer[len-1] = 0;
     202                len--;
     203        }
     204        return len;
    196205    }
    197206  }
     
    247256              uSize);
    248257    return (lstrlenA(lpBuffer));                /* return number of copies bytes */
    249   } else
     258  }
     259  else
    250260  {
    251261    int len;
    252262
    253263    len = PROFILE_GetOdinIniString(ODINDIRECTORIES,"WINDOWS","",lpBuffer,uSize);
    254     if (len > 2) return len;
     264    if (len > 2) {
     265        if(lpBuffer[len-1] == '\\') {
     266                lpBuffer[len-1] = 0;
     267                len--;
     268        }
     269        return len;
     270    }
    255271    else
    256 
    257                                /* if no override by environment is available */
    258       return O32_GetWindowsDirectory(lpBuffer,uSize);
     272        /* if no override by environment is available */
     273        return O32_GetWindowsDirectory(lpBuffer,uSize);
    259274  }
    260275}
  • trunk/src/kernel32/heapshared.cpp

    r1432 r1490  
    1 /* $Id: heapshared.cpp,v 1.1 1999-10-24 22:53:24 sandervl Exp $ */
     1/* $Id: heapshared.cpp,v 1.2 1999-10-28 12:01:12 sandervl Exp $ */
    22/*
    33 * Shared heap functions for OS/2
     
    55 * Initially commit 16 kb, add more when required
    66 *
    7  * NOTE: Hardcoded limit of 256 KB per process (increase when required)
     7 * NOTE: Hardcoded limit of 256 KB (increase when required)
    88 *
    99 * TODO: Not process/thread safe (initializing/destroying heap)
     
    1919#include <os2wrap.h>
    2020#include <misc.h>
    21 #include "heapshared.h"
     21#include <heapshared.h>
    2222
    2323//Global DLL Data
     
    6969                return FALSE;
    7070        }
     71        if(_uopen(sharedHeap) != 0) {
     72                dprintf(("InitializeSharedHeap: unable to open shared heap!"));
     73                return FALSE;
     74        }
    7175  }
    7276  refCount++;
     
    8892                pSharedMem = NULL;
    8993        }
     94  }
     95  else {
     96        _uclose(sharedHeap);
    9097  }
    9198}
  • trunk/src/kernel32/initterm.cpp

    r1481 r1490  
    1 /* $Id: initterm.cpp,v 1.18 1999-10-27 18:11:39 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.19 1999-10-28 12:01:12 sandervl Exp $ */
    22
    33/*
     
    4141#include <odinlx.h>
    4242#include "oslibmisc.h"
    43 #include "heapshared.h"
     43#include <heapshared.h>
    4444#include "mmap.h"
    4545
     
    155155    WriteOutProfiles();
    156156    DestroyTIB();
     157    DestroySharedHeap();
    157158    //NOTE: Must be done after DestroyTIB
    158159    CloseLogFile();
  • trunk/src/kernel32/makefile

    r1481 r1490  
    1 # $Id: makefile,v 1.49 1999-10-27 18:11:39 sandervl Exp $
     1# $Id: makefile,v 1.50 1999-10-28 12:01:12 sandervl Exp $
    22
    33#
     
    132132    os2heap.h
    133133
    134 initterm.OBJ: .\initterm.cpp initterm.h  heapshared.h  mmap.h
     134initterm.OBJ: .\initterm.cpp initterm.h  $(PDWIN32_INCLUDE)\heapshared.h  mmap.h
    135135
    136136thunk.OBJ: \
     
    310310        .\hmopen32.h
    311311
    312 hmmmap.obj: hmmmap.cpp hmdevice.h hmopen32.h mmap.h heapshared.h
     312hmmmap.obj: hmmmap.cpp hmdevice.h hmopen32.h mmap.h $(PDWIN32_INCLUDE)\heapshared.h
    313313
    314314conprop.OBJ: \
     
    327327
    328328virtual.obj:   virtual.cpp $(PDWIN32_INCLUDE)\win\virtual.h $(PDWIN32_INCLUDE)\handlemanager.h mmap.h
    329 mmap.obj:      mmap.cpp mmap.h $(PDWIN32_INCLUDE)\vmutex.h oslibdos.h heapshared.h
     329mmap.obj:      mmap.cpp mmap.h $(PDWIN32_INCLUDE)\vmutex.h oslibdos.h $(PDWIN32_INCLUDE)\heapshared.h
    330330
    331331pefile.OBJ:    pefile.cpp $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winres.h
     
    362362toolhelp.obj: toolhelp.cpp
    363363
    364 heapshared.obj: heapshared.cpp heapshared.h
     364heapshared.obj: heapshared.cpp $(PDWIN32_INCLUDE)\heapshared.h
    365365
    366366
Note: See TracChangeset for help on using the changeset viewer.