Documentation: use i instead of l (for integer)

This commit is contained in:
Shahram Najm 2015-11-27 15:32:26 +00:00
parent 92e839639e
commit a910e208eb
6 changed files with 29 additions and 27 deletions

View File

@ -29,10 +29,10 @@ grib_option grib_options[]={
{"p:",0,0,1,1,0}, {"p:",0,0,1,1,0},
{"s:",0,0,0,1,0}, {"s:",0,0,0,1,0},
{"P:",0,0,0,1,0}, {"P:",0,0,0,1,0},
{"w:","key[:{s/d/l}]=value,key[:{s/d/l}]=value,...","\n\t\tWhere clause." {"w:","key[:{s/d/i}]=value,key[:{s/d/i}]=value,...","\n\t\tWhere clause."
"\n\t\tOnly BUFR messages matching the key/value constraints are " "\n\t\tOnly BUFR messages matching the key/value constraints are "
"copied to the\n\t\toutput_bufr_file.\n\t\tFor each key a string (key:s) or a " "copied to the\n\t\toutput_bufr_file.\n\t\tFor each key a string (key:s), a "
"double (key:d) or a long (key:l)\n\t\ttype can be defined. Default type " "double (key:d) or an integer (key:i)\n\t\ttype can be defined. Default type "
"is string.\n",0,1,0}, "is string.\n",0,1,0},
{"B:",0,0,0,1,0}, {"B:",0,0,0,1,0},
{"V",0,0,0,1,0}, {"V",0,0,0,1,0},

View File

@ -22,12 +22,12 @@ grib_option grib_options[]={
/* {"n:","noise percentage","\n\t\tAdd noise to the data values. The noise added is the given percentage of the data value.\n",0,1,0},*/ /* {"n:","noise percentage","\n\t\tAdd noise to the data values. The noise added is the given percentage of the data value.\n",0,1,0},*/
{"p:",0,0,1,1,0}, {"p:",0,0,1,1,0},
{"P:",0,0,0,1,0}, {"P:",0,0,0,1,0},
{"w:","key[:{s/d/l}]=value,key[:{s/d/l}]=value,...", {"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 " "\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" "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 " " copied unchanged\n\t\tto the output_grib_file. This behaviour can be changed "
"setting the option -S.\n\t\tFor each key a string (key:s) or a double (key:d) or" "setting the option -S.\n\t\tFor each key a string (key:s), a double (key:d) or"
" a long (key:l)\n\t\ttype can be defined. Default type is string.\n",0,1,0}, " an integer (key:i)\n\t\ttype can be defined. Default type is string.\n",0,1,0},
{"q",0,0,1,0,0}, {"q",0,0,1,0,0},
{"7",0,0,0,1,0}, {"7",0,0,0,1,0},
{"S",0,0,0,1,0}, {"S",0,0,0,1,0},

View File

@ -28,12 +28,12 @@ grib_option grib_options[]={
{"q",0,0,1,0,0}, {"q",0,0,1,0,0},
{"p:",0,0,1,1,0}, {"p:",0,0,1,1,0},
{"P:",0,0,0,1,0}, {"P:",0,0,0,1,0},
{"w:","key[:{s/d/l}]{=/!=}value,key[:{s/d/l}]=value,...","\n\t\tWhere clause." {"w:","key[:{s/d/i}]{=/!=}value,key[:{s/d/i}]=value,...","\n\t\tWhere clause."
"\n\t\tOnly grib messages matching the key/value constraints are " "\n\t\tOnly grib messages matching the key/value constraints are "
"copied to the\n\t\toutput_grib_file." "copied to the\n\t\toutput_grib_file."
"\n\t\tA valid constraint is of type key=value or key!=value." "\n\t\tA valid constraint is of type key=value or key!=value."
"\n\t\tFor each key a string (key:s) or a " "\n\t\tFor each key a string (key:s), a "
"double (key:d) or a long (key:l)\n\t\ttype can be defined. Default type " "double (key:d) or an integer (key:i)\n\t\ttype can be defined. Default type "
"is string.\n",0,1,0}, "is string.\n",0,1,0},
{"B:",0,0,0,1,0}, {"B:",0,0,0,1,0},
{"V",0,0,0,1,0}, {"V",0,0,0,1,0},

View File

@ -30,9 +30,9 @@ grib_options_help grib_options_help_list[] ={
{"B:","order by directive", {"B:","order by directive",
"\n\t\tOrder by. The output will be ordered according to the order by directive." "\n\t\tOrder by. The output will be ordered according to the order by directive."
"\n\t\tOrder by example: \"step asc, centre desc\" (step ascending and centre descending)\n"}, "\n\t\tOrder by example: \"step asc, centre desc\" (step ascending and centre descending)\n"},
{"c:","key[:l/d/s/n],key[:l/d/s/n],...", {"c:","key[:i/d/s/n],key[:i/d/s/n],...",
"\n\t\tOnly the listed keys or namespaces (:n) are compared. The optional letter after the colon is used " "\n\t\tOnly the listed keys or namespaces (:n) are compared. The optional letter after the colon is used "
"\n\t\tto force the type in the comparison: l->integer, d->float, s->string, n->namespace." "\n\t\tto force the type in the comparison: i->integer, d->float, s->string, n->namespace."
"\n\t\tSee -a option. Incompatible with -H option.\n"}, "\n\t\tSee -a option. Incompatible with -H option.\n"},
{"d:","value", {"d:","value",
"\n\t\tSet all the data values to \"value\".\n"}, "\n\t\tSet all the data values to \"value\".\n"},
@ -58,26 +58,26 @@ grib_options_help grib_options_help_list[] ={
"\n\t\tOutput grib is written to output_grib_file." "\n\t\tOutput grib is written to output_grib_file."
"\n\t\tIf an output grib file is required and -o is not used, the" "\n\t\tIf an output grib file is required and -o is not used, the"
" output grib is written to filtered.out\n"}, " output grib is written to filtered.out\n"},
{"p:","key[:{s/d/l}],key[:{s/d/l}],...", {"p:","key[:{s/d/i}],key[:{s/d/i}],...",
"\n\t\tDeclaration of keys to print." "\n\t\tDeclaration of keys to print."
"\n\t\tFor each key a string (key:s) or a double (key:d) or a long (key:l)" "\n\t\tFor each key a string (key:s), a double (key:d) or an integer (key:i)"
"\n\t\ttype can be requested. Default type is string.\n"}, "\n\t\ttype can be requested. Default type is string.\n"},
{"q",0,"Quiet.\n"}, {"q",0,"Quiet.\n"},
{"r",0,"Repack data. Sometimes after setting some keys involving properties" {"r",0,"Repack data. Sometimes after setting some keys involving properties"
"\n\t\tof the packing algorithm a repacking of data is needed." "\n\t\tof the packing algorithm a repacking of data is needed."
"\n\t\tThis repacking is performed setting this -r option.\n"}, "\n\t\tThis repacking is performed setting this -r option.\n"},
{"s:","key[:{s/d/l}]=value,key[:{s/d/l}]=value,...", {"s:","key[:{s/d/i}]=value,key[:{s/d/i}]=value,...",
"\n\t\tKey/values to set." "\n\t\tKey/values to set."
"\n\t\tFor each key a string (key:s) or a double (key:d) or a long (key:l)" "\n\t\tFor each key a string (key:s), a double (key:d) or an integer (key:i)"
"\n\t\ttype can be defined. By default the native type is set.\n"}, "\n\t\ttype can be defined. By default the native type is set.\n"},
{"t",0,"Print type information.\n"}, {"t",0,"Print type information.\n"},
{"w:","key[:{s/d/l}]{=/!=}value,key[:{s/d/l}]{=/!=}value,...", {"w:","key[:{s/d/i}]{=/!=}value,key[:{s/d/i}]{=/!=}value,...",
"\n\t\tWhere clause." "\n\t\tWhere clause."
"\n\t\tMessages are processed only if they match all the" "\n\t\tMessages are processed only if they match all the"
" key/value constraints." " key/value constraints."
"\n\t\tA valid constraint is of type key=value or key!=value." "\n\t\tA valid constraint is of type key=value or key!=value."
"\n\t\tFor each key a string (key:s) or a double (key:d) or" "\n\t\tFor each key a string (key:s), a double (key:d) or"
" a long (key:l)\n\t\ttype can be specified. Default type is string.\n"}, " an integer (key:i)\n\t\ttype can be specified. Default type is string.\n"},
{"v",0,"Verbose.\n"}, {"v",0,"Verbose.\n"},
{"7",0,"Does not fail when the message has wrong length\n"}, {"7",0,"Does not fail when the message has wrong length\n"},
{"A:","absolute error\n", {"A:","absolute error\n",
@ -87,7 +87,7 @@ grib_options_help grib_options_help_list[] ={
{"H",0,"Print octet content in hexadecimal format.\n"}, {"H",0,"Print octet content in hexadecimal format.\n"},
{"M",0,"Multi-field support off. Turn off support for multiple fields in single grib message.\n"}, {"M",0,"Multi-field support off. Turn off support for multiple fields in single grib message.\n"},
{"O",0,"Octet mode. WMO documentation style dump.\n"}, {"O",0,"Octet mode. WMO documentation style dump.\n"},
{"P:","key[:{s/d/l}],key[:{s/d/l}],...", {"P:","key[:{s/d/i}],key[:{s/d/i}],...",
"\n\t\tAs -p adding the declared keys to the default list.\n"}, "\n\t\tAs -p adding the declared keys to the default list.\n"},
{"R:","key1=relative_error1,key2=relative_error2,...\n", {"R:","key1=relative_error1,key2=relative_error2,...\n",
"\tCompare floating point values using the relative error as tolerance." "\tCompare floating point values using the relative error as tolerance."
@ -100,7 +100,9 @@ grib_options_help grib_options_help_list[] ={
{"W:","width","\n\t\tMinimum width of each column in output. Default is 10.\n"}, {"W:","width","\n\t\tMinimum width of each column in output. Default is 10.\n"},
{"X:","offset","\n\t\tInput file offset in bytes. Processing of the input file will start from \"offset\".\n"}, {"X:","offset","\n\t\tInput file offset in bytes. Processing of the input file will start from \"offset\".\n"},
{"x",0,"Fast parsing option, only headers are loaded.\n"}, {"x",0,"Fast parsing option, only headers are loaded.\n"},
{"k:","key1,key2,...","\n\t\tSpecify a list of keys to index on. By default the input files are indexed on the MARS keys.\n"} {"k:","key1,key2,...","\n\t\tSpecify a list of keys to index on. By default the input files are indexed on the MARS keys."
"\n\t\tFor each key a string (key:s) or a double (key:d) or an integer (key:i)"
"\n\t\ttype can be requested.\n"}
}; };

View File

@ -22,14 +22,14 @@ grib_option grib_options[]={
/*{"n:","noise percentage","\n\t\tAdd noise to the data values. The noise added is the given percentage of the data value.\n",0,1,0},*/ /*{"n:","noise percentage","\n\t\tAdd noise to the data values. The noise added is the given percentage of the data value.\n",0,1,0},*/
{"p:",0,0,1,1,0}, {"p:",0,0,1,1,0},
{"P:",0,0,0,1,0}, {"P:",0,0,0,1,0},
{"w:","key[:{s/d/l}]{=/!=}value,key[:{s/d/l}]=value,...", {"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 " "\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" "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 " " copied unchanged\n\t\tto the output_grib_file. This behaviour can be changed "
"setting the option -S." "setting the option -S."
"\n\t\tA valid constraint is of type key=value or key!=value." "\n\t\tA valid constraint is of type key=value or key!=value."
"\n\t\tFor each key a string (key:s) or a double (key:d) or" "\n\t\tFor each key a string (key:s), a double (key:d) or"
" a long (key:l)\n\t\ttype can be defined. Default type is string.\n",0,1,0}, " an integer (key:i)\n\t\ttype can be defined. Default type is string.\n",0,1,0},
{"q",0,0,1,0,0}, {"q",0,0,1,0,0},
{"7",0,0,0,1,0}, {"7",0,0,0,1,0},
{"S",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) int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
{ {
int i=0; size_t i=0;
int err=0; int err=0;
if (!options->skip) { if (!options->skip) {

View File

@ -31,10 +31,10 @@ grib_option grib_options[]={
{"q",0,0,1,0,0}, {"q",0,0,1,0,0},
{"p:",0,0,1,1,0}, {"p:",0,0,1,1,0},
{"P:",0,0,0,1,0}, {"P:",0,0,0,1,0},
{"w:","key[:{s/d/l}]=value,key[:{s/d/l}]=value,...","\n\t\tWhere clause." {"w:","key[:{s/d/i}]=value,key[:{s/d/i}]=value,...","\n\t\tWhere clause."
"\n\t\tOnly grib messages matching the key/value constraints are " "\n\t\tOnly grib messages matching the key/value constraints are "
"copied to the\n\t\toutput_grib_file.\n\t\tFor each key a string (key:s) or a " "copied to the\n\t\toutput_grib_file.\n\t\tFor each key a string (key:s), a "
"double (key:d) or a long (key:l)\n\t\ttype can be defined. Default type " "double (key:d) or an integer (key:i)\n\t\ttype can be defined. Default type "
"is string.\n",0,1,0}, "is string.\n",0,1,0},
{"B:",0,0,0,1,0}, {"B:",0,0,0,1,0},
{"V",0,0,0,1,0}, {"V",0,0,0,1,0},