From 4ef34f02e3ccaeb7163fe1f71aa8a4129b8715e0 Mon Sep 17 00:00:00 2001 From: shahramn Date: Sun, 25 Aug 2024 12:51:16 +0100 Subject: [PATCH] Examples --- examples/C/CMakeLists.txt | 1 - examples/C/bufr_clone.c | 6 ------ examples/C/grib_clone.c | 6 ------ examples/C/grib_copy_message.c | 6 ------ examples/C/grib_set_pv.c | 8 +------- 5 files changed, 1 insertion(+), 26 deletions(-) diff --git a/examples/C/CMakeLists.txt b/examples/C/CMakeLists.txt index 5e3795ef8..d25014ed0 100644 --- a/examples/C/CMakeLists.txt +++ b/examples/C/CMakeLists.txt @@ -26,7 +26,6 @@ list( APPEND test_bins grib_get_data grib_sections_copy grib_copy_keys - grib_iterator_bitmap grib_clone grib_copy_message grib_ensemble_index diff --git a/examples/C/bufr_clone.c b/examples/C/bufr_clone.c index 3cda29678..6a617eb50 100644 --- a/examples/C/bufr_clone.c +++ b/examples/C/bufr_clone.c @@ -18,11 +18,6 @@ #include #include "eccodes.h" -static void usage(const char* app) -{ - fprintf(stderr, "Usage is: %s input_file ouput_file\n", app); -} - int main(int argc, char* argv[]) { FILE* in = NULL; @@ -36,7 +31,6 @@ int main(int argc, char* argv[]) int i, err = 0; if (argc != 3) { - usage(argv[0]); return 1; } diff --git a/examples/C/grib_clone.c b/examples/C/grib_clone.c index c2964b54a..dce6c909d 100644 --- a/examples/C/grib_clone.c +++ b/examples/C/grib_clone.c @@ -18,11 +18,6 @@ #include #include "eccodes.h" -static void usage(const char* app) -{ - fprintf(stderr, "Usage is: %s input_file ouput_file\n", app); -} - int main(int argc, char* argv[]) { FILE* in = NULL; @@ -33,7 +28,6 @@ int main(int argc, char* argv[]) int err = 0; if (argc != 3) { - usage(argv[0]); return 1; } diff --git a/examples/C/grib_copy_message.c b/examples/C/grib_copy_message.c index 461bf4ea6..7757fd94a 100644 --- a/examples/C/grib_copy_message.c +++ b/examples/C/grib_copy_message.c @@ -18,11 +18,6 @@ #include "eccodes.h" #include -static void usage(const char* prog) -{ - fprintf(stderr, "Usage is: %s input_file ouput_file\n", prog); -} - int main(int argc, char* argv[]) { FILE* in = NULL; @@ -30,7 +25,6 @@ int main(int argc, char* argv[]) int err = 0; if (argc != 3) { - usage(argv[0]); return 1; } diff --git a/examples/C/grib_set_pv.c b/examples/C/grib_set_pv.c index e279aec8b..7352f6f84 100644 --- a/examples/C/grib_set_pv.c +++ b/examples/C/grib_set_pv.c @@ -19,12 +19,6 @@ #include #include "eccodes.h" -static void usage(const char* prog) -{ - fprintf(stderr, "usage: %s in out\n", prog); - exit(1); -} - int main(int argc, char** argv) { int err = 0; @@ -40,7 +34,7 @@ int main(int argc, char** argv) codes_handle* h = NULL; const void* buffer = NULL; - if (argc != 3) usage(argv[0]); + if (argc != 3) return 1; infile = argv[1]; outfile = argv[2];