Fix bugs from the distribution.

This commit is contained in:
christos 1997-06-23 17:30:42 +00:00
parent 50b2781909
commit 30bc5bd182
1 changed files with 7 additions and 3 deletions

View File

@ -68,6 +68,7 @@ extern int syscall P((int, void *, ...));
#endif /* NTP_SYSCALLS_LIBC */ #endif /* NTP_SYSCALLS_LIBC */
char *sprintb P((u_int, char *)); char *sprintb P((u_int, char *));
char *timex_state P((int)); char *timex_state P((int));
int debug = 0;
#ifdef SIGSYS #ifdef SIGSYS
void pll_trap P((int)); void pll_trap P((int));
@ -79,8 +80,8 @@ static sigjmp_buf env; /* environment var. for pll_trap() */
static volatile int pll_control; /* (0) daemon, (1) kernel loop */ static volatile int pll_control; /* (0) daemon, (1) kernel loop */
static char* progname; char* progname;
static char optargs[] = "ce:f:hm:o:rs:t:"; static char optargs[] = "cde:f:hm:o:rs:t:";
void void
main(argc, argv) main(argc, argv)
@ -106,6 +107,9 @@ main(argc, argv)
case 'c': case 'c':
cost++; cost++;
break; break;
case 'd':
debug++;
break;
case 'e': case 'e':
ntx.modes |= MOD_ESTERROR; ntx.modes |= MOD_ESTERROR;
ntx.esterror = atoi(ntp_optarg); ntx.esterror = atoi(ntp_optarg);
@ -291,7 +295,7 @@ main(argc, argv)
printf(" time constant %ld, precision %ld us, tolerance %.0f ppm,\n", printf(" time constant %ld, precision %ld us, tolerance %.0f ppm,\n",
ntx.constant, ntx.precision, ftemp); ntx.constant, ntx.precision, ftemp);
if (ntx.shift == 0) if (ntx.shift == 0)
return; exit(0);
ftemp = ntx.ppsfreq; ftemp = ntx.ppsfreq;
ftemp /= (1 << SHIFT_USEC); ftemp /= (1 << SHIFT_USEC);
gtemp = ntx.stabil; gtemp = ntx.stabil;