[956] in SIPB bug reports

home help back first fref pref prev next nref lref last post

ANSI C changes for xrn sources; X event handling

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Wed Mar 14 17:54:37 1990

Date: Wed, 14 Mar 90 17:53:50 -0500
From: Ken Raeburn <Raeburn@ATHENA.MIT.EDU>
To: bug-sipb@ATHENA.MIT.EDU

The following changes will make xrn compile under gcc.  The problem
was a completely botched use of stdarg.h.

*** orig/mesg.h Sun Dec 10 00:34:54 1989
--- mesg.h      Wed Mar 14 17:08:20 1990
***************
*** 40,46 ****
--- 40,50 ----

  extern void info(/* char *msg */);
  extern void infoNow(/* char *msg */);
+ #if defined(__STDC__) && !defined(NOSTDHDRS)
+ extern void mesgPane(int /*type*/, char * /*fmtString*/, ...);
+ #else
  extern void mesgPane(/* int type, char *fmtString, args */);
+ #endif

  extern char error_buffer[2048];

*** orig/mesg.c	Wed Feb 28 04:12:47 1990
--- mesg.c	Wed Mar 14 17:06:22 1990
***************
*** 52,58 ****
  #include "xrn.h"
  #include "mesg.h"
  #if defined(__STDC__) && !defined(NOSTDHDRS)
! #include <stdargs.h>
  #else
  #include <varargs.h>
  #endif
--- 52,58 ----
  #include "xrn.h"
  #include "mesg.h"
  #if defined(__STDC__) && !defined(NOSTDHDRS)
! #include <stdarg.h>
  #else
  #include <varargs.h>
  #endif
***************
*** 115,125 ****
  
  /*ARGSUSED*/
  /*VARARGS2*/
  void
  mesgPane(type, fmtString, va_alist)
  int type;		/* XRN_INFO, XRN_SERIOUS */
  char *fmtString;
! va_dcl
  /*
   * brings up a new vertical pane, not moded
   *
--- 115,132 ----
  
  /*ARGSUSED*/
  /*VARARGS2*/
+ #if defined(__STDC__) && !defined(NOSTDHDRS)
  void
+ mesgPane(int type, char *fmtString, ...)
+ #else
+ void
  mesgPane(type, fmtString, va_alist)
  int type;		/* XRN_INFO, XRN_SERIOUS */
  char *fmtString;
! #endif
! #if !defined(__STDC__) || defined(NOSTDHDRS)
!     va_dcl
! #endif
  /*
   * brings up a new vertical pane, not moded
   *

[end of patch]

It seems to work well, though I've only tried reading a few groups, no
posts.

The solution xrn has to dealing with X events while waiting for a
subprocess (i.e., not to do so) seems rather poor.  If it could at
least deal with exposure events, it would be much better than it is
now.  (Exposure events plus an `abort edit' button would be even
better.)

home help back first fref pref prev next nref lref last post