mirror of https://github.com/ecmwf/eccodes.git
Rename functions not to use double underscores
This commit is contained in:
parent
48801c4fb7
commit
479d5bb4c4
|
@ -1173,7 +1173,7 @@ int grib_get_double_array(const grib_handle* h, const char* name, double* val, s
|
|||
int grib_get_float_array_internal(const grib_handle* h, const char* name, float* val, size_t* length);
|
||||
int grib_get_float_array(const grib_handle* h, const char* name, float* val, size_t* length);
|
||||
|
||||
int ecc__grib_get_string_length(grib_accessor* a, size_t* size);
|
||||
int grib_get_string_length_acc(grib_accessor* a, size_t* size);
|
||||
int grib_get_string_length(const grib_handle* h, const char* name, size_t* size);
|
||||
int ecc__grib_get_size(const grib_handle* h, grib_accessor* a, size_t* size);
|
||||
int grib_get_size(const grib_handle* h, const char* name, size_t* size);
|
||||
|
|
|
@ -385,7 +385,7 @@ static int unpack_string_array(grib_accessor* a, char** v, size_t* len)
|
|||
{
|
||||
size_t length = 0;
|
||||
|
||||
int err = ecc__grib_get_string_length(a, &length);
|
||||
int err = grib_get_string_length_acc(a, &length);
|
||||
if (err)
|
||||
return err;
|
||||
v[0] = (char*)grib_context_malloc_clear(a->context, length);
|
||||
|
|
|
@ -150,7 +150,7 @@ static size_t string_length(grib_accessor* a)
|
|||
if (self->length)
|
||||
return self->length;
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
@ -675,7 +675,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
const char* acc_name = a->name;
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -611,7 +611,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0 || (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) != 0)
|
||||
return;
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -724,7 +724,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
const char* acc_name = a->name;
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -665,7 +665,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
const char* acc_name = a->name;
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
if (a->length == 0 && (d->option_flags & GRIB_DUMP_FLAG_CODED) != 0)
|
||||
return;
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
if ((size < 2) && grib_is_missing_internal(a)) {
|
||||
/* GRIB-302: transients and missing keys. Need to re-adjust the size */
|
||||
size = 10; /* big enough to hold the string "missing" */
|
||||
|
|
|
@ -410,7 +410,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
return;
|
||||
}
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
/* ECC-710: It is MUCH slower determining the string length here
|
||||
* than using a maximum size (and no need for malloc).
|
||||
* Specially for BUFR elements */
|
||||
/* err = ecc__grib_get_string_length(a,&size);
|
||||
/* err = grib_get_string_length_acc(a,&size);
|
||||
* if (size==0) return;
|
||||
* value=(char*)grib_context_malloc_clear(a->context,size);
|
||||
* if (!value) {
|
||||
|
|
|
@ -311,7 +311,7 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
return;
|
||||
}
|
||||
|
||||
ecc__grib_get_string_length(a, &size);
|
||||
grib_get_string_length_acc(a, &size);
|
||||
value = (char*)grib_context_malloc_clear(a->context, size);
|
||||
if (!value) {
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR, "unable to allocate %zu bytes", size);
|
||||
|
|
|
@ -166,7 +166,7 @@ int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_
|
|||
|
||||
switch (ga_type) {
|
||||
case GRIB_TYPE_STRING:
|
||||
/*ecc__grib_get_string_length(ga,&len); See ECC-490 */
|
||||
/*grib_get_string_length_acc(ga,&len); See ECC-490 */
|
||||
grib_get_string_length(h, name, &len);
|
||||
sval = (char*)grib_context_malloc(h->context, len);
|
||||
ret = grib_get_string_internal(h, name, sval, &len);
|
||||
|
|
|
@ -1358,7 +1358,7 @@ int grib_get_array<double>(const grib_handle* h, const char* name, double* val,
|
|||
return grib_get_double_array(h, name, val, length);
|
||||
}
|
||||
|
||||
int ecc__grib_get_string_length(grib_accessor* a, size_t* size)
|
||||
int grib_get_string_length_acc(grib_accessor* a, size_t* size)
|
||||
{
|
||||
size_t s = 0;
|
||||
|
||||
|
@ -1384,7 +1384,7 @@ int grib_get_string_length(const grib_handle* h, const char* name, size_t* size)
|
|||
al = grib_find_accessors_list(h, name);
|
||||
if (!al)
|
||||
return GRIB_NOT_FOUND;
|
||||
ret = ecc__grib_get_string_length(al->accessor, size);
|
||||
ret = grib_get_string_length_acc(al->accessor, size);
|
||||
grib_context_free(h->context, al);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1392,7 +1392,7 @@ int grib_get_string_length(const grib_handle* h, const char* name, size_t* size)
|
|||
a = grib_find_accessor(h, name);
|
||||
if (!a)
|
||||
return GRIB_NOT_FOUND;
|
||||
return ecc__grib_get_string_length(a, size);
|
||||
return grib_get_string_length_acc(a, size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue