Merge "[Epic-ID: ODUHIGH-518] Alignment to latest ORAN WG8 Spec: O-RAN.WG8.AAD.0...
[o-du/l2.git] / src / mt / ss_pack.c
index 7441a6c..2f9635a 100644 (file)
 *
 */
 
-#ifdef ANSI
-PUBLIC S16 SPkS8
+S16 SPkS8
 (
 S8 val,                     /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkS8(val, mBuf)
-S8 val;                     /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    S16 ret;                 /* return code */
-   TRC1(SPkS8)
    ret = SAddPreMsg((Data) val, mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS242, (ErrVal)ret, "SAddPreMsg() failed");
 #endif
-   RETVALUE(ret);
+   return (ret);
 } /* end of SPkS8 */
   
 
 \f  
 /*
 *
-*       Fun:   SPkU8
+*       Fun:   oduUnpackUInt8
 *
 *       Desc:  This function packs an unsigned 8 bit value into a message.
 *
@@ -128,27 +121,20 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkU8
+S16 oduUnpackUInt8
 (
-U8 val,                     /* value */
+uint8_t val,                     /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkU8(val, mBuf)
-U8 val;                     /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    S16 ret;                 /* return code */
-   TRC1(SPkU8)
    ret = SAddPreMsg((Data) val, mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS243, (ErrVal)ret, "SAddPreMsg() failed");
 #endif
-   RETVALUE(ret);
-} /* end of SPkU8 */
+   return (ret);
+} /* end of oduUnpackUInt8 */
 \f  
 /*
 *
@@ -166,22 +152,15 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkS16
+S16 SPkS16
 (
 S16 val,                    /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkS16(val, mBuf)
-S16 val;                    /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    Data pkArray[2];         /* array for packing */
    S16 ret;                 /* return code */
 
-   TRC1(SPkS16)
 #ifndef FCSPKINT            /* backward compatibility, packing order */
    pkArray[0] = (Data) GetHiByte(val);
    pkArray[1] = (Data) GetLoByte(val);
@@ -194,13 +173,13 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS244, (ErrVal)ret, "SAddPreMsgMult() failed");
 #endif
-   RETVALUE(ret);
+   return (ret);
 } /* end of SPkS16 */
   
 \f  
 /*
 *
-*       Fun:   SPkU16
+*       Fun:   oduUnpackUInt16
 *
 *       Desc:  This function packs an unsigned 16 bit value into a message.
 *
@@ -214,22 +193,15 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkU16
+S16 oduUnpackUInt16
 (
-U16 val,                    /* value */
+uint16_t val,                    /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkU16(val, mBuf)
-U16 val;                    /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    Data pkArray[2];         /* array for packing */
    S16 ret;                 /* return code */
 
-   TRC1(SPkU16)
 #ifndef FCSPKINT            /* backward compatibility, packing order */
    pkArray[0] = (Data) GetHiByte(val);
    pkArray[1] = (Data) GetLoByte(val);
@@ -242,8 +214,8 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS245, (ErrVal)ret, "SAddPreMsgMult() failed");
 #endif
-   RETVALUE(ret);
-} /* end of SPkU16 */
+   return (ret);
+} /* end of oduUnpackUInt16 */
   
 \f  
 /*
@@ -262,35 +234,28 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkS32
+S16 SPkS32
 (
 S32 val,                    /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkS32(val, mBuf)
-S32 val;                    /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
-   U16 tmp;                 /* temporary value */
+   uint16_t tmp;                 /* temporary value */
    Data pkArray[4];         /* packing array */
    S16 ret;                 /* return code */
   
-   TRC1(SPkS32)
 #ifndef FCSPKINT        /* backward compatibility, packing order */
-   tmp = (U16) GetHiWord(val);
+   tmp = (uint16_t) GetHiWord(val);
    pkArray[0] = (Data) GetHiByte(tmp);
    pkArray[1] = (Data) GetLoByte(tmp);
