Move deprecated tools to subdirectory

This commit is contained in:
Shahram Najm 2016-08-08 13:51:15 +01:00
parent a97409334a
commit c130f5f4c6
20 changed files with 46 additions and 51 deletions

View File

@ -131,8 +131,8 @@ int grib_tool_finalise_action(grib_runtime_options* options)
return 0;
}
int grib_no_handle_action(int err) {
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
int grib_no_handle_action(int err)
{
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
}

View File

@ -16,25 +16,25 @@
#include "grib_tools.h"
grib_option grib_options[]={
/* {id, args, help}, on, command_line, value*/
{"S",0,0,1,0,0},
{"O",0,"Octet mode. WMO documentation style dump.\n",0,1,0},
{"D",0,0,0,1,0},
{"d",0,"Print all data values.\n",0,1,0},
{"j",0,0,0,1,0},
/* {"C",0,0,0,1,0}, */ /* See ECC-234 */
{"t",0,0,0,1,0},
{"H",0,0,0,1,0},
{"a",0,0,0,1,0},
{"w:",0,0,0,1,0},
{"s:",0,0,0,1,0},
{"M",0,0,0,1,0},
{"T:",0,0,0,1,0},
{"7",0,0,0,1,0},
{"V",0,0,0,1,0},
{"q",0,0,1,0,0},
{"X:",0,0,0,1,0},
{"x",0,0,0,1,0}
/* {id, args, help}, on, command_line, value*/
{"S",0,0,1,0,0},
{"O",0,"Octet mode. WMO documentation style dump.\n",0,1,0},
{"D",0,0,0,1,0},
{"d",0,"Print all data values.\n",0,1,0},
{"j",0,0,0,1,0},
/* {"C",0,0,0,1,0}, */ /* See ECC-234 */
{"t",0,0,0,1,0},
{"H",0,0,0,1,0},
{"a",0,0,0,1,0},
{"w:",0,0,0,1,0},
{"s:",0,0,0,1,0},
{"M",0,0,0,1,0},
{"T:",0,0,0,1,0},
{"7",0,0,0,1,0},
{"V",0,0,0,1,0},
{"q",0,0,1,0,0},
{"X:",0,0,0,1,0},
{"x",0,0,0,1,0}
};
char* grib_tool_description="Dump the content of a grib file in different formats.";
@ -83,7 +83,7 @@ int grib_tool_init(grib_runtime_options* options)
else
options->dump_flags = GRIB_DUMP_FLAG_NO_DATA;
}
*/
*/
if (grib_options_on("O")) {
options->dump_mode = "wmo";
@ -140,7 +140,7 @@ int grib_tool_new_file_action(grib_runtime_options* options,grib_tools_file* fil
int err = 0;
grib_context* c = grib_context_get_default();
const char* filename = options->current_infile->name;
err = grib_index_dump_file(stdout, filename);
if (err) {
grib_context_log(c, GRIB_LOG_ERROR, "%s: Could not dump index file \"%s\".\n%s\n",
@ -151,7 +151,7 @@ int grib_tool_new_file_action(grib_runtime_options* options,grib_tools_file* fil
}
/* Since there are no GRIB messages, we have to stop tool exiting in case there
* are more index files
*/
*/
options->fail = 0;
}
}
@ -212,8 +212,9 @@ int grib_tool_finalise_action(grib_runtime_options* options)
return 0;
}
int grib_no_handle_action(int err) {
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
int grib_no_handle_action(int err)
{
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
}

View File

@ -217,8 +217,8 @@ int grib_tool_finalise_action(grib_runtime_options* options)
return 0;
}
int grib_no_handle_action(int err) {
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
int grib_no_handle_action(int err)
{
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
}

View File

@ -23,13 +23,13 @@ grib_option grib_options[]={
{"p:",0,0,1,1,0},
{"P:",0,0,0,1,0},
{"w:","key[:{s/d/i}]{=/!=}value,key[:{s/d/i}]=value,...",
"\n\t\tWhere clause.\n\t\tSet is only executed for grib messages matching all the "
"key/value constraints.\n\t\tIf a grib message does not match the constraints it is"
" copied unchanged\n\t\tto the output_grib_file. This behaviour can be changed "
"setting the option -S."
"\n\t\tA valid constraint is of type key=value or key!=value."
"\n\t\tFor each key a string (key:s), a double (key:d) or"
" an integer (key:i)\n\t\ttype can be defined. Default type is string.\n",0,1,0},
"\n\t\tWhere clause.\n\t\tSet is only executed for grib messages matching all the "
"key/value constraints.\n\t\tIf a grib message does not match the constraints it is"
" copied unchanged\n\t\tto the output_grib_file. This behaviour can be changed "
"setting the option -S."
"\n\t\tA valid constraint is of type key=value or key!=value."
"\n\t\tFor each key a string (key:s), a double (key:d) or"
" an integer (key:i)\n\t\ttype can be defined. Default type is string.\n",0,1,0},
{"q",0,0,1,0,0},
{"7",0,0,0,1,0},
{"S",0,0,0,1,0},
@ -102,7 +102,7 @@ int grib_tool_new_file_action(grib_runtime_options* options,grib_tools_file* fil
int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
{
size_t i=0;
size_t i=0;
int err=0;
if (!options->skip) {
@ -131,12 +131,6 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
for(i = 0; i< size; i++)
v[i] = options->constant;
}
#if 0
if (grib_options_on("n:")) {
for(i = 0; i< size; i++)
v[i] = options->constant;
}
#endif
if (err == GRIB_SUCCESS) {
GRIB_CHECK_NOLINE(grib_set_double_array(h,"values",v,size),0);
@ -175,8 +169,8 @@ int grib_tool_finalise_action(grib_runtime_options* options)
return 0;
}
int grib_no_handle_action(int err) {
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
int grib_no_handle_action(int err)
{
fprintf(dump_file,"\t\t\"ERROR: unreadable message\"\n");
return 0;
}