]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Many files:
authorHarlan Stenn <stenn@ntp.org>
Tue, 22 Jun 1999 07:19:32 +0000 (07:19 -0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 22 Jun 1999 07:19:32 +0000 (07:19 -0000)
  * include/ntp_machine.h: Removed superfluous yy/mm/dd comments.
  * include/ntpd.h: Likewise.
  * libntp/authencrypt.c: Likewise.
  * libntp/a_md5encrypt.c: Likewise.
  * libntp/caljulian.c: Likewise.
  * libntp/ymd2yd.c: Likewise.
  * libntp/syssignal.c: Likewise.
  * libntp/ymd2yd.c: Likewise.
  * ntpd/ntp_control.c: Likewise.
  * ntpd/ntp_io.c: Likewise.
  * ntpd/ntp_timer.c: Likewise.
  * ntpdate/ntpdate.c: Likewise.
  * ntpq/ntpq_ops.c: Likewise.
  * ntpd/ntp_peer.c (findpeer): Wrap debug output in DEBUG/debug.
  From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
  * dot.emacs: Removed wrong indentation of substatements.
  Wrap in c-style.
  From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>

bk: 376f39045S3MqheL4yFUBgoqGTcVUg

15 files changed:
ChangeLog
dot.emacs
include/ntp_machine.h
include/ntpd.h
libntp/a_md5encrypt.c
libntp/authencrypt.c
libntp/caljulian.c
libntp/syssignal.c
libntp/ymd2yd.c
ntpd/ntp_control.c
ntpd/ntp_io.c
ntpd/ntp_peer.c
ntpd/ntp_timer.c
ntpdate/ntpdate.c
ntpq/ntpq_ops.c

index 5073f02ddf5f23864741e955ce78077c9093b128..d64b6cc559a9d7b74b0b09549bcf2172b1073460 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 1999-06-22  Harlan Stenn  <stenn@whimsy.udel.edu>
 
+       * include/ntp_machine.h: Removed superfluous yy/mm/dd comments.
+       * include/ntpd.h: Likewise.
+       * libntp/authencrypt.c: Likewise.
+       * libntp/a_md5encrypt.c: Likewise.
+       * libntp/caljulian.c: Likewise.
+       * libntp/ymd2yd.c: Likewise.
+       * libntp/syssignal.c: Likewise.
+       * libntp/ymd2yd.c: Likewise.
+       * ntpd/ntp_control.c: Likewise.
+       * ntpd/ntp_io.c: Likewise.
+       * ntpd/ntp_timer.c: Likewise.
+       * ntpdate/ntpdate.c: Likewise.
+       * ntpq/ntpq_ops.c: Likewise.
+       * ntpd/ntp_peer.c (findpeer): Wrap debug output in DEBUG/debug.
+       From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+       * dot.emacs: Removed wrong indentation of substatements.
+       Wrap in c-style.
+       From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
        * ntpd/refclock_palisade.c: Patches from Marc Brett
        * ntpd/refclock_palisade.h: Ditto.
        * util/hist.c: Ditto.
index 3a6b14a7130c1e5558ee6fe2d219e0eb7542659d..e4f507f6284a61f8c880299ccd44c2c155a0ee27 100644 (file)
--- a/dot.emacs
+++ b/dot.emacs
@@ -1,9 +1,18 @@
 ;; This is how Dave Mills likes to see the code formatted.
-(setq c-basic-offset   8)
-(c-set-offset 'arglist-intro   +)
-(c-set-offset 'case-label      *)
-(c-set-offset 'statement-case-intro *)
-(c-set-offset 'statement-cont  *)
-(c-set-offset 'substatement    *)
-(c-set-offset 'substatement-open 0)
+
+(defconst ntp-c-style
+  '((c-basic-offset . 8)
+    (c-offsets-alist . ((arglist-intro +)
+                       (case-label     *)
+                       (statement-case-intro *)
+                       (statement-cont *)
+                       (substatement-open 0))))
+  "Dave L. Mills; programming style for use with ntp")
+
+(defun ntp-c-mode-common-hook ()
+  ;; add ntp c style
+  (c-add-style "ntp" ntp-c-style nil))
+
+(add-hook 'c-mode-common-hook 'ntp-c-mode-common-hook)
+
 ;; 1997112600
index 086b84db12b735e7ead22c7ebeb2dc78e547e55f..5d3275657a8468e1f3c7463b958abb5f648ae77e 100644 (file)
@@ -232,15 +232,15 @@ typedef unsigned long u_long;
  */
 #if defined(SYS_WINNT)
 #if !defined(HAVE_CONFIG_H)
-# define MCAST                                 /* Enable Multicast Support */                                                                                                                  /*      98/06/01  */
-# undef  OPEN_BCAST_SOCKET             /* for  ntp_io.c */                                                                                                                                     /*      98/06/01  *//*  98/06/03  */
-# undef  UDP_WILDCARD_DELIVERY /* for  ntp_io.c */                                                                                                                                     /*      98/06/01  */
+# define MCAST                                 /* Enable Multicast Support */
+# undef  OPEN_BCAST_SOCKET             /* for  ntp_io.c */
+# undef  UDP_WILDCARD_DELIVERY /* for  ntp_io.c */
 # define REFCLOCK                              /* from ntpd.mak */
 # define CLOCK_LOCAL                   /* from ntpd.mak */
-# define CLOCK_SHM                             /* from ntpd.mak */                                                                                                                                     /*      98/06/01  */
-# define CLOCK_PALISADE                                /* from ntpd.mak */                                                                                                                                     /*      98/06/26  */
-# undef  DES                                   /* from libntp.mak */                                                                                                                                   /*      98/05/28  */
-# undef  MD5                                   /* from libntp.mak */                                                                                                                                   /*      98/05/28  */
+# define CLOCK_SHM                             /* from ntpd.mak */
+# define CLOCK_PALISADE                                /* from ntpd.mak */
+# undef  DES                                   /* from libntp.mak */
+# undef  MD5                                   /* from libntp.mak */
 # define NTP_LITTLE_ENDIAN             /* from libntp.mak */
 # define SYSLOG_FILE                   /* from libntp.mak */
 # define HAVE_PROTOTYPES               /* from ntpq.mak */
@@ -282,7 +282,7 @@ typedef unsigned long u_long;
 # include <winbase.h>
 # undef interface
 typedef char *caddr_t;
-void PASCAL alarming P((UINT,UINT,DWORD,DWORD,DWORD));                                                                                                                                         /*      98/06/03  */
+void PASCAL alarming P((UINT,UINT,DWORD,DWORD,DWORD));
 #endif /* SYS_WINNT */
 
 int ntp_set_tod P((struct timeval *tvp, void *tzp));
index 71a5bd0e0ee1543e20f579cc9aca9b014feed080..9de1531fb28028a0cfe500a801c6ff0ccac2304e 100644 (file)
@@ -20,8 +20,8 @@ void  worker_thread   (void *);
 #define TARGET_RESOLUTION 1  /* Try for 1-millisecond accuracy.
                                                          * used in ntp_timer.c
                                                          */
-extern DWORD units_per_tick;                                                                                                                                                                                   /*      98/05/28  *//*  98/05/29  */
-extern long  adj_precision;                                                                                                                                                                                    /*      98/05/28  *//*  98/05/29  */
+extern DWORD units_per_tick;
+extern long  adj_precision;
 #else
 #define closesocket close
 #endif /* SYS_WINNT */
index 18343f7563ab9dc472353fdd5f0abec0861b2d50..5c380355209597c86f69b4d5d5078de2b1b3fce4 100644 (file)
@@ -7,9 +7,9 @@
  * the US and foreign countries. Further information is available at
  * www.rsa.com.
  */
-                                                                                                                                                                                                                                               /*      98/05/28  */
-#include "ntp_machine.h"                                                                                                /*  98/05/28  */
-                                                                                                                                                                                                                                               /*      98/05/28  */
+
+#include "ntp_machine.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
index cca5f9e6665bfb58a4cc6d030eb41de52310822b..f0f30232cabf27c087ab4781f1cf9fb17ff24618 100644 (file)
@@ -7,9 +7,9 @@
  * included in the rsaref2.0 package available from RSA in the US and
  * foreign countries. Further information is available at www.rsa.com.
  */
-                                                                                                                                                                                                                                               /*      98/05/28  */
-#include "ntp_machine.h"                                                                                                /*  98/05/28  */
-                                                                                                                                                                                                                                               /*      98/05/28  */
+
+#include "ntp_machine.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
index e36f978cf4d641ddd2f8853300f824c225936f1a..948bb1c57dd834b186289da40b056d7c090ee104 100644 (file)
@@ -51,10 +51,10 @@ caljulian(
         * Do the easy stuff first: take care of hh:mm:ss, ignoring leap
         * seconds
         */
-       jt->second = (u_char)(ntptime % SECSPERMIN);                                                                                                                                            /*      98/06/04  */
+       jt->second = (u_char)(ntptime % SECSPERMIN);
        minutes    = ntptime / SECSPERMIN;
-       jt->minute = (u_char)(minutes % MINSPERHR);                                                                                                                                             /*      98/06/04  */
-       jt->hour   = (u_char)((minutes / MINSPERHR) % HRSPERDAY);                                                                                                                       /*      98/06/04  */
+       jt->minute = (u_char)(minutes % MINSPERHR);
+       jt->hour   = (u_char)((minutes / MINSPERHR) % HRSPERDAY);
 
        /*
         * Find the day past 1900/01/01 00:00 UTC
@@ -72,8 +72,8 @@ caljulian(
        /*
         * Calculate the year and year-of-day
         */
-       jt->yearday = (u_short)(1 + d4%DAYSPERYEAR);                                                                                                                                            /*      98/06/04  */
-       jt->year        = (u_short)(400*n400 + 100*n100 + n4*4 + n1);                                                                                                                   /*      98/06/04  */
+       jt->yearday = (u_short)(1 + d4%DAYSPERYEAR);
+       jt->year        = (u_short)(400*n400 + 100*n100 + n4*4 + n1);
 
        if (n100 == 4 || n1 == 4)
        {
index 34f39fdd18598555e75695ddd226eb08fcf560c8..612d1203bbaed363672b5e480199ba2dee9b32fa 100644 (file)
@@ -103,13 +103,13 @@ signal_no_reset(
        RETSIGTYPE (*func) (int)
        )
 {
-#ifdef SIG_ERR                                                                                                                                                                                                                 /*      98/06/04  */
-       if (SIG_ERR == signal(sig, func)) {                                                                                                                                                             /*      98/06/04  */
-#else                                                                                                                                                                                                                                  /*      98/06/04  */
-       int n;                                                                                                                                                                                                                          /*      98/06/04  */
-       n = signal(sig, func);                                                                                                                                                                                          /*      98/06/04  */
-       if (n == -1) {                                                                                                                                                                                                          /*      98/06/04  */
-#endif                                                                                                                                                                                                                                 /*      98/06/04  */
+#ifdef SIG_ERR
+       if (SIG_ERR == signal(sig, func)) {
+#else
+       int n;
+       n = signal(sig, func);
+       if (n == -1) {
+#endif
                perror("signal");
                exit(1);
        }
index 78773ffc260590a73700f49a3df88515c446149a..796ce40948bdb7ab5eda1919d4858d8109f11f7d 100644 (file)
@@ -25,10 +25,10 @@ ymd2yd(
        if (m < 1 || m > 12 || d < 1)
                return (-1);
 
-       if (((y%4 == 0) && (y%100 != 0)) || (y%400 == 0))                                                                                                                                       /*      98/06/04  */
-               t = day2tab;    /* leap year */                                                                                                                                                                 /*      98/06/04  */
+       if (((y%4 == 0) && (y%100 != 0)) || (y%400 == 0))
+               t = day2tab;    /* leap year */
        else
-               t = day1tab;    /* not a leap year */                                                                                                                                                   /*      98/06/04  */
+               t = day1tab;    /* not a leap year */
        if (d > t[m - 1])
                return (-1);
        for (i = 0; i < m - 1; i++)
index 607d7033de538ee756c7a7fd19ec75b6a6550353..5a23f041388a0665d4ae4fa8e4bffb272529df2b 100644 (file)
@@ -1148,9 +1148,9 @@ ctl_putsys(
        )
 {
        l_fp tmp;
-#ifdef HAVE_UNAME                                                                                                                                                                                                              /*      98/06/04  */
+#ifdef HAVE_UNAME
        char str[50];
-#endif                                                                                                                                                                                                                                 /*      98/06/04  */
+#endif
 
        switch (varid) {
                case CS_LEAP:
index f0d61cb4782d8c34bdd9c3bf67424547c4894022..f50573d2c9acb430535f90d6c80e16c3b96aca1f 100644 (file)
@@ -32,8 +32,8 @@
 #if _BSDI_VERSION >= 199510
 # include <ifaddrs.h>
 #endif
-/*     98/06/01  */
-#include "ntp_machine.h"       /*  98/06/01  */
+
+#include "ntp_machine.h"
 #include "ntpd.h"
 #include "ntp_select.h"
 #include "ntp_io.h"
@@ -491,11 +491,10 @@ create_sockets(
            (ifr->ifr_addr.sa_family != AF_INET)
 # endif /* VMS+UCX */
            continue;
-               /*      98/06/02  */
                ifreq = *ifr;
-               inter_list[i].flags = 0; /*     98/06/02  */
+               inter_list[i].flags = 0;
                /* is it broadcast capable? */
-# ifndef SYS_WINNT             /*      98/06/03  */
+# ifndef SYS_WINNT
 #  ifdef STREAMS_TLI
                ioc.ic_cmd = SIOCGIFFLAGS;
                ioc.ic_timout = 0;
@@ -640,7 +639,6 @@ create_sockets(
                inter_list[i].mask.sin_addr.s_addr = inet_addr(ifreq.ifr_mask);
 # endif /* not SYS_WINNT */
 
-               /*      98/06/03  */
                /*
                 * look for an already existing source interface address.  If
                 * the machine has multiple point to point interfaces, then
@@ -659,8 +657,7 @@ create_sockets(
        }
        closesocket(vs);
 #endif /* _BSDI_VERSION >= 199510 */
-       /*      98/06/03  */
-       /*      98/06/03  */
+
        ninterfaces = i;
        maxactivefd = 0;
        FD_ZERO(&activefds);
@@ -757,7 +754,7 @@ io_setbclient(void)
                inter_list[i].bcast.sin_addr.s_addr = htonl(INADDR_ANY);
 #endif
 #ifdef OPEN_BCAST_SOCKET /* Was: !SYS_DOMAINOS && !SYS_LINUX */
-               inter_list[i].bfd = open_socket(&inter_list[i].bcast, INT_BROADCAST, 1);                                                                                /*      98/06/01  */
+               inter_list[i].bfd = open_socket(&inter_list[i].bcast, INT_BROADCAST, 1);
                inter_list[i].flags |= INT_BCASTOPEN;
 #endif
        }
@@ -1160,7 +1157,7 @@ findbcastinter(
        struct sockaddr_in *addr
        )
 {
-#if defined(SIOCGIFCONF) || defined(SYS_WINNT) /*      98/06/03  */
+#if defined(SIOCGIFCONF) || defined(SYS_WINNT)
        register int i;
        register u_int32 netnum;
 
@@ -1315,7 +1312,7 @@ sendpkt(
            inter = any_interface;
 #ifdef DEBUG
        if (debug > 1)
-           printf("%ssendpkt(fd=%d dst=%s, src=%s, ttl=%d, len=%d)\n",                                                     /*  98/06/03  */
+           printf("%ssendpkt(fd=%d dst=%s, src=%s, ttl=%d, len=%d)\n",
                   (ttl >= 0) ? "\tMCAST\t*****" : "",
                   inter->fd, ntoa(dest),
                   ntoa(&inter->sin), ttl, len);
@@ -1585,7 +1582,7 @@ input_handler(
                                                 * on the wild card socket, just dump the
                                                 * packet.
                                                 */
-                                               if ( /* 98/06/02  */
+                                               if (
 #ifdef UDP_WILDCARD_DELIVERY
                                /*
                                 * these guys manage to put properly addressed
@@ -1599,7 +1596,7 @@ input_handler(
        {
                char buf[RX_BUFF_SIZE];
                struct sockaddr from;
-               /*      98/06/02  */
+
                fromlen = sizeof from;
                (void) recvfrom(fd, buf, sizeof(buf), 0, &from, &fromlen);
 #ifdef DEBUG
@@ -2426,11 +2423,11 @@ get_winnt_interfaces(
        DWORD sizeofsubnetmasks = 10000;
        char bindservicenames[1000];
        DWORD sizeofbindnames = 1000;
-       DWORD enableDhcp;                                                                                                                                                                                                       /*      98/06/01  */
-       DWORD sizeofenable = sizeof(DWORD);                                                                                                                                                             /*      98/06/01  */
-       char *ipkeyname;                                                                                                                                                                                                        /*      98/06/01  */
-       char *maskkeyname;                                                                                                                                                                                                      /*      98/06/01  */
-       long ip, broad;                                                                                                                                                                                                         /*      98/06/02  */
+       DWORD enableDhcp;
+       DWORD sizeofenable = sizeof(DWORD);
+       char *ipkeyname;
+       char *maskkeyname;
+       long ip, broad;
 
        char oneIpAddress[16];
        char oneSubNetMask[16];
@@ -2474,7 +2471,7 @@ get_winnt_interfaces(
        onenetcard = bindservicenames;
        while(1)
        {
-               onenetcard = onenetcard + 8;    /* skip /Device/ prefix on the service name */                                                                  /*      98/06/01  */
+               onenetcard = onenetcard + 8;    /* skip /Device/ prefix on the service name */
                if      ((onenetcard < (bindservicenames + sizeofbindnames)) &&
                         (sscanf(onenetcard,"%s",servicename) != EOF))
                {
@@ -2521,55 +2518,55 @@ get_winnt_interfaces(
                        }
                        else
                        { /* ok it is a network card */
-                               /* check for DHCP */                                                                                                                                                                    /*      98/06/01  */
-                               sizeofenable = sizeof(DWORD);                                                                                                                                                   /*      98/06/01  */
-                               bSuccess =                                                                                                                                                                                              /*      98/06/01  */
-                                   RegQueryValueEx(hksub,                /* subkey handle                        */                                                                            /*      98/06/01  */
-                                                   "EnableDHCP",         /* value name               */                                        /*  98/06/01  */
-                                                   NULL,                                 /* must be zero                         */                                                                            /*      98/06/01  */
-                                                   NULL,                                 /* value type not required  */                                                                                /*      98/06/01  */
-                                                   (LPBYTE)&enableDhcp,  /* address of value data        */                                                                            /*      98/06/01  */
-                                                   &sizeofenable);       /* length of value data         */                                                                            /*      98/06/01  */
-                               if(bSuccess != ERROR_SUCCESS)                                                                                                                                                   /*      98/06/01  */
-                               {                                                                                                                                                                                                               /*      98/06/01  */
-                                       msyslog(LOG_ERR, "Error in RegQueryValueEx fetching EnableDHCP parameter: %m");                     /*  98/06/01  */
-                                       RegCloseKey(hksub);                                                                                                                                                             /*      98/06/01  */
-                                       return -1;                                                                                                                                                                                      /*      98/06/01  */
-                               }                                                                                                                                                                                                               /*      98/06/01  */
-                               /*      98/06/01  */
-                               if (enableDhcp) {                                                                                                                                                                               /*      98/06/01  */
-                                       ipkeyname       = "DhcpIpAddress";                                                                      /*  98/06/01  */
-                                       maskkeyname = "DhcpSubNetMask";                                                                     /*  98/06/01  */
-                               }                                                                                                                                                                                                               /*      98/06/01  */
-                               else {                                                                                                                                                                                                  /*      98/06/01  */
-                                       ipkeyname       = "IpAddress";                                                                          /*  98/06/01  */
-                                       maskkeyname = "SubNetMask";                                                                         /*  98/06/01  */
-                               }                                                                                                                                                                                                               /*      98/06/01  */
-                               /* ok now get the ipaddress */                                                                                                                                                  /*      98/06/01  */
+                               /* check for DHCP */
+                               sizeofenable = sizeof(DWORD);
+                               bSuccess =
+                                   RegQueryValueEx(hksub,                /* subkey handle                        */
+                                                   "EnableDHCP",         /* value name               */
+                                                   NULL,                                 /* must be zero                         */
+                                                   NULL,                                 /* value type not required  */
+                                                   (LPBYTE)&enableDhcp,  /* address of value data        */
+                                                   &sizeofenable);       /* length of value data         */
+                               if(bSuccess != ERROR_SUCCESS)
+                               {
+                                       msyslog(LOG_ERR, "Error in RegQueryValueEx fetching EnableDHCP parameter: %m");
+                                       RegCloseKey(hksub);
+                                       return -1;
+                               }
+
+                               if (enableDhcp) {
+                                       ipkeyname       = "DhcpIpAddress";
+                                       maskkeyname = "DhcpSubNetMask";
+                               }
+                               else {
+                                       ipkeyname       = "IpAddress";
+                                       maskkeyname = "SubNetMask";
+                               }
+                               /* ok now get the ipaddress */
                                sizeofipaddresses = 10000;
                                bSuccess =
-                                   RegQueryValueEx(hksub,                /* subkey handle                        */                                                                            /*      98/06/01  */
-                                                   ipkeyname,                    /* value name                           */                                                                            /*      98/06/01  */
-                                                   NULL,                                 /* must be zero                         */                                                                            /*      98/06/01  */
-                                                   NULL,                                 /* value type not required  */                                                                                /*      98/06/01  */
-                                                   (LPBYTE)&IpAddresses, /* address of value data        */                                                                            /*      98/06/01  */
-                                                   &sizeofipaddresses);  /* length of value data         */                                                                            /*      98/06/01  */
+                                   RegQueryValueEx(hksub,                /* subkey handle                        */
+                                                   ipkeyname,                    /* value name                           */
+                                                   NULL,                                 /* must be zero                         */
+                                                   NULL,                                 /* value type not required  */
+                                                   (LPBYTE)&IpAddresses, /* address of value data        */
+                                                   &sizeofipaddresses);  /* length of value data         */
                                if(bSuccess != ERROR_SUCCESS)
                                {
                                        msyslog(LOG_ERR, "Error in RegQueryValueEx fetching IpAddress parameter: %m");
                                        RegCloseKey(hksub);
                                        return -1;
                                }
-                               /*      98/06/01  */
-                               /* ok now get the subnetmask */                                                                                                                                                 /*      98/06/01  */
+
+                               /* ok now get the subnetmask */
                                sizeofsubnetmasks = 10000;
                                bSuccess =
-                                   RegQueryValueEx(hksub,                /* subkey handle                        */                                                                            /*      98/06/01  */
-                                                   maskkeyname,                  /* value name                           */                                                                            /*      98/06/01  */
-                                                   NULL,                                 /* must be zero                         */                                                                            /*      98/06/01  */
-                                                   NULL,                                 /* value type not required  */                                                                                /*      98/06/01  */
-                                                   (LPBYTE)&SubNetMasks, /* address of value data        */                                                                            /*      98/06/01  */
-                                                   &sizeofsubnetmasks);  /* length of value data         */                                                                            /*      98/06/01  */
+                                   RegQueryValueEx(hksub,                /* subkey handle                        */
+                                                   maskkeyname,                  /* value name                           */
+                                                   NULL,                                 /* must be zero                         */
+                                                   NULL,                                 /* value type not required  */
+                                                   (LPBYTE)&SubNetMasks, /* address of value data        */
+                                                   &sizeofsubnetmasks);  /* length of value data         */
                                if(bSuccess != ERROR_SUCCESS)
                                {
                                        msyslog(LOG_ERR, "Error in RegQueryValueEx fetching SubNetMask parameter: %m");
@@ -2580,7 +2577,7 @@ get_winnt_interfaces(
                                RegCloseKey(hksub);
                                /* ok now that we have some addresses and subnet masks go through each one and add to our structure... */
                                /* multi_sz strings are terminated by two \0 in a row */
-                               /* however, the dhcp strings are not multi_sz, they are just plain strings */                                                   /*      98/06/01  */
+                               /* however, the dhcp strings are not multi_sz, they are just plain strings */
 
                                ipptr = IpAddresses;
                                subptr = SubNetMasks;
@@ -2598,13 +2595,13 @@ get_winnt_interfaces(
                                        /* now add to interface structure */
                                        if (!Done)
                                        {
-                                               ifr   = (struct ifreq *)ifc_buffer;                                                                                                                     /*      98/06/02  */
-                                               ip        = inet_addr(oneIpAddress);                                                                                                                            /*      98/06/01  *//*  98/06/02  */
-                                               broad = ~inet_addr(oneSubNetMask) | ip;                                                                                                                 /*      98/06/01  *//*  98/06/02  */
+                                               ifr   = (struct ifreq *)ifc_buffer;
+                                               ip        = inet_addr(oneIpAddress);
+                                               broad = ~inet_addr(oneSubNetMask) | ip;
                                                ifr->ifr_addr.sa_family = AF_INET;
-                                               ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr = ip;                                                                   /*      98/06/01  */
-                                               ifr->ifr_broadaddr.sa_family = AF_INET;                                                                                                                 /*      98/06/01  */
-                                               ((struct sockaddr_in *)&ifr->ifr_broadaddr)->sin_addr.s_addr = broad;                                                   /*      98/06/01  */
+                                               ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr = ip;
+                                               ifr->ifr_broadaddr.sa_family = AF_INET;
+                                               ((struct sockaddr_in *)&ifr->ifr_broadaddr)->sin_addr.s_addr = broad;
                                                strcpy(ifr->ifr_mask,oneSubNetMask);
 
                                                if (strlen(servicename) > 15)
@@ -2612,9 +2609,9 @@ get_winnt_interfaces(
                                                else strcpy(ifr->ifr_name,servicename);
 
                                                /* now increment pointer */
-                                               ifc_buffer += sizeof(struct ifreq);                                                                                                                     /*      98/06/02  */
+                                               ifc_buffer += sizeof(struct ifreq);
                                                ++count;
-                                               if (((char *)ipptr == '\0') || ((char *)subptr == '\0') || (enableDhcp))                        /*  98/06/01  */
+                                               if (((char *)ipptr == '\0') || ((char *)subptr == '\0') || (enableDhcp))
                                                    Done = 1;
                                        }
                                }
@@ -2622,24 +2619,23 @@ get_winnt_interfaces(
                } /* it is/not a temporary ndiswan name */
        } /* end of loop  */
 
-       /*      98/06/02  */
-       /* add the loopback interface */                                                                                                                                                                        /*      98/06/02  */
-       ifr   = (struct ifreq *)ifc_buffer;                                                                                                                                                             /*      98/06/02  */
-       ip        = inet_addr("127.0.0.1");                                                                                     /*  98/06/01  *//*  98/06/02  */
-       broad = ~inet_addr("255.0.0.0") | ip;                                                                               /*  98/06/01  *//*  98/06/02  */
-       ifr->ifr_addr.sa_family = AF_INET;                                                                                                                                                                      /*      98/06/02  */
-       ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr = ip;                                                                                                           /*      98/06/01  *//*  98/06/02  */
-       ifr->ifr_broadaddr.sa_family = AF_INET;                                                                                                                                                         /*      98/06/01  *//*  98/06/02  */
-       ((struct sockaddr_in *)&ifr->ifr_broadaddr)->sin_addr.s_addr = broad;                                                                                           /*      98/06/01  *//*  98/06/02  */
-       strcpy(ifr->ifr_mask,"255.0.0.0");                                                                                  /*  98/06/02  */
-       strcpy(ifr->ifr_name,"loopback");                                                                                   /*  98/06/02  */
-       /*      98/06/02  */
-       /* now increment pointer */                                                                                                                                                                             /*      98/06/02  */
-       ifc_buffer += sizeof(struct ifreq);                                                                                                                                                             /*      98/06/02  */
-       ++count;                                                                                                                                                                                                                        /*      98/06/02  */
-       /*      98/06/02  */
+       /* add the loopback interface */
+       ifr   = (struct ifreq *)ifc_buffer;
+       ip        = inet_addr("127.0.0.1");
+       broad = ~inet_addr("255.0.0.0") | ip;
+       ifr->ifr_addr.sa_family = AF_INET;
+       ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr = ip;
+       ifr->ifr_broadaddr.sa_family = AF_INET;
+       ((struct sockaddr_in *)&ifr->ifr_broadaddr)->sin_addr.s_addr = broad;
+       strcpy(ifr->ifr_mask,"255.0.0.0");
+       strcpy(ifr->ifr_name,"loopback");
+
+       /* now increment pointer */
+       ifc_buffer += sizeof(struct ifreq);
+       ++count;
+
        /* now reset the length */
-       ifc->ifc_len = count * (sizeof(struct ifreq));                                                                                                                                          /*      98/06/02  */
+       ifc->ifc_len = count * (sizeof(struct ifreq));
        return 0;
 }
 
index 8257ab6cfedd49b5c0e41262eef20b864d1d40aa..d8e5d9f8f29ec996a4036d9dce2d8f5ec21ac500 100644 (file)
@@ -302,11 +302,17 @@ findpeer(
                }
        }
 
-printf("pkt_mode %d action %d\n", pkt_mode, *action);
+#ifdef DEBUG
+       if (debug)
+               printf("pkt_mode %d action %d\n", pkt_mode, *action);
+#endif
        /* if no matching association is found */
        if (peer == 0) {
                *action = MATCH_ASSOC(NO_PEER, pkt_mode);
-printf("pkt_mode %d action %d\n", pkt_mode, *action);
+#ifdef DEBUG
+               if (debug)
+                       printf("pkt_mode %d action %d\n", pkt_mode, *action);
+#endif
                return (struct peer *)0;
        }
 
index 11f18b0c534ad3b876165b05dc2614a4f03eae4d..e685047c2888d156bface862f7dc28dae5cdaa77 100644 (file)
@@ -12,7 +12,7 @@
 #include <signal.h>
 #include <sys/signal.h>
 
-#include "ntp_machine.h"                                                                                                /*  98/06/03  */
+#include "ntp_machine.h"
 #include "ntpd.h"
 #include "ntp_stdlib.h"
 
@@ -92,7 +92,7 @@ init_timer(void)
        extern HANDLE hMutex;
        UINT wTimerRes, wTimerID;
 # endif /* SYS_WINNT */
-#if defined(SYS_CYGWIN32) || defined(SYS_WINNT)                                                                                                                                                /*      98/06/03  */
+#if defined(SYS_CYGWIN32) || defined(SYS_WINNT)
        HANDLE hToken;
        TOKEN_PRIVILEGES tkp;
 #endif
@@ -239,24 +239,24 @@ timer(void)
 {
        register struct peer *peer, *next_peer;
        int n;
-#ifdef SYS_WINNT                                                                                                                                                                                                               /*      98/05/29  */
-       extern HANDLE hMutex;                                                                                                                                                                                           /*      98/06/03  */
-       DWORD dwWaitResult;                                                                                                                                                                                             /*      98/06/03  */
-                                                                                                                                                                                                                                               /*      98/06/03  */
-       dwWaitResult = WaitForSingleObject(                                                                                                                                                             /*      98/06/03  */
-               hMutex,         /* handle of mutex */                                                                                                                                                           /*      98/06/03  */
-               5000L); /* five-second time-out interval */                                                                                                                                     /*      98/06/03  */
-                                                                                                                                                                                                                                               /*      98/06/03  */
-       switch (dwWaitResult) {                                                                                                                                                                                         /*      98/06/03  */
-               case WAIT_OBJECT_0:                                                                                                                                                                                     /*      98/06/03  */
-                       /* The thread got mutex ownership. */                                                                                                                                           /*      98/06/03  */
-                       break;                                                                                                                                                                                                          /*      98/06/03  */
-               default:                                                                                                                                                                                                                /*      98/06/03  */
-                       /* Cannot get mutex ownership due to time-out. */                                                                                                                       /*      98/06/03  */
-                       msyslog(LOG_ERR, "timer() cannot obtain mutex: %m\n");                                                      /*  98/06/03  */
-                       exit(1);                                                                                                                                                                                                        /*      98/06/03  */
-       }                                                                                                                                                                                                                                       /*      98/06/03  */
-#endif                                                                                                                                                                                                                                 /*      98/05/29  */
+#ifdef SYS_WINNT
+       extern HANDLE hMutex;
+       DWORD dwWaitResult;
+
+       dwWaitResult = WaitForSingleObject(
+               hMutex,         /* handle of mutex */
+               5000L); /* five-second time-out interval */
+
+       switch (dwWaitResult) {
+               case WAIT_OBJECT_0:
+                       /* The thread got mutex ownership. */
+                       break;
+               default:
+                       /* Cannot get mutex ownership due to time-out. */
+                       msyslog(LOG_ERR, "timer() cannot obtain mutex: %m\n");
+                       exit(1);
+       }
+#endif
 
        current_time += (1<<EVENT_TIMEOUT);
 
@@ -267,12 +267,12 @@ timer(void)
                adjust_timer += 1;
                adj_host_clock();
        }
-                                                                                                                                                                                                                                               /*      98/05/29  */
-#ifdef SYS_WINNT                                                                                                                                                                                                               /*      98/05/29  */
-       if (!ReleaseMutex(hMutex)) {                                                                                                                                                                            /*      98/05/29  */
-               msyslog(LOG_ERR, "timer() cannot release mutex: %m\n");                                                         /*  98/05/29  *//*  98/06/03  */
-               exit(1);                                                                                                                                                                                                                /*      98/05/29  */
-       }                                                                                                                                                                                                                                       /*      98/05/29  */
+
+#ifdef SYS_WINNT
+       if (!ReleaseMutex(hMutex)) {
+               msyslog(LOG_ERR, "timer() cannot release mutex: %m\n");
+               exit(1);
+       }
 #endif /* SYS_WINNT */
 
        /*
index 0d6bdb962c9e9c4583dc478962a491589d29abf2..9f6cb024bda192908ff9b3fe9a1636bebee8531e 100644 (file)
@@ -27,8 +27,8 @@
 # include <sys/time.h>
 # include <sys/resource.h>
 
-#else                                                                                                                                                                                                                                  /*      98/05/28  */
-# include <sys/time.h>                                                                                                                                                                                                 /*      98/05/28  */
+#else
+# include <sys/time.h>
 #endif /* SYS_WINNT */
 
 #ifdef SYS_VXWORKS
@@ -195,7 +195,7 @@ static      struct server *clock_select P((void));
 static int clock_adjust        P((void));
 static void    addserver       P((char *));
 static struct server *findserver P((struct sockaddr_in *));
-               void    timer           P((void));                                                                                                                                                                      /*      98/06/03  */
+               void    timer           P((void));
 static void    init_alarm      P((void));
 #ifndef SYS_WINNT
 static RETSIGTYPE alarming P((int));
@@ -213,10 +213,10 @@ static    int getnetnum   P((const char *, u_int32 *));
 static void    printserver P((struct server *, FILE *));
 
 #ifdef SYS_WINNT
-int    on = 1;                                                                                                                                                                                                                 /*      98/06/03  */
-WORD   wVersionRequested;                                                                                                                                                                                              /*      98/06/03  */
-WSADATA wsaData;                                                                                                                                                                                                               /*      98/06/03  */
-HANDLE TimerThreadHandle = NULL;                                                                                                                                                                               /*      98/06/03  */
+int    on = 1;
+WORD   wVersionRequested;
+WSADATA wsaData;
+HANDLE TimerThreadHandle = NULL;
 #endif /* SYS_WINNT */
 
 #ifdef NO_MAIN_ALLOWED
@@ -1358,7 +1358,7 @@ init_alarm(void)
 #if defined SYS_CYGWIN32 || defined SYS_WINNT
        HANDLE hToken;
        TOKEN_PRIVILEGES tkp;
-       DWORD dwUser = 0;                                                                                                                                                                                                       /*      98/05/28  */
+       DWORD dwUser = 0;
 #endif /* SYS_WINNT */
 
        alarm_flag = 0;
index c57367ef1f0250634188cc74ca21c63c773fd2e9..2386976dddfb5147fb1bd07e8b14ddf6941f59c4 100644 (file)
@@ -179,7 +179,7 @@ char flash2[] = " .+*    "; /* flash decode for version 2 */
 char flash3[] = " x.-+#*o"; /* flash decode for peer status version 3 */
 
 struct varlist {
-       const char *name;                                                                                                                                                                                                               /*      98/06/04  */
+       const char *name;
        char *value;
 } varlist[MAXLIST] = { { 0, 0 } };