-   tmp = (U16) GetLoWord(val);
+   tmp = (uint16_t) GetLoWord(val);
    pkArray[2] = (Data) GetHiByte(tmp);
    pkArray[3] = (Data) GetLoByte(tmp);
 #else                   /* forward compatibility, packing order */
-   tmp = (U16) GetHiWord(val);
+   tmp = (uint16_t) GetHiWord(val);
    pkArray[3] = (Data) GetHiByte(tmp);
    pkArray[2] = (Data) GetLoByte(tmp);
-   tmp = (U16) GetLoWord(val);
+   tmp = (uint16_t) GetLoWord(val);
    pkArray[1] = (Data) GetHiByte(tmp);
    pkArray[0] = (Data) GetLoByte(tmp);
 #endif
@@ -299,13 +264,13 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS246, (ErrVal)ret, "SAddPreMsgMult() failed");
 #endif
-   RETVALUE(ret);
+   return (ret);
 } /* end of SPkS32 */
   
 \f  
 /*
 *
-*       Fun:   SPkU32
+*       Fun:   oduUnpackUInt32
 *
 *       Desc:  This function packs an unsigned 32 bit value into a message.
 *
@@ -319,35 +284,28 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkU32
+S16 oduUnpackUInt32
 (
-U32 val,                    /* value */
+uint32_t val,                    /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkU32(val, mBuf)
-U32 val;                    /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
-   U16 tmp;                 /* temporary value */
+   uint16_t tmp;                 /* temporary value */
    Data pkArray[4];         /* packing array */
    S16 ret;                 /* return code */
   
-   TRC1(SPkU32)
 #ifndef FCSPKINT        /* backward compatibility, packing order */
-   tmp = (U16) GetHiWord(val);
+   tmp = (uint16_t) GetHiWord(val);
    pkArray[0] = (Data) GetHiByte(tmp);
    pkArray[1] = (Data) GetLoByte(tmp);
-   tmp = (U16) GetLoWord(val);
+   tmp = (uint16_t) GetLoWord(val);
    pkArray[2] = (Data) GetHiByte(tmp);
    pkArray[3] = (Data) GetLoByte(tmp);
 #else                   /* forward compatibility, packing order */
-   tmp = (U16) GetHiWord(val);
+   tmp = (uint16_t) GetHiWord(val);
    pkArray[3] = (Data) GetHiByte(tmp);
    pkArray[2] = (Data) GetLoByte(tmp);
-   tmp = (U16) GetLoWord(val);
+   tmp = (uint16_t) GetLoWord(val);
    pkArray[1] = (Data) GetHiByte(tmp);
    pkArray[0] = (Data) GetLoByte(tmp);
 #endif
@@ -356,8 +314,8 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS247, (ErrVal)ret, "SAddPreMsgMult() failed");
 #endif
-   RETVALUE(ret);
-} /* end of SPkU32 */
+   return (ret);
+} /* end of oduUnpackUInt32 */
 
 /*ss038.103  1. Added Floating point support*/
 #ifdef SS_FLOAT
@@ -377,17 +335,11 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkF32
+S16 SPkF32
 (
 F32 val,                    /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkF32(val, mBuf)
-F32 val;                    /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    S16  ret;                /* return code */
    S8   tmpArray[15];       /* temporary array */
@@ -397,8 +349,6 @@ Buffer *mBuf;               /* message buffer */
    S8   pkArray[15];        /* packing array */
 #endif /*FCSPKINT*/
   
-   TRC1(SPkF32)
-
    sprintf(tmpArray, "%.7e", val);
 
 #ifndef FCSPKINT            /* backward compatibility, packing order */
@@ -417,7 +367,7 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS248, (ErrVal)ret, "SAddPreMsgMult() failed");
 #endif
-   RETVALUE(ret);
+   return (ret);
 } /* end of SPkF32 */
 
 /*
@@ -436,17 +386,11 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SPkF64
+S16 SPkF64
 (
 F64 val,                    /* value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SPkF64(val, mBuf)
-F64 val;                    /* value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
 
    S16  ret;                /* return code */
@@ -457,8 +401,6 @@ Buffer *mBuf;               /* message buffer */
    S8   pkArray[25];        /* packing array */
 #endif /*FCSPKINT*/
   
