Changeset 2828 for trunk/kLdr/kLdrHlp.c
- Timestamp:
- Oct 22, 2006, 8:21:04 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdrHlp.c
r2826 r2828 61 61 if (!rc) 62 62 { 63 size_t cch = strlen(pszValue);63 size_t cch = kLdrHlpStrLen(pszValue); 64 64 if (pszVal) 65 65 { 66 66 if (*pcchVal > cch) 67 67 { 68 memcpy(pszVal, pszValue, cch + 1);68 kLdrHlpMemCopy(pszVal, pszValue, cch + 1); 69 69 *pcchVal = cch; 70 70 } 71 71 else if (*pcchVal) 72 72 { 73 memcpy(pszVal, pszValue, *pcchVal);73 kLdrHlpMemCopy(pszVal, pszValue, *pcchVal); 74 74 pszVal[*pcchVal - 1] = '\0'; 75 75 rc = ERROR_BUFFER_OVERFLOW; … … 167 167 168 168 DosWrite((HFILE)2, s_szMsg1, sizeof(s_szMsg1) - 1, &cbWritten); 169 DosWrite((HFILE)2, pszExpr, kLdr StrLen(pszExpr), &cbWritten);169 DosWrite((HFILE)2, pszExpr, kLdrHlpStrLen(pszExpr), &cbWritten); 170 170 DosWrite((HFILE)2, s_szMsg2, sizeof(s_szMsg2) - 1, &cbWritten); 171 DosWrite((HFILE)2, pszFile, kLdr StrLen(pszFile), &cbWritten);171 DosWrite((HFILE)2, pszFile, kLdrHlpStrLen(pszFile), &cbWritten); 172 172 DosWrite((HFILE)2, "(", sizeof("(") - 1, &cbWritten); 173 173 int2dec(szLine, iLine); 174 DosWrite((HFILE)2, szLine, kLdr StrLen(szLine), &cbWritten);174 DosWrite((HFILE)2, szLine, kLdrHlpStrLen(szLine), &cbWritten); 175 175 DosWrite((HFILE)2, ") ", sizeof(") ") - 1, &cbWritten); 176 DosWrite((HFILE)2, pszFunction, kLdr StrLen(pszFunction), &cbWritten);176 DosWrite((HFILE)2, pszFunction, kLdrHlpStrLen(pszFunction), &cbWritten); 177 177 DosWrite((HFILE)2, s_szMsg3, sizeof(s_szMsg3) - 1, &cbWritten); 178 178 … … 186 186 187 187 WriteFile(hStdErr, s_szMsg1, sizeof(s_szMsg1) - 1, &cbWritten, NULL); 188 WriteFile(hStdErr, pszExpr, kLdr StrLen(pszExpr), &cbWritten, NULL);188 WriteFile(hStdErr, pszExpr, kLdrHlpStrLen(pszExpr), &cbWritten, NULL); 189 189 WriteFile(hStdErr, s_szMsg2, sizeof(s_szMsg2) - 1, &cbWritten, NULL); 190 WriteFile(hStdErr, pszFile, kLdr StrLen(pszFile), &cbWritten, NULL);190 WriteFile(hStdErr, pszFile, kLdrHlpStrLen(pszFile), &cbWritten, NULL); 191 191 WriteFile(hStdErr, "(", sizeof("(") - 1, &cbWritten, NULL); 192 192 int2dec(szLine, iLine); 193 WriteFile(hStdErr, szLine, kLdr StrLen(szLine), &cbWritten, NULL);193 WriteFile(hStdErr, szLine, kLdrHlpStrLen(szLine), &cbWritten, NULL); 194 194 WriteFile(hStdErr, ") ", sizeof(") ") - 1, &cbWritten, NULL); 195 WriteFile(hStdErr, pszFunction, kLdr StrLen(pszFunction), &cbWritten, NULL);195 WriteFile(hStdErr, pszFunction, kLdrHlpStrLen(pszFunction), &cbWritten, NULL); 196 196 WriteFile(hStdErr, s_szMsg3, sizeof(s_szMsg3) - 1, &cbWritten, NULL); 197 197
Note:
See TracChangeset
for help on using the changeset viewer.