Exemplo n.º 1
0
static void FSGZIP_BuildHash(void *handle)
{
	gzipfile_t *gzip = (gzipfile_t *)handle;

	if (!Hash_GetInsensitive(filesystemhash, gzip->file.name))
	{
		Hash_AddInsensitive(filesystemhash, gzip->file.name, &gzip->file);
		fs_hash_files++;
	}
	else {
		fs_hash_dups++;
	}
}
Exemplo n.º 2
0
static void FSPAK_BuildHash(void *handle)
{
	pack_t *pak = handle;
	int i;

	for (i = 0; i < pak->numfiles; i++)
	{
		if (!Hash_GetInsensitive(filesystemhash, pak->files[i].name))
		{
			Hash_AddInsensitive(filesystemhash, pak->files[i].name, &pak->files[i]);
			fs_hash_files++;
		}
		else
			fs_hash_dups++;
	}
}
Exemplo n.º 3
0
static int FSOS_RebuildFSHash(char *filename, int filesize, void *data)
{
	if (filename[strlen(filename)-1] == '/')
	{	//this is actually a directory

		char childpath[256];
		snprintf(childpath, sizeof (childpath), "%s*", filename);
		Sys_EnumerateFiles((char*)data, childpath, FSOS_RebuildFSHash, data);
		return true;
	}
	if (!Hash_GetInsensitive(filesystemhash, filename))
	{
		Hash_AddInsensitive(filesystemhash, filename, data);
		fs_hash_files++;
	}
	else
		fs_hash_dups++;
	return true;
}