[BACK]Return to cdkscreen.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / othersrc / dist / cdk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /othersrc/dist/cdk/cdkscreen.c between version 1.1.1.1 and 1.2

version 1.1.1.1, 2001/01/04 19:58:24 version 1.2, 2004/04/02 16:11:17
Line 1 
Line 1 
 #include <cdk.h>  #include <cdk.h>
 #include <signal.h>  
   
 /*  /*
  * $Author$   * $Author$
Line 7 
Line 6 
  * $Revision$   * $Revision$
  */   */
   
 static void segvTrap (int sig);  
   
 static boolean validObjType(EObjectType type)  static boolean validObjType(EObjectType type)
 {  {
    switch (type) {     switch (type) {
Line 56  CDKSCREEN *initCDKScreen(WINDOW *window)
Line 53  CDKSCREEN *initCDKScreen(WINDOW *window)
    CDKSCREEN *screen = (CDKSCREEN *)malloc (sizeof(CDKSCREEN));     CDKSCREEN *screen = (CDKSCREEN *)malloc (sizeof(CDKSCREEN));
    int x;     int x;
   
    /* Set signal trap handlers. */  
    signal (SIGSEGV, segvTrap);  
    signal (SIGBUS, segvTrap);  
   
    /* Set up basic curses settings. */     /* Set up basic curses settings. */
    noecho();     noecho();
    cbreak();     cbreak();
Line 261  void endCDK(void)
Line 254  void endCDK(void)
    XCursesExit();     XCursesExit();
 #endif  #endif
 }  }
   
 /*  
  * This is the function called when we trap a SEGV or a BUS error.  
  */  
 static void segvTrap (int sig)  
 {  
    static int nested;  
    if (!nested++)  
    {  
       endCDK();  
       printf ("core dumped. your fault! (signal %d)\n", sig);  
    }  
    abort();  
 }  

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

CVSweb <webmaster@jp.NetBSD.org>