This commit is contained in:
Shahram Najm 2020-02-20 13:07:44 +00:00
parent 9222fe2873
commit 0820f37b4a
4 changed files with 21 additions and 21 deletions

View File

@ -283,14 +283,14 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_set_long(grib_handle_of_accessor(a), self->bitmap_present, bitmap_present); ret = grib_set_long(grib_handle_of_accessor(a), self->bitmap_present, bitmap_present);
if (ret) { if (ret) {
grib_context_log(a->context, GRIB_LOG_ERROR, grib_context_log(a->context, GRIB_LOG_ERROR,
"Accessor %s cannont pack value for %s error %d \n", a->name, self->bitmap_present, ret); "Accessor %s cannot pack value for %s error %d \n", a->name, self->bitmap_present, ret);
return ret; return ret;
} }
#if 0 #if 0
if(!grib_find_accessor(grib_handle_of_accessor(a),self->bitmap)){ if(!grib_find_accessor(grib_handle_of_accessor(a),self->bitmap)){
grib_context_log(a->context, GRIB_LOG_ERROR, grib_context_log(a->context, GRIB_LOG_ERROR,
"Accessor %s cannont access bitmap \n", a->name, self->bitmap_present, ret); "Accessor %s cannot access bitmap \n", a->name, self->bitmap_present, ret);
return ret; return ret;
} }
#endif #endif
@ -298,7 +298,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_set_double_array_internal(grib_handle_of_accessor(a), self->coded_values, val, *len); ret = grib_set_double_array_internal(grib_handle_of_accessor(a), self->coded_values, val, *len);
if (ret) { if (ret) {
grib_context_log(a->context, GRIB_LOG_ERROR, grib_context_log(a->context, GRIB_LOG_ERROR,
"Accessor %s cannont pack value for %s error %d \n", a->name, self->coded_values, ret); "Accessor %s cannot pack value for %s error %d \n", a->name, self->coded_values, ret);
return ret; return ret;
} }

View File

@ -222,17 +222,17 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_get_double_internal(grib_handle_of_accessor(a), self->first, &first); ret = grib_get_double_internal(grib_handle_of_accessor(a), self->first, &first);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->first, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->first, ret);
return ret; return ret;
} }
ret = grib_get_double_internal(grib_handle_of_accessor(a), self->last, &last); ret = grib_get_double_internal(grib_handle_of_accessor(a), self->last, &last);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->last, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->last, ret);
return ret; return ret;
} }
if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->directionIncrementGiven, &directionIncrementGiven)) != GRIB_SUCCESS) { if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->directionIncrementGiven, &directionIncrementGiven)) != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->directionIncrementGiven, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->directionIncrementGiven, ret);
return ret; return ret;
} }
@ -249,7 +249,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_set_long_internal(grib_handle_of_accessor(a), self->numberOfPoints, numberOfPoints); ret = grib_set_long_internal(grib_handle_of_accessor(a), self->numberOfPoints, numberOfPoints);
if (ret) if (ret)
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont pack value for %s error %d \n", a->name, self->numberOfPoints, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->numberOfPoints, ret);
grib_get_long_internal(grib_handle_of_accessor(a), self->numberOfPoints, &codedNumberOfPoints); grib_get_long_internal(grib_handle_of_accessor(a), self->numberOfPoints, &codedNumberOfPoints);
@ -257,11 +257,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_set_long_internal(grib_handle_of_accessor(a), self->directionIncrement, directionIncrement); ret = grib_set_long_internal(grib_handle_of_accessor(a), self->directionIncrement, directionIncrement);
if (ret) if (ret)
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont pack value for %s error %d \n", a->name, self->directionIncrement, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->directionIncrement, ret);
ret = grib_set_long_internal(grib_handle_of_accessor(a), self->directionIncrementGiven, directionIncrementGiven); ret = grib_set_long_internal(grib_handle_of_accessor(a), self->directionIncrementGiven, directionIncrementGiven);
if (ret) if (ret)
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont pack value for %s error %d \n", a->name, self->directionIncrementGiven, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->directionIncrementGiven, ret);
#if 0 #if 0
printf("pack -- %s=%ld %s=%ld %s=%f %s=%f %s=%ld codedNumberOfPoints=%ld %s=%f\n", printf("pack -- %s=%ld %s=%ld %s=%f %s=%f %s=%ld codedNumberOfPoints=%ld %s=%f\n",

View File

@ -215,24 +215,24 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->divisor, &divisor); ret = grib_get_long_internal(grib_handle_of_accessor(a), self->divisor, &divisor);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->divisor, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->divisor, ret);
return ret; return ret;
} }
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->multiplier, &multiplier); ret = grib_get_long_internal(grib_handle_of_accessor(a), self->multiplier, &multiplier);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->divisor, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->divisor, ret);
return ret; return ret;
} }
if (self->truncating) { if (self->truncating) {
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->truncating, &truncating); ret = grib_get_long_internal(grib_handle_of_accessor(a), self->truncating, &truncating);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->truncating, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->truncating, ret);
return ret; return ret;
} }
} }
if (multiplier == 0) { if (multiplier == 0) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont divide by a zero multiplier %s error %d \n", a->name, self->multiplier, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot divide by a zero multiplier %s error %d \n", a->name, self->multiplier, ret);
return GRIB_ENCODING_ERROR; return GRIB_ENCODING_ERROR;
} }
@ -248,7 +248,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_set_long_internal(grib_handle_of_accessor(a), self->value, value); ret = grib_set_long_internal(grib_handle_of_accessor(a), self->value, value);
if (ret) if (ret)
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont pack value for %s error %d \n", a->name, self->value, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->value, ret);
if (ret == GRIB_SUCCESS) if (ret == GRIB_SUCCESS)
*len = 1; *len = 1;
@ -271,7 +271,7 @@ static int is_missing(grib_accessor* a)
if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value,
&value) ) != GRIB_SUCCESS){ &value) ) != GRIB_SUCCESS){
grib_context_log(a->context, GRIB_LOG_ERROR, grib_context_log(a->context, GRIB_LOG_ERROR,
"Accessor %s cannont gather value for %s error %d \n", a->name, "Accessor %s cannot gather value for %s error %d \n", a->name,
self->value, ret); self->value, ret);
return 0; return 0;
} }

