home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / DVI_MGR / dvimgr_s.lzh / dvimgr / getbmap.h < prev    next >
Text File  |  1993-08-06  |  997b  |  41 lines

  1. /* -*-C-*- getbmap.h */
  2. /*-->getbmap*/
  3. /**********************************************************************/
  4. /****************************** getbmap *******************************/
  5. /**********************************************************************/
  6.  
  7. void
  8. getbmap()                /* allocate bitmap array */
  9. {
  10. #if    SEGMEM
  11.     register UNSIGN16 y;
  12.  
  13.     if (bitmap[0] == (UNSIGN32*)NULL)
  14.     {
  15.     for (y = 0; y < (UNSIGN16)YBIT; ++y)
  16.     {
  17.         bitmap[y] = (UNSIGN32*)MALLOC( (unsigned)((XBIT) * \
  18.             sizeof(UNSIGN32)) );
  19.         if (bitmap[y] == (UNSIGN32*)NULL)
  20.         (void)fatal(
  21.             "getbmap():  Cannot allocate space for page image bitmap");
  22.     }
  23.     }
  24. #else /* NOT SEGMEM */
  25.  
  26.     UNSIGN32     bmsize;
  27.  
  28.     if (bitmap == (UNSIGN32*)NULL)
  29.     {
  30.     bmsize = ((UNSIGN32)(XBIT)) * ((UNSIGN32)(YBIT)) * sizeof(UNSIGN32)+2048;
  31.     bitmap = (UNSIGN32*)MALLOC( bmsize);
  32.     if (bitmap == (UNSIGN32*)NULL)
  33.     {
  34.         (void)fatal(
  35.         "getbmap():  Cannot allocate space for page image bitmap");
  36.     }
  37.     }
  38. #endif /* SEGMEM */
  39. }
  40.  
  41.