Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[ JIRA Id - ODUHIGH-606 ] Fixing null memory size allocation issue
[o-du/l2.git]
/
src
/
cm
/
cm_tkns.c
diff --git
a/src/cm/cm_tkns.c
b/src/cm/cm_tkns.c
index
d3ce6db
..
2a477ae
100644
(file)
--- a/
src/cm/cm_tkns.c
+++ b/
src/cm/cm_tkns.c
@@
-66,17
+66,11
@@
File: cm_tkns.c
*
*/
File: cm_tkns.c
*
*/
-#ifdef ANSI
S16 cmPkTknS16
(
TknS16 *tknS16, /* token S16 */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknS16
(
TknS16 *tknS16, /* token S16 */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknS16(tknS16, mBuf)
-TknS16 *tknS16; /* token S16 */
-Buffer *mBuf; /* message buffer */
-#endif
{
if (tknS16->pres)
{
if (tknS16->pres)
@@
-86,7
+80,7
@@
Buffer *mBuf; /* message buffer */
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknS16->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknS16->pres, mBuf);
return ROK;
} /* end of cmPkTknS16 */
return ROK;
} /* end of cmPkTknS16 */
@@
-106,17
+100,11
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknBStr32
(
TknBStr32 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknBStr32
(
TknBStr32 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknBStr32(tknStr, mBuf)
-TknBStr32 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
CMPKTKNBSTR(tknStr, mBuf);
{
CMPKTKNBSTR(tknStr, mBuf);
@@
-139,17
+127,11
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStr8
(
TknStr8 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStr8
(
TknStr8 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStr8(tknStr, mBuf)
-TknStr8 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
CMPKTKNSTR(tknStr, mBuf);
{
CMPKTKNSTR(tknStr, mBuf);
@@
-173,17
+155,11
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStr16
(
TknStr16 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStr16
(
TknStr16 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStr16(tknStr, mBuf)
-TknStr16 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
CMPKTKNSTR(tknStr, mBuf);
{
CMPKTKNSTR(tknStr, mBuf);
@@
-207,19
+183,13
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStrOSXL
(
TknStrOSXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStrOSXL
(
TknStrOSXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStrOSXL(tknStr, mBuf)
-TknStrOSXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U16
ndx;
+
uint16_t
ndx;
if(tknStr->pres)
if(tknStr->pres)
@@
-227,13
+197,13
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
- CMCHKPK(odu
Unp
ackUInt8, tknStr->val[ndx], mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->val[ndx], mBuf);
}
/* Length */
}
/* Length */
- CMCHKPK(odu
Unp
ackUInt16, tknStr->len, mBuf);
+ CMCHKPK(odu
P
ackUInt16, tknStr->len, mBuf);
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->pres, mBuf);
return ROK;
return ROK;
@@
-255,20
+225,14
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStrBSXL
(
TknStrBSXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStrBSXL
(
TknStrBSXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStrBSXL(tknStr, mBuf)
-TknStrBSXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U16
ndx;
-
U16
len;
+
uint16_t
ndx;
+
uint16_t
len;
if(tknStr->pres)
if(tknStr->pres)
@@
-281,13
+245,13
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 0; ndx < len; ndx++)
{
/* Value */
for (ndx = 0; ndx < len; ndx++)
{
- CMCHKPK(odu
Unp
ackUInt8, tknStr->val[ndx], mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->val[ndx], mBuf);
}
/* Length */
}
/* Length */
- CMCHKPK(odu
Unp
ackUInt16, tknStr->len, mBuf);
+ CMCHKPK(odu
P
ackUInt16, tknStr->len, mBuf);
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->pres, mBuf);
return ROK;
return ROK;
@@
-308,19
+272,13
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStrBMP4
(
TknStrBMP4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStrBMP4
(
TknStrBMP4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStrBMP4(tknStr, mBuf)
-TknStrBMP4 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U8
ndx;
+
uint8_t
ndx;
if(tknStr->pres)
if(tknStr->pres)
@@
-328,15
+286,15
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
- CMCHKPK(odu
Unp
ackUInt16, tknStr->val[ndx], mBuf);
+ CMCHKPK(odu
P
ackUInt16, tknStr->val[ndx], mBuf);
}
/* Length */
}
/* Length */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->len, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->len, mBuf);
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->pres, mBuf);
return ROK;
} /* end of cmPkTknStrBMP4 */
return ROK;
} /* end of cmPkTknStrBMP4 */
@@
-356,19
+314,13
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStrBMPXL
(
TknStrBMPXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStrBMPXL
(
TknStrBMPXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStrBMPXL(tknStr, mBuf)
-TknStrBMPXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U16
ndx;
+
uint16_t
ndx;
if(tknStr->pres)
if(tknStr->pres)
@@
-376,13
+328,13
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
- CMCHKPK(odu
Unp
ackUInt16, tknStr->val[ndx], mBuf);
+ CMCHKPK(odu
P
ackUInt16, tknStr->val[ndx], mBuf);
}
/* Length */
}
/* Length */
- CMCHKPK(odu
Unp
ackUInt16, tknStr->len, mBuf);
+ CMCHKPK(odu
P
ackUInt16, tknStr->len, mBuf);
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->pres, mBuf);
return ROK;
} /* end of cmPkTknStrBMPXL */
return ROK;
} /* end of cmPkTknStrBMPXL */
@@
-402,19
+354,13
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStrUNI4
(
TknStrUNI4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStrUNI4
(
TknStrUNI4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStrUNI4(tknStr, mBuf)
-TknStrUNI4 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U8
ndx;
+
uint8_t
ndx;
if(tknStr->pres)
if(tknStr->pres)
@@
-422,15
+368,15
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
- CMCHKPK(odu
Unp
ackUInt32, tknStr->val[ndx], mBuf);
+ CMCHKPK(odu
P
ackUInt32, tknStr->val[ndx], mBuf);
}
/* Length */
}
/* Length */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->len, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->len, mBuf);
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->pres, mBuf);
return ROK;
} /* end of cmPkTknStrUNI4 */
return ROK;
} /* end of cmPkTknStrUNI4 */
@@
-450,19
+396,13
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmPkTknStrUNIXL
(
TknStrUNIXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmPkTknStrUNIXL
(
TknStrUNIXL *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmPkTknStrUNIXL(tknStr, mBuf)
-TknStrUNIXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U16
ndx;
+
uint16_t
ndx;
if(tknStr->pres)
if(tknStr->pres)
@@
-470,13
+410,13
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
/* Value */
for (ndx = 0; ndx < tknStr->len; ndx++)
{
- CMCHKPK(odu
Unp
ackUInt32, tknStr->val[ndx], mBuf);
+ CMCHKPK(odu
P
ackUInt32, tknStr->val[ndx], mBuf);
}
/* Length */
}
/* Length */
- CMCHKPK(odu
Unp
ackUInt16, tknStr->len, mBuf);
+ CMCHKPK(odu
P
ackUInt16, tknStr->len, mBuf);
}
/* Token Header */
}
/* Token Header */
- CMCHKPK(odu
Unp
ackUInt8, tknStr->pres, mBuf);
+ CMCHKPK(odu
P
ackUInt8, tknStr->pres, mBuf);
return ROK;
} /* end of cmPkTknStrUNIXL */
return ROK;
} /* end of cmPkTknStrUNIXL */
@@
-499,21
+439,15
@@
Buffer *mBuf; /* message buffer */
File: cm_tkns.c
*
*/
File: cm_tkns.c
*
*/
-#ifdef ANSI
S16 cmUnpkTknS16
(
TknS16 *tknS16, /* token S16 */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknS16
(
TknS16 *tknS16, /* token S16 */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknS16(tknS16, mBuf)
-TknS16 *tknS16; /* token S16 */
-Buffer *mBuf; /* message buffer */
-#endif
{
/* Token Header */
{
/* Token Header */
- CMCHKUNPK(odu
P
ackUInt8, &tknS16->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknS16->pres, mBuf);
if (tknS16->pres)
{
if (tknS16->pres)
{
@@
-539,17
+473,11
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknBStr32
(
TknBStr32 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknBStr32
(
TknBStr32 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknBStr32(tknStr, mBuf)
-TknBStr32 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
CMUNPKTKNBSTR(tknStr, mBuf);
{
CMUNPKTKNBSTR(tknStr, mBuf);
@@
-573,17
+501,11
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStr8
(
TknStr8 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknStr8
(
TknStr8 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknStr8(tknStr, mBuf)
-TknStr8 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
CMUNPKTKNSTR(tknStr, mBuf);
{
CMUNPKTKNSTR(tknStr, mBuf);
@@
-607,17
+529,11
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStr16
(
TknStr16 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknStr16
(
TknStr16 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknStr16(tknStr, mBuf)
-TknStr16 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
CMUNPKTKNSTR(tknStr, mBuf);
{
CMUNPKTKNSTR(tknStr, mBuf);
@@
-641,28
+557,21
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStrOSXL
(
TknStrOSXL *tknStr, /* token string */
Buffer *mBuf, /* message buffer */
Ptr ptr /* pointer to memory control block */
)
S16 cmUnpkTknStrOSXL
(
TknStrOSXL *tknStr, /* token string */
Buffer *mBuf, /* message buffer */
Ptr ptr /* pointer to memory control block */
)
-#else
-S16 cmUnpkTknStrOSXL(tknStr, mBuf, ptr)
-TknStrOSXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-Ptr ptr; /* pointer to control memory block */
-#endif
{
{
-
U16
ndx;
+
uint16_t
ndx;
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->pres, mBuf);
if(tknStr->pres)
{
/* Length */
if(tknStr->pres)
{
/* Length */
- CMCHKUNPK(odu
P
ackUInt16, &tknStr->len, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt16, &tknStr->len, mBuf);
if( cmGetMem(ptr, tknStr->len, (Ptr *)&tknStr->val) != ROK)
{
if( cmGetMem(ptr, tknStr->len, (Ptr *)&tknStr->val) != ROK)
{
@@
-671,7
+580,7
@@
Ptr ptr; /* pointer to control memory block */
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->val[tknStr->len - ndx], mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->val[tknStr->len - ndx], mBuf);
}
}
}
}
@@
-695,30
+604,23
@@
Ptr ptr; /* pointer to control memory block */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStrBSXL
(
TknStrBSXL *tknStr, /* token string */
Ptr ptr, /* pointer to memory control block */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknStrBSXL
(
TknStrBSXL *tknStr, /* token string */
Ptr ptr, /* pointer to memory control block */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknStrBSXL(tknStr, ptr, mBuf)
-TknStrBSXL *tknStr; /* token string */
-Ptr ptr; /* pointer to control memory block */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U16
ndx;
-
U16
len;
+
uint16_t
ndx;
+
uint16_t
len;
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->pres, mBuf);
if(tknStr->pres)
{
/* Length */
if(tknStr->pres)
{
/* Length */
- CMCHKUNPK(odu
P
ackUInt16, &tknStr->len, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt16, &tknStr->len, mBuf);
if (tknStr->len % 8)
len = (tknStr->len/8) + 1;
if (tknStr->len % 8)
len = (tknStr->len/8) + 1;
@@
-732,7
+634,7
@@
Buffer *mBuf; /* message buffer */
/* Value */
for (ndx = 1; ndx <= len; ndx++)
{
/* Value */
for (ndx = 1; ndx <= len; ndx++)
{
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->val[len - ndx], mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->val[len - ndx], mBuf);
}
}
}
}
@@
-755,33
+657,27
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStrBMP4
(
TknStrBMP4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknStrBMP4
(
TknStrBMP4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknStrBMP4(tknStr, mBuf)
-TknStrBMP4 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U8
ndx;
+
uint8_t
ndx;
/* Token Header */
/* Token Header */
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->pres, mBuf);
if(tknStr->pres)
{
/* Length */
if(tknStr->pres)
{
/* Length */
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->len, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->len, mBuf);
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
- CMCHKUNPK(odu
P
ackUInt16, &tknStr->val[tknStr->len - ndx], mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt16, &tknStr->val[tknStr->len - ndx], mBuf);
}
}
}
}
@@
-803,29
+699,22
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStrBMPXL
(
TknStrBMPXL *tknStr, /* token string */
Buffer *mBuf, /* message buffer */
Ptr ptr /* pointer to memory control block */
)
S16 cmUnpkTknStrBMPXL
(
TknStrBMPXL *tknStr, /* token string */
Buffer *mBuf, /* message buffer */
Ptr ptr /* pointer to memory control block */
)
-#else
-S16 cmUnpkTknStrBMPXL(tknStr, mBuf, ptr)
-TknStrBMPXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-Ptr ptr; /* pointer to control memory block */
-#endif
{
{
-
U16
ndx;
+
uint16_t
ndx;
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->pres, mBuf);
if(tknStr->pres)
{
/* Length */
if(tknStr->pres)
{
/* Length */
- CMCHKUNPK(odu
P
ackUInt16, &tknStr->len, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt16, &tknStr->len, mBuf);
/* Each BMP Character is 2 octet long */
if( cmGetMem(ptr, 2*(tknStr->len), (Ptr *)&tknStr->val) != ROK)
/* Each BMP Character is 2 octet long */
if( cmGetMem(ptr, 2*(tknStr->len), (Ptr *)&tknStr->val) != ROK)
@@
-835,7
+724,7
@@
Ptr ptr; /* pointer to control memory block */
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
- CMCHKUNPK(odu
P
ackUInt16, &tknStr->val[tknStr->len - ndx], mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt16, &tknStr->val[tknStr->len - ndx], mBuf);
}
}
}
}
@@
-858,33
+747,27
@@
Ptr ptr; /* pointer to control memory block */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStrUNI4
(
TknStrUNI4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
S16 cmUnpkTknStrUNI4
(
TknStrUNI4 *tknStr, /* token string */
Buffer *mBuf /* message buffer */
)
-#else
-S16 cmUnpkTknStrUNI4(tknStr, mBuf)
-TknStrUNI4 *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-#endif
{
{
-
U8
ndx;
+
uint8_t
ndx;
/* Token Header */
/* Token Header */
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->pres, mBuf);
if(tknStr->pres)
{
/* Length */
if(tknStr->pres)
{
/* Length */
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->len, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->len, mBuf);
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
- CMCHKUNPK(odu
P
ackUInt32, &tknStr->val[tknStr->len - ndx], mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt32, &tknStr->val[tknStr->len - ndx], mBuf);
}
}
}
}
@@
-906,29
+789,22
@@
Buffer *mBuf; /* message buffer */
*
*/
*
*/
-#ifdef ANSI
S16 cmUnpkTknStrUNIXL
(
TknStrUNIXL *tknStr, /* token string */
Buffer *mBuf, /* message buffer */
Ptr ptr /* pointer to memory control block */
)
S16 cmUnpkTknStrUNIXL
(
TknStrUNIXL *tknStr, /* token string */
Buffer *mBuf, /* message buffer */
Ptr ptr /* pointer to memory control block */
)
-#else
-S16 cmUnpkTknStrUNIXL(tknStr, mBuf, ptr)
-TknStrUNIXL *tknStr; /* token string */
-Buffer *mBuf; /* message buffer */
-Ptr ptr; /* pointer to control memory block */
-#endif
{
{
-
U16
ndx;
+
uint16_t
ndx;
- CMCHKUNPK(odu
P
ackUInt8, &tknStr->pres, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt8, &tknStr->pres, mBuf);
if(tknStr->pres)
{
/* Length */
if(tknStr->pres)
{
/* Length */
- CMCHKUNPK(odu
P
ackUInt16, &tknStr->len, mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt16, &tknStr->len, mBuf);
/* Each UNI Character is 4 octets long */
if( cmGetMem(ptr, 4*tknStr->len, (Ptr *)&tknStr->val) != ROK)
/* Each UNI Character is 4 octets long */
if( cmGetMem(ptr, 4*tknStr->len, (Ptr *)&tknStr->val) != ROK)
@@
-938,7
+814,7
@@
Ptr ptr; /* pointer to control memory block */
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
/* Value */
for (ndx = 1; ndx <= tknStr->len; ndx++)
{
- CMCHKUNPK(odu
P
ackUInt32, &tknStr->val[tknStr->len - ndx], mBuf);
+ CMCHKUNPK(odu
Unp
ackUInt32, &tknStr->val[tknStr->len - ndx], mBuf);
}
}
}
}