MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / xdr_short

Function xdr_short

src/common/xdr.cpp:660–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658
659
660bool_t xdr_short(xdr_t* xdrs, SSHORT* ip)
661{
662/**************************************
663 *
664 * x d r _ s h o r t
665 *
666 **************************************
667 *
668 * Functional description
669 * Map from external to internal representation (or vice versa).
670 *
671 **************************************/
672 SLONG temp;
673
674 switch (xdrs->x_op)
675 {
676 case XDR_ENCODE:
677 temp = *ip;
678 return PUTLONG(xdrs, &temp);
679
680 case XDR_DECODE:
681 if (!GETLONG(xdrs, &temp))
682 return FALSE;
683 *ip = (SSHORT) temp;
684 return TRUE;
685
686 case XDR_FREE:
687 return TRUE;
688 }
689
690 return FALSE;
691}
692
693
694bool_t xdr_string(xdr_t* xdrs, SCHAR** sp, unsigned maxlength)

Callers 2

CAN_encode_decodeFunction · 0.85
xdr_datumFunction · 0.85

Calls 2

PUTLONGFunction · 0.85
GETLONGFunction · 0.85

Tested by

no test coverage detected