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

Function gmtapi_decode_id

src/gmt_api.c:2915–2925  ·  view source on GitHub ↗

! . */

Source from the content-addressed store, hash-verified

2913
2914/*! . */
2915GMT_LOCAL int gmtapi_decode_id (const char *filename) {
2916 /* Checking if filename contains a name with embedded GMTAPI Object ID.
2917 * If found we return the ID, otherwise we return GMT_NOTSET.
2918 */
2919 int object_ID = GMT_NOTSET;
2920
2921 if (gmt_M_file_is_memory (filename)) { /* Passing ID of a registered object */
2922 if (sscanf (&filename[GMTAPI_OBJECT_ID_START], "%d", &object_ID) != 1) return (GMT_NOTSET); /* Get the object ID unless we fail scanning */
2923 }
2924 return (object_ID); /* Returns GMT_NOTSET if no embedded ID was found */
2925}
2926
2927/*! . */
2928bool gmtlib_data_is_geographic (struct GMTAPI_CTRL *API, const char *file) {

Callers 7

gmtapi_memory_registeredFunction · 0.85
GMT_Close_VirtualFileFunction · 0.85
GMT_Read_VirtualFileFunction · 0.85
GMT_Inquire_VirtualFileFunction · 0.85
GMT_Init_VirtualFileFunction · 0.85
GMT_Get_FamilyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected