Replied: Mon, 20 Jan 1997 18:19:00 -0500
Replied: "Frank Kardel <kardel@Informatik.Uni-Erlangen.DE> "
Received: from snow-white.ee.udel.edu by whimsy.udel.edu id aa08036;
          19 Jan 97 16:52 GMT
Received: from Flinx.dialin.informatik.uni-erlangen.de (kardel.dialin.informatik.uni-erlangen.de [131.188.19.204]) by immd4.informatik.uni-erlangen.de with SMTP
	id RAA16177 (8.7.6/7.5b-FAU); for <stenn@whimsy.udel.edu>; Sun, 19 Jan 1997 17:51:58 +0100 (MET)
Received: by Flinx.dialin.informatik.uni-erlangen.de (Smail3.1.29.0 #8)
	id m0vm0Rr-0005vPC; Sun, 19 Jan 1997 17:50:23 +0100
Message-Id: <m0vm0Rr-0005vPC@Flinx.dialin.informatik.uni-erlangen.de>
Date: Sun, 19 Jan 1997 17:50:23 +0100
From: Frank Kardel <kardel@Informatik.Uni-Erlangen.DE>
To: Harlan Stenn <stenn@whimsy.udel.edu>
Subject: patch for 5.88.1


Hi,

here is another small patch (i fixed some bugs of 5.88.1 in respect to
parse).

Thanks,
  Frank

Index: ChangeLog
diff -c ChangeLog:1.1.1.5 ChangeLog:1.5
*** ChangeLog:1.1.1.5	Sun Jan 19 13:20:21 1997
--- ChangeLog	Sun Jan 19 15:08:53 1997
***************
*** 1,3 ****
--- 1,11 ----
+ Sun Jan 19 14:56:29 1997  Frank Kardel  <kardel@Informatik.Uni-Erlangen.DE>
+ 
+ 	* parseutil/dcfd.c (main): msyslog() is used for xntp code -
+  	dcfd.c is a standalone utility and thus not linked to libntp.a. So
+  	dcfd.c has to use syslog() directly.
+ 
+ 	* xntpd/refclock_parse.c: removed stream_nop(), parse_leap()
+ 
  Wed Jan 15 02:09:42 1997  Harlan Stenn  <stenn@whimsy.udel.edu>
  
  	* configure.in: For irix6, if -n{32,64} is not present in CFLAGS
Index: libparse/clk_computime.c
diff -c libparse/clk_computime.c:1.1.1.2 libparse/clk_computime.c:1.8
*** libparse/clk_computime.c:1.1.1.2	Sun Jan 19 13:09:34 1997
--- libparse/clk_computime.c	Sun Jan 19 13:44:35 1997
***************
*** 4,10 ****
  
  #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_COMPUTIME)
  /*
!  * clk_computime.c,v 1.7 1996/12/01 16:04:12 kardel Exp
   * 
   * Supports Diem's Computime Radio Clock
   * 
--- 4,10 ----
  
  #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_COMPUTIME)
  /*
!  * clk_computime.c,v 1.8 1997/01/19 12:44:35 kardel Exp
   * 
   * Supports Diem's Computime Radio Clock
   * 
***************
*** 128,133 ****
--- 128,136 ----
  
  /*
   * clk_computime.c,v
+  * Revision 1.8  1997/01/19 12:44:35  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 1.7  1996/12/01 16:04:12  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: libparse/clk_dcf7000.c
diff -c libparse/clk_dcf7000.c:1.1.1.15 libparse/clk_dcf7000.c:3.18
*** libparse/clk_dcf7000.c:1.1.1.15	Sun Jan 19 13:09:31 1997
--- libparse/clk_dcf7000.c	Sun Jan 19 13:44:36 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_dcf7000.c,v 3.17 1996/12/01 16:04:13 kardel Exp
   *  
!  * clk_dcf7000.c,v 3.17 1996/12/01 16:04:13 kardel Exp
   *
   * ELV DCF7000 module
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_dcf7000.c,v 3.18 1997/01/19 12:44:36 kardel Exp
   *  
!  * clk_dcf7000.c,v 3.18 1997/01/19 12:44:36 kardel Exp
   *
   * ELV DCF7000 module
   *
***************
*** 131,136 ****
--- 131,139 ----
   * History:
   *
   * clk_dcf7000.c,v
+  * Revision 3.18  1997/01/19 12:44:36  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.17  1996/12/01 16:04:13  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: libparse/clk_hopf6021.c
diff -c libparse/clk_hopf6021.c:1.1.1.5 libparse/clk_hopf6021.c:3.5
*** libparse/clk_hopf6021.c:1.1.1.5	Sun Jan 19 13:09:33 1997
--- libparse/clk_hopf6021.c	Sun Jan 19 13:44:37 1997
***************
*** 1,8 ****
  /*
   *
!  * /src/NTP/REPOSITORY/v4/libparse/clk_hopf6021.c,v 3.4 1996/11/24 20:09:43 kardel Exp
   *
!  * clk_hopf6021.c,v 3.4 1996/11/24 20:09:43 kardel Exp
   *
   * Radiocode Clocks HOPF Funkuhr 6021 mit serieller Schnittstelle
   * base code version from 24th Nov 1995 - history at end
--- 1,8 ----
  /*
   *
!  * /src/NTP/REPOSITORY/v4/libparse/clk_hopf6021.c,v 3.5 1997/01/19 12:44:37 kardel Exp
   *
!  * clk_hopf6021.c,v 3.5 1997/01/19 12:44:37 kardel Exp
   *
   * Radiocode Clocks HOPF Funkuhr 6021 mit serieller Schnittstelle
   * base code version from 24th Nov 1995 - history at end
***************
*** 220,225 ****
--- 220,228 ----
   * History:
   *
   * clk_hopf6021.c,v
+  * Revision 3.5  1997/01/19 12:44:37  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.4  1996/11/24 20:09:43  kardel
   * RELEASE_5_86_12_2 reconcilation
   *
Index: libparse/clk_meinberg.c
diff -c libparse/clk_meinberg.c:1.1.1.18 libparse/clk_meinberg.c:3.23
*** libparse/clk_meinberg.c:1.1.1.18	Sun Jan 19 13:09:25 1997
--- libparse/clk_meinberg.c	Sun Jan 19 13:44:38 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_meinberg.c,v 3.22 1996/12/01 16:04:14 kardel Exp
   *  
!  * clk_meinberg.c,v 3.22 1996/12/01 16:04:14 kardel Exp
   *
   * Meinberg clock support
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_meinberg.c,v 3.23 1997/01/19 12:44:38 kardel Exp
   *  
!  * clk_meinberg.c,v 3.23 1997/01/19 12:44:38 kardel Exp
   *
   * Meinberg clock support
   *
***************
*** 457,462 ****
--- 457,465 ----
   * History:
   *
   * clk_meinberg.c,v
+  * Revision 3.23  1997/01/19 12:44:38  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.22  1996/12/01 16:04:14  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: libparse/clk_rawdcf.c
diff -c libparse/clk_rawdcf.c:1.1.1.18 libparse/clk_rawdcf.c:3.23
*** libparse/clk_rawdcf.c:1.1.1.18	Sun Jan 19 13:09:29 1997
--- libparse/clk_rawdcf.c	Sun Jan 19 13:44:39 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_rawdcf.c,v 3.22 1996/12/01 16:04:15 kardel Exp
   *  
!  * clk_rawdcf.c,v 3.22 1996/12/01 16:04:15 kardel Exp
   *
   * Raw DCF77 pulse clock support
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_rawdcf.c,v 3.23 1997/01/19 12:44:39 kardel Exp
   *  
!  * clk_rawdcf.c,v 3.23 1997/01/19 12:44:39 kardel Exp
   *
   * Raw DCF77 pulse clock support
   *
***************
*** 540,545 ****
--- 540,548 ----
   * History:
   *
   * clk_rawdcf.c,v
+  * Revision 3.23  1997/01/19 12:44:39  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.22  1996/12/01 16:04:15  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: libparse/clk_rcc8000.c
diff -c libparse/clk_rcc8000.c:1.1.1.7 libparse/clk_rcc8000.c:3.5
*** libparse/clk_rcc8000.c:1.1.1.7	Sun Jan 19 13:09:32 1997
--- libparse/clk_rcc8000.c	Sun Jan 19 13:44:40 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_rcc8000.c,v 3.4 1996/11/24 20:09:45 kardel Exp
   *  
!  * clk_rcc8000.c,v 3.4 1996/11/24 20:09:45 kardel Exp
   *
   * Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_rcc8000.c,v 3.5 1997/01/19 12:44:40 kardel Exp
   *  
!  * clk_rcc8000.c,v 3.5 1997/01/19 12:44:40 kardel Exp
   *
   * Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
   *
***************
*** 134,139 ****
--- 134,142 ----
   * History:
   *
   * clk_rcc8000.c,v
+  * Revision 3.5  1997/01/19 12:44:40  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.4  1996/11/24 20:09:45  kardel
   * RELEASE_5_86_12_2 reconcilation
   *
Index: libparse/clk_schmid.c
diff -c libparse/clk_schmid.c:1.1.1.17 libparse/clk_schmid.c:3.22
*** libparse/clk_schmid.c:1.1.1.17	Sun Jan 19 13:09:26 1997
--- libparse/clk_schmid.c	Sun Jan 19 13:44:41 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_schmid.c,v 3.21 1996/12/01 16:04:15 kardel Exp
   *  
!  * clk_schmid.c,v 3.21 1996/12/01 16:04:15 kardel Exp
   *
   * Schmid clock support
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_schmid.c,v 3.22 1997/01/19 12:44:41 kardel Exp
   *  
!  * clk_schmid.c,v 3.22 1997/01/19 12:44:41 kardel Exp
   *
   * Schmid clock support
   *
***************
*** 177,182 ****
--- 177,185 ----
   * History:
   *
   * clk_schmid.c,v
+  * Revision 3.22  1997/01/19 12:44:41  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.21  1996/12/01 16:04:15  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: libparse/clk_trimtaip.c
diff -c libparse/clk_trimtaip.c:1.1.1.6 libparse/clk_trimtaip.c:1.4
*** libparse/clk_trimtaip.c:1.1.1.6	Sun Jan 19 13:09:32 1997
--- libparse/clk_trimtaip.c	Sun Jan 19 13:44:41 1997
***************
*** 1,5 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_trimtaip.c,v 1.3 1996/11/24 20:09:47 kardel Exp
   *
   * Trimble SV6 clock support
   */
--- 1,5 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_trimtaip.c,v 1.4 1997/01/19 12:44:41 kardel Exp
   *
   * Trimble SV6 clock support
   */
***************
*** 117,122 ****
--- 117,125 ----
   * History:
   *
   * clk_trimtaip.c,v
+  * Revision 1.4  1997/01/19 12:44:41  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 1.3  1996/11/24 20:09:47  kardel
   * RELEASE_5_86_12_2 reconcilation
   *
Index: libparse/clk_trimtsip.c
diff -c libparse/clk_trimtsip.c:1.1.1.6 libparse/clk_trimtsip.c:1.7
*** libparse/clk_trimtsip.c:1.1.1.6	Sun Jan 19 13:09:30 1997
--- libparse/clk_trimtsip.c	Sun Jan 19 13:44:42 1997
***************
*** 1,5 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_trimtsip.c,v 1.6 1996/12/01 12:59:10 kardel Exp
   *
   * Trimble TSIP support - CURRENTLY VERY MUCH UNDER CONSTRUCTION
   */
--- 1,5 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/clk_trimtsip.c,v 1.7 1997/01/19 12:44:42 kardel Exp
   *
   * Trimble TSIP support - CURRENTLY VERY MUCH UNDER CONSTRUCTION
   */
***************
*** 496,501 ****
--- 496,504 ----
   * History:
   *
   * clk_trimtsip.c,v
+  * Revision 1.7  1997/01/19 12:44:42  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 1.6  1996/12/01 12:59:10  kardel
   * appropriate casts for conversion routine parameters
   *
Index: libparse/parse.c
diff -c libparse/parse.c:1.1.1.22 libparse/parse.c:3.42
*** libparse/parse.c:1.1.1.22	Sun Jan 19 13:09:27 1997
--- libparse/parse.c	Sun Jan 19 15:37:19 1997
***************
*** 1,17 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/parse.c,v 3.40 1996/12/01 16:04:16 kardel Exp
   *  
!  * parse.c,v 3.40 1996/12/01 16:04:16 kardel Exp
   *
   * Parser module for reference clock
   *
   * PARSEKERNEL define switches between two personalities of the module
!  * if PARSEKERNEL is defined this module can be used with dcf77sync.c as
!  * a PARSEKERNEL kernel module. In this case the time stamps will be
   * a struct timeval.
   * when PARSEKERNEL is not defined NTP time stamps will be used.
   *
!  * Copyright (c) 1992,1993,1994,1995,1996 by Frank Kardel
   * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
   *                                    
   * This program is distributed in the hope that it will be useful,
--- 1,17 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/parse.c,v 3.42 1997/01/19 14:37:19 kardel Exp
   *  
!  * parse.c,v 3.42 1997/01/19 14:37:19 kardel Exp
   *
   * Parser module for reference clock
   *
   * PARSEKERNEL define switches between two personalities of the module
!  * if PARSEKERNEL is defined this module can be used
!  * as kernel module. In this case the time stamps will be
   * a struct timeval.
   * when PARSEKERNEL is not defined NTP time stamps will be used.
   *
!  * Copyright (c) 1992,1993,1994,1995,1996, 1997 by Frank Kardel
   * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
   *                                    
   * This program is distributed in the hope that it will be useful,
***************
*** 37,43 ****
  #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
  
  #if	!(defined(lint) || defined(__GNUC__))
! static char rcsid[] = "parse.c,v 3.40 1996/12/01 16:04:16 kardel Exp";
  #endif
  
  #include <sys/types.h>
--- 37,43 ----
  #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
  
  #if	!(defined(lint) || defined(__GNUC__))
! static char rcsid[] = "parse.c,v 3.42 1997/01/19 14:37:19 kardel Exp";
  #endif
  
  #include <sys/types.h>
***************
*** 1094,1099 ****
--- 1094,1105 ----
   * History:
   *
   * parse.c,v
+  * Revision 3.42  1997/01/19 14:37:19  kardel
+  * fixed comments
+  *
+  * Revision 3.41  1997/01/19 12:44:43  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.40  1996/12/01 16:04:16  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: libparse/parse_conf.c
diff -c libparse/parse_conf.c:1.1.1.15 libparse/parse_conf.c:3.24
*** libparse/parse_conf.c:1.1.1.15	Sun Jan 19 13:09:24 1997
--- libparse/parse_conf.c	Sun Jan 19 13:44:45 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/parse_conf.c,v 3.23 1996/12/01 16:04:17 kardel Exp
   *  
!  * parse_conf.c,v 3.23 1996/12/01 16:04:17 kardel Exp
   *
   * Parser configuration module for reference clocks
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/libparse/parse_conf.c,v 3.24 1997/01/19 12:44:45 kardel Exp
   *  
!  * parse_conf.c,v 3.24 1997/01/19 12:44:45 kardel Exp
   *
   * Parser configuration module for reference clocks
   *
***************
*** 117,122 ****
--- 117,125 ----
   * History:
   *
   * parse_conf.c,v
+  * Revision 3.24  1997/01/19 12:44:45  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.23  1996/12/01 16:04:17  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
Index: parseutil/dcfd.c
diff -c parseutil/dcfd.c:1.1.1.12 parseutil/dcfd.c:3.30
*** parseutil/dcfd.c:1.1.1.12	Sun Jan 19 13:09:59 1997
--- parseutil/dcfd.c	Sun Jan 19 15:41:15 1997
***************
*** 1,19 ****
  /*
!  * /src/NTP/REPOSITORY/v4/parseutil/dcfd.c,v 3.27 1996/12/01 16:05:02 kardel Exp
   *  
!  * dcfd.c,v 3.27 1996/12/01 16:05:02 kardel Exp
   *
   * DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
   *
   * Features:
   *  DCF77 decoding
!  *  NTP loopfilter logic for local clock
   *  interactive display for debugging
   *
   * Lacks:
   *  Leap second handling (at that level you should switch to xntp3 - really!)
   *
!  * Copyright (C) 1993,1994,1995,1996 by Frank Kardel
   * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
   *                                    
   * This program is distributed in the hope that it will be useful,
--- 1,19 ----
  /*
!  * /src/NTP/REPOSITORY/v4/parseutil/dcfd.c,v 3.30 1997/01/19 14:41:15 kardel Exp
   *  
!  * dcfd.c,v 3.30 1997/01/19 14:41:15 kardel Exp
   *
   * DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
   *
   * Features:
   *  DCF77 decoding
!  *  simple NTP loopfilter logic for local clock
   *  interactive display for debugging
   *
   * Lacks:
   *  Leap second handling (at that level you should switch to xntp3 - really!)
   *
!  * Copyright (C) 1993, 1994, 1995, 1996, 1997 by Frank Kardel
   * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
   *                                    
   * This program is distributed in the hope that it will be useful,
***************
*** 40,45 ****
--- 40,46 ----
  /*
   * NTP compilation environment
   */
+ #include "l_stdlib.h"
  #ifdef USE_PROTOTYPES
  #include "ntp_stdlib.h"
  extern int sigvec P((int, struct sigvec *, struct sigvec *));
***************
*** 343,349 ****
  
  /*-----------------------------------------------------------------------
   * extract a bitfield from DCF77 datastream
!  * All numeric field are LSB first.
   * buf holds a pointer to a DCF77 data buffer in symbolic
   *     representation
   * idx holds the index to the field description in rawdcfcode
--- 344,350 ----
  
  /*-----------------------------------------------------------------------
   * extract a bitfield from DCF77 datastream
!  * All numeric fields are LSB first.
   * buf holds a pointer to a DCF77 data buffer in symbolic
   *     representation
   * idx holds the index to the field description in rawdcfcode
***************
*** 889,895 ****
      return;
  
    LPRINTF("set_time: %s ", pr_timeval(offset));
!   msyslog(LOG_NOTICE, "setting time (offset %s)", pr_timeval(offset));
  
    if (gettimeofday(&the_time, 0L) == -1)
      {
--- 890,896 ----
      return;
  
    LPRINTF("set_time: %s ", pr_timeval(offset));
!   syslog(LOG_NOTICE, "setting time (offset %s)", pr_timeval(offset));
  
    if (gettimeofday(&the_time, 0L) == -1)
      {
***************
*** 1080,1086 ****
  	   * completely lost information
  	   */
  	  sync_state = NO_SYNC;
! 	  msyslog(LOG_INFO, "DCF77 reception lost (timeout)");
  	  last_notice = ticks;
  	}
        else
