Exemplo n.º 1
0
//--------------------------------------------------------------------------
static void idaapi add_mapping(TView *fields[], int)
{
  static const char form[] =
    "Add mapping\n"
    "\n"
    "<~F~rom:N:16:16::> (nonexisting address)\n"
    "<~T~o  :N:16:16::> (existing address)\n"
    "<~S~ize:N:16:16::>\n"
    "\n"
    "\n";
  static ea_t source;
  static ea_t target;
  asize_t size = default_mapping_size;
  while ( AskUsingForm_c(form, &source, &target, &size) )
  {
    if ( apply_mapping(source, source + size, target) )
    {
      close_form(fields, true);
      break;
    }
    else
    {
      warning("Can't add mapping!");
    }
  }
}
Exemplo n.º 2
0
static void idaapi remove_mapping(TView *fields[], int)
{
  mapping_t *m = (mapping_t *)mapping.choose_area2(true,
                qnumber(widths), widths,
                getl_mapping,
                "Please select mapping to remove",
                -1);
  if ( m != NULL )
  {
    mapping.del_area(m->startEA);
    noUsed(inf.minEA, inf.maxEA);
    close_form(fields, true);
  }
}
Exemplo n.º 3
0
void Dialog_paper::on_Dialog_paper_finished(int result)
// сигнал закрытия формы
{
    if(chen) result=1; else result=0;
    emit close_form(result);
 }