dwg_dim_blockname (Dwg_Data *restrict dwg, const Dwg_Object *restrict obj)
{
  BITCODE_BL id = obj->tio.entity->objid;
  Dwg_Object *restrict hdr = &dwg->object[id + 1];
  Dwg_Object *restrict blk = &dwg->object[id + 2];

  if ((hdr->type == DWG_TYPE_LAYER || hdr->type == DWG_TYPE_DICTIONARY)
      && blk->type == DWG_TYPE_BLOCK_HEADER)
    {
      hdr = blk;
      blk = &dwg->object[id + 3];
    }
  if (hdr->type == DWG_TYPE_BLOCK_HEADER && blk->type == DWG_TYPE_BLOCK)
    {
      Dwg_Entity_BLOCK *restrict _blk = blk->tio.entity->tio.BLOCK;
      return _blk->name;
    }
  return NULL;
}
dwg_dim_blockname (Dwg_Data *restrict dwg, const Dwg_Object *restrict obj)
{
  BITCODE_BL id = obj->tio.entity->objid;
  Dwg_Object *restrict hdr = &dwg->object[id + 1];
  Dwg_Object *restrict blk = &dwg->object[id + 2];

  if ((hdr->type == DWG_TYPE_LAYER || hdr->type == DWG_TYPE_DICTIONARY)
      && blk->type == DWG_TYPE_BLOCK_HEADER)
    {
      hdr = blk;
      blk = &dwg->object[id + 3];
    }
  if (hdr->type == DWG_TYPE_BLOCK_HEADER && blk->type == DWG_TYPE_BLOCK)
    {
      Dwg_Entity_BLOCK *restrict _blk = blk->tio.entity->tio.BLOCK;
      return _blk->name;
    }
  return NULL;
}