--- 1081,1087 ----
  	   * completely lost information
  	   */
  	  sync_state = NO_SYNC;
! 	  syslog(LOG_INFO, "DCF77 reception lost (timeout)");
  	  last_notice = ticks;
  	}
        else
***************
*** 1089,1095 ****
  	 */
  	if ((ticks - last_notice) > NOTICE_INTERVAL)
  	  {
! 	    msyslog(LOG_NOTICE, "still not synchronized to DCF77 - check receiver/signal");
  	    last_notice = ticks;
  	  }
      }
--- 1090,1096 ----
  	 */
  	if ((ticks - last_notice) > NOTICE_INTERVAL)
  	  {
! 	    syslog(LOG_NOTICE, "still not synchronized to DCF77 - check receiver/signal");
  	    last_notice = ticks;
  	  }
      }
***************
*** 1100,1134 ****
  }
  
  /*-----------------------------------------------------------------------
!  * break association from terminal to avaoid catching terminal
   * or process group related signals (-> daemon operation)
   */
  static void detach()
  {
!   int s;
  
!   if (fork())
!     exit(0);
  
!   for (s = 0; s < 3; s++)
!     (void) close(s);
!   (void) open("/", 0);
!   (void) dup2(0, 1);
!   (void) dup2(0, 2);
! 
! #if defined(NTP_POSIX_SOURCE) || defined(_POSIX_)
!   (void) setsid();
! #else  /* _POSIX_ */
! #ifndef BSD
!   (void) setpgrp();
! #else  /* BSD */
!   (void) setpgrp(0, getpid());
! #endif /* BSD */
! #endif /* _POSIX_ */
! #if defined(hpux)
!   if (fork())
!     exit(0);
! #endif /* hpux */
  }
  
  /*-----------------------------------------------------------------------
--- 1101,1167 ----
  }
  
  /*-----------------------------------------------------------------------
!  * break association from terminal to avoid catching terminal
   * or process group related signals (-> daemon operation)
   */
  static void detach()
  {
! #   ifdef HAVE_DAEMON
!       daemon(0, 0);
! #   else /* not HAVE_DAEMON */
!       if (fork())
! 	exit(0);
  
!       {
! 	u_long s;
! 	int max_fd;
! 
! #if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
! 	max_fd = sysconf(_SC_OPEN_MAX);
! #else /* HAVE_SYSCONF && _SC_OPEN_MAX */
! 	max_fd = getdtablesize();
! #endif /* HAVE_SYSCONF && _SC_OPEN_MAX */
! 	for (s = 0; s < max_fd; s++)
! 	  (void) close(s);
! 	(void) open("/", 0);
! 	(void) dup2(0, 1);
! 	(void) dup2(0, 2);
! #ifdef SYS_DOMAINOS
! 	{
! 	  uid_$t puid;
! 	  status_$t st;
! 
! 	  proc2_$who_am_i(&puid);
! 	  proc2_$make_server(&puid, &st);
! 	}
! #endif /* SYS_DOMAINOS */
! #if defined(HAVE_SETPGID) || defined(HAVE_SETSID)
! # ifdef HAVE_SETSID
! 	if (setsid() == (pid_t)-1)
! 	  syslog(LOG_ERR, "dcfd: setsid(): %m");
! # else
! 	if (setpgid(0, 0) == -1)
! 	  syslog(LOG_ERR, "dcfd: setpgid(): %m");
! # endif
! #else /* HAVE_SETPGID || HAVE_SETSID */
! 	{
! 	  int fid;
  
! 	  fid = open("/dev/tty", 2);
! 	  if (fid >= 0)
! 	    {
! 	      (void) ioctl(fid, (u_long) TIOCNOTTY, (char *) 0);
! 	      (void) close(fid);
! 	    }
! # ifdef HAVE_SETPGRP_O
! 	  (void) setpgrp();
! # else /* HAVE_SETPGRP_0 */
! 	  (void) setpgrp(0, getpid());
! # endif /* HAVE_SETPGRP_0 */
! 	}
! #endif /* HAVE_SETPGID || HAVE_SETSID */
!       }
! #endif /* not HAVE_DAEMON */
  }
  
  /*-----------------------------------------------------------------------
***************
*** 1312,1319 ****
  
        memset(term.c_cc, 0, sizeof(term.c_cc));
        term.c_cc[VMIN] = 1;
! #ifdef NO_PARENB_IGNPAR /* Was: defined(SYS_IRIX4) || defined(SYS_IRIX5) */
!       /* somehow doesn't grok PARENB & IGNPAR (mj) */
        term.c_cflag = B50|CS8|CREAD|CLOCAL;
  #else
        term.c_cflag = B50|CS8|CREAD|CLOCAL|PARENB;
