コード例 #1
0
ファイル: scanner.cpp プロジェクト: OLEGator30/Bot
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...
}
コード例 #2
0
ファイル: devtty.c プロジェクト: NoSuchProcess/FUZIX
void kbd_interrupt(void)
{
    newkey = 0;
    keyproc();
    if (keysdown < 3 && newkey)
        keydecode();
}
コード例 #3
0
ファイル: devtty.c プロジェクト: 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;
}
コード例 #4
0
ファイル: devtty.c プロジェクト: Rappalot/FUZIX
void platform_interrupt(void)
{
	uint8_t i = *pia_ctrl;
	if (i & 0x80) {
		*pia_col;
		newkey = 0;
		keyproc();
		if (keysdown < 3 && newkey)
			keydecode();
		timer_interrupt();
	}
}
コード例 #5
0
ファイル: devtty.c プロジェクト: 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;
		}
	}
}
コード例 #6
0
ファイル: GUI_termwin.cpp プロジェクト: KIAaze/iteam_hacking
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);
}
コード例 #7
0
ファイル: devnascom.c プロジェクト: erkinalp/FUZIX
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;
		}
	}
}
コード例 #8
0
ファイル: devtty.c プロジェクト: EtchedPixels/FUZIX
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();
	}
}
コード例 #9
0
ファイル: devtty.c プロジェクト: 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;
}
コード例 #10
0
ファイル: GUI_termwin.cpp プロジェクト: KIAaze/iteam_hacking
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);
}