Bug 42889 - ogg vorbis function ov_read_float defined differently
Summary: ogg vorbis function ov_read_float defined differently
Status: RESOLVED FIXED
Alias: None
Product: arts
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Westerfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-21 17:48 UTC by David Dudley
Modified: 2006-12-31 19:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Dudley 2002-05-21 17:40:24 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           arts
Version:           Latest CVS build (using KDE 3.0.5 CVS/CVSup/Snapshot)
Severity:          normal
Installed from:    Compiled sources
Compiler:          gcc 2.95.3
OS:                Linux
OS/Compiler notes: Not Specified

Since about 5-17-02 I have been unable to comple the aRts module which causes all the following compiles to fail.

When the compilation gets down to the file
'flow/gsl/gsldatahandle-vorbis.c' it crashes saying that the
function 'ov_read_float' is used incorrectly.

After looking it appears that the aRts code is trying to call a function that uses 3 variables while my version of vorbis has the function needing 4 variables.

This is the latest version of ogg-vorbis I just got it today.

Rather than try to fix this myself and probably screw things up big-time I'll submit a bug report and let the right person fix it the right way.

Later-

(Submitted via bugs.kde.org)
Comment 1 Neil Stevens 2002-09-23 12:54:10 UTC
I'm pretty sure this was fixed a while back. 
Comment 2 Reinhold Kainhofer 2005-08-31 16:45:27 UTC
SVN commit 455439 by kainhofe:

If an event ends on midnight, it does *NOT* belong to that day (since end dates are non-inclusive)...

BUG: 107149
CCBUG:42889



 M  +8 -4      korganizer/koagendaview.cpp  
 M  +1 -1      korganizer/komonthview.cpp  
 M  +1 -1      libkcal/calendarlocal.cpp  
 M  +14 -1     libkcal/event.cpp  
 M  +8 -2      libkcal/event.h  


--- branches/KDE/3.5/kdepim/korganizer/koagendaview.cpp #455438:455439
@@ -1243,7 +1243,7 @@
   int endX;
   if ( event ) {
     beginX = curDate.daysTo( incidence->dtStart().date() ) + curCol;
-    endX = curDate.daysTo( event->dtEnd().date() ) + curCol;
+    endX = curDate.daysTo( event->dateEnd() ) + curCol;
   } else if ( todo ) {
     beginX = curDate.daysTo( todo->dtDue().date() ) + curCol;
     endX = beginX;
@@ -1266,7 +1266,9 @@
     }
   } else if ( event && event->isMultiDay() ) {
     int startY = mAgenda->timeToY( event->dtStart().time() );
-    int endY = mAgenda->timeToY( event->dtEnd().time() ) - 1;
+    QTime endtime( event->dtEnd().time() );
+    if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 );
+    int endY = mAgenda->timeToY( endtime ) - 1;
     if ( (beginX <= 0 && curCol == 0) || beginX == curCol ) {
       mAgenda->insertMultiItem( event, curDate, beginX, endX, startY, endY );
     }
@@ -1284,7 +1286,9 @@
     int startY = 0, endY = 0;
     if ( event ) {
       startY = mAgenda->timeToY( incidence->dtStart().time() );
-      endY = mAgenda->timeToY( event->dtEnd().time() ) - 1;
+      QTime endtime( event->dtEnd().time() );
+      if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 );
+      endY = mAgenda->timeToY( endtime ) - 1;
     }
     if ( todo ) {
       QTime t = todo->dtDue().time();
@@ -1325,7 +1329,7 @@
 
   QDate endDt;
   if ( incidence->type() == "Event" )
-    endDt = (static_cast<Event *>(incidence))->dtEnd().date();
+    endDt = (static_cast<Event *>(incidence))->dateEnd();
   if ( todo ) {
     endDt = todo->isOverdue() ? QDate::currentDate()
                               : todo->dtDue().date();
--- branches/KDE/3.5/kdepim/korganizer/komonthview.cpp #455438:455439
@@ -967,7 +967,7 @@
      }
   } else if ( event ) {
       for ( QDateTime _date = date;
-            _date <= event->dtEnd(); _date = _date.addDays( 1 ) ) {
+            _date < event->dtEnd(); _date = _date.addDays( 1 ) ) {
         mvc = lookupCellByDate( _date.date() );
         if ( mvc ) mvc->addIncidence( event );
       }
--- branches/KDE/3.5/kdepim/libkcal/calendarlocal.cpp #455438:455439
@@ -388,7 +388,7 @@
           eventList.append( event );
       }
     } else {
-      if ( event->dtStart().date() <= qd && event->dtEnd().date() >= qd ) {
+      if ( event->dtStart().date() <= qd && event->dateEnd() >= qd ) {
         eventList.append( event );
       }
     }
--- branches/KDE/3.5/kdepim/libkcal/event.cpp #455438:455439
@@ -83,6 +83,12 @@
   return dtStart();
 }
 
+QDate Event::dateEnd() const
+{
+  if ( doesFloat() ) return dtEnd().date();
+  else return dtEnd().addSecs(-1).date();
+}
+
 QString Event::dtEndTimeStr() const
 {
   return KGlobal::locale()->formatTime(dtEnd().time());
@@ -110,7 +116,14 @@
 
 bool Event::isMultiDay() const
 {
-  bool multi = !(dtStart().date() == dtEnd().date());
+  // End date is non inclusive, so subtract 1 second...
+  QDateTime start( dtStart() );
+  QDateTime end( dtEnd() );
+  if ( ! doesFloat() ) {
+    end = end.addSecs(-1);
+  }
+  bool multi = ( start.date() != end.date() && start <= end );
+kdDebug() <<" Item " << summary() << " is multi: " << multi << endl;
   return multi;
 }
 
--- branches/KDE/3.5/kdepim/libkcal/event.h #455438:455439
@@ -34,7 +34,7 @@
   public:
     /**
       Transparency of event.
-      
+
       Opaque      - event appears in free/busy time
       Transparent - event doesn't appear in free/busy time
     */
@@ -63,6 +63,12 @@
     */
     virtual QDateTime dtEnd() const;
     /**
+      Returns the day when the event ends. This might be different from
+      dtEnd().date, since the end date/time is non-inclusive. So timed events
+      ending at 0:00 have their end date on the day before.
+    */
+    QDate dateEnd() const;
+    /**
       Return end time as string formatted according to the users locale
       settings.
     */
@@ -70,7 +76,7 @@
     /**
       Return end date as string formatted according to the users locale
       settings.
-      
+
       @param shortfmt if true return string in short format, if false return
                       long format
     */
Comment 3 Reinhold Kainhofer 2006-12-31 19:05:04 UTC
*** Bug 112483 has been marked as a duplicate of this bug. ***