--- 1345,1351 ----
  
        memset(term.c_cc, 0, sizeof(term.c_cc));
        term.c_cc[VMIN] = 1;
! #ifdef NO_PARENB_IGNPAR
        term.c_cflag = B50|CS8|CREAD|CLOCAL;
  #else
        term.c_cflag = B50|CS8|CREAD|CLOCAL|PARENB;
***************
*** 1335,1341 ****
  	detach();
        
        /*
!        * get msyslog() initialized
         */
  #ifdef LOG_DAEMON
        openlog("dcfd", LOG_PID, LOG_DAEMON);
--- 1367,1373 ----
  	detach();
        
        /*
!        * get syslog() initialized
         */
  #ifdef LOG_DAEMON
        openlog("dcfd", LOG_PID, LOG_DAEMON);
***************
*** 1356,1362 ****
  
  	if (sigvec(SIGALRM, &vec, (struct sigvec *)0) == -1)
  	  {
! 	    msyslog(LOG_ERR, "sigvec(SIGALRM): %m");
  	    exit(1);
  	  }
        }
--- 1388,1394 ----
  
  	if (sigvec(SIGALRM, &vec, (struct sigvec *)0) == -1)
  	  {
! 	    syslog(LOG_ERR, "sigvec(SIGALRM): %m");
  	    exit(1);
  	  }
        }
