| 
    bufr2synop 0.24.0
    
   | 
 
inclusion file for binary bufrnoaa More...
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <getopt.h>#include <time.h>#include <utime.h>#include <sys/time.h>#include <sys/stat.h>

Go to the source code of this file.
Macros | |
| #define | BLEN 1024 | 
| #define | BUFRLEN 8388608 | 
Functions | |
| int | is_bufr (unsigned char *b) | 
| checks if an unsigned char from an array is the first char of 'BUFR'  More... | |
| int | is_endb (unsigned char *b) | 
| checks if an unsigned char from an array is the first char of '7777'  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 | 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 | read_args (int _argc, char *_argv[]) | 
| read the arguments from stdio  More... | |
| void | print_usage (void) | 
| void | print_version (void) | 
| 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... | |
Variables | |
| int | STAGE | 
| int | SELECT | 
| int | INDIVIDUAL | 
| int | COLECT | 
| int | VERBOSE | 
| int | LISTF | 
| unsigned char | BUFR [BUFRLEN] | 
| unsigned char | BUF [BLEN] | 
| char | ENTRADA [256] | 
| char | PREFIX [64] | 
| struct stat | INSTAT | 
| char | SEL [64] | 
| char | SELS [64] | 
| char | SELO [64] | 
| char | SELU [64] | 
| char | OWN [] | 
| char | HEADER_MARK | 
| char | FINAL_SEP [4] | 
| char | SEP [] | 
inclusion file for binary bufrnoaa
Definition in file bufrnoaa.h.
| #define BLEN 1024 | 
Definition at line 34 of file bufrnoaa.h.
| #define BUFRLEN 8388608 | 
Definition at line 36 of file bufrnoaa.h.
| 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().

| nt 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().

| void print_usage | ( | void | ) | 
Definition at line 37 of file bufrdeco_json.c.
References OWN, PACKAGE_VERSION, print_version(), and SELF.
Referenced by main(), and read_args().


| void print_version | ( | void | ) | 
Definition at line 114 of file bufrnoaa_io.c.
References bufrnoaa_get_version(), OWN, and VERSION.
Referenced by print_usage(), and read_args().


| int read_args | ( | int | _argc, | 
| char * | _argv[] | ||
| ) | 
read the arguments from stdio
| _argc | number of arguments passed | 
| _argv | array of arguments | 
Returns 1 if succcess, -1 othewise
Definition at line 63 of file bufrdeco_json.c.
References COLECT, ENTRADA, EXTRACT, FINAL_SEP, FIRST_SUBSET, HEADER_MARK, INDIVIDUAL, LAST_SUBSET, LISTF, OWN, PREFIX, PRINT_JSON_EXPANDED_TREE, PRINT_JSON_SEC0, PRINT_JSON_SEC1, PRINT_JSON_SEC2, PRINT_JSON_SEC3, PRINT_JSON_SEC4, print_usage(), print_version(), SELECT, SELO, SELS, SELU, SEP, and VERBOSE.
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().

      
  | 
  extern | 
Definition at line 195 of file bufrnoaa.c.
Referenced by main().
      
  | 
  extern | 
Definition at line 25 of file bufrdeco_json.c.
| int COLECT | 
Definition at line 38 of file bufrnoaa.h.
      
  | 
  extern | 
Definition at line 27 of file bufrdeco_json.c.
Referenced by main(), and read_args().
      
  | 
  extern | 
Definition at line 207 of file bufrnoaa.c.
Referenced by main(), and read_args().
      
  | 
  extern | 
Header mark character who is repeated four times at the begining
Definition at line 202 of file bufrnoaa.c.
Referenced by main(), and read_args().
| int INDIVIDUAL | 
Definition at line 38 of file bufrnoaa.h.
      
  | 
  extern | 
Definition at line 204 of file bufrnoaa.c.
Referenced by main().
      
  | 
  extern | 
if != then a list of messages in bin file is generated
Definition at line 193 of file bufrnoaa.c.
Referenced by main(), and read_args().
      
  | 
  extern | 
Definition at line 205 of file bufrnoaa.c.
Referenced by main(), print_usage(), print_version(), and read_args().
| char PREFIX[64] | 
Definition at line 42 of file bufrnoaa.h.
      
  | 
  extern | 
Selection string for argument -T according with T1
Definition at line 197 of file bufrnoaa.c.
| int SELECT | 
Definition at line 38 of file bufrnoaa.h.
| char SELO[64] | 
Definition at line 44 of file bufrnoaa.h.
| char SELS[64] | 
Definition at line 44 of file bufrnoaa.h.
| char SELU[64] | 
Definition at line 44 of file bufrnoaa.h.
      
  | 
  extern | 
Definition at line 206 of file bufrnoaa.c.
Referenced by read_args().
      
  | 
  extern | 
Definition at line 192 of file bufrnoaa.c.
Referenced by main().
| int VERBOSE | 
Definition at line 38 of file bufrnoaa.h.