mirror of https://github.com/ecmwf/eccodes.git
Remove tabs
This commit is contained in:
parent
495e4185c2
commit
ff3039cb7c
|
@ -31,8 +31,8 @@ static void encode_double_array_common(int numBits, long packStart, long datasiz
|
|||
/* note float -> unsigned int .. truncate */
|
||||
ival = (unsigned int)((data[i] - zref) * factor + 0.5);
|
||||
/*
|
||||
if ( ival > max_nbpv_pow2 ) ival = max_nbpv_pow2;
|
||||
if ( ival < 0 ) ival = 0;
|
||||
if ( ival > max_nbpv_pow2 ) ival = max_nbpv_pow2;
|
||||
if ( ival < 0 ) ival = 0;
|
||||
*/
|
||||
jbits = numBits;
|
||||
while (cbits <= jbits) {
|
||||
|
|
|
@ -131,14 +131,14 @@ static void init_class(grib_accessor_class* c)
|
|||
static void dump(grib_accessor* a, grib_dumper* dumper)
|
||||
{
|
||||
#if 0
|
||||
/* grib_accessor_forward* self = (grib_accessor_forward*)a; */
|
||||
grib_accessor *target = grib_find_accessor(grib_handle_of_accessor(a),a->alias);
|
||||
if(target) {
|
||||
grib_dump_label(dumper,a,"is:");
|
||||
dumper->depth += 2;
|
||||
grib_accessor_dump(target, dumper);
|
||||
dumper->depth -= 2;
|
||||
}
|
||||
else grib_dump_label(dumper,a," undefined ");
|
||||
/* grib_accessor_forward* self = (grib_accessor_forward*)a; */
|
||||
grib_accessor *target = grib_find_accessor(grib_handle_of_accessor(a),a->alias);
|
||||
if(target) {
|
||||
grib_dump_label(dumper,a,"is:");
|
||||
dumper->depth += 2;
|
||||
grib_accessor_dump(target, dumper);
|
||||
dumper->depth -= 2;
|
||||
}
|
||||
else grib_dump_label(dumper,a," undefined ");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -144,14 +144,14 @@ static void init(grib_accessor* a, const long len, grib_arguments* args)
|
|||
static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||
{
|
||||
#if 0
|
||||
grib_accessor_class* super = *(a->cclass->super);
|
||||
grib_accessor_class* super = *(a->cclass->super);
|
||||
|
||||
/* Here we assume that the totalLength will be coded AFTER the section4 length, and
|
||||
the section4 length will be overwritten by the totalLength accessor for large GRIBs */
|
||||
|
||||
/*printf("UPDATING sec4len %ld\n",*val);*/
|
||||
/* Here we assume that the totalLength will be coded AFTER the section4 length, and
|
||||
the section4 length will be overwritten by the totalLength accessor for large GRIBs */
|
||||
|
||||
/*printf("UPDATING sec4len %ld\n",*val);*/
|
||||
|
||||
return super->pack_long(a,val,len);
|
||||
return super->pack_long(a,val,len);
|
||||
#endif
|
||||
/* Do not directly call pack_long on base class */
|
||||
/* because in this special case we want to skip the checks. */
|
||||
|
|
|
@ -229,12 +229,12 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
|||
if (ret) return ret;
|
||||
|
||||
/*
|
||||
if(*len < rlen)
|
||||
{
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||
"Wrong size for %s it contains %d values ", a->name , rlen );
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
if(*len < rlen)
|
||||
{
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||
"Wrong size for %s it contains %d values ", a->name , rlen );
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
*/
|
||||
if (*len != rlen)
|
||||
ret = grib_set_long(grib_handle_of_accessor(a), self->numberOfElements, *len);
|
||||
|
|
|
@ -90,7 +90,7 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)
|
|||
grib_expression_functor* e = (grib_expression_functor*)g;
|
||||
|
||||
/*
|
||||
TODO: needs OO code here
|
||||
TODO: needs OO code here
|
||||
*/
|
||||
if (strcmp(e->name, "lookup") == 0) {
|
||||
return GRIB_SUCCESS;
|
||||
|
|
|
@ -112,7 +112,7 @@ grib_expression* new_sub_string_expression(grib_context* c, const char* value, s
|
|||
char v[1024] = {0,};
|
||||
grib_expression_sub_string* e = (grib_expression_sub_string*)grib_context_malloc_clear_persistent(c, sizeof(grib_expression_sub_string));
|
||||
const size_t slen = strlen(value);
|
||||
/* if (start<0) start+=strlen(value); */
|
||||
/* if (start<0) start+=strlen(value); */
|
||||
|
||||
if (length == 0) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "Invalid substring: length must be > 0");
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
static pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER;
|
||||
static void init() {
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&mutex1,&attr);
|
||||
pthread_mutex_init(&mutex2,&attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&mutex1,&attr);
|
||||
pthread_mutex_init(&mutex2,&attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
}
|
||||
/* #elif GRIB_OMP_THREADS */
|
||||
static int once = 0;
|
||||
|
|
Loading…
Reference in New Issue