Deprecated action

This commit is contained in:
Shahram Najm 2023-04-19 12:33:27 +01:00
parent 33f51f2a8d
commit 5ad3d9bcff
2 changed files with 21 additions and 9 deletions

View File

@ -10,7 +10,6 @@
/***************************************************************************
* Jean Baptiste Filippi - 01.11.2005 *
* Enrico Fucile *
***************************************************************************/
#include "grib_api_internal.h"
@ -88,6 +87,9 @@ static void init_class(grib_action_class* c)
grib_action* grib_action_create_trigger(grib_context* context, grib_arguments* args, grib_action* block)
{
Assert(!"action_class_trigger::grib_action_create_trigger: 'trigger' statement is deprecated");
return NULL;
#if 0
char name[1024];
const size_t nameLen = sizeof(name);
@ -108,26 +110,31 @@ grib_action* grib_action_create_trigger(grib_context* context, grib_arguments* a
a->block = block;
return act;
#endif
}
static void dump(grib_action* act, FILE* f, int lvl)
{
/* grib_action_trigger* a = ( grib_action_trigger*)act; */
Assert(!"action_class_trigger::dump: 'trigger' statement is deprecated");
#if 0
int i = 0;
for (i = 0; i < lvl; i++)
grib_context_print(act->context, f, " ");
grib_context_print(act->context, f, "Trigger\n");
#endif
}
static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
{
Assert(!"action_class_trigger::create_accessor: 'trigger' statement is deprecated");
#if 0
int ret = GRIB_SUCCESS;
grib_action_trigger* a = (grib_action_trigger*)act;
grib_action* next = NULL;
grib_accessor* as = NULL;
grib_section* gs = NULL;
as = grib_accessor_factory(p, act, 0, NULL);
if (!as)
@ -147,7 +154,7 @@ static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
return ret;
next = next->next;
}
#endif
return GRIB_SUCCESS;
}
@ -160,8 +167,10 @@ static grib_action* reparse(grib_action* a, grib_accessor* acc, int* doit)
/* COMEBACK */
static void destroy(grib_context* context, grib_action* act)
{
grib_action_trigger* a = (grib_action_trigger*)act;
Assert(!"action_class_trigger::destroy: 'trigger' statement is deprecated");
#if 0
grib_action_trigger* a = (grib_action_trigger*)act;
grib_action* b = a->block;
while (b) {
@ -173,4 +182,5 @@ static void destroy(grib_context* context, grib_action* act)
grib_arguments_free(context, a->trigger_on);
grib_context_free_persistent(context, act->name);
grib_context_free_persistent(context, act->op);
#endif
}

View File

@ -82,7 +82,8 @@ static void init_class(grib_action_class* c)
static void dump(grib_action* act, FILE* f, int lvl)
{
Assert(!"action class while (dump): deprecated");
Assert(!"action_class_while::dump: 'while' statement is deprecated");
#if 0
grib_action_while* a = (grib_action_while*)act;
int i = 0;
@ -95,7 +96,8 @@ static void dump(grib_action* act, FILE* f, int lvl)
static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
{
Assert(!"action class while (create_accessor): deprecated");
Assert(!"action_class_while::create_accessor: 'while' statement is deprecated");
#if 0
grib_action_while* a = (grib_action_while*)act;
@ -143,7 +145,7 @@ static int create_accessor(grib_section* p, grib_action* act, grib_loader* h)
grib_action* grib_action_create_while(grib_context* context, grib_expression* expression, grib_action* block)
{
Assert(!"action class while (grib_action_create_while): deprecated");
Assert(!"action_class_while::grib_action_create_while: 'while' statement is deprecated");
return NULL;
#if 0
char name[80];
@ -170,7 +172,7 @@ grib_action* grib_action_create_while(grib_context* context, grib_expression* ex
static void destroy(grib_context* context, grib_action* act)
{
Assert(!"action class while (destroy): deprecated");
Assert(!"action_class_while::destroy: 'while' statement is deprecated");
#if 0
grib_action_while* self = (grib_action_while*)act;
grib_action* a = self->block_while;