Exemplo n.º 1
0
void LIST_AddStringSorted (linkedList_t **listDest, const char *data)
{
	assert(listDest);
	assert(data);

	for (; *listDest; listDest = &(*listDest)->next) {
		if (Q_StringSort(data, static_cast<char const*>((*listDest)->data)) < 0)
			break;
	}

	*listDest = LIST_AllocateString(data, *listDest);
}
Exemplo n.º 2
0
/**
 * @sa FS_MapDefSort
 */
static int Com_MapDefSort (const void* mapDef1, const void* mapDef2)
{
	const char* map1 = ((const mapDef_t*)mapDef1)->mapTheme;
	const char* map2 = ((const mapDef_t*)mapDef2)->mapTheme;

	/* skip special map chars for rma and base attack */
	if (map1[0] == '+' || map1[0] == '.')
		map1++;
	if (map2[0] == '+' || map2[0] == '.')
		map2++;

	return Q_StringSort(map1, map2);
}