示例#1
0
void testing()
{
	char buffer1[1024];
	char buffer2[1024];
	memset(buffer1, 0, 1000);
	memset(buffer2, 0, 1000);
	getstring(buffer1, 1000);
	getstring(buffer2, 1000);
	buffer1[strlen(buffer1) - 1] = '\0';
	buffer2[strlen(buffer2) - 1] = '\0';

	// Now we Load these into our Structures;
	Number *Number1, *Number2;
	Number1 = allocate_number(Number1);
	Number2 = allocate_number(Number2);


	Number1 = loadroutine(Number1, buffer1);
	Number2 = loadroutine(Number2, buffer2);

	recursivePrint(Number1);
	printf("\n");
	recursivePrint(Number2);
	printf("\n");
}
示例#2
0
void recursivePrint(tree_member * no, int (* imp)(void * p))
{
    if(no != NULL) {
        recursivePrint(no->esq, imp);
        (* imp)(no->data);
        recursivePrint(no->dir, imp);
    }
}
示例#3
0
void IntervalTree::recursivePrint(IntervalTreeNode* x) const
{
  if(x != nil)
  {
    recursivePrint(x->left);
    x->print(nil,root);
    recursivePrint(x->right);
  }
}
示例#4
0
void recursivePrint(ofTypeNode *headNode){ // recursive print function
puts("recursively printing the linked list");
	if(headNode != NULL){
		printf("%c \n", headNode->nodeData);
		recursivePrint(headNode->nextNode);
	}
}
示例#5
0
void recursivePrint(Number *num)
{
	if(num->next != NULL)	recursivePrint(num->next);
	int i;
	for(i = MAX_DIGITS_PER_NODE-1; i>=0; i--)
		printf("%d", num->digits[i]);
}
void CImpactReport::recursivePrint(CResultsTree* pRoot,string prefix) {
	if(pRoot != NULL) {
		do{
			CResultEntity* pEntity = pRoot->getEntity();
			*m_pStream << prefix << pEntity->getMessage()->c_str()<<endl;
			recursivePrint(pRoot->children(),prefix + "    ");
		} while((pRoot=pRoot->getNext())!=NULL); 
	}
}
示例#7
0
int main()
{
	Number *num;
	num = allocate_number(num);	
	num = int_to_number(123344567, num);
	recursivePrint(num);

//	testing();
}
示例#8
0
void recursivePrint(Queue q)
{
	if(NULL == q.pHead)
	{
	}
	else
	{
		printf("%d ", q.pHead->data);
		q.pHead = q.pHead->pNext;
		recursivePrint(q);
	}
}
示例#9
0
static void recursivePrint(const PrefixTreeVertex& vertex, unsigned depth)
{
    dataLogF("%s", prefixTreeVertexToString(vertex, depth).utf8().data());
    for (const auto& edge : vertex.edges) {
        StringBuilder builder;
        for (unsigned i = 0; i < depth * 2; ++i)
            builder.append(' ');
        builder.append("vertex edge: ");
        builder.append(edge.term.toString());
        builder.append('\n');
        dataLogF("%s", builder.toString().utf8().data());
        ASSERT(edge.child);
        recursivePrint(*edge.child.get(), depth + 1);
    }
}
示例#10
0
std::ostream& ossimQuadTreeWarp::print(std::ostream& out) const
{
   if(!isEmpty())
   {
      out << "___________VERTEX LIST____________________\n";
      printVertices(out);
      out << "___________TREE LIST____________________\n";
      
      recursivePrint(out, theTree);
   }
   else
   {
      out << "<empty tree>\n";
   }
   return out;
}
示例#11
0
void ossimQuadTreeWarp::recursivePrint(std::ostream& out,
                                       ossimQuadTreeWarpNode* node)const
{
   if(node)
   {
      out << (*node) << "\n";
   }

   if(!node->isLeaf())
   {
      for(ossim_uint32 i =0; i < node->theChildren.size();++i)
      {
         recursivePrint(out, node->theChildren[i]);
      }
   }
}
void CImpactReport::Descriptions() {
	*m_pStream << "Impact description"<<endl<<endl;
	TReportIterator iter;
	string prefix = "    ";
	for(iter = m_Entries.begin(); iter != m_Entries.end(); iter++) {
		CReportEntry* pEntry = *iter;
		*m_pStream << " " <<pEntry->getMessage() << endl;
		TReportEntities* pChildren = pEntry->GetChildren();
		if(pChildren!=NULL) {
			TReportIterator ChildrenIter;		
			int nIdx = 1;
			for(ChildrenIter = pChildren->begin(); ChildrenIter != pChildren->end(); ChildrenIter++,nIdx++) {
				CReportEntry* pChildEntry = *ChildrenIter;
				*m_pStream << prefix << nIdx << "." << pChildEntry->getMessage()<<endl;
				recursivePrint(pChildEntry->getResults(),prefix);
			}
		}
	}
}
示例#13
0
int main(int argc, char *argv[]){
	int iCount;
	int jCount;
	for(iCount = 1; iCount < 3; iCount++){ // the number of words you have as arguments.  Change this if you want more words as arguments, right now it is "Ada Lovelace"
		for(jCount = 0; jCount < 10; jCount++){ // the max number of letters in your words (it's set to 10 because no words will be longer than 10) and my code handles if a word is shorter than the given int counter
			if(argv[iCount][jCount] == '\0'){
				
				break;
			}
			//printf("%c", argv[i][j]);
			//puts("inserting a node");
			printf("inserting nodeData %c \n", argv[iCount][jCount]);
			headNode = insertData(argv[iCount][jCount], headNode);
		}
		puts("\n");
	}
	//printLinkedList(headNode);
	recursivePrint(headNode);
	puts("\nThis is for the Extra credit\n");
	puts("printing the fourth letter");
	printf("%c", headNode->nextNode->nextNode->nextNode->nodeData);
	return 0;
}
示例#14
0
void IntervalTree::print() const
{
  recursivePrint(root->left);
}
示例#15
0
void recursiveP(tree_header * pa, int (* imp)(void * p))
{
    recursivePrint(pa->root, imp);
}
示例#16
0
void CombinedURLFilters::print() const
{
    recursivePrint(*m_prefixTreeRoot.get(), 0);
}