***************
*** 1375,1381 ****
  	
        if (setitimer(ITIMER_REAL, &it, (struct itimerval *)0) == -1)
  	{
! 	  msyslog(LOG_ERR, "setitimer: %m");
  	  exit(1);
  	}
        }
--- 1407,1413 ----
  	
        if (setitimer(ITIMER_REAL, &it, (struct itimerval *)0) == -1)
  	{
! 	  syslog(LOG_ERR, "setitimer: %m");
  	  exit(1);
  	}
        }
***************
*** 1383,1389 ****
        (void) alarm(1<<ADJINTERVAL);
  #endif
  
!       PRINTF("  DCF77 monitor - Copyright 1993-1996 Frank Kardel\n\n");
  
        pbuf[60] = '\0';
        for ( i = 0; i < 60; i++)
--- 1415,1421 ----
        (void) alarm(1<<ADJINTERVAL);
  #endif
  
!       PRINTF("  DCF77 monitor - Copyright (C) 1993 - 1997 by Frank Kardel\n\n");
  
        pbuf[60] = '\0';
        for ( i = 0; i < 60; i++)
***************
*** 1433,1439 ****
  		      if (sync_state == SYNC)
  			{
  			  sync_state = NO_SYNC;
! 			  msyslog(LOG_INFO, "DCF77 reception lost (bad data)");
  			}
  		      errs++;
  		    }
