CVS is dead?

2001-08-06 Thread Kristian G. Kvilekval


Haven't been able to check the cvs repository today


cvs update -Pd 
cvs [update aborted]: connect to cvs.freeamp.org:2401 failed: Connection refused

-- 
Kristian G. Kvilekval
email:[EMAIL PROTECTED] office:(805)893-4178 http://www.cs.ucsb.edu/~kris
___
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev



more patches (2nd try)

2002-01-09 Thread Kristian G. Kvilekval


Some simple patches:

1.   Simpler randomize list  in playlist.cpp
2.   Don't choke on invalid glyphs in ttfont.cpp
3.   Add Drag Drop between playlists in browserlist.cpp
4.   FileSelector remembers last directory after selection in fileselector.cpp


Some of these patches were previously submitted, I never recieved confirmation 
nor rejection and they've never shown up in the archive so I thought I would try again.

Any thoughts of opening up the CVS to non-team members or adding more team members?



-- 
Kristian G. Kvilekval
email:[EMAIL PROTECTED] office:(805)893-4178 http://www.cs.ucsb.edu/~kris

Index: base/src/playlist.cpp
===
RCS file: /src/repository/freeamp/base/src/playlist.cpp,v
retrieving revision 1.118
diff -c -r1.118 playlist.cpp
*** base/src/playlist.cpp   2001/12/17 05:13:15 1.118
--- base/src/playlist.cpp   2002/01/10 02:49:51
***
*** 428,475 
  if (!toBeShuffled)
  toBeShuffled = m_shuffleList;
  
! int max = toBeShuffled-size();
! vectorPlaylistItem * tempShuffled;
! 
! srand((unsigned int)time(NULL));
! 
! int i;
! vectorbool usedList;
! for (i = 0; i  max; i++)
! {
! usedList.push_back(false);
! }
! 
! bool used = true;
! int  index = 0;
! int  lastindex = 0;
! 
! for (i = 0; i  max; i++) 
! {
! while (used)
! {
! index = (int)((double)rand() / (RAND_MAX + 1.0) * max);
! if (usedList[index] == false)
! used = false;
! if (max - i  50  abs(index - lastindex)  10)
! used = true;
! } 
! usedList[index] = true;
! PlaylistItem *dupe = (*toBeShuffled)[index];
! tempShuffled.push_back(dupe);
! used = true;
! lastindex = index;
! }
! 
! toBeShuffled-erase(toBeShuffled-begin(), toBeShuffled-end());
! vectorPlaylistItem *::iterator iter = tempShuffled.begin();
! for (; iter != tempShuffled.end(); iter++) 
! toBeShuffled-push_back(*iter);
  }
  
  Error PlaylistManager::SetCurrentItem(PlaylistItem* item)
  {
! return SetCurrentIndex(IndexOf(item));
  }
  
  PlaylistItem*  PlaylistManager::GetCurrentItem()
--- 428,442 
  if (!toBeShuffled)
  toBeShuffled = m_shuffleList;
  
! random_shuffle ((*toBeShuffled).begin(), (*toBeShuffled).end());
  }
  
+ 
  Error PlaylistManager::SetCurrentItem(PlaylistItem* item)
  {
!int index ;
!index = IndexOf(item);
!return SetCurrentIndex(index);
  }
  
  PlaylistItem*  PlaylistManager::GetCurrentItem()
***
*** 493,500 
  {
 m_mutex.Acquire();
 index = CheckIndex(index);
!if(m_shuffle)
!   index = InternalIndexOf(m_shuffleList, ItemAt(index));
 InternalSetCurrentIndex(index);
 m_mutex.Release();
 return kError_NoErr;
--- 460,468 
  {
 m_mutex.Acquire();
 index = CheckIndex(index);
!if (m_shuffle) {
!  index = InternalIndexOf(m_shuffleList, ItemAt(index));
!}
 InternalSetCurrentIndex(index);
 m_mutex.Release();
 return kError_NoErr;
***
*** 536,555 
  if(!(kPlaylistMode_RepeatOne == m_repeatMode) || userAction)
  {
  index++;
- 
- if( (index = count)  
- (m_repeatMode == kPlaylistMode_RepeatAll || userAction))
- {
- index = 0;
  
! if(m_shuffle)
! {
! ShuffleIt();
! }
! }
! else if(index = count)
  {
! index = m_current;
  }
  }
  
--- 504,519 
  if(!(kPlaylistMode_RepeatOne == m_repeatMode) || userAction)
  {
  index++;
  
! if( (index = count) )
  {
!if(m_repeatMode == kPlaylistMode_RepeatAll || userAction)
!{
!   index = 0;
!   if (m_shuffle) ShuffleIt();
!}
!else
!   index = m_current;
  }
  }
  
***
*** 570,594 
  
  Error result = kError_NoErr;
  uint32 count = m_masterList.size();
! uint32 index = m_current;
  
  if(count)
  {
  if(!(kPlaylistMode_RepeatOne == m_repeatMode) || userAction)
  {
! if( (index == 0)  
! (m_repeatMode == kPlaylistMode_RepeatAll || userAction))
  {
! index = count - 1;
! 
! if(m_shuffle)
  {
! ShuffleIt();
  }
! }
! else if(index != 0)
! {
! index--;
  }
  }
  
--- 534,555 
  
  Error result = kError_NoErr;
  uint32 count = m_masterList.size();
! int32 index = m_current;
  
  if(count