diff --git a/tools/codes_split_file.c b/tools/codes_split_file.c index 9b0a8a05f..00166bf56 100644 --- a/tools/codes_split_file.c +++ b/tools/codes_split_file.c @@ -48,11 +48,11 @@ static int split_file(FILE* in, const char* filename, const int nchunks, unsigne fseeko(in, 0, SEEK_END); insize = ftello(in); fseeko(in, 0, SEEK_SET); - if(nchunks == -1){ - chunk_size = size; - }else{ - assert(nchunks > 0); - chunk_size=insize/nchunks; + if (nchunks == -1) { + chunk_size = size; + } else { + assert(nchunks > 0); + chunk_size=insize/nchunks; } i=1; diff --git a/tools/codes_split_file.desc b/tools/codes_split_file.desc index d7245929e..8903f5bfa 100644 --- a/tools/codes_split_file.desc +++ b/tools/codes_split_file.desc @@ -3,6 +3,7 @@ NAME codes_split_file DESCRIPTION Split an input file (GRIB, BUFR etc) into chunks of roughly the same size. The output files are named input_01, input_02 etc. This is much faster than grib_copy/bufr_copy. + If the nchunks argument is -1, then the file is split into the individual messages. USAGE codes_split_file [-v] nchunks input