src/grib_dumper_class.c
/* Note: if the dumper passed in is non-NULL, it will be freed up */
if the dumper passed in is non-NULL, it will be freed up
if the dumper passed in is non - NULL it will be freed up
grib_dumper* grib_dump_content_with_dumper(grib_handle* h, grib_dumper* dumper, FILE* f, const char* mode, unsigned long flags, void* data)
{
    long count = 1;
    if (dumper != NULL) {
        count = dumper->count;
        count++;
        grib_dumper_delete(dumper);
    }
    dumper = grib_dumper_factory(mode ? mode : "serialize", h, f, flags, data);
    if (!dumper)
        return NULL;
    dumper->count = count;
    grib_dump_header(dumper, h);
    grib_dump_accessors_block(dumper, h->root->block);
    grib_dump_footer(dumper, h);
    return dumper;
}
grib_dumper * grib_dump_content_with_dumper ( grib_handle * h , grib_dumper * dumper , FILE * f , const char * mode , unsigned long flags , void * data ) { long count = 1 ; if ( dumper != NULL ) { count = dumper -> count ; count ++ ; grib_dumper_delete ( dumper ) ; } dumper = grib_dumper_factory ( mode ? mode : " " , h , f , flags , data ) ; if ( ! dumper ) return NULL ; dumper -> count = count ; grib_dump_header ( dumper , h ) ; grib_dump_accessors_block ( dumper , h -> root -> block ) ; grib_dump_footer ( dumper , h ) ; return dumper ; }
Note: if the dumper passed in is non-NULL, it will be freed up
Note : if the dumper passed in is non - NULL it will be freed up