diff --git a/ChangeLog b/ChangeLog index df40b1956cc2d900104cb1572a1db6d3b433c8fc..3c80e270fd6a9f5ce038c6c5bf7dc5045d2a47b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * Version 2.5.1 released +2025-02-06 Uwe Schulzweida + + * Added obsolete functions vlistNgrids() and vlistNzaxis() for ParaView vtkCDIReader + 2025-02-01 Uwe Schulzweida * Added support for READ_CELL_CENTER=false diff --git a/src/cdi.h b/src/cdi.h index 060f5b2bb0b93022d6c94c5d5adb5843376ab9e4..32e8e7cbb9beddb629833c771dd2e9936ca59524 100644 --- a/src/cdi.h +++ b/src/cdi.h @@ -1315,6 +1315,10 @@ int vlistInqVarTypeOfGeneratingProcess(int vlistID, int varID); void vlistDefVarTypeOfGeneratingProcess(int vlistID, int varID, int typeOfGeneratingProcess); void vlistDefVarProductDefinitionTemplate(int vlistID, int varID, int productDefinitionTemplate); +// Compatibility functions for ParaView vtkCDIReader (obsolete functions) +int vlistNgrids(int vlistID); // calls vlistNumGrids() +int vlistNzaxis(int vlistID); // calls vlistNumZaxis() + #ifdef __cplusplus } #endif diff --git a/src/vlist.c b/src/vlist.c index b7af82e762f6f1844b39ce9ad95725e47b24bc20..a6bf4888ee0e7ebcea82061e0bcf35a52c14eb74 100644 --- a/src/vlist.c +++ b/src/vlist.c @@ -1013,10 +1013,15 @@ int vlistNumGrids(int vlistID) { vlist_t *vlistptr = vlist_to_pointer(vlistID); - return vlistptr->ngrids; } +int +vlistNgrids(int vlistID) +{ + return vlistNumGrids(vlistID); +} + /* @Function vlistNumZaxis @Title Number of zaxis in a variable list @@ -1037,15 +1042,19 @@ int vlistNumZaxis(int vlistID) { vlist_t *vlistptr = vlist_to_pointer(vlistID); - return vlistptr->nzaxis; } +int +vlistNzaxis(int vlistID) +{ + return vlistNumZaxis(vlistID); +} + int vlistNsubtypes(int vlistID) { vlist_t *vlistptr = vlist_to_pointer(vlistID); - return vlistptr->nsubtypes; } @@ -1066,7 +1075,6 @@ int vlistNtsteps(int vlistID) { vlist_t *vlistptr = vlist_to_pointer(vlistID); - return (int) vlistptr->ntsteps; }