--- 1465,1471 ----
  		      if (sync_state == SYNC)
  			{
  			  sync_state = NO_SYNC;
! 			  syslog(LOG_INFO, "DCF77 reception lost (bad data)");
  			}
  		      errs++;
  		    }
***************
*** 1498,1504 ****
  		      if (sync_state == SYNC)
  			{
  			  sync_state = NO_SYNC;
! 			  msyslog(LOG_INFO, "DCF77 reception lost (data mismatch)");
  			}
  		      errs++;
  		      rtc = CVT_FAIL|CVT_BADTIME|CVT_BADDATE;
--- 1530,1536 ----
  		      if (sync_state == SYNC)
  			{
  			  sync_state = NO_SYNC;
! 			  syslog(LOG_INFO, "DCF77 reception lost (data mismatch)");
  			}
  		      errs++;
  		      rtc = CVT_FAIL|CVT_BADTIME|CVT_BADDATE;
***************
*** 1520,1526 ****
  		      last_sync = ticks;
  		      if (sync_state == NO_SYNC)
  			{
! 			  msyslog(LOG_INFO, "receiving DCF77");
  			}
  		      else
  			{
--- 1552,1558 ----
  		      last_sync = ticks;
  		      if (sync_state == NO_SYNC)
  			{
! 			  syslog(LOG_INFO, "receiving DCF77");
  			}
  		      else
  			{
***************
*** 1587,1593 ****
        /*
         * lost IO - sorry guys
         */
!       msyslog(LOG_ERR, "TERMINATING - cannot read from device %s (%m)", file);
  
        (void)close(fd);
      }
--- 1619,1625 ----
        /*
         * lost IO - sorry guys
         */
!       syslog(LOG_ERR, "TERMINATING - cannot read from device %s (%m)", file);
  
        (void)close(fd);
      }
