Exemplo n.º 1
0
BOOLEAN
read_key (REAL del, BOOLEAN dot, BOOLEAN dash)
{
	extern BOOLEAN read_straight_key (KeyerState ks, BOOLEAN keyed);
	extern BOOLEAN read_iambic_key (KeyerState ks, BOOLEAN dot,
				  BOOLEAN dash, KeyerLogic kl, REAL ticklen);

	if (bug)
	{
		if (dash)
			return read_straight_key (ks, dash);
		else
			return read_iambic_key (ks, dot, FALSE, kl, del);
	}
	if (iambic)
		return read_iambic_key (ks, dot, dash, kl, del);
	return read_straight_key (ks, dot | dash);
}
Exemplo n.º 2
0
BOOLEAN
read_key (REAL del, BOOLEAN dot, BOOLEAN dash)
{
	extern BOOLEAN read_straight_key (KeyerState ks, BOOLEAN keyed);
	extern BOOLEAN read_iambic_key (KeyerState ks, BOOLEAN dot,
				  BOOLEAN dash, KeyerLogic kl, REAL ticklen);

	if (!ks)
	{
		fprintf(stderr,"%s: No ks! dash=%d dot=%d\n",__func__,dash,dot);
		return FALSE;
	}

	if (bug)
	{
		if (dash)
			return read_straight_key (ks, dash);
		else
			return read_iambic_key (ks, dot, FALSE, kl, del);
	}
	if (iambic)
		return read_iambic_key (ks, dot, dash, kl, del);
	return read_straight_key (ks, dot | dash);
}