[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xwpe Debug Quit



> > stop itself before exit just disappears.  Since I don't particularly
> > like that behavior I didn't remove it.  A better solution in my opinion
> > would be to send a terminate signal to the xterm.
> 
> I agree. My solution worked but was dirty. Could you please implement your
> suggestion to send out that terminate signal in version 28a? I don't
> particularly like programs that tend to freeze.

Alright.  Here's a patch to do it.

Dennis Payne
dulsi@identicalsoftware.com

diff -u -r xwpe-1.5.27a-orig/edit.h xwpe-1.5.27a/edit.h
--- xwpe-1.5.27a-orig/edit.h	Sat Mar 23 01:51:03 2002
+++ xwpe-1.5.27a/edit.h	Tue Apr  9 22:01:46 2002
@@ -743,6 +743,7 @@
 int e_d_dum_read(void);
 int e_d_p_exec(FENSTER *f);
 int e_d_getchar(void);
+int e_d_quit_basic(FENSTER *f);
 int e_d_quit(FENSTER *f);
 int e_d_add_watch(char *str, FENSTER *f);
 int e_remove_all_watches(FENSTER *f);
diff -u -r xwpe-1.5.27a-orig/we_debug.c xwpe-1.5.27a/we_debug.c
--- xwpe-1.5.27a-orig/we_debug.c	Fri Mar 22 18:32:37 2002
+++ xwpe-1.5.27a/we_debug.c	Tue Apr  9 22:01:46 2002
@@ -429,9 +429,8 @@
   return(0);
 }
 
-int e_d_quit(FENSTER *f)
+int e_d_quit_basic(FENSTER *f)
 {
- ECNT *cn = f->ed;
  int i, kbdflgs;
 
  if (rfildes[1] >= 0)
@@ -490,6 +489,13 @@
    e_d_switch_out(0);
   }
  }
+}
+
+int e_d_quit(FENSTER *f)
+{
+ ECNT *cn = f->ed;
+ int i;
+ e_d_quit_basic(f);
  e_d_p_message(e_d_msg[ERR_ENDDEBUG], f, 1);
  WpeMouseChangeShape(WpeEditingShape);
  e_d_delbreak(f);
diff -u -r xwpe-1.5.27a-orig/we_fl_fkt.c xwpe-1.5.27a/we_fl_fkt.c
--- xwpe-1.5.27a-orig/we_fl_fkt.c	Fri Mar 22 18:32:36 2002
+++ xwpe-1.5.27a/we_fl_fkt.c	Tue Apr  9 22:01:46 2002
@@ -219,11 +219,7 @@
 #ifdef DEBUGGER
  extern int rfildes[], e_d_swtch;
 
- if (e_d_swtch)
- {
-  write(rfildes[1], "q\ny\n", 4);
-  e_d_swtch = 0;
- }
+ e_d_quit_basic(f);
 #endif
  for (i = cn->mxedt; i > 0; i--)
  {