📄 signal.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 + -