#include "menu.gbl"

DoDirect(drive)
char drive;
{

	char name[20], *p, first;
	int row, col;

	drive = ToUpper(drive);
	TClrWind();
	p = "This is the string to be bashed";
	if(drive < 'A' || drive > 'P'){
		TBell();
		TDisStr(0, 0, "Illegal drive name!");
		goto out;
	}
	TDisStr(0, 0, "Directory of ");
	TPutChar(drive);
	TPutChar(':');
	first = 1;
	for(row = 2; row < TMaxRow(); row++)
		for(col = 0; col < TMaxCol() - 15; col += 16){
			if(Direct(first, drive, name)){
				fixname(name);
				TDisStr(row, col, name);
			}
			else{
				row = TMaxCol();
				break;
			}
		first = 0;
		}
out:
	TDisStr(TMaxRow() - 1, 0, "HIT any key to return to menu:");
	TGetKb();
	TClrWind();
	return(1);		/* yes, redisplay needed */

}

fixname(name)
char *name;
{

	movmem(&name[8], &name[9], 4);
	name[8] = ' ';

}