View File

@ -210,24 +210,24 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->divisor, &divisor); ret = grib_get_long_internal(grib_handle_of_accessor(a), self->divisor, &divisor);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->divisor, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->divisor, ret);
return ret; return ret;
} }
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->multiplier, &multiplier); ret = grib_get_long_internal(grib_handle_of_accessor(a), self->multiplier, &multiplier);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->divisor, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->divisor, ret);
return ret; return ret;
} }
if (self->truncating) { if (self->truncating) {
ret = grib_get_long_internal(grib_handle_of_accessor(a), self->truncating, &truncating); ret = grib_get_long_internal(grib_handle_of_accessor(a), self->truncating, &truncating);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->truncating, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->truncating, ret);
return ret; return ret;
} }
} }
if (multiplier == 0) { if (multiplier == 0) {
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont divide by a zero multiplier %s error %d \n", a->name, self->multiplier, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot divide by a zero multiplier %s error %d \n", a->name, self->multiplier, ret);
return GRIB_ENCODING_ERROR; return GRIB_ENCODING_ERROR;
} }
@ -243,7 +243,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
ret = grib_set_long_internal(grib_handle_of_accessor(a), self->value, value); ret = grib_set_long_internal(grib_handle_of_accessor(a), self->value, value);
if (ret) if (ret)
grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont pack value for %s error %d \n", a->name, self->value, ret); grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->value, ret);
if (ret == GRIB_SUCCESS) if (ret == GRIB_SUCCESS)
*len = 1; *len = 1;
@ -265,7 +265,7 @@ static int is_missing(grib_accessor* a)
if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, &value))!= GRIB_SUCCESS){ if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, &value))!= GRIB_SUCCESS){
grib_context_log(a->context, GRIB_LOG_ERROR, grib_context_log(a->context, GRIB_LOG_ERROR,
"Accessor %s cannont gather value for %s error %d \n", a->name, "Accessor %s cannot gather value for %s error %d \n", a->name,
self->value, ret); self->value, ret);
return 0; return 0;
} }