ECC-241: Make the installation paths available through the API

This commit is contained in:
Shahram Najm 2016-03-16 18:10:40 +00:00
parent a005315b0d
commit a4fdf10170
4 changed files with 11 additions and 0 deletions

View File

@ -17,6 +17,10 @@ char* codes_samples_path(const grib_context *c)
{ {
return grib_samples_path(c); return grib_samples_path(c);
} }
char* codes_definition_path(const grib_context *c)
{
return grib_definition_path(c);
}
long codes_get_api_version(void) long codes_get_api_version(void)
{ {
return grib_get_api_version(); return grib_get_api_version();

View File

@ -1174,6 +1174,7 @@ void grib_multi_support_off(grib_context* c);
void grib_multi_support_reset_file(grib_context* c, FILE* f); void grib_multi_support_reset_file(grib_context* c, FILE* f);
char* grib_samples_path(const grib_context *c); char* grib_samples_path(const grib_context *c);
char* grib_definition_path(const grib_context *c);
/*! @} */ /*! @} */
/** /**

View File

@ -920,6 +920,7 @@ void grib_print_api_version(FILE *out);
grib_context *grib_context_get_default(void); grib_context *grib_context_get_default(void);
char *grib_context_full_defs_path(grib_context *c, const char *basename); char *grib_context_full_defs_path(grib_context *c, const char *basename);
char *grib_samples_path(const grib_context *c); char *grib_samples_path(const grib_context *c);
char *grib_definition_path(const grib_context *c);
void grib_context_free(const grib_context *c, void *p); void grib_context_free(const grib_context *c, void *p);
void grib_context_free_persistent(const grib_context *c, void *p); void grib_context_free_persistent(const grib_context *c, void *p);
void grib_context_reset(grib_context *c); void grib_context_reset(grib_context *c);

View File

@ -657,6 +657,11 @@ char* grib_samples_path(const grib_context *c)
if (!c) c=grib_context_get_default(); if (!c) c=grib_context_get_default();
return c->grib_samples_path; return c->grib_samples_path;
} }
char* grib_definition_path(const grib_context *c)
{
if (!c) c=grib_context_get_default();
return c->grib_definition_files_path;
}
void grib_context_free(const grib_context* c, void* p) void grib_context_free(const grib_context* c, void* p)
{ {