1 Description: Catches the ctrl-c(SIGINT) signal and asks the user whether
2 he really wants to exit.
4 Author: Kęstutis Biliūnas <kebil@kaunas.init.lt>
6 Bug-Debian: http://bugs.debian.org/578122
7 Last-Update: 2010-07-29
9 --- a/fontforge/start.c
10 +++ b/fontforge/start.c
13 # include <stdlib.h> /* getenv,setenv */
18 int32 unicode_from_adobestd[256];
19 struct lconv localeinfo;
20 @@ -129,6 +131,23 @@ static void initlibrarysearchpath(void)
28 + /* re-set the signal handler again to sigfun, for next time */
29 + signal(SIGINT, sigfun);
30 + printf("\nYou have pressed Ctrl-C\n"
31 + "Do you really want to quit? [y/n] ");
34 + if (c == 'y' || c == 'Y') {
37 + while(getchar()!='\n');
41 void InitSimpleStuff(void) {
42 initlibrarysearchpath();
44 @@ -143,6 +162,8 @@ void InitSimpleStuff(void) {
45 if ( getenv("FF_SCRIPT_IN_LATIN1") ) use_utf8_in_script=false;
49 + signal(SIGINT, sigfun);
52 void doinitFontForgeMain(void) {