-   TRC1(SPkF64)
-
    sprintf(tmpArray, "%.16le", val);
 
 #ifndef FCSPKINT            /* backward compatibility, packing order */
@@ -477,7 +419,7 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_ADD_RES, ESS249, (ErrVal)ret, "SAddPreMsgMult() failed");
 #endif
-   RETVALUE(ret);
+   return (ret);
 
 } /* end of SPkF64 */
 #endif /* SS_FLOAT */
@@ -496,21 +438,14 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkS8
+S16 SUnpkS8
 (
 S8 *val,                    /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkS8(val, mBuf)
-S8 *val;                    /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    Data tmp;                /* temporary value */
    S16 ret;                 /* return code */
-   TRC1(SUnpkS8)
 
 /* ss021.103 - Addition of data pointer check */
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -518,7 +453,7 @@ Buffer *mBuf;               /* message buffer */
    if (!val)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS250, ERRZERO, "SUnpkS8 : Null value");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -528,13 +463,13 @@ Buffer *mBuf;               /* message buffer */
       SSLOGERROR(ERRCLS_DEBUG, ESS251, (ErrVal)ret, "SRemPreMsg() failed");
 #endif
    *val = (S8) tmp;
-   RETVALUE(ret);
+   return (ret);
 } /* end of SUnpkS8 */
   
 \f  
 /*
 *
-*       Fun:   SUnpkU8
+*       Fun:   oduPackUInt8
 *
 *       Desc:  This function unpacks an unsigned 8 bit value from a message.
 *
@@ -546,29 +481,22 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkU8
+S16 oduPackUInt8
 (
-U8 *val,                    /* pointer to value */
+uint8_t *val,                    /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkU8(val, mBuf)
-U8 *val;                    /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    Data tmp;                /* temporary value */
    S16 ret;                 /* return code */
-   TRC1(SUnpkU8)
 
 /* ss021.103 - Addition of data pointer check */
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!val)
    {
-      SSLOGERROR(ERRCLS_INT_PAR, ESS252, ERRZERO, "SUnpkU8 : Null value");
-      RETVALUE(RFAILED);
+      SSLOGERROR(ERRCLS_INT_PAR, ESS252, ERRZERO, "oduPackUInt8 : Null value");
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -577,9 +505,9 @@ Buffer *mBuf;               /* message buffer */
    if (ret != ROK)
       SSLOGERROR(ERRCLS_DEBUG, ESS253, (ErrVal)ret, "SRemPreMsg() failed");
 #endif
-   *val = (U8) tmp;
-   RETVALUE(ret);
-} /* end of SUnpkU8 */
+   *val = (uint8_t) tmp;
+   return (ret);
+} /* end of oduPackUInt8 */
 \f  
 /*
 *
@@ -595,22 +523,15 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkS16
+S16 SUnpkS16
 (
 S16 *val,                   /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkS16(val, mBuf)
-S16 *val;                   /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
-   U16 tmp16;               /* temporary value */
+   uint16_t tmp16;               /* temporary value */
    Data unpkArray[2];       /* unpacking array */
    S16 ret;                 /* return code */
-   TRC1(SUnpkS16)
 
 /* ss021.103 - Addition of data pointer check */
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -618,7 +539,7 @@ Buffer *mBuf;               /* message buffer */
    if (!val)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS254, ERRZERO, "SUnpkS16 : Null value");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -629,20 +550,20 @@ Buffer *mBuf;               /* message buffer */
 #endif
    tmp16 = 0; 
 #ifndef FCSPKINT            /* backward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[1]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[0]);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[1]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[0]);
 #else                       /* forward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[0]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[1]);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[0]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[1]);
 #endif
    *val = (S16) tmp16;
