1999-11-02 Harlan Stenn <stenn@whimsy.udel.edu>
+ * ntpd/refclock_parse.c: Cleanup/fixes
+ From: John Hay <jhay@mikom.csir.co.za>
+
* ntpd/refclock_parse.c: Lose #include "ntp_select.h"
* ntpd/ntpd.c: Lose #include "ntp_select.h"
* ntpd/ntp_io.c: Lose #include "ntp_select.h"
static void
clear_err(
struct parseunit *parse,
- u_long state
+ u_long lstate
)
{
- if (state == ERR_ALL)
+ if (lstate == ERR_ALL)
{
int i;
}
else
{
- parse->errors[state].err_stage = err_tbl[state];
- parse->errors[state].err_cnt = 0;
- parse->errors[state].err_last = 0;
- parse->errors[state].err_started = 0;
- parse->errors[state].err_suppressed = 0;
+ parse->errors[lstate].err_stage = err_tbl[lstate];
+ parse->errors[lstate].err_cnt = 0;
+ parse->errors[lstate].err_last = 0;
+ parse->errors[lstate].err_started = 0;
+ parse->errors[lstate].err_suppressed = 0;
}
}
static int
list_err(
struct parseunit *parse,
- u_long state
+ u_long lstate
)
{
int do_it;
- struct errorinfo *err = &parse->errors[state];
+ struct errorinfo *err = &parse->errors[lstate];
if (err->err_started == 0)
{
*/
static char *
parsestate(
- u_long state,
+ u_long lstate,
char *buffer
)
{
i = 0;
while (flagstrings[i].bit)
{
- if (flagstrings[i].bit & state)
+ if (flagstrings[i].bit & lstate)
{
if (buffer[0])
strcat(buffer, "; ");
i++;
}
- if (state & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
+ if (lstate & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
{
char *s, *t;
i = 0;
while (sflagstrings[i].bit)
{
- if (sflagstrings[i].bit & state)
+ if (sflagstrings[i].bit & lstate)
{
if (t != s)
{
*/
static char *
parsestatus(
- u_long state,
+ u_long lstate,
char *buffer
)
{
i = 0;
while (flagstrings[i].bit)
{
- if (flagstrings[i].bit & state)
+ if (flagstrings[i].bit & lstate)
{
if (buffer[0])
strcat(buffer, "; ");
*/
static const char *
clockstatus(
- u_long state
+ u_long lstate
)
{
static char buffer[20];
i = 0;
while (flagstrings[i].value != ~0)
{
- if (flagstrings[i].value == state)
+ if (flagstrings[i].value == lstate)
{
return flagstrings[i].name;
}
i++;
}
- sprintf(buffer, "unknown #%ld", (u_long)state);
+ sprintf(buffer, "unknown #%ld", (u_long)lstate);
return buffer;
}
parse->generic->io.fd = fd232;
- parse->generic->nstages = parse->parse_type->cl_samples;
- parse->generic->nskeep = parse->parse_type->cl_keep;
-
parse->peer = peer; /* marks it also as busy */
/*