Exemple #1
0
void SList_Shutdown(void) {  
	FILE *f;

	if (!slist_initialised)
		return;	

	if (!(f = fopen(va("%s/servers.txt", com_basedir), "w"))) {
		Com_DPrintf ("Couldn't open servers.txt.\n");
		return;
	}
	SList_Save(f);
	fclose(f);
}
void SList_Shutdown(void) {  
	char filename[MAX_OSPATH] = {0};
	FILE *f;

	if (!slist_initialised)
		return;

	snprintf(&filename[0], sizeof(filename), "%s/servers.txt", com_basedir);

	if (!(f = fopen(filename, "w"))) {
		Com_DPrintf("Couldn't open %s\n", filename);
		return;
	}
	SList_Save(f);
	fclose(f);
}
Exemple #3
0
void SList_Shutdown (void)
{
	FILE	*f;

	// if the first is empty already that means there isn't a single entry
	if (!slist[0].server)
		return;

	//if (!(f = fopen("servers.lst", "wt")))
    if (!(f = fopen(va("%s/servers.lst", com_gamedir), "wt")))
	{
		Con_DPrintf ("Couldn't open servers.lst\n");
		return;
	}
	SList_Save (f);
	fclose (f);
}