Ignore:
Timestamp:
Aug 5, 2007, 4:57:03 PM (14 years ago)
Author:
Eugene Romanenko
Message:

subsequently load supported files in same directory, Next/Previous? menuitem (part of ticket #66)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.cpp

    r221 r222  
    5252#define LuPixbuf_Class_Source
    5353
     54#define INCL_DOS
     55#include <os2.h>
     56#include <assert.h>
     57
    5458#include "lupixbuf.xih"
    5559
    5660
    57 SOM_Scope void SOMLINK LuPixbufInit(LuPixbuf *somSelf,  Environment *ev, 
    58                                     somInitCtrl* ctrl, long w, 
     61SOM_Scope void SOMLINK LuPixbufInit(LuPixbuf *somSelf,  Environment *ev,
     62                                    somInitCtrl* ctrl, long w,
    5963                                    long h, short bpp)
    6064{
     65    APIRET rc = 0;
    6166    LuPixbufData *somThis;
    6267    somInitCtrl globalCtrl;
     
    7176    somThis->rowsize = ( somThis->width * somThis->bpp );
    7277    if ( bpp != 4 ) {
    73             somThis->rowsize = (somThis->rowsize + 3) &~3;
    74         }
     78        somThis->rowsize = (somThis->rowsize + 3) &~3;
     79    }
    7580    somThis->dlen = somThis->rowsize * somThis->height;
     81
    7682    //somPrintf( "LuPixbufInit: allocating %d bytes\n", somThis->dlen );
    77     somThis->data = (char *)SOMMalloc( somThis->dlen );
     83
     84    // To support HUGE pixbufs we need HMA
     85    // (Is OBJ_ANY compatible with old (9.0xx) kernels?)
     86    rc = DosAllocMem( &(somThis->data), somThis->dlen, PAG_COMMIT | fPERM | OBJ_ANY );
     87    assert( rc == 0 );
     88
    7889    memset( somThis->data, 0xff, somThis->dlen );
    7990}
     
    142153
    143154    // local LuPixbuf deinitialization code
    144     SOMFree( somThis->data );
     155    DosFreeMem( somThis->data );
    145156    // local LuPixbuf deinitialization code end
    146157
Note: See TracChangeset for help on using the changeset viewer.