-   RETVALUE(ret);
+   return (ret);
 } /* end of SUnpkS16 */
   
 \f  
 /*
 *
-*       Fun:   SUnpkU16
+*       Fun:   oduPackUInt16
 *
 *       Desc:  This function unpacks an unsigned 16 bit value from a message.
 *
@@ -654,30 +575,23 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkU16
+S16 oduPackUInt16
 (
-U16 *val,                   /* pointer to value */
+uint16_t *val,                   /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkU16(val, mBuf)
-U16 *val;                   /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
-   U16 tmp16;               /* temporary value */
+   uint16_t tmp16;               /* temporary value */
    Data unpkArray[2];       /* unpacking array */
    S16 ret;                 /* return code */
-   TRC1(SUnpkU16)
 
 /* ss021.103 - Addition of data pointer check */
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!val)
    {
-      SSLOGERROR(ERRCLS_INT_PAR, ESS256, ERRZERO, "SUnpkU16 : Null value");
-      RETVALUE(RFAILED);
+      SSLOGERROR(ERRCLS_INT_PAR, ESS256, ERRZERO, "oduPackUInt16 : Null value");
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -688,15 +602,15 @@ Buffer *mBuf;               /* message buffer */
 #endif
    tmp16 = 0; 
 #ifndef FCSPKINT            /* backward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[1]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[0]);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[1]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[0]);
 #else                       /* forward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[0]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[1]);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[0]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[1]);
 #endif
    *val = tmp16;
-   RETVALUE(ret);
-} /* end of SUnpkU16 */
+   return (ret);
+} /* end of oduPackUInt16 */
   
 \f  
 /*
@@ -713,23 +627,16 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkS32
+S16 SUnpkS32
 (
 S32 *val,                   /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkS32(val, mBuf)
-S32 *val;                   /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
-   U16 tmp16;               /* temporary value */
-   U32 tmp32;               /* temporary value */
+   uint16_t tmp16;               /* temporary value */
+   uint32_t tmp32;               /* temporary value */
    Data unpkArray[4];       /* unpacking array */
    S16 ret;                 /* return code */
-   TRC1(SUnpkS32)
 
 /* ss021.103 - Addition of data pointer check */
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -737,7 +644,7 @@ Buffer *mBuf;               /* message buffer */
    if (!val)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS258, ERRZERO, "SUnpkS32 : Null value");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -749,28 +656,28 @@ Buffer *mBuf;               /* message buffer */
    tmp16 = 0;
    tmp32 = 0; 
 #ifndef FCSPKINT            /* backward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[3]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[2]);
-   tmp32 = (U32) PutHiWord(tmp32, (U16) tmp16);
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[1]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[0]);
-   tmp32 = (U32) PutLoWord(tmp32, (U16) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[3]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[2]);
+   tmp32 = (uint32_t) PutHiWord(tmp32, (uint16_t) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[1]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[0]);
+   tmp32 = (uint32_t) PutLoWord(tmp32, (uint16_t) tmp16);
 #else                       /* forward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[0]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[1]);
-   tmp32 = (U32) PutHiWord(tmp32, (U16) tmp16);
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[2]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[3]);
-   tmp32 = (U32) PutLoWord(tmp32, (U16) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[0]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[1]);
+   tmp32 = (uint32_t) PutHiWord(tmp32, (uint16_t) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[2]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[3]);
+   tmp32 = (uint32_t) PutLoWord(tmp32, (uint16_t) tmp16);
 #endif
    *val = (S32) tmp32;
-   RETVALUE(ret);
+   return (ret);
 } /* end of SUnpkS32 */
   
 \f  
 /*
 *
-*       Fun:   SUnpkU32
+*       Fun:   oduPackUInt32
 *
 *       Desc:  This function unpacks an unsigned 32 bit value from a message.
 *
@@ -782,33 +689,26 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkU32
+S16 oduPackUInt32
 (
-U32 *val,                   /* pointer to value */
+uint32_t *val,                   /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkU32(val, mBuf)
-U32 *val;                   /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
-   U16 tmp16;               /* temporary value */
-   U32 tmp32;               /* temporary value */
+   uint16_t tmp16;               /* temporary value */
+   uint32_t tmp32;               /* temporary value */
    Data unpkArray[4];       /* unpacking array */
 #ifdef ERRCLASS
    S16 ret;                 /* return code */
 #endif /* ERRCLASS */
