int InspectConsCell(char* str, int len, Object* cell){
  char car_buf[512] = {'\0'}, cdr_buf[512] = {'\0'};
  Inspect(car_buf, 512, Car(cell));
  Inspect(cdr_buf, 512, Cdr(cell));
  return snprintf(str, len, "#<cell:%lld, car=%s, cdr=%s>", IdToInt(cell->id), car_buf, cdr_buf);

}
Beispiel #2
0
void CGnuSearch::Rebuild()
{
	m_ResultMap.clear();
	m_GroupList.clear();
	m_CurrentList.clear();

	for(int i = 0; i < m_WholeList.size(); i++)
		if(Inspect(m_WholeList[i]))
		{
			m_CurrentList.push_back(m_WholeList[i]);
			AddtoGroup(m_WholeList[i]);
		}

	if(m_pCore->m_dnaCore->m_dnaEvents)
		m_pCore->m_dnaCore->m_dnaEvents->SearchRefresh(m_SearchID);
}
Beispiel #3
0
void CGnuSearch::IncomingHost(FileSource &Source)
{
	int SubnetLimit = 0;

	// check for duplicates
	for(int i = 0; i < m_WholeList.size(); i++)
		if(Source.Sha1Hash == m_WholeList[i].Sha1Hash)
		{
			// filter hosts from same subnet if not private
			if( memcmp(&Source.Address.Host.S_addr, &m_WholeList[i].Address.Host.S_addr, 3) == 0 &&
				!IsPrivateIP(Source.Address.Host) )
			{
				SubnetLimit++;
			
				if(SubnetLimit > SUBNET_LIMIT)
					return;
			}

			// dupe host
			if( Source.Address.Host.S_addr == m_WholeList[i].Address.Host.S_addr && 
				Source.Address.Port == m_WholeList[i].Address.Port )
				return;
		}


	m_WholeList.push_back(Source);

	// Screen Item to user's preferences
	if( !Inspect(Source) )
		return;
	
	m_CurrentList.push_back(Source);
	ResultGroup* pGroup = AddtoGroup(Source);

	if(pGroup && m_pCore->m_dnaCore->m_dnaEvents)
	{
		if(pGroup->ResultList.size() > 1)
			m_pCore->m_dnaCore->m_dnaEvents->SearchUpdate(m_SearchID, pGroup->ResultID);
		else
			m_pCore->m_dnaCore->m_dnaEvents->SearchResult(m_SearchID, pGroup->ResultID);
	}
}
void PrintInspect(Object* object){
  char buf[1024] = {'\0'};
  Inspect(buf, 1024, object);
  printf("%s\n", buf);
}
void rePropertyInspector::OnSelection(rEvent& event){
	reSelectionEvent& selectionEvent = static_cast<reSelectionEvent&>(event);
	Inspect(selectionEvent.Item());
}