📄 12
字号:
ADDCMD(ntp_optarg);Only in new/usr.sbin/xntp/ntpq: obj.i386diff -rc old/usr.sbin/xntp/ntptime/ntptime.c new/usr.sbin/xntp/ntptime/ntptime.c*** old/usr.sbin/xntp/ntptime/ntptime.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/ntptime/ntptime.c Mon Aug 10 15:52:15 1998****************** 20,25 ****--- 20,26 ---- #include <sys/time.h> #include <signal.h> #include <errno.h>+ #include <unistd.h> #include <setjmp.h> #include "ntp_fp.h" #include "ntp_unixtime.h"****************** 75,80 ****--- 76,82 ---- #endif /* NTP_SYSCALLS_LIBC */ char *sprintb P((u_int, char *)); char *timex_state P((int));+ int main P((int, char *[])); int debug = 0; #ifdef SIGSYS****************** 90,96 **** char* progname; static char optargs[] = "cde:f:hm:o:rs:t:"; ! void main(argc, argv) int argc; char *argv[];--- 92,98 ---- char* progname; static char optargs[] = "cde:f:hm:o:rs:t:"; ! int main(argc, argv) int argc; char *argv[];****************** 108,116 **** int cost = 0; int rawtime = 0; memset((char *)&ntx, 0, sizeof(ntx)); progname = argv[0];! while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) { case 'c': cost++; break;--- 110,124 ---- int cost = 0; int rawtime = 0; + #ifdef __GNUC__+ /* avoid vfork clobbering */+ (void) &cost;+ (void) &rawtime;+ #endif+ memset((char *)&ntx, 0, sizeof(ntx)); progname = argv[0];! while ((c = ntp_getopt(argc, argv, optargs)) != -1) switch (c) { case 'c': cost++; break;Only in new/usr.sbin/xntp/ntptime: obj.i386diff -rc old/usr.sbin/xntp/ntptrace/ntptrace.c new/usr.sbin/xntp/ntptrace/ntptrace.c*** old/usr.sbin/xntp/ntptrace/ntptrace.c Mon Aug 10 17:42:55 1998--- new/usr.sbin/xntp/ntptrace/ntptrace.c Mon Aug 10 15:53:23 1998****************** 108,120 **** * timer expiries. */ #ifdef NO_MAIN_ALLOWED CALL(ntptrace,"ntptrace",ntptracemain); #endif! void #ifndef NO_MAIN_ALLOWED! main #else! ntptracemain #endif /* NO_MAIN_ALLOWED */ (argc, argv) int argc;--- 108,124 ---- * timer expiries. */ #ifdef NO_MAIN_ALLOWED+ void ntptracemain P((int, char *[]));+ CALL(ntptrace,"ntptrace",ntptracemain);+ #else+ int main P((int, char *[])); #endif! #ifndef NO_MAIN_ALLOWED! int main #else! void ntptracemain #endif /* NO_MAIN_ALLOWED */ (argc, argv) int argc;****************** 138,144 **** /* * Decode argument list */! while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != EOF) switch (c) { case 'd': ++debug;--- 142,148 ---- /* * Decode argument list */! while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != -1) switch (c) { case 'd': ++debug;Only in new/usr.sbin/xntp/ntptrace: obj.i386diff -rc old/usr.sbin/xntp/xntpd/clk_computime.c new/usr.sbin/xntp/xntpd/clk_computime.c*** old/usr.sbin/xntp/xntpd/clk_computime.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpd/clk_computime.c Mon Aug 10 17:20:31 1998****************** 63,77 **** 0 }; ! static u_long cvt_computime(); clockformat_t clock_computime = {! (unsigned long (*) ()) 0, /* no input handling */ cvt_computime, /* Computime conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */! (u_long (*)())0, /* no PPS monitoring */! (u_long(*) ())0, /* no time code synthesizer monitoring */ (void *)&computime_fmt, /* conversion configuration */ "Diem's Computime Radio Clock", /* Computime Radio Clock */ 24, /* string buffer */--- 63,77 ---- 0 }; ! static u_long cvt_computime P((char *, unsigned int, void *, clocktime_t *, void *)); clockformat_t clock_computime = {! NULL, /* no input handling */ cvt_computime, /* Computime conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */! NULL, /* no PPS monitoring */! NULL, /* no time code synthesizer monitoring */ (void *)&computime_fmt, /* conversion configuration */ "Diem's Computime Radio Clock", /* Computime Radio Clock */ 24, /* string buffer */****************** 89,100 **** * convert simple type format */ static u_long! cvt_computime(buffer, size, format, clock) register char *buffer;! register int size;! register struct format *format; register clocktime_t *clock; { if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;--- 89,102 ---- * convert simple type format */ static u_long! cvt_computime(buffer, size, vf, clock, vt) register char *buffer;! register unsigned int size;! register void *vf; register clocktime_t *clock;+ register void *vt; {+ register struct format *format = vf; if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;diff -rc old/usr.sbin/xntp/xntpd/clk_dcf7000.c new/usr.sbin/xntp/xntpd/clk_dcf7000.c*** old/usr.sbin/xntp/xntpd/clk_dcf7000.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpd/clk_dcf7000.c Mon Aug 10 17:20:06 1998****************** 40,54 **** 0 }; ! static u_long cvt_dcf7000(); clockformat_t clock_dcf7000 = {! (unsigned long (*)())0, /* no input handling */ cvt_dcf7000, /* ELV DCF77 conversion */ syn_simple, /* easy time stamps */! (u_long (*)())0, /* no direct PPS monitoring */! (u_long (*)())0, /* no time code synthesizer monitoring */ (void *)&dcf7000_fmt, /* conversion configuration */ "ELV DCF7000", /* ELV clock */ 24, /* string buffer */--- 40,54 ---- 0 }; ! static u_long cvt_dcf7000 P((char *, unsigned int, void *, clocktime_t *, void *)); clockformat_t clock_dcf7000 = {! NULL, /* no input handling */ cvt_dcf7000, /* ELV DCF77 conversion */ syn_simple, /* easy time stamps */! NULL, /* no direct PPS monitoring */! NULL, /* no time code synthesizer monitoring */ (void *)&dcf7000_fmt, /* conversion configuration */ "ELV DCF7000", /* ELV clock */ 24, /* string buffer */****************** 66,77 **** * convert dcf7000 type format */ static u_long! cvt_dcf7000(buffer, size, format, clock) register char *buffer;! register int size;! register struct format *format; register clocktime_t *clock; { if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;--- 66,79 ---- * convert dcf7000 type format */ static u_long! cvt_dcf7000(buffer, size, vf, clock, vt) register char *buffer;! register unsigned int size;! register void *vf; register clocktime_t *clock;+ register void *vt; {+ register struct format *format = vf; if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;diff -rc old/usr.sbin/xntp/xntpd/clk_hopf6021.c new/usr.sbin/xntp/xntpd/clk_hopf6021.c*** old/usr.sbin/xntp/xntpd/clk_hopf6021.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpd/clk_hopf6021.c Mon Aug 10 17:19:50 1998****************** 113,127 **** ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \ -1) ! static unsigned long cvt_hopf6021(); clockformat_t clock_hopf6021 = {! (unsigned long (*)())0, /* no input handling */ cvt_hopf6021, /* Radiocode clock conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */! (unsigned long (*)())0, /* no direct PPS monitoring */! (unsigned long (*)())0, /* no time code synthesizer monitoring */ (void *)&hopf6021_fmt, /* conversion configuration */ "hopf Funkuhr 6021", /* clock format name */ 19, /* string buffer */--- 113,128 ---- ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \ -1) ! ! static u_long cvt_hopf6021 P((char *, unsigned int, void *, clocktime_t *, void *)); clockformat_t clock_hopf6021 = {! NULL, /* no input handling */ cvt_hopf6021, /* Radiocode clock conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */! NULL, /* no direct PPS monitoring */! NULL, /* no time code synthesizer monitoring */ (void *)&hopf6021_fmt, /* conversion configuration */ "hopf Funkuhr 6021", /* clock format name */ 19, /* string buffer */****************** 133,146 **** 0 /* sync symbol */ }; ! static unsigned long! cvt_hopf6021(buffer, size, format, clock) register char *buffer;! register int size;! register struct format *format; register clocktime_t *clock; {! char status,weekday; if (!Strok(buffer, format->fixed_string)) {--- 134,149 ---- 0 /* sync symbol */ }; ! static u_long! cvt_hopf6021(buffer, size, vf, clock, vt) register char *buffer;! register unsigned int size;! register void *vf; register clocktime_t *clock;+ register void *vt; {! register struct format *format = vf;! int status,weekday; if (!Strok(buffer, format->fixed_string)) {diff -rc old/usr.sbin/xntp/xntpd/clk_meinberg.c new/usr.sbin/xntp/xntpd/clk_meinberg.c*** old/usr.sbin/xntp/xntpd/clk_meinberg.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpd/clk_meinberg.c Mon Aug 10 17:19:33 1998****************** 142,158 **** } }; ! static u_long cvt_meinberg();! static u_long cvt_mgps(); clockformat_t clock_meinberg[] = { {! (unsigned long (*)())0, /* no input handling */ cvt_meinberg, /* Meinberg conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */ pps_simple, /* easy PPS monitoring */! (u_long (*)())0, /* no time code synthesizer monitoring */ (void *)&meinberg_fmt[0], /* conversion configuration */ "Meinberg Standard", /* Meinberg simple format - beware */ 32, /* string buffer */--- 142,159 ---- } }; ! ! static u_long cvt_meinberg P((char *, unsigned int, void *, clocktime_t *, void *));! static u_long cvt_mgps P((char *, unsigned int, void *, clocktime_t *, void *)); clockformat_t clock_meinberg[] = { {! NULL, /* no input handling */ cvt_meinberg, /* Meinberg conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */ pps_simple, /* easy PPS monitoring */! NULL, /* no time code synthesizer monitoring */ (void *)&meinberg_fmt[0], /* conversion configuration */ "Meinberg Standard", /* Meinberg simple format - beware */ 32, /* string buffer */****************** 164,174 **** '\0' }, {! (unsigned long (*)())0, /* no input handling */ cvt_meinberg, /* Meinberg conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */ pps_simple, /* easy PPS monitoring */! (u_long (*)())0, /* no time code synthesizer monitoring */ (void *)&meinberg_fmt[1], /* conversion configuration */ "Meinberg Extended", /* Meinberg enhanced format */ 32, /* string buffer */--- 165,175 ---- '\0' }, {! NULL, /* no input handling */ cvt_meinberg, /* Meinberg conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */ pps_simple, /* easy PPS monitoring */! NULL, /* no time code synthesizer monitoring */ (void *)&meinberg_fmt[1], /* conversion configuration */ "Meinberg Extended", /* Meinberg enhanced format */ 32, /* string buffer */****************** 180,190 **** '\0' }, {! (unsigned long (*)())0, /* no input handling */ cvt_mgps, /* Meinberg GPS166 conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */ pps_simple, /* easy PPS monitoring */! (u_long (*)())0, /* no time code synthesizer monitoring */ (void *)&meinberg_fmt[2], /* conversion configuration */ "Meinberg GPS Extended", /* Meinberg FAU GPS format */ 70, /* string buffer */--- 181,191 ---- '\0' }, {! NULL, /* no input handling */ cvt_mgps, /* Meinberg GPS166 conversion */ syn_simple, /* easy time stamps for RS232 (fallback) */ pps_simple, /* easy PPS monitoring */! NULL, /* no time code synthesizer monitoring */ (void *)&meinberg_fmt[2], /* conversion configuration */ "Meinberg GPS Extended", /* Meinberg FAU GPS format */ 70, /* string buffer */****************** 203,214 **** * convert simple type format */ static u_long! cvt_meinberg(buffer, size, format, clock) register char *buffer;! register int size;! register struct format *format; register clocktime_t *clock; { if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;--- 204,217 ---- * convert simple type format */ static u_long! cvt_meinberg(buffer, size, vf, clock, vt) register char *buffer;! register unsigned int size;! register void *vf; register clocktime_t *clock;+ register void *vt; {+ register struct format *format = vf; if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;****************** 332,343 **** * convert Meinberg GPS format */ static u_long! cvt_mgps(buffer, size, format, clock) register char *buffer;! register int size;! register struct format *format; register clocktime_t *clock; { if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;--- 335,348 ---- * convert Meinberg GPS format */ static u_long! cvt_mgps(buffer, size, vf, clock, vt) register char *buffer;! register unsigned int size;! register void *vf; register clocktime_t *clock;+ register void *vt; {+ register struct format *format = vf; if (!Strok(buffer, format->fixed_string)) { return CVT_NONE;diff -rc old/usr.sbin/xntp/xntpd/clk_rawdcf.c new/usr.sbin/xntp/xntpd/clk_rawdcf.c*** old/usr.sbin/xntp/xntpd/clk_rawdcf.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpd/clk_rawdcf.c Mon Aug 10 17:19:12 1998****************** 84,98 **** * 59 - usually missing (minute indication), except for leap insertion */ ! static u_long cvt_rawdcf();! static u_long pps_rawdcf();! static u_long snt_rawdcf(); clockformat_t clock_rawdcf = {! (unsigned long (*)())0, /* no input handling */ cvt_rawdcf, /* raw dcf input conversion */! (void (*)())0, /* no character bound synchronisation */ pps_rawdcf, /* examining PPS information */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -