FreeBSD/contrib/ntp/libparse/clk_trimtaip.c
/*
 * parse_inp_fnc_t inp_trimtaip
 *
 * grab data from input stream
 */
parse_inp_fnc_t inp_trimtaip
grab data from input stream
parse_inp_fnc_t inp_trimtaip grab data from input stream
static u_long
inp_trimtaip(
	     parse_t      *parseio,
	     char         ch,
	     timestamp_t  *tstamp
	  )
{
	unsigned int rtc;
	parseprintf(DD_PARSE, ("inp_trimtaip(0x%p, 0x%x, ...)\n", (void*)parseio, ch));
	switch (ch)
	{
	case '>':
		parseprintf(DD_PARSE, ("inp_trimptaip: START seen\n"));
		parseio->parse_index = 1;
		parseio->parse_data[0] = ch;
		parseio->parse_dtime.parse_stime = *tstamp; 
		return PARSE_INP_SKIP;
	case '<':
		parseprintf(DD_PARSE, ("inp_trimtaip: END seen\n"));
		if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
			return parse_end(parseio);
		else
			return rtc;
	default:
		return parse_addchar(parseio, ch);
	}
}
static u_long inp_trimtaip ( parse_t * parseio , char ch , timestamp_t * tstamp ) { unsigned int rtc ; parseprintf ( DD_PARSE , ( " \n " , ( void * ) parseio , ch ) ) ; switch ( ch ) { case ' ' : parseprintf ( DD_PARSE , ( " \n " ) ) ; parseio -> parse_index = 1 ; parseio -> parse_data [ 0 ] = ch ; parseio -> parse_dtime . parse_stime = * tstamp ; return PARSE_INP_SKIP ; case ' ' : parseprintf ( DD_PARSE , ( " \n " ) ) ; if ( ( rtc = parse_addchar ( parseio , ch ) ) == PARSE_INP_SKIP ) return parse_end ( parseio ) ; else return rtc ; default : return parse_addchar ( parseio , ch ) ; } }
parse_inp_fnc_t inp_trimtaip
 grab data from input stream
parse_inp_fnc_t inp_trimtaip grab data from input stream
/* collect timestamp */