From 286af66cfb787b76ee7289c920a75a3dd21ce795 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 26 Dec 2004 12:45:22 +0100 Subject: Made several functions threadsafe (cont'd) --- HISTORY | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) (limited to 'HISTORY') diff --git a/HISTORY b/HISTORY index 48e36e25..09f602f3 100644 --- a/HISTORY +++ b/HISTORY @@ -3160,7 +3160,7 @@ Video Disk Recorder Revision History right day of week for timers in the future. - Some improvements to cPoller (thanks to Marco Schlüßler). -2004-12-24: Version 1.3.18 +2004-12-26: Version 1.3.18 - Removed an unused variable from cTimer::GetWDayFromMDay() (thanks to Wayne Keer for reporting this one). @@ -3215,12 +3215,37 @@ Video Disk Recorder Revision History the actual buffering. In particular these are: readdir() -> cReadDir readline() -> cReadLine - strescape() -> cStrEscape - AddDirectory() -> cAddDirectory - ctime() -> cCtime - itoa() -> cItoa - WeekDayName() -> cWeekDayName - DayDateTime() -> cDayDateTime +- Several formerly non-threadsafe functions now have a return type of cString: + cChannel::ToText() + tChannelID::ToString() + cEvent::GetDateString() + cEvent::GetTimeString() + cEvent::GetEndTimeString() + cEvent::GetVpsString() + cMark::ToText() + cTimer::ToText() + cSource::ToString() + cTimer::PrintDay() + cTimer::PrintFirstDay() + PrefixVideoFileName() + IndexToHMSF() + ChannelString() + strescape() + AddDirectory() + itoa() + WeekDayName() + DayDateTime() + When using these functions in a 'const char *' context there is nothing special + to consider, except that you can no longer have a pointer to the return value, + as in + const char *date = DayDateTime(); + Although this will compile without error message, the resulting 'date' will not + be valid after this line. Use this instead: + cString date = DayDateTime(); + In a 'const void *' context (as in printf() etc.) the result needs to be + dereferenced with a '*', as in + printf("%s", *DayDateTime()); + to make it a 'const char *'. - Removed delay_ms(), using cCondWait::SleepMs() instead. - Replaced time_ms() with a threadsafe and non-overflowing cTimeMs (thanks to Rainer Zocholl for pointing out this problem). -- cgit v1.2.3