35 if ( b[0] ==
'R' && b[1] ==
'F' && b[2] ==
'U' && b[3] ==
'B' )
49 if ( b[0] ==
'*' && b[1] ==
'*' && b[2] ==
'*' && b[3] ==
'*' )
63 if ( b[0] == mark && b[1] == mark && b[2] == mark && b[3] == mark )
78 if ( b[0] ==
'7' && b[1] ==
'7' && b[2] ==
'7' && b[3] ==
'7' )
97 if ( x->tv_usec < y->tv_usec )
99 int nsec = ( y->tv_usec - x->tv_usec ) / 1000000 + 1;
100 y->tv_usec -= 1000000 * nsec;
103 if ( x->tv_usec - y->tv_usec > 1000000 )
105 int nsec = ( x->tv_usec - y->tv_usec ) / 1000000;
106 y->tv_usec += 1000000 * nsec;
112 result->tv_sec = x->tv_sec - y->tv_sec;
113 result->tv_usec = x->tv_usec - y->tv_usec;
116 return x->tv_sec < y->tv_sec;
126 if ( strlen (
SEL ) == 0 )
128 if ( strchr (
SEL, name[1] ) == NULL )
130 if ( name[1] ==
'S' )
132 if ( strlen (
SELS ) == 0 )
134 else if ( strchr (
SELS, name[2] ) == NULL )
138 if ( name[1] ==
'O' )
140 if ( strlen (
SELO ) == 0 )
142 else if ( strchr (
SELO, name[2] ) == NULL )
146 if ( name[1] ==
'U' )
148 if ( strlen (
SELU ) == 0 )
150 else if ( strchr (
SELU, name[2] ) == NULL )
166 memset ( &tim, 0,
sizeof ( tim ) );
167 gmtime_r ( & ( st->st_mtime ), &tim );
168 strftime ( date, 16,
"%Y%m%d%H%M%S", &tim );
181 ut.modtime = st->st_mtime;
182 ut.actime = st->st_mtime;
183 utime ( filename, &ut );
inclusion file for binary bufrnoaa
int bufr_is_selected(char *name)
returns 1 if selected message 0 otherwise
int is_head_custom(unsigned char *b, char mark)
checks if an unsigned char from an array is the first char of repeated mark char four times
int is_endb(unsigned char *b)
checks if an unsigned char from an array is the first char of '7777'
int mtime_from_stat(char *filename, struct stat *st)
modifies a file update time from a struct stat
int is_head(unsigned char *b)
checks if an unsigned char from an array is the first char of '****'
int is_bufr(unsigned char *b)
checks if an unsigned char from an array is the first char of 'BUFR'
int date_mtime_from_stat(char *date, struct stat *st)
get a string with date and time from a struct stat
int timeval_substract(struct timeval *result, struct timeval *x, struct timeval *y)
Subtract the ‘struct timeval’ values X and Y, storing the result in RESULT.