~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to parseutil/dcfd.c

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-10-11 16:10:27 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041011161027-icyjbji8ujym633o
Tags: 1:4.2.0a-10ubuntu2
Use ntp.ubuntulinux.org instead of pool.ntp.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
#define dprintf(_x_)
109
109
#endif
110
110
 
 
111
#ifdef DECL_ERRNO
111
112
     extern int errno;
 
113
#endif
112
114
 
113
115
/*
114
116
 * display received data (avoids also detaching from tty)
175
177
 */
176
178
#define DCFB_ANNOUNCE           0x0001 /* switch time zone warning (DST switch) */
177
179
#define DCFB_DST                0x0002 /* DST in effect */
178
 
#define DCFB_LEAP               0x0004 /* LEAP warning (1 hour prior to occurence) */
 
180
#define DCFB_LEAP               0x0004 /* LEAP warning (1 hour prior to occurrence) */
179
181
#define DCFB_ALTERNATE          0x0008 /* alternate antenna used */
180
182
 
181
183
struct clocktime                /* clock time broken up from time code */
728
730
 * convert a wall clock time description of DCF77 to a Unix time (seconds
729
731
 * since 1.1. 1970 UTC)
730
732
 */
731
 
time_t
 
733
static time_t
732
734
dcf_to_unixtime(
733
735
                clocktime_t   *clock_time,
734
736
                unsigned *cvtrtc
1083
1085
 */
1084
1086
static void
1085
1087
tick(
1086
 
     void
 
1088
     int signum
1087
1089
     )
1088
1090
{
1089
1091
        static unsigned long last_notice = 0;
1217
1219
 * check_y2k() - internal check of Y2K logic
1218
1220
 *      (a lot of this logic lifted from ../ntpd/check_y2k.c)
1219
1221
 */
1220
 
int
 
1222
static int
1221
1223
check_y2k( void )
1222
1224
1223
1225
    int  year;                  /* current working year */
1562
1564
                }
1563
1565
 
1564
1566
                /*
1565
 
                 * loose terminal if in daemon operation
 
1567
                 * lose terminal if in daemon operation
1566
1568
                 */
1567
1569
                if (!interactive)
1568
1570
                    detach();
1798
1800
                                        /*
1799
1801
                                         * output interpreted DCF77 data
1800
1802
                                         */
1801
 
                                        PRINTF(offsets ? "%s, %2d:%02d:%02d, %d.%02d.%02d, <%s%s%s%s> (%c%d.%06ds)" :
1802
 
                                               "%s, %2d:%02d:%02d, %d.%02d.%02d, <%s%s%s%s>",
 
1803
                                        PRINTF(offsets ? "%s, %2ld:%02ld:%02d, %ld.%02ld.%02ld, <%s%s%s%s> (%c%ld.%06lds)" :
 
1804
                                               "%s, %2ld:%02ld:%02d, %ld.%02ld.%02ld, <%s%s%s%s>",
1803
1805
                                               wday[clock_time.wday],
1804
1806
                                               clock_time.hour, clock_time.minute, i, clock_time.day, clock_time.month,
1805
1807
                                               clock_time.year,