Example #1
0
static int startconn(void)
{
    if(*progspec) {
	if(nolisten == 0)
	    startlisten();
	else
	    startnolisten();
    }
    if(curaddr != NULL)
	return(sconnect());
    return(econnect());
}
Example #2
0
void CHIP_econnect_chips(QGraphicsScene *scene, Chip *from, Chip *to){
  if(chips_are_econnected(from,to)==true){
    printf("Chips are already econnected\n");
    return;
  }

  if(econnect(scene, from, to)==false)
    return; // trying to make recursive connection

  Connection *econnection = new Connection(scene, true);
  econnection->from = from;
  econnection->to = to;
  
  from->_econnections.push_back(econnection);
  to->_econnections.push_back(econnection);
  
  econnection->update_position();
  scene->addItem(econnection);
}