예제 #1
0
파일: worker.c 프로젝트: lytsing/ytht
void
win_checkrec()
{
	int n;
	win_loadrec();
	for (n = 0; n <= NUMREC; n++)
		if (!strcmp(topID[n], userid)) {
			if (stage == topStage[n] && steps < topSteps[n]) {
				topSteps[n] = steps;
				strcpy(topFROM[n], fromhost);
				win_sort();
			}
			if (stage > topStage[n]) {
				topStage[n] = stage;
				topSteps[n] = steps;
				strcpy(topFROM[n], fromhost);
				strcpy(prize[n], "δ");
				win_sort();
			}
			return;
		}
	if (stage > topStage[NUMREC - 1]
	    || (stage == topStage[NUMREC - 1]
		&& steps < topSteps[NUMREC - 1])) {
		strcpy(topID[NUMREC - 1], userid);
		topStage[NUMREC - 1] = stage;
		topSteps[NUMREC - 1] = steps;
		strsncpy(topFROM[NUMREC - 1], fromhost, sizeof (topFROM[0]));
		strcpy(prize[NUMREC - 1], "δ");
		win_sort();
		return;
	}
}
예제 #2
0
int win_checkrec(int dt) {
    char id[20];
    int n;
    win_loadrec();
    strcpy(id, userid);
    if(dt < 50){
	clear();
	prints("р╩йг╩ЗфВхк!!!\n╥ёдЦк╞цъ1╥жжс\n");
	refresh();
	sleep(60);
	pressanykey();
	return 0;
    }
    for(n=0;n<20;n++)
    if(!strcmp(topID[n], id)) {
	if(stiger > topS[n]){
            topS[n]=stiger;
            win_saverec();
        }
        if(dt< topT[n]) {
            topT[n]= dt;
            strcpy(topFROM[n], fromhost);
            win_sort();
            win_saverec();
        }
        return 0;
    }
    if(dt<topT[19]) {
        strcpy(topID[19], id);
        topT[19]= dt;
        topS[19]= stiger;
        strcpy(topFROM[19], fromhost);
        win_sort();
        win_saverec();
        return 0;
    }
    return 0;
}
예제 #3
0
파일: winmine.c 프로젝트: lytsing/ytht
void
win_checkrec(int dt)
{
	int n;
	win_loadrec();
	for (n = 0; n <= 19; n++)
		if (!strcmp(topID[n], userid)) {
			if (dt < topT[n]) {
				topT[n] = dt;
				strsncpy(topFROM[n], fromhost, sizeof(topFROM[0]));
				strcpy(prize[n], "δ");
				win_sort();
			}
			return;
		}
	if (dt < topT[19]) {
		strsncpy(topID[19], userid, sizeof(topID[0]));
		topT[19] = dt;
		strsncpy(topFROM[19], fromhost, sizeof(topFROM[0]));
		strcpy(prize[19], "δ");
		win_sort();
		return;
	}
}
예제 #4
0
파일: winmine.c 프로젝트: caidongyun/fbbs
int win_checkrec(int dt) {
    char id[20];
    int n;
    win_loadrec();
    strcpy(id, userid);
    for(n=0; n<=19; n++)
    if(!strcmp(topID[n], id)) {
        if(dt< topT[n]) {
            topT[n]= dt;
            strcpy(topFROM[n], fromhost);
            win_sort();
            win_saverec();
        }
        return;
    }
    if(dt<topT[19]) {
        strcpy(topID[19], id);
        topT[19]= dt;
        strcpy(topFROM[19], fromhost);
        win_sort();
        win_saverec();
        return;
    }
}