History

Use char instead of str_t

Martin Storsjö committed 12 years ago

Commit f2bd22a1 parent 7b96c6734 files · +131 −135Browse files

Showing the changes to codec/decoder/plus/src/welsCodecTrace.cpp (1 of 34 files). Show all

Unified · Split

codec/decoder/plus/src/welsCodecTrace.cpp+10−10
@@ -57,14 +57,14 @@ int32_t CWelsTraceBase::SetTraceLevel (int iLevel) { · 56 unmodified lines
57 return 0;57 return 0;
58}58}
59 59
60int32_t CWelsTraceBase::Trace (const int kLevel, const str_t* kpFormat, va_list pVl) {60int32_t CWelsTraceBase::Trace (const int kLevel, const char* kpFormat, va_list pVl) {
61 if (kLevel & m_iLevel) {61 if (kLevel & m_iLevel) {
62 str_t chBuf[MAX_LOG_SIZE] = {0};62 char chBuf[MAX_LOG_SIZE] = {0};
63 const int32_t kLen = strlen ("[DECODER]: ");63 const int32_t kLen = strlen ("[DECODER]: ");
64 64
65 WelsStrncpy (chBuf, MAX_LOG_SIZE, (const str_t*)"[DECODER]: ");65 WelsStrncpy (chBuf, MAX_LOG_SIZE, (const char*)"[DECODER]: ");
66 66
67 WelsVsnprintf ((chBuf + kLen), MAX_LOG_SIZE - kLen, (const str_t*)kpFormat, pVl);67 WelsVsnprintf ((chBuf + kLen), MAX_LOG_SIZE - kLen, (const char*)kpFormat, pVl);
68 68
69 WriteString (kLevel, chBuf);69 WriteString (kLevel, chBuf);
70 }70 }
@@ -72,8 +72,8 @@ int32_t CWelsTraceBase::Trace (const int kLevel, const str_t* kpFormat, va_list · 1 unmodified line
72 return 0;72 return 0;
73}73}
74 74
75CWelsTraceFile::CWelsTraceFile (const str_t* pFileName) {75CWelsTraceFile::CWelsTraceFile (const char* pFileName) {
76 m_pTraceFile = WelsFopen (pFileName, (const str_t*)"wt");76 m_pTraceFile = WelsFopen (pFileName, (const char*)"wt");
77}77}
78 78
79CWelsTraceFile::~CWelsTraceFile() {79CWelsTraceFile::~CWelsTraceFile() {
@@ -83,9 +83,9 @@ CWelsTraceFile::~CWelsTraceFile() { · 3 unmodified lines
83 }83 }
84}84}
85 85
86int32_t CWelsTraceFile::WriteString (int32_t iLevel, const str_t* pStr) {86int32_t CWelsTraceFile::WriteString (int32_t iLevel, const char* pStr) {
87 int iRC = 0;87 int iRC = 0;
88 const static str_t chEnter[16] = "\n";88 const static char chEnter[16] = "\n";
89 if (m_pTraceFile) {89 if (m_pTraceFile) {
90 iRC += WelsFwrite (pStr, 1, strlen (pStr), m_pTraceFile);90 iRC += WelsFwrite (pStr, 1, strlen (pStr), m_pTraceFile);
91 iRC += WelsFwrite (chEnter, 1, strlen (chEnter), m_pTraceFile);91 iRC += WelsFwrite (chEnter, 1, strlen (chEnter), m_pTraceFile);
@@ -97,7 +97,7 @@ int32_t CWelsTraceFile::WriteString (int32_t iLevel, const str_t* pStr) { · 5 unmodified lines
97 97
98#ifdef _WIN3298#ifdef _WIN32
99 99
100int32_t CWelsTraceWinDgb::WriteString (int32_t iLevel, const str_t* pStr) {100int32_t CWelsTraceWinDgb::WriteString (int32_t iLevel, const char* pStr) {
101 OutputDebugStringA (pStr);101 OutputDebugStringA (pStr);
102 102
103 return strlen (pStr);103 return strlen (pStr);
@@ -134,7 +134,7 @@ int32_t CWelsCodecTrace::UnloadWelsTraceModule() { · 30 unmodified lines
134 return 0;134 return 0;
135}135}
136 136
137int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const str_t* pStr) {137int32_t CWelsCodecTrace::WriteString (int32_t iLevel, const char* pStr) {
138 {138 {
139 switch (iLevel) {139 switch (iLevel) {
140 case WELS_LOG_ERROR:140 case WELS_LOG_ERROR:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t