Esempio n. 1
0
/* make random name */
void get_table_name(char *out_string)
{
	char Syllable[80];
	char tmp[80];

	get_rnd_line(_("aname_j.txt", "aname.txt"), 1, Syllable);
	strcpy(tmp, Syllable);
	get_rnd_line(_("aname_j.txt", "aname.txt"), 2, Syllable);
	strcat(tmp, Syllable);
#ifndef JP
	tmp[1] = toupper(tmp[1]);
#endif
	sprintf(out_string, _("『%s』", "'%s'"), tmp);

	return;
}
Esempio n. 2
0
/* Make random Sindarin name */
void get_table_sindarin(char *out_string)
{
	char Syllable[80];
	char tmp[80];

	get_rnd_line("sname.txt", 1, Syllable);
	strcpy(tmp, Syllable);
	get_rnd_line("sname.txt", 2, Syllable);
	strcat(tmp, Syllable);
#ifdef JP
	sindarin_to_kana(Syllable, tmp);
	sprintf(out_string, "『%s』", Syllable);
#else
	tmp[0] = toupper(tmp[0]);
	sprintf(out_string, "'%s'", tmp);
#endif
	return;
}
Esempio n. 3
0
void get_table_name(char *out_string, bool quotes)
{
	int testcounter = rand_range(2, 3);

	if (quotes)
	{
		strcpy(out_string, "'");
	}
	else
	{
		out_string[0] = 0;
	}

	if (one_in_(3))
	{
		while (testcounter--)
			strcat(out_string, syllables[randint0(MAX_SYLLABLES)]);
	}
	else
	{
		char Syllable[80];

		while (testcounter--)
		{
			(void)get_rnd_line("elvish.txt", 0, Syllable);
			strcat(out_string, Syllable);
		}
	}

	if (quotes)
	{
		out_string[1] = toupper(out_string[1]);
		strcat(out_string, "'");
	}
	else
	{
		out_string[0] = toupper(out_string[0]);
	}

	out_string[18] = '\0';

	return;
}
Esempio n. 4
0
void get_table_name(char *out_string, bool quotes)
{
	int testcounter = 2;
	
	int len = 0;
	
	/* Empty string */
	out_string[0] = 0;

	if (quotes)
	{
		strnfcat(out_string, 18, &len, "'");
	}

	if (one_in_(3))
	{
		while (testcounter--)
			strnfcat(out_string, 18, &len, syllables[randint0(MAX_SYLLABLES)]);
	}
	else
	{
		char Syllable[80];

		while (testcounter--)
		{
			(void)get_rnd_line("elvish.txt", 0, Syllable);
			strnfcat(out_string, 18, &len, "%s", Syllable);
		}
	}

	if (quotes)
	{
		out_string[1] = toupper(out_string[1]);
		strnfcat(out_string, 18, &len, "'");
	}
	else
	{
		out_string[0] = toupper(out_string[0]);
	}
}