All pastes #2049242 Raw Edit

Unnamed

public text v1 · immutable
#2049242 ·published 2011-04-22 05:50 UTC
rendered paste body
int treeprint(struct tnode *p, FILE* output)
	{
            static int uniqueCount = 0;
		if (p != NULL) 
			{
				treeprint(p->left);
				char s[255];
				sprintf(s, "%4d %s\n", p->count, p->word);
				printf(s, "%s\n", s);
				if(output)
				{
					//fputs(  );
				}
				treeprint(p->right);
			}
		else 
			{
				uniqueCount++;
			}    
            			
           	 return (uniqueCount-1);
	}