#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>

#include "viewlog.h"

int clogdisp(FILE *pFile)
{
	char callsign[10];
	char buffer[90];

	buffer[0] = '\0';

	while (fread(callsign, 1, 7, pFile) != 0)
	{
		while (strlen(callsign) < 8)
			strcat(callsign, " ");

		strcat(buffer, callsign);

		if (strlen(buffer) > 80)
		{
			strcat(buffer, "\n");
			writetext(buffer);
			buffer[0] = '\0';
		}
	}

	return(0);
}

