register int	inf;
register int	inf = score_wfd;
score(){	register int	inf;	register SCORE	*scp;	register int	uid;	register bool	done_show = FALSE;	static int	numscores, max_uid;	Newscore = FALSE;	if ((inf = open(Scorefile, 2)) < 0) {		perror(Scorefile);		return;	}	if (read(inf, &max_uid, sizeof max_uid) == sizeof max_uid)		read(inf, Top, sizeof Top);	else {		for (scp = Top; scp < &Top[MAXSCORES]; scp++)			scp->s_score = -1;		max_uid = Max_per_uid;	}	uid = getuid();	if (Top[MAXSCORES-1].s_score <= Score) {		numscores = 0;		for (scp = Top; scp < &Top[MAXSCORES]; scp++)			if (scp->s_score < 0 ||			    (scp->s_uid == uid && ++numscores == max_uid)) {				if (scp->s_score > Score)					break;				scp->s_score = Score;				scp->s_uid = uid;				set_name(scp);				Newscore = TRUE;				break;			}		if (scp == &Top[MAXSCORES]) {			Top[MAXSCORES-1].s_score = Score;			Top[MAXSCORES-1].s_uid = uid;			set_name(&Top[MAXSCORES-1]);			Newscore = TRUE;		}		if (Newscore)			qsort(Top, MAXSCORES, sizeof Top[0], cmp_sc);	}	if (!Newscore) {		Full_clear = FALSE;		close(inf);		return;	}	else		Full_clear = TRUE;	for (scp = Top; scp < &Top[MAXSCORES]; scp++) {		if (scp->s_score < 0)			break;		move((scp - Top) + 1, 15);		if (!done_show && scp->s_uid == uid && scp->s_score == Score)			standout();		printw(" %d\t%d\t%-8.8s ", (scp - Top) + 1, scp->s_score, scp->s_name);		if (!done_show && scp->s_uid == uid && scp->s_score == Score) {			standend();			done_show = TRUE;		}	}	Num_scores = scp - Top;	refresh();	if (Newscore) {		lseek(inf, 0L, 0);		write(inf, &max_uid, sizeof max_uid);		write(inf, Top, sizeof Top);	}	close(inf);}