Index: xntpd/ntp_proto.c
diff -c xntpd/ntp_proto.c:1.1.1.45 xntpd/ntp_proto.c:3.46
*** xntpd/ntp_proto.c:1.1.1.45	Sun Jan 19 13:22:08 1997
--- xntpd/ntp_proto.c	Sun Jan 19 13:45:35 1997
***************
*** 511,518 ****
  	} else {
  #ifdef DEBUG
  		if (debug > 2)
! 			printf("receive: bad length %d %d\n",
! 			    rbufp->recv_length, (int) sizeof(struct pkt));
  #endif
  		sys_badlength++;
  		return;
--- 511,518 ----
  	} else {
  #ifdef DEBUG
  		if (debug > 2)
! 			printf("receive: bad length %d %ld\n",
! 			    rbufp->recv_length, sizeof(struct pkt));
  #endif
  		sys_badlength++;
  		return;
Index: xntpd/refclock_parse.c
diff -c xntpd/refclock_parse.c:1.1.1.30 xntpd/refclock_parse.c:3.98
*** xntpd/refclock_parse.c:1.1.1.30	Sun Jan 19 13:10:41 1997
--- xntpd/refclock_parse.c	Sun Jan 19 15:11:59 1997
***************
*** 1,7 ****
  /*
!  * /src/NTP/REPOSITORY/v4/xntpd/refclock_parse.c,v 3.96 1996/12/01 16:05:49 kardel Exp
   *
!  * refclock_parse.c,v 3.96 1996/12/01 16:05:49 kardel Exp
   *
   * generic reference clock driver for receivers
   *
--- 1,7 ----
  /*
!  * /src/NTP/REPOSITORY/v4/xntpd/refclock_parse.c,v 3.98 1997/01/19 14:11:59 kardel Exp
   *
!  * refclock_parse.c,v 3.98 1997/01/19 14:11:59 kardel Exp
   *
   * generic reference clock driver for receivers
   *
***************
*** 9,15 ****
   * available and configured. Currently the STREAMS module
   * is only available for Suns running SunOS 4.x and SunOS5.x
   *
!  * Copyright (c) 1989,1990,1991,1992,1993,1994,1995,1996 by Frank Kardel
   * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
   *
   * This program is distributed in the hope that it will be useful,
--- 9,15 ----
   * available and configured. Currently the STREAMS module
   * is only available for Suns running SunOS 4.x and SunOS5.x
   *
!  * Copyright (c) 1989,1990,1991,1992,1993,1994,1995,1996, 1997 by Frank Kardel
   * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
   *
   * This program is distributed in the hope that it will be useful,
***************
*** 144,150 ****
  #include "parse.h"
  
  #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
! static char rcsid[]="refclock_parse.c,v 3.96 1996/12/01 16:05:49 kardel Exp";
  #endif
  
  /**===========================================================================
--- 144,150 ----
  #include "parse.h"
  
  #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
! static char rcsid[]="refclock_parse.c,v 3.98 1997/01/19 14:11:59 kardel Exp";
  #endif
  
  /**===========================================================================
***************
*** 1238,1244 ****
  static int  ppsclock_init   P((struct parseunit *));
  static int  stream_init     P((struct parseunit *));
  static void stream_end      P((struct parseunit *));
- static void stream_nop      P((struct parseunit *));
  static int  stream_enable   P((struct parseunit *));
  static int  stream_disable  P((struct parseunit *));
  static int  stream_setcs    P((struct parseunit *, parsectl_t *));
--- 1238,1243 ----
***************
*** 1433,1447 ****
  }
  
  /*--------------------------------------------------
-  * STREAM nop
-  */
- static void
- stream_nop(parse)
-      struct parseunit *parse;
- {
- }
- 
- /*--------------------------------------------------
   * STREAM enable
   */
  static int
--- 1432,1437 ----
***************
*** 3128,3149 ****
  }
  
  /*--------------------------------------------------
-  * parse_leap - called when a leap second occurs
-  */
- 
- static void
- parse_leap()
- {
- 	/*
- 	 * PARSE encodes the LEAP correction direction.
- 	 * For timecodes that do not pass on the leap correction direction
- 	 * the default PARSEB_LEAPADD must be used. It may then be modified
- 	 * with a fudge flag (flag2).
- 	 */
- }
- 
- 
- /*--------------------------------------------------
   * parse_control - set fudge factors, return statistics
   */
  static void
--- 3118,3123 ----
***************
*** 3371,3377 ****
        sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
  
        tt = add_var(&out->kv_list, 128, RO);
!       sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.96 1996/12/01 16:05:49 kardel Exp\"");
  
        out->lencode       = strlen(outstatus);
        out->lastcode      = outstatus;
--- 3345,3351 ----
        sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
  
        tt = add_var(&out->kv_list, 128, RO);
!       sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.98 1997/01/19 14:11:59 kardel Exp\"");
  
        out->lencode       = strlen(outstatus);
        out->lastcode      = outstatus;
***************
*** 4266,4271 ****
--- 4240,4251 ----
   * History:
   *
   * refclock_parse.c,v
+  * Revision 3.98  1997/01/19 14:11:59  kardel
+  * removed superfluous functions
+  *
+  * Revision 3.97  1997/01/19 12:46:01  kardel
+  * 3-5.88.1 reconcilation
+  *
   * Revision 3.96  1996/12/01 16:05:49  kardel
   * freeze for 5.86.12.2 PARSE-Patch
   *
