Пример #1
0
INT region_tt::update_type()
{
    if (rgn->extents.is_empty())
    {
        rgn->type = NULLREGION;
        numRects = 0;
    }
    else
        rgn->type = SIMPLEREGION;
    return get_region_type();
}
Пример #2
0
INT region_tt::offset( INT x, INT y )
{
    ULONG nbox = numRects;
    rect_tt *pbox = rects;

    while (nbox--)
    {
        pbox->offset( x, y );
        pbox++;
    }
    rgn->extents.offset( x, y );
    return get_region_type();
}
Пример #3
0
int handleDefFunction( void* userData, uint32_t stream, uint32_t func,
  const char* name, uint32_t funcGroup, uint32_t source ) {
  VTOTF_Control* c = (VTOTF_Control*) userData;

  ELGCB_STRING(c->stringid, name);
  ELGCB_REGION((func-1), c->stringid++, 
               (source ? dvec_get(c->scltab, SCL, source-1).fnid : ELG_NO_ID),
               (source ? dvec_get(c->scltab, SCL, source-1).line : ELG_NO_LNO),
               ELG_NO_LNO,
	       dvec_get(c->funcgrouptab, elg_ui4, funcGroup-1),
	       get_region_type(name));
  if (c->tracinggid == funcGroup) {
    /* VT_API function */
    dvec_pushback(c->vtapitab, elg_ui4, func);
  }
  return OTF_RETURN_OK;
}
Пример #4
0
void		*malloc_exec(size_t size)
{
	t_region	*region;
	int			region_type;
	t_block		*block;

	region_type = get_region_type(size);
	region = g_heap[region_type];
	if (region)
	{
		block = region_alloc(region, size);
		if (!block)
			return (NULL);
	}
	else
	{
		block = extend_region(&g_heap[region_type], size);
		if (!block)
			return (NULL);
	}
	return (block->data);
}
Пример #5
0
INT region_tt::get_region_box( RECT* rect )
{
    *rect = rgn->extents;
    return get_region_type();
}