Changeset 634 for trunk/src


Ignore:
Timestamp:
Aug 23, 1999, 12:11:23 AM (26 years ago)
Author:
sandervl
Message:

Bugfixes + def files changes

Location:
trunk/src/kernel32
Files:
9 edited

Legend:

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

    r607 r634  
    1 ; $Id: KERNEL32.DEF,v 1.26 1999-08-21 16:29:27 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.27 1999-08-22 22:11:22 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    999999    HEAP_strdupW               = _HEAP_strdupW@12                 @1248
    10001000
    1001 
    10021001    VIRTUAL_MapFileA           = _VIRTUAL_MapFileA@4              @1249
    10031002    VIRTUAL_MapFileW           = _VIRTUAL_MapFileW@4              @1250
    1004 
  • trunk/src/kernel32/cvtcursor.cpp

    r589 r634  
    1 /* $Id: cvtcursor.cpp,v 1.1 1999-08-19 19:50:40 sandervl Exp $ */
     1/* $Id: cvtcursor.cpp,v 1.2 1999-08-22 22:11:21 sandervl Exp $ */
    22
    33/*
     
    3434{
    3535 RGBQUAD   *rgb;
    36  RGB       *os2rgb;
     36 RGB2      *os2rgb;
    3737 WINBITMAPINFOHEADER *bhdr = (WINBITMAPINFOHEADER *)(curHdr+1);
    38  BITMAPFILEHEADER    *cursorhdr;
     38 BITMAPFILEHEADER2   *cursorhdr;
    3939 int        i, bwsize, bmpsize, cursorsize;
    4040
    4141  dprintf(("ConvertCursor: Cursor size %d", size));
    4242  bmpsize = size - sizeof(CursorComponent) - (1<<bhdr->biBitCount)*sizeof(RGBQUAD);
    43   cursorsize = sizeof(BITMAPFILEHEADER) + bmpsize + (1<<bhdr->biBitCount)*sizeof(RGB);
     43  cursorsize = sizeof(BITMAPFILEHEADER2) + bmpsize + (1<<bhdr->biBitCount)*sizeof(RGB2);
    4444
    45   cursorhdr  = (BITMAPFILEHEADER *)malloc(cursorsize);
     45  cursorhdr  = (BITMAPFILEHEADER2 *)malloc(cursorsize);
    4646  cursorhdr->usType        = BFT_POINTER;
    47   cursorhdr->cbSize        = sizeof(BITMAPFILEHEADER);
     47  cursorhdr->cbSize        = sizeof(BITMAPFILEHEADER2);
    4848  cursorhdr->xHotspot      = curHdr->xHotspot;
    4949
     
    5555  dprintf(("Cursor Hot.y   : %d", curHdr->yHotspot));
    5656
    57   cursorhdr->offBits       = sizeof(BITMAPFILEHEADER) + 2*sizeof(RGB) + offsetBits;
    58   cursorhdr->bmp.cbFix     = sizeof(BITMAPINFOHEADER);
    59   cursorhdr->bmp.cx        = (USHORT)bhdr->biWidth;
    60   cursorhdr->bmp.cy        = (USHORT)(bhdr->biHeight);
    61   cursorhdr->bmp.cPlanes   = bhdr->biPlanes;
    62   cursorhdr->bmp.cBitCount = bhdr->biBitCount;
     57  cursorhdr->offBits       = sizeof(BITMAPFILEHEADER2) + 2*sizeof(RGB2) + offsetBits;
     58  cursorhdr->bmp2.cbFix     = sizeof(BITMAPINFOHEADER);
     59  cursorhdr->bmp2.cx        = (USHORT)bhdr->biWidth;
     60  cursorhdr->bmp2.cy        = (USHORT)(bhdr->biHeight);
     61  cursorhdr->bmp2.cPlanes   = bhdr->biPlanes;
     62  cursorhdr->bmp2.cBitCount = bhdr->biBitCount;
    6363  dprintf(("Cursor size    : %d", bhdr->biSizeImage));
    6464  dprintf(("Cursor Width   : %d", bhdr->biWidth));
     
    6868  dprintf(("Cursor Compress: %d", bhdr->biCompression));
    6969
    70   os2rgb                   = (RGB *)(cursorhdr+1);
     70  os2rgb                   = (RGB2 *)(cursorhdr+1);
    7171  rgb                      = (RGBQUAD *)(bhdr+1);
    7272  for(i=0;i<(1<<bhdr->biBitCount);i++) {
  • trunk/src/kernel32/exceptions.cpp

    r617 r634  
    1 /* $Id: exceptions.cpp,v 1.10 1999-08-22 11:11:10 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.11 1999-08-22 22:11:21 sandervl Exp $ */
    22
    33/*
     
    935935 PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)exceptframe;
    936936
    937   pExceptRec->prev_structure   = 0;
     937  pExceptRec->prev_structure   = (PEXCEPTIONREGISTRATIONRECORD)-1;
    938938  pExceptRec->ExceptionHandler = OS2ExceptionHandler;
    939939
     
    960960}
    961961
     962void SetOS2ExceptionChain(ULONG val)
     963{
     964 USHORT sel = GetFS();
     965
     966    SetExceptionChain(val);   
     967    SetFS(sel);
     968}
     969
    962970/*****************************************************************************
    963971 * Name      : void ReplaceExceptionHandler
  • trunk/src/kernel32/exceptutil.h

    r620 r634  
    1 /* $Id: exceptutil.h,v 1.1 1999-08-22 12:55:57 sandervl Exp $ */
     1/* $Id: exceptutil.h,v 1.2 1999-08-22 22:11:21 sandervl Exp $ */
    22
    33/*
     
    2525void  OS2SetExceptionHandler(void *exceptframe);
    2626void  OS2UnsetExceptionHandler(void *exceptframe);
     27void  SetOS2ExceptionChain(ULONG val);
    2728
    2829ULONG  getEAX();
  • trunk/src/kernel32/heapstring.cpp

    r567 r634  
    1 /* $Id */
     1/* $Id: heapstring.cpp,v 1.8 1999-08-22 22:11:21 sandervl Exp $ */
    22
    33/*
     
    845845
    846846
     847
    847848#if 0
    848849
  • trunk/src/kernel32/kernel32exp.def

    r607 r634  
    1 ; $Id: kernel32exp.def,v 1.13 1999-08-21 16:29:27 sandervl Exp $
     1; $Id: kernel32exp.def,v 1.14 1999-08-22 22:11:22 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    851851_VIRTUAL_MapFileA@4              @1249
    852852_VIRTUAL_MapFileW@4              @1250
     853
     854; HEAP Management (heap.cpp, heapstring.cpp)
     855_HEAP_xalloc@12                  @1240
     856_HEAP_xrealloc@16                @1241
     857_HEAP_malloc@4                   @1242
     858_HEAP_realloc@8                  @1243
     859_HEAP_free@4                     @1244
     860_HEAP_strdupWtoA@12              @1245
     861_HEAP_strdupAtoW@12              @1246
     862_HEAP_strdupA@12                 @1247
     863_HEAP_strdupW@12                 @1248
  • trunk/src/kernel32/windll.cpp

    r624 r634  
    1 /* $Id: windll.cpp,v 1.12 1999-08-22 15:11:35 sandervl Exp $ */
     1/* $Id: windll.cpp,v 1.13 1999-08-22 22:11:22 sandervl Exp $ */
    22
    33/*
     
    4848  head = this;
    4949
     50  dllEntryPoint = 0;
     51
    5052  dprintf(("Win32Dll::Win32Dll %s %s", szFileName, szModule));
    5153}
  • trunk/src/kernel32/winimgres.cpp

    r597 r634  
    1 /* $Id: winimgres.cpp,v 1.11 1999-08-20 11:52:44 sandervl Exp $ */
     1/* $Id: winimgres.cpp,v 1.12 1999-08-22 22:11:22 sandervl Exp $ */
    22
    33/*
     
    8181        pstring = (PIMAGE_RESOURCE_DIR_STRING_U)((ULONG)pResDir + nameOffset);
    8282        char *typename = (char *)malloc(pstring->Length+1);
    83         lstrcpynWtoA(typename, pstring->NameString, pstring->Length);
     83        lstrcpynWtoA(typename, pstring->NameString, pstring->Length+1);
    8484        typename[pstring->Length] = 0;
    8585       
     
    170170
    171171                resname = (char *)malloc(pstring->Length+1);
    172                 lstrcpynWtoA(resname, pstring->NameString, pstring->Length);
     172                lstrcpynWtoA(resname, pstring->NameString, pstring->Length+1);
    173173                resname[pstring->Length] = 0;
    174174                if(stricmp(resname, (char *)*nodeData) == 0) {
     
    253253  pData = getPEResourceEntry(id, type, lang);
    254254  if(pData == NULL) {
    255         dprintf(("Win32Image::getPEResource: couldn't find resource %d (type %d, lang %d)", id, type, lang));
     255        if(HIWORD(id)) {
     256                dprintf(("Win32Image::getPEResource: couldn't find resource %s (type %d, lang %d)", id, type, lang));
     257        }
     258        else    dprintf(("Win32Image::getPEResource: couldn't find resource %d (type %d, lang %d)", id, type, lang));
    256259        return 0;
    257260  }
  • trunk/src/kernel32/wprocess.cpp

    r622 r634  
    1 /* $Id: wprocess.cpp,v 1.25 1999-08-22 14:24:35 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.26 1999-08-22 22:11:23 sandervl Exp $ */
    22
    33/*
     
    329329  dprintf(("KERNEL32:  ExitProcess FS = %x\n", GetFS()));
    330330
     331  SetOS2ExceptionChain(-1);
     332
    331333  //avoid crashes since win32 & OS/2 exception handler aren't identical
    332334  //(terminate process generates two exceptions)
     
    674676
    675677    if(O32_CreateProcess(lpszImageName, lpszCommandLine, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) == TRUE)
    676     return(TRUE);
     678        return(TRUE);
    677679
    678680    //probably a win32 exe, so run it in the pe loader
    679681    if(lpszImageName) {
    680      if(lpszCommandLine) {
    681         cmdline = (char *)malloc(strlen(lpszImageName)+strlen(lpszCommandLine) + 16);
    682         sprintf(cmdline, "%s %s", lpszImageName, lpszCommandLine);
    683         fAllocStr = TRUE;
    684      }
    685      else   cmdline = (char *)lpszImageName;
     682         if(lpszCommandLine) {
     683                cmdline = (char *)malloc(strlen(lpszImageName)+strlen(lpszCommandLine) + 16);
     684                sprintf(cmdline, "%s %s", lpszImageName, lpszCommandLine);
     685                fAllocStr = TRUE;
     686         }
     687         else   cmdline = (char *)lpszImageName;
    686688    }
    687689    else cmdline = (char *)lpszCommandLine;
Note: See TracChangeset for help on using the changeset viewer.