directory as tree

Please read the rules:

(6) Do not post classroom or homework problems.

But I'll give you a couple of hints. The last line in function dostat is a call to show_file_info, but there are only two args. The function show_file_info is just below that and you can see that it uses fore args. And in show_file_info you have

	//print file type
	if(modestr[0]=='d')//dir
	{do_ls(path,count);
	}
	else
	{
 printf( "%s"  , fname2 );

You need a } after that.