Changeset 780 for trunk/src/kernel32


Ignore:
Timestamp:
Sep 1, 1999, 9:12:23 PM (26 years ago)
Author:
phaller
Message:

Fix: header file cleanup (win32type.h)

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

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

    r769 r780  
    1 /* $Id: HandleManager.cpp,v 1.19 1999-08-31 23:48:36 phaller Exp $ */
     1/* $Id: HandleManager.cpp,v 1.20 1999-09-01 19:12:16 phaller Exp $ */
    22
    33/*
     
    8383  struct _HMDEVICE *pNext;                /* pointer to next device in chain */
    8484
    85   PSZ             pszDeviceName;       /* name or alias of the pseudo-device */
     85  LPSTR           pszDeviceName;       /* name or alias of the pseudo-device */
    8686  HMDeviceHandler *pDeviceHandler;         /* handler for this pseudo-device */
    8787} HMDEVICE, *PHMDEVICE;
     
    133133
    134134                        /* get appropriate device handler by the device name */
    135 static HMDeviceHandler*  _Optlink _HMDeviceFind(PSZ pszDeviceName);
     135static HMDeviceHandler*  _Optlink _HMDeviceFind(LPSTR pszDeviceName);
    136136
    137137                               /* get next free handle from the handle table */
     
    156156 *****************************************************************************/
    157157
    158 static HMDeviceHandler *_HMDeviceFind (PSZ pszDeviceName)
     158static HMDeviceHandler *_HMDeviceFind (LPSTR pszDeviceName)
    159159{
    160160  PHMDEVICE pHMDevice;                     /* iterator over the device table */
     
    247247 *****************************************************************************/
    248248
    249 DWORD   HMDeviceRegister(PSZ             pszDeviceName,
     249DWORD   HMDeviceRegister(LPSTR           pszDeviceName,
    250250                         HMDeviceHandler *pDeviceHandler)
    251251{
     
    767767  else
    768768  {
    769     pDeviceHandler = _HMDeviceFind((PSZ)lpFileName);          /* find device */
     769    pDeviceHandler = _HMDeviceFind((LPSTR)lpFileName);        /* find device */
    770770
    771771    if (NULL == pDeviceHandler)                /* this name is unknown to us */
     
    900900
    901901
    902   pDeviceHandler = _HMDeviceFind((PSZ)lpFileName);            /* find device */
     902  pDeviceHandler = _HMDeviceFind((LPSTR)lpFileName);          /* find device */
    903903  if (NULL == pDeviceHandler)                  /* this name is unknown to us */
    904904  {
  • trunk/src/kernel32/hmdevice.cpp

    r690 r780  
    1 /* $Id: hmdevice.cpp,v 1.7 1999-08-25 14:27:05 sandervl Exp $ */
     1/* $Id: hmdevice.cpp,v 1.8 1999-09-01 19:12:17 phaller Exp $ */
    22
    33/*
     
    1818 *****************************************************************************/
    1919
    20 #include <os2win.h>
     20#include <odin.h>
     21#include <win32type.h>
     22#include <misc.h>
    2123#include "HandleManager.h"
    2224#include "HMDevice.h"
     
    2729 *****************************************************************************/
    2830
     31#ifndef ERROR_INVALID_FUNCTION
     32#define ERROR_INVALID_FUNCTION 1
     33#endif
    2934
    3035/*****************************************************************************
     
    95100 * Name      : HMDeviceHandler::DuplicateHandle
    96101 * Purpose   : dummy version
    97  * Parameters: 
     102 * Parameters:
    98103 *             various parameters as required
    99104 * Variables :
  • trunk/src/kernel32/hmdevice.h

    r690 r780  
    1 /* $Id: hmdevice.h,v 1.8 1999-08-25 14:27:06 sandervl Exp $ */
     1/* $Id: hmdevice.h,v 1.9 1999-09-01 19:12:17 phaller Exp $ */
    22
    33/*
     
    288288
    289289                            /* register a new device with the handle manager */
    290 DWORD  HMDeviceRegister(PSZ             pszDeviceName,
     290DWORD  HMDeviceRegister(LPSTR           pszDeviceName,
    291291                        HMDeviceHandler *pDeviceHandler);
    292292
  • trunk/src/kernel32/virtual.cpp

    r712 r780  
    1 /* $Id: virtual.cpp,v 1.11 1999-08-27 16:51:01 sandervl Exp $ */
     1/* $Id: virtual.cpp,v 1.12 1999-09-01 19:12:18 phaller Exp $ */
    22
    33/*
     
    5050 * See CreateFileMapping32A
    5151 */
    52 HANDLE WINAPI CreateFileMappingW( HFILE hFile, LPSECURITY_ATTRIBUTES attr, 
    53                                       DWORD protect, DWORD size_high, 
     52HANDLE WINAPI CreateFileMappingW( HFILE hFile, LPSECURITY_ATTRIBUTES attr,
     53                                      DWORD protect, DWORD size_high,
    5454                                      DWORD size_low, LPCWSTR name )
    5555{
     
    107107              DWORD offset_low,  /* [in] Low-order 32 bits of file offset */
    108108              DWORD count        /* [in] Number of bytes to map */
    109 ) 
     109)
    110110{
    111111    return MapViewOfFileEx( mapping, access, offset_high,
     
    129129              DWORD count,       /* [in] Number of bytes to map */
    130130              LPVOID addr        /* [in] Suggested starting address for mapped view */
    131 ) 
     131)
    132132{
    133133  return HMMapViewOfFileEx(handle, access, offset_high, offset_low, count, addr);
     
    146146              LPCVOID base, /* [in] Start address of byte range to flush */
    147147              DWORD cbFlush /* [in] Number of bytes in range */
    148 ) 
     148)
    149149{
    150150 Win32MemMap *map;
     
    177177 */
    178178BOOL WINAPI UnmapViewOfFile(LPVOID addr /* [in] Address where mapped view begins */
    179 ) 
     179)
    180180{
    181181 Win32MemMap *map;
     
    201201 *
    202202 * Helper function to map a file to memory:
    203  *  name                        -       file name 
     203 *  name                        -       file name
    204204 *  [RETURN] ptr                -       pointer to mapped file
    205205 */
     
    208208    HANDLE hFile, hMapping = -1;
    209209
    210     hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ, NULL, 
     210    hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ, NULL,
    211211                           OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0);
    212212    if (hFile != INVALID_HANDLE_VALUE)
     
    226226 *
    227227 * Helper function to map a file to memory:
    228  *  name                        -       file name 
     228 *  name                        -       file name
    229229 *  [RETURN] ptr                -       pointer to mapped file
    230230 */
     
    233233    HANDLE hFile, hMapping = -1;
    234234
    235     hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL, 
     235    hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL,
    236236                        OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0);
    237237    if (hFile != INVALID_HANDLE_VALUE)
     
    254254 PVOID Address = lpvAddress;
    255255 ULONG flag = 0, base;
    256  APIRET rc;
     256 DWORD rc;
    257257
    258258  dprintf(("VirtualAlloc at %X; %d bytes, fAlloc %d, fProtect %d\n", (int)lpvAddress, cbSize, fdwAllocationType, fdwProtect));
     
    360360BOOL WIN32API VirtualFree(LPVOID lpvAddress, DWORD cbSize, DWORD FreeType)
    361361{
    362  APIRET rc;
     362 DWORD rc;
    363363
    364364  dprintf(("VirtualFree at %d; %d bytes, freetype %d\n", (int)lpvAddress, cbSize, FreeType));
     
    390390                             DWORD *pfdwOldProtect)
    391391{
    392  APIRET rc;
     392 DWORD rc;
    393393 ULONG  pageFlags = 0;
    394394 int npages;
     
    460460{
    461461 ULONG  cbRangeSize, dAttr;
    462  APIRET rc;
     462 DWORD rc;
    463463
    464464  if(lpvAddress == NULL || pmbiBuffer == NULL || cbLength == 0) {
    465465        return 0;
    466466  }
    467  
     467
    468468  cbRangeSize = cbLength & ~0xFFF;
    469469  if(cbLength & 0xFFF) {
Note: See TracChangeset for help on using the changeset viewer.