Exemplo n.º 1
0
lexlist* fsm::newchar(int c,int ln)
{
	line=ln;

	if (c==0)
		if (state!=Home)
			throw scanerr("missed \"\n",line);
		else
		{
			lexlist *tmp;
			tmp=addnewlex();
			return tmp;
		}
	else
		switch (state)
		{
			lexlist *temp;

			case Home: return homeproc(c);
			case Num: return numproc(c);
			case Fun: return funproc(c);
			case Var: return varproc(c);
			case Lab: return labproc(c);
			case Key: return keyproc(c);
			case Equ: return equproc(c);
			case Str:
				if (c=='"') { temp=addnewlex(String); return temp; }
				else { buffer.write(c); return 0; }
		}
	return 0; // g++ wants it...
}
Exemplo n.º 2
0
void kbd_interrupt(void)
{
    newkey = 0;
    keyproc();
    if (keysdown < 3 && newkey)
        keydecode();
}
Exemplo n.º 3
0
Arquivo: devtty.c Projeto: Abioy/FUZIX
void platform_interrupt(void)
{
	uint8_t a = irqmap;
	uint8_t c;
	if (!(a & 2))
		wakeup(&ttydata[2]);
	if (!(a & 1)) {
		/* work around sdcc bug */
		c = uarta;
		tty_inproc(2, c);
	}
	if (!(a & 8)) {
		keyin[0] = kmap0;
		keyin[1] = kmap1;
		keyin[2] = kmap2;
		keyin[3] = kmap3;
		keyin[4] = kmap4;
		keyin[5] = kmap5;
		keyin[6] = kmap6;
		keyin[7] = kmap7;
		keyin[8] = kmap8;
		keyin[9] = kmap9;	/* This resets the scan for 10mS on */

		newkey = 0;
		keyproc();
		if (keysdown < 3 && newkey)
			keydecode();
		timer_interrupt();
	}
	/* clear the mask */
	irqmap = a;
}
Exemplo n.º 4
0
void platform_interrupt(void)
{
	uint8_t i = *pia_ctrl;
	if (i & 0x80) {
		*pia_col;
		newkey = 0;
		keyproc();
		if (keysdown < 3 && newkey)
			keydecode();
		timer_interrupt();
	}
}
Exemplo n.º 5
0
Arquivo: devtty.c Projeto: 8l/FUZIX
void kbd_interrupt(void)
{
	newkey = 0;
	keyproc();
	if (keysdown && keysdown < 3) {
		if (newkey) {
			keydecode();
			kbd_timer = keyrepeat.first;
		} else if (! --kbd_timer) {
			keydecode();
			kbd_timer = keyrepeat.continual;
		}
	}
}
Exemplo n.º 6
0
GUI_status
GUI_TermWin:: KeyDown(SDL_keysym key)
{
	GUI_status status;

	status = GUI_PASS;
	if ( keyproc ) {
		keyproc(key.sym, key.unicode);
		repeat_key = key.sym;
		repeat_unicode = key.unicode;
		repeat_next = SDL_GetTicks()+5*KEYREPEAT_TIME;
		status = GUI_YUM;
	}
	return(status);
}
Exemplo n.º 7
0
void kbd_poll(void)
{
	/* Report any press of the NMI button */
	if (nmikey) {
		nmikey = 0;
		vt_inproc(1, KEY_STOP);
	}
	newkey = 0;
	keyproc();
	if (keysdown && keysdown < 3) {
		if (newkey) {
			keydecode();
			kbd_timer = keyrepeat.first;
		} else if (!--kbd_timer) {
			keydecode();
			kbd_timer = keyrepeat.continual;
		}
	}
}
Exemplo n.º 8
0
void platform_interrupt(void)
{
	uint8_t i = *pia_ctrl;
	if (i & 0x80) {
		*pia_col;
		newkey = 0;
		keyproc();
		if (keysdown && keysdown < 3) {
			if (newkey) {
				keydecode();
				kbd_timer = keyrepeat.first;
			} else if (! --kbd_timer) {
				keydecode();
				kbd_timer = keyrepeat.continual;
			}
		}
		timer_interrupt();
	}
}
Exemplo n.º 9
0
Arquivo: devtty.c Projeto: Abioy/FUZIX
void platform_interrupt(void)
{
	uint8_t a = irqmap;
	uint8_t c;
	if (!(a & 4)) {
		/* FIXME: need to check uart itself to see wake cause */
		wakeup(&ttydata[2]);
		/* work around sdcc bug */
		c = uarta;
		tty_inproc(2, c);
	}
	if (!(a & 8)) {
		keyin[0] = kmap0;
		keyin[1] = kmap1;
		keyin[2] = kmap2;
		keyin[3] = kmap3;
		keyin[4] = kmap4;
		keyin[5] = kmap5;
		keyin[6] = kmap6;
		keyin[7] = kmap7;
		keyin[8] = kmap8;
		keyin[9] = kmap9;	/* This resets the scan for 10mS on */

		newkey = 0;
		keyproc();
		if (keysdown < 3 && newkey)
			keydecode();
		timer_interrupt();
	}
	if (!(a & 16)) {
		/* FIXME: Power button */
		;
	}
	if (!(a & 32)) {
		/* FIXME: FDC interrupt */
		;
	}
	/* clear the mask */
	irqmap = a;
}
Exemplo n.º 10
0
GUI_status
GUI_TermWin:: Idle(void)
{
	GUI_status status;

	status = GUI_PASS;

	/* Perform any necessary key repeat */
	if ( repeat_key && keyproc ) {
		if ( repeat_next <= SDL_GetTicks() ) {
			keyproc(repeat_key, repeat_unicode);
			repeat_next = SDL_GetTicks()+KEYREPEAT_TIME;
		}
	}

	/* Check to see if display contents have changed */
	if ( changed ) {
		status = GUI_REDRAW;
		changed = 0;
	}
	return(status);
}