/* * Copyright 2005-2019 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * * In applying this licence, ECMWF does not waive the privileges and immunities granted to it by * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ #include "grib_api_internal.h" #include "eccodes.h" #include int main(int argc,char* argv[]) { char* filename; int i, err = 0; int num_messages = 0; codes_bufr_header* headers = NULL; codes_context* c = codes_context_get_default(); assert(argc == 2); filename=argv[1]; err = codes_bufr_extract_headers_malloc(c, filename, &headers, &num_messages); assert(!err); for (i=0; i