mirror of https://github.com/ecmwf/eccodes.git
Testing: get_message_offset
This commit is contained in:
parent
5c61344551
commit
1e55b8d89f
|
@ -20,6 +20,7 @@ int main(int argc, char* argv[])
|
|||
size_t totalLength = 0, size = 0;
|
||||
unsigned char* buffer = NULL;
|
||||
codes_handle* new_handle = NULL;
|
||||
off_t offset = 0;
|
||||
|
||||
assert (argc == 3);
|
||||
|
||||
|
@ -31,6 +32,9 @@ int main(int argc, char* argv[])
|
|||
source_handle = codes_handle_new_from_file(0, in, PRODUCT_GRIB, &err);
|
||||
assert(source_handle);
|
||||
|
||||
CODES_CHECK(codes_get_message_offset(source_handle, &offset), 0);
|
||||
printf("offset = %lld\n", offset);
|
||||
|
||||
// How big is the input GRIB message?
|
||||
CODES_CHECK(codes_get_message_size(source_handle, &totalLength), 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue