| 154 | } |
| 155 | |
| 156 | XN_C_API XnStatus xnOSStrCopy(XnChar* cpDestString, const XnChar* cpSrcString, const XnUInt32 nDestLength) |
| 157 | { |
| 158 | // Validate the input/output pointers (to make sure none of them is NULL) |
| 159 | XN_VALIDATE_INPUT_PTR(cpSrcString); |
| 160 | XN_VALIDATE_INPUT_PTR(cpDestString); |
| 161 | |
| 162 | // Make sure the destination string can hold the required information |
| 163 | if (strlen(cpSrcString) >= nDestLength) |
| 164 | { |
| 165 | return (XN_STATUS_INTERNAL_BUFFER_TOO_SMALL); |
| 166 | } |
| 167 | |
| 168 | // Copy the string |
| 169 | strncpy (cpDestString, cpSrcString, nDestLength); |
| 170 | |
| 171 | // All is good... |
| 172 | return (XN_STATUS_OK); |
| 173 | } |
| 174 | |
| 175 | XN_C_API XnUInt32 xnOSStrLen(const XnChar* cpString) |
| 176 | { |
no outgoing calls
no test coverage detected