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

Function gmtapi_retrieve_vector

src/gmt_api.c:15519–15538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15517}
15518
15519GMT_LOCAL void * gmtapi_retrieve_vector (void *API, union GMT_UNIVECTOR *V, unsigned int type) {
15520 void *vector = NULL;
15521 gmt_M_unused (API);
15522 switch (type) {
15523 case GMT_DOUBLE: vector = V->f8; break;
15524 case GMT_FLOAT: vector = V->f4; break;
15525 case GMT_ULONG: vector = V->ui8; break;
15526 case GMT_LONG: vector = V->si8; break;
15527 case GMT_UINT: vector = V->ui4; break;
15528 case GMT_INT: vector = V->si4; break;
15529 case GMT_USHORT: vector = V->ui2; break;
15530 case GMT_SHORT: vector = V->si2; break;
15531 case GMT_UCHAR: vector = V->uc1; break;
15532 case GMT_CHAR: vector = V->sc1; break;
15533 default:
15534 return NULL;
15535 break;
15536 }
15537 return vector;
15538}
15539
15540int GMT_Put_Vector (void *V_API, struct GMT_VECTOR *V, unsigned int col, unsigned int type, void *vector) {
15541 /* Hooks a users custom vector onto V's column array and sets the type.

Callers 3

GMT_Put_VectorFunction · 0.85
GMT_Get_VectorFunction · 0.85
GMT_Get_MatrixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected