MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtapi_memory_registered

Function gmtapi_memory_registered

src/gmt_api.c:3345–3355  ·  view source on GitHub ↗

Unused code - probably can be removed but like unused DNA in-between the useful stuff */

Source from the content-addressed store, hash-verified

3343#if 0
3344/* Unused code - probably can be removed but like unused DNA in-between the useful stuff */
3345GMT_LOCAL int gmtapi_memory_registered (struct GMTAPI_CTRL *API, enum GMT_enum_family family, unsigned int direction, void *resource) {
3346 int object_ID = 0, item;
3347 unsigned int module_input = (family & GMT_VIA_MODULE_INPUT); /* Are we dealing with a resource that is a module input? */
3348 family -= module_input;
3349
3350 if (family == GMT_IS_COORD) return (GMT_NOTSET); /* Coordinate arrays cannot be a registered memory resource */
3351 if ((object_ID = gmtapi_decode_id (resource)) == GMT_NOTSET) return (GMT_NOTSET); /* Not a registered resource */
3352 if ((item = gmtlib_validate_id (API, family, object_ID, direction, GMT_NOTSET)) == GMT_NOTSET) return (GMT_NOTSET); /* Not the right attributes */
3353 if (module_input && direction == GMT_IN) API->object[item]->module_input = true; /* Flag this object as a module input resource */
3354 return (object_ID); /* resource is a registered and valid item */
3355}
3356#endif
3357
3358/*! Determine if resource is a filename that has already been registered */

Callers 2

gmtapi_is_registeredFunction · 0.85
GMT_Write_DataFunction · 0.85

Calls 3

gmtapi_decode_idFunction · 0.85
gmtlib_validate_idFunction · 0.85
GMT_ReportFunction · 0.85

Tested by

no test coverage detected