diff --git a/src/eccodes_prototypes.h b/src/eccodes_prototypes.h index ba44e941a..ba88a265f 100644 --- a/src/eccodes_prototypes.h +++ b/src/eccodes_prototypes.h @@ -1020,8 +1020,6 @@ int wmo_read_any_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_grib_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_bufr_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_gts_from_file(FILE* f, void* buffer, size_t* len); -int wmo_read_taf_from_file(FILE* f, void* buffer, size_t* len); -int wmo_read_metar_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_any_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); int wmo_read_grib_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); int wmo_read_bufr_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); diff --git a/src/grib_io.cc b/src/grib_io.cc index ce8d2aa65..978885c09 100644 --- a/src/grib_io.cc +++ b/src/grib_io.cc @@ -1267,57 +1267,50 @@ int wmo_read_gts_from_file(FILE* f, void* buffer, size_t* len) return err; } -int wmo_read_taf_from_file(FILE* f, void* buffer, size_t* len) -{ - int err; - user_buffer_t u; - reader r; +// int wmo_read_taf_from_file(FILE* f, void* buffer, size_t* len) +// { +// int err; +// user_buffer_t u; +// reader r; +// u.user_buffer = buffer; +// u.buffer_size = *len; - u.user_buffer = buffer; - u.buffer_size = *len; +// r.read_data = f; +// r.read = &stdio_read; +// r.alloc_data = &u; +// r.alloc = &user_provider_buffer; +// r.headers_only = 0; +// r.seek = &stdio_seek; +// r.seek_from_start = &stdio_seek_from_start; +// r.tell = &stdio_tell; +// r.offset = 0; +// r.message_size = 0; +// err = read_any_taf(&r); +// *len = r.message_size; +// return err; +// } - r.read_data = f; - r.read = &stdio_read; - r.alloc_data = &u; - r.alloc = &user_provider_buffer; - r.headers_only = 0; - r.seek = &stdio_seek; - r.seek_from_start = &stdio_seek_from_start; - r.tell = &stdio_tell; - r.offset = 0; - r.message_size = 0; - - err = read_any_taf(&r); - *len = r.message_size; - - return err; -} - -int wmo_read_metar_from_file(FILE* f, void* buffer, size_t* len) -{ - int err; - user_buffer_t u; - reader r; - - u.user_buffer = buffer; - u.buffer_size = *len; - - r.read_data = f; - r.read = &stdio_read; - r.alloc_data = &u; - r.alloc = &user_provider_buffer; - r.headers_only = 0; - r.seek = &stdio_seek; - r.seek_from_start = &stdio_seek_from_start; - r.tell = &stdio_tell; - r.offset = 0; - r.message_size = 0; - - err = read_any_metar(&r); - *len = r.message_size; - - return err; -} +// int wmo_read_metar_from_file(FILE* f, void* buffer, size_t* len) +// { +// int err; +// user_buffer_t u; +// reader r; +// u.user_buffer = buffer; +// u.buffer_size = *len; +// r.read_data = f; +// r.read = &stdio_read; +// r.alloc_data = &u; +// r.alloc = &user_provider_buffer; +// r.headers_only = 0; +// r.seek = &stdio_seek; +// r.seek_from_start = &stdio_seek_from_start; +// r.tell = &stdio_tell; +// r.offset = 0; +// r.message_size = 0; +// err = read_any_metar(&r); +// *len = r.message_size; +// return err; +// } /*================== */