-   TRC1(SUnpkU32)
 
 /* ss021.103 - Addition of data pointer check */
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!val)
    {
-      SSLOGERROR(ERRCLS_INT_PAR, ESS260, ERRZERO, "SUnpkU32 : Null value");
-      RETVALUE(RFAILED);
+      SSLOGERROR(ERRCLS_INT_PAR, ESS260, ERRZERO, "oduPackUInt32 : Null value");
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -821,23 +721,23 @@ Buffer *mBuf;               /* message buffer */
    tmp16 = 0;
    tmp32 = 0; 
 #ifndef FCSPKINT            /* backward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[3]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[2]);
-   tmp32 = (U32) PutHiWord(tmp32, (U16) tmp16);
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[1]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[0]);
-   tmp32 = (U32) PutLoWord(tmp32, (U16) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[3]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[2]);
+   tmp32 = (uint32_t) PutHiWord(tmp32, (uint16_t) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[1]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[0]);
+   tmp32 = (uint32_t) PutLoWord(tmp32, (uint16_t) tmp16);
 #else                       /* forward compatibility, packing order */
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[0]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[1]);
-   tmp32 = (U32) PutHiWord(tmp32, (U16) tmp16);
-   tmp16 = (U16) PutHiByte(tmp16, (U8) unpkArray[2]);
-   tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[3]);
-   tmp32 = (U32) PutLoWord(tmp32, (U16) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[0]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[1]);
+   tmp32 = (uint32_t) PutHiWord(tmp32, (uint16_t) tmp16);
+   tmp16 = (uint16_t) PutHiByte(tmp16, (uint8_t) unpkArray[2]);
+   tmp16 = (uint16_t) PutLoByte(tmp16, (uint8_t) unpkArray[3]);
+   tmp32 = (uint32_t) PutLoWord(tmp32, (uint16_t) tmp16);
 #endif
    *val = tmp32;
-   RETVALUE(ret);
-} /* end of SUnpkU32 */
+   return (ret);
+} /* end of oduPackUInt32 */
 
 /*ss038.103  1. Added Floating point support*/
 #ifdef SS_FLOAT
@@ -855,17 +755,11 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkF32
+S16 SUnpkF32
 (
 F32 *val,                   /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkF32(val, mBuf)
-F32 *val;                   /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    S16 ret;                 /* return code */
    S8 tmpArray[15];         /* temporary array */
@@ -875,14 +769,12 @@ Buffer *mBuf;               /* message buffer */
    S8 unpkArray[15];        /* unpacking array */
 #endif /* FCSPKINT */
 
-   TRC1(SUnpkF32)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!val)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS262, ERRZERO, "SUnpkF32 : Null value");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -903,7 +795,7 @@ Buffer *mBuf;               /* message buffer */
    sscanf(tmpArray, "%f", val);
 #endif
 
-   RETVALUE(ret);
+   return (ret);
 
 } /* end of SUnpkF32 */
 
@@ -921,17 +813,11 @@ Buffer *mBuf;               /* message buffer */
 *
 */
   
-#ifdef ANSI
-PUBLIC S16 SUnpkF64
+S16 SUnpkF64
 (
 F64 *val,                   /* pointer to value */
 Buffer *mBuf                /* message buffer */
 )
-#else
-PUBLIC S16 SUnpkF64(val, mBuf)
-F64 *val;                   /* pointer to value */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
 
    S16 ret;                 /* return code */
@@ -942,14 +828,12 @@ Buffer *mBuf;               /* message buffer */
    S8 unpkArray[25];        /* unpacking array */
 #endif /* FCSPKINT */
 
-   TRC1(SUnpkF64)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!val)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS264, ERRZERO, "SUnpkF64 : Null value");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -970,7 +854,7 @@ Buffer *mBuf;               /* message buffer */
    sscanf(tmpArray, "%lf", val);
 #endif
 
-   RETVALUE(ret);
+   return (ret);
 
 } /* end of SUnpkF64 */
 #endif /* SS_FLOAT */