Browse Source

* Disable SLang's own SIGINT handler

tags/v0.99.beta17
Jean-Yves Lamoureux jylam 15 years ago
parent
commit
4ea7d027a7
2 changed files with 43 additions and 1 deletions
  1. +33
    -1
      XCode/libcacaXCode.xcodeproj/project.pbxproj
  2. +10
    -0
      caca/driver/slang.c

+ 33
- 1
XCode/libcacaXCode.xcodeproj/project.pbxproj View File

@@ -10,6 +10,18 @@
E6A7681710B560BB008B6DEC /* caca++.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "caca++.cpp"; path = "../cxx/caca++.cpp"; sourceTree = SOURCE_ROOT; };
E6A7681810B560BB008B6DEC /* caca++.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca++.h"; path = "../cxx/caca++.h"; sourceTree = SOURCE_ROOT; };
E6A7681910B560BB008B6DEC /* cxxtest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cxxtest.cpp; path = ../cxx/cxxtest.cpp; sourceTree = SOURCE_ROOT; };
E6A7681B10B561CE008B6DEC /* caca-canvas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "caca-canvas.c"; path = "../ruby/caca-canvas.c"; sourceTree = SOURCE_ROOT; };
E6A7681C10B561CE008B6DEC /* caca-canvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca-canvas.h"; path = "../ruby/caca-canvas.h"; sourceTree = SOURCE_ROOT; };
E6A7681D10B561CE008B6DEC /* caca-display.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "caca-display.c"; path = "../ruby/caca-display.c"; sourceTree = SOURCE_ROOT; };
E6A7681E10B561CE008B6DEC /* caca-display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca-display.h"; path = "../ruby/caca-display.h"; sourceTree = SOURCE_ROOT; };
E6A7681F10B561CE008B6DEC /* caca-dither.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "caca-dither.c"; path = "../ruby/caca-dither.c"; sourceTree = SOURCE_ROOT; };
E6A7682010B561CE008B6DEC /* caca-dither.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca-dither.h"; path = "../ruby/caca-dither.h"; sourceTree = SOURCE_ROOT; };
E6A7682110B561CE008B6DEC /* caca-event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "caca-event.c"; path = "../ruby/caca-event.c"; sourceTree = SOURCE_ROOT; };
E6A7682210B561CE008B6DEC /* caca-event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca-event.h"; path = "../ruby/caca-event.h"; sourceTree = SOURCE_ROOT; };
E6A7682310B561CE008B6DEC /* caca-font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "caca-font.c"; path = "../ruby/caca-font.c"; sourceTree = SOURCE_ROOT; };
E6A7682410B561CE008B6DEC /* caca-font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "caca-font.h"; path = "../ruby/caca-font.h"; sourceTree = SOURCE_ROOT; };
E6A7682510B561CE008B6DEC /* caca.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = caca.c; path = ../ruby/caca.c; sourceTree = SOURCE_ROOT; };
E6A7682610B561CE008B6DEC /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../ruby/common.h; sourceTree = SOURCE_ROOT; };
E6DB65F610AECC7800B6F924 /* attr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = attr.c; path = ../caca/attr.c; sourceTree = SOURCE_ROOT; };
E6DB65F710AECC7800B6F924 /* box.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = box.c; path = ../caca/box.c; sourceTree = SOURCE_ROOT; };
E6DB65F810AECC7800B6F924 /* caca_conio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = caca_conio.c; path = ../caca/caca_conio.c; sourceTree = SOURCE_ROOT; };
@@ -101,6 +113,7 @@
08FB7794FE84155DC02AAC07 /* XCode */ = {
isa = PBXGroup;
children = (
E6A7681A10B561B9008B6DEC /* ruby */,
E6A7681510B560AE008B6DEC /* cxx */,
E6DB66FA10B176D100B6F924 /* configure.ac */,
E6DB663A10AECDC500B6F924 /* examples */,
@@ -120,10 +133,30 @@
name = cxx;
sourceTree = "<group>";
};
E6A7681A10B561B9008B6DEC /* ruby */ = {
isa = PBXGroup;
children = (
E6A7681B10B561CE008B6DEC /* caca-canvas.c */,
E6A7681C10B561CE008B6DEC /* caca-canvas.h */,
E6A7681D10B561CE008B6DEC /* caca-display.c */,
E6A7681E10B561CE008B6DEC /* caca-display.h */,
E6A7681F10B561CE008B6DEC /* caca-dither.c */,
E6A7682010B561CE008B6DEC /* caca-dither.h */,
E6A7682110B561CE008B6DEC /* caca-event.c */,
E6A7682210B561CE008B6DEC /* caca-event.h */,
E6A7682310B561CE008B6DEC /* caca-font.c */,
E6A7682410B561CE008B6DEC /* caca-font.h */,
E6A7682510B561CE008B6DEC /* caca.c */,
E6A7682610B561CE008B6DEC /* common.h */,
);
name = ruby;
sourceTree = "<group>";
};
E6DB65F510AECC5800B6F924 /* caca */ = {
isa = PBXGroup;
children = (
E6DB670010B17BFC00B6F924 /* Makefile.am */,
E6DB65FF10AECC7800B6F924 /* caca.h */,
E6DB65F610AECC7800B6F924 /* attr.c */,
E6DB65F710AECC7800B6F924 /* box.c */,
E6DB65F810AECC7800B6F924 /* caca_conio.c */,
@@ -132,7 +165,6 @@
E6DB65FB10AECC7800B6F924 /* caca_stubs.h */,
E6DB65FC10AECC7800B6F924 /* caca_types.h */,
E6DB65FE10AECC7800B6F924 /* caca.c */,
E6DB65FF10AECC7800B6F924 /* caca.h */,
E6DB660210AECC7800B6F924 /* caca0.c */,
E6DB660310AECC7800B6F924 /* caca0.h */,
E6DB660410AECC7800B6F924 /* canvas.c */,


+ 10
- 0
caca/driver/slang.c View File

@@ -117,6 +117,12 @@ struct driver_private
char *term;
};

static void default_sigint (int sig)
{
/* Do nothing */
return;
}

static int slang_init_graphics(caca_display_t *dp)
{
dp->drv.p = malloc(sizeof(struct driver_private));
@@ -158,6 +164,10 @@ static int slang_init_graphics(caca_display_t *dp)
SLtt_set_mouse_mode(1, 0);
SLsmg_refresh();

/* Disable SLang's own SIGINT on ctrl-c */
SLang_set_abort_signal (default_sigint);
/* Disable scrolling so that hashmap scrolling optimization code
* does not cause ugly refreshes due to slow terminals */
SLtt_Term_Cannot_Scroll = 1;


Loading…
Cancel
Save