儲存庫 vbox 的更動 63122
- 時間撮記:
- 2016-8-7 上午03:25:21 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
r63121 r63122 99 99 100 100 //size_t cb = RTStrNLen(pv, ); 101 char *buf = (char *)RTMemAlloc(cb + 1); 102 RT_BZERO(buf, cb); 103 RTStrCopy(buf, cb, (const char*)pv); 101 char *pszBuf = (char *)RTMemAllocZ(cb + 1); 102 RTStrCopy(pszBuf, cb + 1, (const char *)pv); 104 103 for (size_t off = 0; off < cb; ++off) 105 104 { 106 if ( buf[off] == '\n' || buf[off] == '\r')107 buf[off] = ' ';108 } 109 110 Log(("%s\n", buf));111 RTMemFree( buf);105 if (pszBuf[off] == '\n' || pszBuf[off] == '\r') 106 pszBuf[off] = ' '; 107 } 108 109 Log(("%s\n", pszBuf)); 110 RTMemFree(pszBuf); 112 111 } 113 112 else … … 834 833 } 835 834 836 int DumpHtml(c har* src, size_t cb)837 { 838 size_t lenght= 0;839 int rc = RTStrNLenEx( src, cb, &lenght);835 int DumpHtml(const char *pszSrc, size_t cb) 836 { 837 size_t cchIgnored = 0; 838 int rc = RTStrNLenEx(pszSrc, cb, &cchIgnored); 840 839 if (RT_SUCCESS(rc)) 841 840 { 842 char* buf = (char*)RTMemAlloc(cb + 1); 843 if (buf != NULL) 844 { 845 RT_BZERO(buf, cb + 1); 846 rc = RTStrCopy(buf, cb, (const char*)src); 841 char *pszBuf = (char *)RTMemAllocZ(cb + 1); 842 if (pszBuf != NULL) 843 { 844 rc = RTStrCopy(pszBuf, cb + 1, (const char *)pszSrc); 847 845 if (RT_SUCCESS(rc)) 848 846 { 849 847 for (size_t i = 0; i < cb; ++i) 850 if ( buf[i] == '\n' || buf[i] == '\r')851 buf[i] = ' ';848 if (pszBuf[i] == '\n' || pszBuf[i] == '\r') 849 pszBuf[i] = ' '; 852 850 } 853 851 else 854 852 Log(("Error in copying string.\n")); 855 Log(("Removed \\r\\n: %s\n", buf));856 RTMemFree( buf);853 Log(("Removed \\r\\n: %s\n", pszBuf)); 854 RTMemFree(pszBuf); 857 855 } 858 856 else
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器