⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signal.c

📁 一个MIPS模拟器的源码
💻 C
字号:
/* * Copyright (c) 2008 Martin Decky * All rights reserved. * * Distributed under the terms of GPL. * */#include "../signal.h"#ifndef __WIN32__#include <signal.h>#include <stdlib.h>#include "../../device/machine.h"#include "../../io/output.h"static void machine_user_break(int signo){	if ((tobreak) || (interactive)) {		mprintf("Quit\n");		input_back();		exit(1);	}		tobreak = true;	if (!interactive)		reenter = true;	interactive = true;}void register_sigint(void){	struct sigaction act;		act.sa_handler = machine_user_break;	(void) sigemptyset(&act.sa_mask);	act.sa_flags = 0;	sigaction(SIGINT, &act, NULL);} #endif /* __WIN32__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -