bufr2synop 0.24.0
|
File with some routines for bufrnoaa binary. More...
#include "bufrnoaa.h"
Go to the source code of this file.
Functions | |
int | is_bufr (unsigned char *b) |
checks if an unsigned char from an array is the first char of 'BUFR' More... | |
int | is_head (unsigned char *b) |
checks if an unsigned char from an array is the first char of '****' More... | |
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 More... | |
int | is_endb (unsigned char *b) |
checks if an unsigned char from an array is the first char of '7777' More... | |
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. More... | |
int | bufr_is_selected (char *name) |
returns 1 if selected message 0 otherwise More... | |
int | date_mtime_from_stat (char *date, struct stat *st) |
get a string with date and time from a struct stat More... | |
int | mtime_from_stat (char *filename, struct stat *st) |
modifies a file update time from a struct stat More... | |
File with some routines for bufrnoaa binary.
Definition in file bufrnoaa_utils.c.
int bufr_is_selected | ( | char * | name | ) |
returns 1 if selected message 0 otherwise
name | string with name to check |
Definition at line 124 of file bufrnoaa_utils.c.
References SELO, SELS, and SELU.
Referenced by main().
int date_mtime_from_stat | ( | char * | date, |
struct stat * | st | ||
) |
get a string with date and time from a struct stat
date | string wuth the result |
st | pointer to a strucr stat |
Definition at line 163 of file bufrnoaa_utils.c.
Referenced by main().
int is_bufr | ( | unsigned char * | b | ) |
checks if an unsigned char from an array is the first char of 'BUFR'
b | pointer to unsigned char to check |
Returns 1 if success, 0 othewise
Definition at line 33 of file bufrnoaa_utils.c.
Referenced by main().
int is_endb | ( | unsigned char * | b | ) |
checks if an unsigned char from an array is the first char of '7777'
b | pointer to unsigned char to check |
Returns 1 if success, 0 othewise
Definition at line 76 of file bufrnoaa_utils.c.
Referenced by main().
int is_head | ( | unsigned char * | b | ) |
checks if an unsigned char from an array is the first char of '****'
b | pointer to unsigned char to check |
Returns 1 if success, 0 othewise
Definition at line 47 of file bufrnoaa_utils.c.
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
b | pointer to unsigned char to check |
mark | char to be found repeated four times since b Returns 1 if success, 0 othewise |
Definition at line 61 of file bufrnoaa_utils.c.
Referenced by main().
int mtime_from_stat | ( | char * | filename, |
struct stat * | st | ||
) |
modifies a file update time from a struct stat
filename | string with the pathname of file to modify |
st | pointer to a struct stat as reference |
Definition at line 178 of file bufrnoaa_utils.c.
Referenced by main().
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.
result | pointer to a struct timeval where to set the result |
x | pointer to struct timeval as X in (X - Y) |
y | pointer to struct timeval as Y in (X - Y) |
Return 1 if the difference is negative, otherwise 0.
Definition at line 93 of file bufrnoaa_utils.c.
Referenced by main().