fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n",
fprintf(fd, "%s %d %-6u (%d,%d) %-15s %s\n",
print(msg, addr)struct tsp *msg;struct sockaddr_in *addr;{	char tm[26];	time_t msgtime;		if (msg->tsp_type > TSPTYPENUMBER) {		fprintf(fd, "bad type (%u) on packet from %s\n",		    msg->tsp_type, inet_ntoa(addr->sin_addr));		return;	}	switch (msg->tsp_type) {	case TSP_LOOP:		fprintf(fd, "%s %d %-6u #%d %-15s %s\n",			tsptype[msg->tsp_type],			msg->tsp_vers,			msg->tsp_seq,			msg->tsp_hopcnt,			inet_ntoa(addr->sin_addr),			msg->tsp_name);		break;	case TSP_SETTIME:	case TSP_SETDATE:	case TSP_SETDATEREQ:#ifdef sgi		(void)cftime(tm, "%D %T", &msg->tsp_time.tv_sec);#else		msgtime = msg->tsp_time.tv_sec;		strncpy(tm, ctime(&msgtime)+3+1, sizeof(tm));		tm[15] = '\0';		/* ugh */#endif /* sgi */		fprintf(fd, "%s %d %-6u %s %-15s %s\n",			tsptype[msg->tsp_type],			msg->tsp_vers,			msg->tsp_seq,			tm,			inet_ntoa(addr->sin_addr),			msg->tsp_name);		break;	case TSP_ADJTIME:		fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n",			tsptype[msg->tsp_type],			msg->tsp_vers,			msg->tsp_seq,			msg->tsp_time.tv_sec,			msg->tsp_time.tv_usec,			inet_ntoa(addr->sin_addr),			msg->tsp_name);		break;	default:		fprintf(fd, "%s %d %-6u %-15s %s\n",			tsptype[msg->tsp_type],			msg->tsp_vers,			msg->tsp_seq,			inet_ntoa(addr->sin_addr),			msg->tsp_name);		break;	}}