summaryrefslogtreecommitdiffstats
path: root/kscd
diff options
context:
space:
mode:
Diffstat (limited to 'kscd')
-rw-r--r--kscd/Makefile.am1
-rw-r--r--kscd/bwlednum.cpp20
-rw-r--r--kscd/bwlednum.h8
-rw-r--r--kscd/cddbdlg.cpp12
-rw-r--r--kscd/cddbdlg.h2
-rw-r--r--kscd/configWidget.cpp2
-rw-r--r--kscd/configWidget.h2
-rw-r--r--kscd/configWidgetUI.ui12
-rw-r--r--kscd/docking.cpp20
-rw-r--r--kscd/docking.h2
-rw-r--r--kscd/kcompactdisc.cpp4
-rw-r--r--kscd/kcompactdisc.h2
-rwxr-xr-xkscd/kscd-script32
-rw-r--r--kscd/kscd.cpp204
-rw-r--r--kscd/kscd.h6
-rw-r--r--kscd/kscdmagic/main.cpp2
-rw-r--r--kscd/kscdmagic/syna.h6
-rw-r--r--kscd/kscdmagic/xlibwrap.cpp2
-rw-r--r--kscd/ledlamp.h2
-rw-r--r--kscd/libwm/CMakeLists.txt4
-rw-r--r--kscd/libwm/ConfigureChecks.cmake1
-rw-r--r--kscd/libwm/Makefile.am2
-rw-r--r--kscd/libwm/PLAT_IMPL_STATUS70
-rw-r--r--kscd/libwm/cddb.c2
-rw-r--r--kscd/libwm/include/wm_config.h17
-rw-r--r--kscd/libwm/include/wm_struct.h33
-rw-r--r--kscd/libwm/plat_linux_cdda.c1
-rw-r--r--kscd/libwm/plat_osf1.c674
-rw-r--r--kscd/libwm/scsi.c2
-rw-r--r--kscd/panel.ui10
30 files changed, 212 insertions, 945 deletions
diff --git a/kscd/Makefile.am b/kscd/Makefile.am
index c7091a6d..93297cb5 100644
--- a/kscd/Makefile.am
+++ b/kscd/Makefile.am
@@ -65,7 +65,6 @@ plat_hpux.c:config.h
plat_irix.c:config.h
plat_linux.c:config.h
plat_news.c:config.h
-plat_osf1.c:config.h
plat_scor5.c:config.h
plat_sun.c:config.h
plat_sun_audio.c:config.h
diff --git a/kscd/bwlednum.cpp b/kscd/bwlednum.cpp
index eb18917e..322cf38a 100644
--- a/kscd/bwlednum.cpp
+++ b/kscd/bwlednum.cpp
@@ -41,7 +41,7 @@ BW_LED_Number::BW_LED_Number( TQWidget *parent, const char *name )
offcolor = TQColor(100,0,0);
- showOffColon(FALSE);
+ showOffColon(false);
smallLED = false;
current_symbol = ' ';
old_segments = &segs[13][0]; // nothing
@@ -131,7 +131,7 @@ static char *getSegments( char s)
void BW_LED_Number::drawContents( TQPainter *p ){
- drawSymbol( p, current_symbol,TRUE );
+ drawSymbol( p, current_symbol,true );
}
@@ -155,7 +155,7 @@ void BW_LED_Number::display(char s){
current_symbol = s;
current_segments = getSegments(s);
- drawSymbol(&p,s,FALSE);
+ drawSymbol(&p,s,false);
p.end();
@@ -202,12 +202,12 @@ void BW_LED_Number::drawSymbol( TQPainter *p,char ,bool repaint ){
// by default not shown.
for(int l = 0; l <= NUM_OF_SEGMENTS +1; l++){
- drawSegment(pos,(char) l,*p,Segment_Length,TRUE); //erase segment
+ drawSegment(pos,(char) l,*p,Segment_Length,true); //erase segment
}
}
else{
for(int l = 0; l <= NUM_OF_SEGMENTS -1; l++){
- drawSegment(pos,(char) l,*p,Segment_Length,TRUE); //erase segment
+ drawSegment(pos,(char) l,*p,Segment_Length,true); //erase segment
}
}
@@ -215,7 +215,7 @@ void BW_LED_Number::drawSymbol( TQPainter *p,char ,bool repaint ){
for(int l = 0; l <= NUM_OF_SEGMENTS -1; l++){
if(current_segments[l] != STOP_CHAR){
- drawSegment(pos,current_segments[l],*p,Segment_Length,FALSE); // draw segment
+ drawSegment(pos,current_segments[l],*p,Segment_Length,false); // draw segment
}
else{
break;
@@ -229,7 +229,7 @@ void BW_LED_Number::drawSymbol( TQPainter *p,char ,bool repaint ){
if(current_segments[l] != STOP_CHAR){
if(!seg_contained_in(current_segments[l],old_segments))
- drawSegment(pos,current_segments[l],*p,Segment_Length,FALSE); // draw segment
+ drawSegment(pos,current_segments[l],*p,Segment_Length,false); // draw segment
}
else{
break;
@@ -241,7 +241,7 @@ void BW_LED_Number::drawSymbol( TQPainter *p,char ,bool repaint ){
if(old_segments[k] != STOP_CHAR){
if(!seg_contained_in(old_segments[k],current_segments))
- drawSegment(pos,old_segments[k],*p,Segment_Length,TRUE); //erase segment
+ drawSegment(pos,old_segments[k],*p,Segment_Length,true); //erase segment
}
else{
break;
@@ -254,12 +254,12 @@ void BW_LED_Number::drawSymbol( TQPainter *p,char ,bool repaint ){
bool BW_LED_Number::seg_contained_in( char c, char* seg){
- bool result = FALSE;
+ bool result = false;
while ( *seg != STOP_CHAR){
// printf("Comparing %d with %d\n",c,*seg);
if ( c == *seg )
- result = TRUE;
+ result = true;
seg++;
}
diff --git a/kscd/bwlednum.h b/kscd/bwlednum.h
index 3b37ac38..79497a18 100644
--- a/kscd/bwlednum.h
+++ b/kscd/bwlednum.h
@@ -19,7 +19,7 @@
class BW_LED_Number : public TQFrame
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -28,7 +28,7 @@ public:
~BW_LED_Number();
void setSmallLED(bool ); // if you LED is small it might look better
- // if you call setSmallLED(TRUE)
+ // if you call setSmallLED(true)
// this sets the fore and background color of the LED
// the forground defaults to yellow, the background defaults
@@ -42,7 +42,7 @@ public:
void setLEDoffColor(TQColor color);
- // calling showOffColon(TRUE) will show the colon if not illuminated
+ // calling showOffColon(true) will show the colon if not illuminated
// this is rather ugly -- the default is that they are not shown.
void showOffColon(bool off);
@@ -67,7 +67,7 @@ protected:
private:
bool seg_contained_in( char c, char* seg);
- void drawSegment( const TQPoint &, char, TQPainter &, int, bool = FALSE );
+ void drawSegment( const TQPoint &, char, TQPainter &, int, bool = false );
void drawSymbol( TQPainter *p,char s ,bool repaint);
char* old_segments;
diff --git a/kscd/cddbdlg.cpp b/kscd/cddbdlg.cpp
index 40a17cbf..9fc6cbac 100644
--- a/kscd/cddbdlg.cpp
+++ b/kscd/cddbdlg.cpp
@@ -46,15 +46,15 @@ CDDBDlg::CDDBDlg( TQWidget* parent, const char* name )
setButtonText( User1, i18n( "Upload" ) );
setButtonText( User2, i18n( "Fetch Info" ) );
- connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( save() ) );
- connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( upload() ) );
- connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SIGNAL( cddbQuery() ) );
- connect( m_dlgBase, TQT_SIGNAL( play( int ) ), TQT_SIGNAL( play( int ) ) );
+ connect( this, TQ_SIGNAL( okClicked() ), TQ_SLOT( save() ) );
+ connect( this, TQ_SIGNAL( user1Clicked() ), TQ_SLOT( upload() ) );
+ connect( this, TQ_SIGNAL( user2Clicked() ), TQ_SIGNAL( cddbQuery() ) );
+ connect( m_dlgBase, TQ_SIGNAL( play( int ) ), TQ_SIGNAL( play( int ) ) );
cddbClient = new KCDDB::Client();
cddbClient->setBlockingMode(false);
- connect (cddbClient, TQT_SIGNAL(finished(CDDB::Result)),
- TQT_SLOT(submitFinished(CDDB::Result)));
+ connect (cddbClient, TQ_SIGNAL(finished(CDDB::Result)),
+ TQ_SLOT(submitFinished(CDDB::Result)));
}
diff --git a/kscd/cddbdlg.h b/kscd/cddbdlg.h
index b111fc27..8df7da01 100644
--- a/kscd/cddbdlg.h
+++ b/kscd/cddbdlg.h
@@ -11,7 +11,7 @@ class CDInfoDialogBase;
class CDDBDlg : public KDialogBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kscd/configWidget.cpp b/kscd/configWidget.cpp
index 3cde9992..696e95f8 100644
--- a/kscd/configWidget.cpp
+++ b/kscd/configWidget.cpp
@@ -63,7 +63,7 @@ public:
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
+ * true to construct a modal dialog.
*/
configWidget::configWidget(KSCD* player, TQWidget* parent, const char* name)
: configWidgetUI(parent, name),
diff --git a/kscd/configWidget.h b/kscd/configWidget.h
index 315508b0..8bec1002 100644
--- a/kscd/configWidget.h
+++ b/kscd/configWidget.h
@@ -30,7 +30,7 @@ class SpecialComboBox;
class configWidget : public configWidgetUI
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kscd/configWidgetUI.ui b/kscd/configWidgetUI.ui
index 8acca09f..14f4435b 100644
--- a/kscd/configWidgetUI.ui
+++ b/kscd/configWidgetUI.ui
@@ -445,20 +445,18 @@
<tabstop>kcfg_DigitalPlayback</tabstop>
<tabstop>kcfg_AudioDevice</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot>kcfg_DigitalPlayback_toggled( bool )</slot>
<slot>kcfg_SelectEncoding_toggled(bool)</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">kcolorbutton.h</include>
+ <include location="global" impldecl="in implementation">kcombobox.h</include>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
<include location="global" impldecl="in implementation">knuminput.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
<include location="global" impldecl="in implementation">tdefontrequester.h</include>
</includes>
-<includehints>
- <includehint>kcombobox.h</includehint>
- <includehint>kpushbutton.h</includehint>
- <includehint>klineedit.h</includehint>
-</includehints>
</UI>
diff --git a/kscd/docking.cpp b/kscd/docking.cpp
index e6689b8d..cce4652f 100644
--- a/kscd/docking.cpp
+++ b/kscd/docking.cpp
@@ -53,13 +53,13 @@ DockWidget::DockWidget( KSCD* parent, const char *name)
// popup menu for right mouse button
TQPopupMenu* popup = contextMenu();
- popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-playback-start", TDEIcon::Small), i18n("Play/Pause"), parent, TQT_SLOT(playClicked()));
- popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-playback-stop", TDEIcon::Small), i18n("Stop"), parent, TQT_SLOT(stopClicked()));
- popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-skip-forward", TDEIcon::Small), i18n("Next"), parent, TQT_SLOT(nextClicked()));
- popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-skip-backward", TDEIcon::Small), i18n("Previous"), parent, TQT_SLOT(prevClicked()));
- popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_eject", TDEIcon::Small), i18n("Eject"), parent, TQT_SLOT(ejectClicked()));
+ popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-playback-start", TDEIcon::Small), i18n("Play/Pause"), parent, TQ_SLOT(playClicked()));
+ popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-playback-stop", TDEIcon::Small), i18n("Stop"), parent, TQ_SLOT(stopClicked()));
+ popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-skip-forward", TDEIcon::Small), i18n("Next"), parent, TQ_SLOT(nextClicked()));
+ popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("media-skip-backward", TDEIcon::Small), i18n("Previous"), parent, TQ_SLOT(prevClicked()));
+ popup->insertItem(TDEGlobal::iconLoader()->loadIconSet("player_eject", TDEIcon::Small), i18n("Eject"), parent, TQ_SLOT(ejectClicked()));
- TQToolTip::add(this, kapp->aboutData()->programName());
+ TQToolTip::add(this, tdeApp->aboutData()->programName());
}
DockWidget::~DockWidget()
@@ -80,7 +80,7 @@ void DockWidget::createPopup(const TQString &songName, bool addButtons)
{
TQPushButton* backButton = new TQPushButton(m_backPix, 0, box, "popup_back");
backButton->setFlat(true);
- connect(backButton, TQT_SIGNAL(clicked()), m_backAction, TQT_SLOT(activate()));
+ connect(backButton, TQ_SIGNAL(clicked()), m_backAction, TQ_SLOT(activate()));
}
TQLabel* l = new TQLabel(songName, box);
@@ -90,7 +90,7 @@ void DockWidget::createPopup(const TQString &songName, bool addButtons)
{
TQPushButton* forwardButton = new TQPushButton(m_forwardPix, 0, box, "popup_forward");
forwardButton->setFlat(true);
- connect(forwardButton, TQT_SIGNAL(clicked()), m_forwardAction, TQT_SLOT(activate()));
+ connect(forwardButton, TQ_SIGNAL(clicked()), m_forwardAction, TQ_SLOT(activate()));
}
m_popup->setView(box);
@@ -110,7 +110,7 @@ void DockWidget::setToolTip(const TQString& text)
if (text.isEmpty())
{
- TQToolTip::add(this, kapp->aboutData()->programName());
+ TQToolTip::add(this, tdeApp->aboutData()->programName());
}
else
{
@@ -120,7 +120,7 @@ void DockWidget::setToolTip(const TQString& text)
void DockWidget::wheelEvent(TQWheelEvent *e)
{
- if (e->orientation() ==Qt::Horizontal)
+ if (e->orientation() ==TQt::Horizontal)
return;
KSCD* kscd = dynamic_cast<KSCD*>(parent());
diff --git a/kscd/docking.h b/kscd/docking.h
index b4f84b1c..481bbca7 100644
--- a/kscd/docking.h
+++ b/kscd/docking.h
@@ -45,7 +45,7 @@ class KPassivePopup;
class DockWidget : public KSystemTray
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kscd/kcompactdisc.cpp b/kscd/kcompactdisc.cpp
index e17fdaa7..045d0ea4 100644
--- a/kscd/kcompactdisc.cpp
+++ b/kscd/kcompactdisc.cpp
@@ -53,7 +53,7 @@
#define KSCDMAGIC 0
#endif
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <config.h>
extern "C"
@@ -109,7 +109,7 @@ TDECompactDisc::TDECompactDisc(InformationMode infoMode) :
m_trackArtists.clear();
m_trackTitles.clear();
m_trackStartFrames.clear();
- connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired()));
+ connect(&timer, TQ_SIGNAL(timeout()), TQ_SLOT(timerExpired()));
}
TDECompactDisc::~TDECompactDisc()
diff --git a/kscd/kcompactdisc.h b/kscd/kcompactdisc.h
index 2e6830ca..e58aa7c7 100644
--- a/kscd/kcompactdisc.h
+++ b/kscd/kcompactdisc.h
@@ -46,7 +46,7 @@
class TDECompactDisc :
public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
enum InformationMode
diff --git a/kscd/kscd-script b/kscd/kscd-script
index 89146f7c..27de2d26 100755
--- a/kscd/kscd-script
+++ b/kscd/kscd-script
@@ -51,7 +51,6 @@ echo " Sun ........................ S"
echo " HPUX ....................... H"
echo " Irix ....................... I"
echo " Sony NEWS .................. N"
-echo " OSF/1 ...................... O"
echo " Ultrix ..................... U"
echo " Generic SVR4 (not Sun) ..... V"
echo
@@ -661,36 +660,6 @@ echo "#endif /* ultrix */" >> $config_file
}
-osf_conf(){
-
-clear
-echo "KSCD configuration for OSF systems"
-echo "----------------------------------"
-echo
-
-give_instructions
-write_config_header
-
-echo "" >> config_file
-echo "#if defined(__osf__)" >> $config_file
-
-echo "Nothing to be done for OSF. The CD device should be automatically detected."
-echo "If you have trouble look at plat_osf1.c and let me know what needs to be"
-echo "changed."
-
-echo ""
-echo $ac_n "Press [Enter] to continue.$ac_c"
-read dummy
-
-echo "" >> $config_file
-echo "#endif /* osf */" >> $config_file
-echo "" >> $config_file
-
-#endif
-
-
-}
-
generic_svr_conf(){
clear
@@ -751,7 +720,6 @@ s|S) sun_conf;;
h|H) hp_conf;;
i|I) irix_conf;;
n|N) sony_conf;;
-o|O) osf_conf;;
u|U) ultrix_conf;;
v|V) generic_svr_conf;;
*) linux_conf;;
diff --git a/kscd/kscd.cpp b/kscd/kscd.cpp
index 73eb0ed4..1c1c2c0c 100644
--- a/kscd/kscd.cpp
+++ b/kscd/kscd.cpp
@@ -54,11 +54,11 @@
#include <tdepopupmenu.h>
#include <tdeprotocolmanager.h>
#include <krun.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <kstdaction.h>
#include <kstringhandler.h>
#include <kurl.h>
-#include <kuniqueapplication.h>
+#include <tdeuniqueapplication.h>
#include <tdeglobalsettings.h>
#include <tdecmoduleloader.h>
#include <tdeconfigdialog.h>
@@ -103,7 +103,7 @@ KSCD::KSCD( TQWidget *parent, const char *name )
random_current = random_list.begin();
cddb = new KCDDB::Client();
- connect(cddb, TQT_SIGNAL(finished(CDDB::Result)), TQT_TQOBJECT(this), TQT_SLOT(lookupCDDBDone(CDDB::Result)));
+ connect(cddb, TQ_SIGNAL(finished(CDDB::Result)), this, TQ_SLOT(lookupCDDBDone(CDDB::Result)));
#if defined(BUILD_CDDA)
audio_systems_list
@@ -124,10 +124,10 @@ KSCD::KSCD( TQWidget *parent, const char *name )
// the time slider
timeIcon->setPixmap(SmallIcon("player_time"));
- connect(timeSlider, TQT_SIGNAL(sliderPressed()), TQT_SLOT(timeSliderPressed()));
- connect(timeSlider, TQT_SIGNAL(sliderReleased()), TQT_SLOT(timeSliderReleased()));
- connect(timeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(timeSliderMoved(int)));
- connect(timeSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(jumpToTime(int)));
+ connect(timeSlider, TQ_SIGNAL(sliderPressed()), TQ_SLOT(timeSliderPressed()));
+ connect(timeSlider, TQ_SIGNAL(sliderReleased()), TQ_SLOT(timeSliderReleased()));
+ connect(timeSlider, TQ_SIGNAL(sliderMoved(int)), TQ_SLOT(timeSliderMoved(int)));
+ connect(timeSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(jumpToTime(int)));
// the volume slider
volumeIcon->setPixmap(SmallIcon("player_volume"));
@@ -135,33 +135,33 @@ KSCD::KSCD( TQWidget *parent, const char *name )
TQString str;
str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) );
volumelabel->setText(str);
- connect(volumeSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(volChanged(int)));
+ connect(volumeSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(volChanged(int)));
/* FIXME check for return value */
setDevicePaths(/*Prefs::cdDevice(), Prefs::audioSystem(), Prefs::audioDevice()*/);
- connect(m_cd, TQT_SIGNAL(trackPlaying(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(trackUpdate(unsigned, unsigned)));
- connect(m_cd, TQT_SIGNAL(trackPaused(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(trackUpdate(unsigned, unsigned)));
- connect(m_cd, TQT_SIGNAL(trackChanged(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(trackChanged(unsigned, unsigned)));
- connect(m_cd, TQT_SIGNAL(discStopped()), TQT_TQOBJECT(this), TQT_SLOT(discStopped()));
- connect(m_cd, TQT_SIGNAL(discChanged(unsigned)), TQT_TQOBJECT(this), TQT_SLOT(discChanged(unsigned)));
- connect( &queryledtimer, TQT_SIGNAL(timeout()), TQT_SLOT(togglequeryled()) );
- connect( &titlelabeltimer, TQT_SIGNAL(timeout()), TQT_SLOT(titlelabeltimeout()) );
- connect( &cycletimer, TQT_SIGNAL(timeout()), TQT_SLOT(cycletimeout()) );
- connect( &jumpTrackTimer, TQT_SIGNAL(timeout()), TQT_SLOT(jumpTracks()) );
+ connect(m_cd, TQ_SIGNAL(trackPlaying(unsigned, unsigned)), this, TQ_SLOT(trackUpdate(unsigned, unsigned)));
+ connect(m_cd, TQ_SIGNAL(trackPaused(unsigned, unsigned)), this, TQ_SLOT(trackUpdate(unsigned, unsigned)));
+ connect(m_cd, TQ_SIGNAL(trackChanged(unsigned, unsigned)), this, TQ_SLOT(trackChanged(unsigned, unsigned)));
+ connect(m_cd, TQ_SIGNAL(discStopped()), this, TQ_SLOT(discStopped()));
+ connect(m_cd, TQ_SIGNAL(discChanged(unsigned)), this, TQ_SLOT(discChanged(unsigned)));
+ connect( &queryledtimer, TQ_SIGNAL(timeout()), TQ_SLOT(togglequeryled()) );
+ connect( &titlelabeltimer, TQ_SIGNAL(timeout()), TQ_SLOT(titlelabeltimeout()) );
+ connect( &cycletimer, TQ_SIGNAL(timeout()), TQ_SLOT(cycletimeout()) );
+ connect( &jumpTrackTimer, TQ_SIGNAL(timeout()), TQ_SLOT(jumpTracks()) );
/*
these are always connected in base class
- connect( playPB, TQT_SIGNAL(clicked()), TQT_SLOT(playClicked()) );
- connect( nextPB, TQT_SIGNAL(clicked()), TQT_SLOT(nextClicked()) );
- connect( prevPB, TQT_SIGNAL(clicked()), TQT_SLOT(prevClicked()) );
- connect( stopPB, TQT_SIGNAL(clicked()), TQT_SLOT(stopClicked()) );
- connect( ejectPB, TQT_SIGNAL(clicked()), TQT_SLOT(ejectClicked()) );
+ connect( playPB, TQ_SIGNAL(clicked()), TQ_SLOT(playClicked()) );
+ connect( nextPB, TQ_SIGNAL(clicked()), TQ_SLOT(nextClicked()) );
+ connect( prevPB, TQ_SIGNAL(clicked()), TQ_SLOT(prevClicked()) );
+ connect( stopPB, TQ_SIGNAL(clicked()), TQ_SLOT(stopClicked()) );
+ connect( ejectPB, TQ_SIGNAL(clicked()), TQ_SLOT(ejectClicked()) );
*/
- connect( repeatPB, TQT_SIGNAL(clicked()), TQT_SLOT(loopClicked()) );
- connect( songListCB, TQT_SIGNAL(activated(int)), TQT_SLOT(trackSelected(int)));
- connect( shufflePB, TQT_SIGNAL(clicked()), TQT_SLOT(randomSelected()));
- connect( cddbPB, TQT_SIGNAL(clicked()), TQT_SLOT(CDDialogSelected()));
- connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_TQOBJECT(this), TQT_SLOT(setColors()));
- connect(kapp, TQT_SIGNAL(iconChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(setIcons()));
+ connect( repeatPB, TQ_SIGNAL(clicked()), TQ_SLOT(loopClicked()) );
+ connect( songListCB, TQ_SIGNAL(activated(int)), TQ_SLOT(trackSelected(int)));
+ connect( shufflePB, TQ_SIGNAL(clicked()), TQ_SLOT(randomSelected()));
+ connect( cddbPB, TQ_SIGNAL(clicked()), TQ_SLOT(CDDialogSelected()));
+ connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), this, TQ_SLOT(setColors()));
+ connect(tdeApp, TQ_SIGNAL(iconChanged(int)), this, TQ_SLOT(setIcons()));
TQToolTip::remove(songListCB);
TQToolTip::add(songListCB, i18n("Track list"));
@@ -170,30 +170,30 @@ KSCD::KSCD( TQWidget *parent, const char *name )
m_actions = new TDEActionCollection(this);
TDEAction* action;
- action = new TDEAction(i18n("Play/Pause"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(playClicked()), m_actions, "Play/Pause");
- action = new TDEAction(i18n("Stop"), Key_S, TQT_TQOBJECT(this), TQT_SLOT(stopClicked()), m_actions, "Stop");
- action = new TDEAction(i18n("Previous"), Key_B, TQT_TQOBJECT(this), TQT_SLOT(prevClicked()), m_actions, "Previous");
- action = new TDEAction(i18n("Next"), Key_N, TQT_TQOBJECT(this), TQT_SLOT(nextClicked()), m_actions, "Next");
- action = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quitClicked()), m_actions);
- action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureKeys()), m_actions, "options_configure_shortcuts");
- action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureGlobalKeys()), m_actions, "options_configure_globals");
- action = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showConfig()), m_actions);
- action = new TDEAction(i18n("Loop"), Key_L, TQT_TQOBJECT(this), TQT_SLOT(loopClicked()), m_actions, "Loop");
- action = new TDEAction(i18n("Eject"), CTRL + Key_E, TQT_TQOBJECT(this), TQT_SLOT(ejectClicked()), m_actions, "Eject");
- action = new TDEAction(i18n("Increase Volume"), Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(incVolume()), m_actions, "IncVolume");
+ action = new TDEAction(i18n("Play/Pause"), Key_P, this, TQ_SLOT(playClicked()), m_actions, "Play/Pause");
+ action = new TDEAction(i18n("Stop"), Key_S, this, TQ_SLOT(stopClicked()), m_actions, "Stop");
+ action = new TDEAction(i18n("Previous"), Key_B, this, TQ_SLOT(prevClicked()), m_actions, "Previous");
+ action = new TDEAction(i18n("Next"), Key_N, this, TQ_SLOT(nextClicked()), m_actions, "Next");
+ action = KStdAction::quit(this, TQ_SLOT(quitClicked()), m_actions);
+ action = KStdAction::keyBindings(this, TQ_SLOT(configureKeys()), m_actions, "options_configure_shortcuts");
+ action = KStdAction::keyBindings(this, TQ_SLOT(configureGlobalKeys()), m_actions, "options_configure_globals");
+ action = KStdAction::preferences(this, TQ_SLOT(showConfig()), m_actions);
+ action = new TDEAction(i18n("Loop"), Key_L, this, TQ_SLOT(loopClicked()), m_actions, "Loop");
+ action = new TDEAction(i18n("Eject"), CTRL + Key_E, this, TQ_SLOT(ejectClicked()), m_actions, "Eject");
+ action = new TDEAction(i18n("Increase Volume"), Key_Plus, this, TQ_SLOT(incVolume()), m_actions, "IncVolume");
TDEShortcut increaseVolume = action->shortcut();
increaseVolume.append( KKey( Key_Equal ) );
action->setShortcut( increaseVolume );
- action = new TDEAction(i18n("Decrease Volume"), Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(decVolume()), m_actions, "DecVolume");
- action = new TDEAction(i18n("Options"), CTRL + Key_T, TQT_TQOBJECT(this), TQT_SLOT(showConfig()), m_actions, "Options");
- action = new TDEAction(i18n("Shuffle"), Key_R, TQT_TQOBJECT(this), TQT_SLOT(randomSelected()), m_actions, "Shuffle");
- action = new TDEAction(i18n("CDDB"), CTRL + Key_D, TQT_TQOBJECT(this), TQT_SLOT(CDDialogSelected()), m_actions, "CDDB");
+ action = new TDEAction(i18n("Decrease Volume"), Key_Minus, this, TQ_SLOT(decVolume()), m_actions, "DecVolume");
+ action = new TDEAction(i18n("Options"), CTRL + Key_T, this, TQ_SLOT(showConfig()), m_actions, "Options");
+ action = new TDEAction(i18n("Shuffle"), Key_R, this, TQ_SLOT(randomSelected()), m_actions, "Shuffle");
+ action = new TDEAction(i18n("CDDB"), CTRL + Key_D, this, TQ_SLOT(CDDialogSelected()), m_actions, "CDDB");
m_actions->readShortcutSettings("Shortcuts");
m_actions->action( "options_configure_globals" )->setText( i18n( "Configure &Global Shortcuts..." ) );
- kapp->installKDEPropertyMap();
+ tdeApp->installKDEPropertyMap();
TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap();
map->insert("KComboBox", "currentText");
@@ -210,7 +210,7 @@ KSCD::KSCD( TQWidget *parent, const char *name )
setDocking(Prefs::docking());
- setFocusPolicy(TQ_NoFocus);
+ setFocusPolicy(TQWidget::NoFocus);
songListCB->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed);
adjustSize();
@@ -227,28 +227,28 @@ KSCD::~KSCD()
void KSCD::initGlobalShortcuts() {
- m_globalAccel = new TDEGlobalAccel( TQT_TQOBJECT(this) );
+ m_globalAccel = new TDEGlobalAccel( this );
//Definition of global shortcuts is based on 'local' shortcuts which follow
//the WIN key.
m_globalAccel->insert("Next", i18n("Next"), 0, KKey("WIN+N"), KKey("WIN+Right"),
- TQT_TQOBJECT(this), TQT_SLOT(nextClicked()));
+ this, TQ_SLOT(nextClicked()));
//NOTE: WIN+B collidates with amarok's default global shortcut.
m_globalAccel->insert("Previous", i18n("Previous"), 0, KKey("WIN+B"), KKey("WIN+Left"),
- TQT_TQOBJECT(this), TQT_SLOT(prevClicked()));
+ this, TQ_SLOT(prevClicked()));
m_globalAccel->insert("Play/Pause", i18n("Play/Pause"), 0, KKey("WIN+P"), 0,
- TQT_TQOBJECT(this), TQT_SLOT(playClicked()));
+ this, TQ_SLOT(playClicked()));
m_globalAccel->insert("Stop", i18n("Stop"), 0, KKey("WIN+S"), 0,
- TQT_TQOBJECT(this), TQT_SLOT(stopClicked()));
+ this, TQ_SLOT(stopClicked()));
m_globalAccel->insert("IncVolume", i18n("Increase Volume"), 0, KKey("WIN+Plus"), KKey("WIN+Up"),
- TQT_TQOBJECT(this), TQT_SLOT(incVolume()));
+ this, TQ_SLOT(incVolume()));
m_globalAccel->insert("DecVolume", i18n("Decrease Volume"), 0, KKey("WIN+Minus"), KKey("WIN+Down"),
- TQT_TQOBJECT(this), TQT_SLOT(decVolume()));
+ this, TQ_SLOT(decVolume()));
m_globalAccel->insert("Shuffle", i18n("Shuffle"), 0, KKey("WIN+R"), 0,
- TQT_TQOBJECT(this), TQT_SLOT(incVolume()));
+ this, TQ_SLOT(incVolume()));
m_globalAccel->setConfigGroup( "GlobalShortcuts" );
- m_globalAccel->readSettings( kapp->config() );
+ m_globalAccel->readSettings( tdeApp->config() );
m_globalAccel->updateConnections();
}
@@ -312,7 +312,7 @@ void KSCD::drawPanel()
trackTimeLED[u]->setLEDoffColor(Prefs::backColor());
trackTimeLED[u]->setLEDColor(Prefs::ledColor(), Prefs::backColor());
trackTimeLED[u]->setGeometry(2 + u * 18, D, 23, 30);
- connect(trackTimeLED[u], TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(cycleplaytimemode()));
+ connect(trackTimeLED[u], TQ_SIGNAL(clicked()), this, TQ_SLOT(cycleplaytimemode()));
}
setLEDs(-1);
@@ -369,7 +369,7 @@ void KSCD::setupPopups()
mainPopup->insertItem(i18n("Artist Information"), infoPopup);
- connect( infoPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(information(int)) );
+ connect( infoPopup, TQ_SIGNAL(activated(int)), TQ_SLOT(information(int)) );
KHelpMenu* helpMenu = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false);
mainPopup->insertItem(SmallIcon("help"),i18n("&Help"), helpMenu->menu());
@@ -382,13 +382,13 @@ void KSCD::playClicked()
if (m_cd->discId() == TDECompactDisc::missingDisc)
return;
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
if (!m_cd->isPlaying())
{
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
if (m_cd->isPaused())
{
@@ -427,8 +427,8 @@ void KSCD::playClicked()
playPB->setText(i18n("Play"));
}
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
} // playClicked()
void KSCD::setShuffle(int shuffle)
@@ -462,8 +462,8 @@ void KSCD::stopClicked()
{
stoppedByUser = true;
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
m_cd->stop();
} // stopClicked()
@@ -488,8 +488,8 @@ void KSCD::prevClicked()
}
}
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
m_cd->play(track, 0, playlist.isEmpty() ? 0 : track);
} // prevClicked()
@@ -516,8 +516,8 @@ bool KSCD::nextClicked()
}
}
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
m_cd->play(track, 0, Prefs::randomPlay() || !playlist.isEmpty() ? track + 1 : 0);
return true;
} // nextClicked()
@@ -570,8 +570,8 @@ void KSCD::trackChanged(unsigned track, unsigned trackLength)
void KSCD::jumpToTime(int ms, bool forcePlay)
{
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
int track = m_cd->track();
if ((m_cd->isPlaying() || forcePlay) &&
@@ -617,15 +617,15 @@ void KSCD::quitClicked()
setLEDs(-1);
// Good GOD this is evil
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
if(Prefs::stopExit())
m_cd->stop();
delete m_cd;
- kapp->quit();
+ tdeApp->quit();
} // quitClicked()
bool KSCD::event( TQEvent *e )
@@ -639,8 +639,8 @@ void KSCD::loopOn()
Prefs::setLooping(true);
loopled->on();
loopled->show();
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
} // loopOn;
void KSCD::loopOff()
@@ -648,8 +648,8 @@ void KSCD::loopOff()
Prefs::setLooping(false);
loopled->off();
loopled->show();
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
} // loopOff;
void KSCD::loopClicked()
@@ -675,7 +675,7 @@ void KSCD::ejectClicked()
void KSCD::closeEvent(TQCloseEvent *e)
{
- if (Prefs::docking() && !kapp->sessionSaving())
+ if (Prefs::docking() && !tdeApp->sessionSaving())
{
hide();
e->ignore();
@@ -756,16 +756,16 @@ void KSCD::showConfig()
cfg->readConfig();
configDialog -> addPage(m, cfg, TQString("CDDB"), "application-x-cda", i18n("Configure Fetching Items"));
- connect(configDialog, TQT_SIGNAL(okClicked()), m, TQT_SLOT(save()));
- connect(configDialog, TQT_SIGNAL(applyClicked()), m, TQT_SLOT(save()));
- connect(configDialog, TQT_SIGNAL(defaultClicked()), m, TQT_SLOT(defaults()));
+ connect(configDialog, TQ_SIGNAL(okClicked()), m, TQ_SLOT(save()));
+ connect(configDialog, TQ_SIGNAL(applyClicked()), m, TQ_SLOT(save()));
+ connect(configDialog, TQ_SIGNAL(defaultClicked()), m, TQ_SLOT(defaults()));
}
}
}
updateConfigDialog(confWidget);
- connect(configDialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(configDone()));
+ connect(configDialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(configDone()));
configDialog -> show();
} // showConfig()
@@ -814,14 +814,14 @@ void KSCD::setDocking(bool dock)
if (!m_dockWidget)
{
m_dockWidget = new DockWidget(this, "dockw");
- connect(m_dockWidget, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(quitClicked()));
+ connect(m_dockWidget, TQ_SIGNAL(quitSelected()), this, TQ_SLOT(quitClicked()));
}
m_dockWidget->show();
- connect(this, TQT_SIGNAL(trackChanged(const TQString&)),
- m_dockWidget, TQT_SLOT(setToolTip(const TQString&)));
- connect(this, TQT_SIGNAL(trackChanged(const TQString&)),
- m_dockWidget, TQT_SLOT(createPopup(const TQString&)));
+ connect(this, TQ_SIGNAL(trackChanged(const TQString&)),
+ m_dockWidget, TQ_SLOT(setToolTip(const TQString&)));
+ connect(this, TQ_SIGNAL(trackChanged(const TQString&)),
+ m_dockWidget, TQ_SLOT(createPopup(const TQString&)));
}
else
{
@@ -1155,11 +1155,11 @@ void KSCD::CDDialogSelected()
cddialog = new CDDBDlg(this);
cddialog->setData(cddbInfo, m_cd->discSignature(), playlist);
- connect(cddialog,TQT_SIGNAL(cddbQuery()),TQT_SLOT(lookupCDDB()));
- connect(cddialog,TQT_SIGNAL(newCDInfoStored(KCDDB::CDInfo)),
- TQT_SLOT(setCDInfo(KCDDB::CDInfo)));
- connect(cddialog,TQT_SIGNAL(finished()),TQT_SLOT(CDDialogDone()));
- connect(cddialog,TQT_SIGNAL(play(int)),TQT_SLOT(trackSelected(int)));
+ connect(cddialog,TQ_SIGNAL(cddbQuery()),TQ_SLOT(lookupCDDB()));
+ connect(cddialog,TQ_SIGNAL(newCDInfoStored(KCDDB::CDInfo)),
+ TQ_SLOT(setCDInfo(KCDDB::CDInfo)));
+ connect(cddialog,TQ_SIGNAL(finished()),TQ_SLOT(CDDialogDone()));
+ connect(cddialog,TQ_SIGNAL(play(int)),TQ_SLOT(trackSelected(int)));
}
cddialog->show();
@@ -1274,8 +1274,8 @@ void KSCD::led_on()
queryledtimer.start(800);
queryled->off();
queryled->show();
- kapp->processEvents();
- kapp->flushX();
+ tdeApp->processEvents();
+ tdeApp->flushX();
} // led_on
void KSCD::togglequeryled()
@@ -1491,7 +1491,7 @@ void KSCD::information(int i)
bool KSCD::saveState(TQSessionManager& /*sm*/)
{
writeSettings();
- TDEConfig* config = TDEApplication::kApplication()->sessionConfig();
+ TDEConfig* config = tdeApp->sessionConfig();
config->setGroup("General");
config->writeEntry("Show", isVisible());
return true;
@@ -1508,7 +1508,7 @@ void KSCD::keyPressEvent(TQKeyEvent* e)
if (e->key() == TQt::Key_F1)
{
- kapp->invokeHelp();
+ tdeApp->invokeHelp();
}
else if (isNum)
{
@@ -1620,10 +1620,10 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions(options);
- KUniqueApplication::addCmdLineOptions();
+ TDEUniqueApplication::addCmdLineOptions();
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
- if (!KUniqueApplication::start())
+ if (!TDEUniqueApplication::start())
{
fprintf(stderr, "kscd is already running\n");
if (args->count()>0 || args->isSet("start"))
@@ -1646,9 +1646,9 @@ int main( int argc, char *argv[] )
exit(0);
}
- KUniqueApplication a;
+ TDEUniqueApplication a;
- kapp->dcopClient()->setDefaultObject("CDPlayer");
+ tdeApp->dcopClient()->setDefaultObject("CDPlayer");
KSCD *k = new KSCD();
@@ -1657,9 +1657,9 @@ int main( int argc, char *argv[] )
k->setCaption(a.caption());
- if (kapp->isRestored())
+ if (tdeApp->isRestored())
{
- TDEConfig* config = TDEApplication::kApplication()->sessionConfig();
+ TDEConfig* config = tdeApp->sessionConfig();
config->setGroup("General");
if (config->readBoolEntry("Show"))
k->show();
diff --git a/kscd/kscd.h b/kscd/kscd.h
index 3fa7be5a..b8730280 100644
--- a/kscd/kscd.h
+++ b/kscd/kscd.h
@@ -54,10 +54,10 @@ class TDECompactDisc;
#include "configWidget.h"
#include <tdeapplication.h>
#include <tdeconfigdialog.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#include <krandomsequence.h>
#include <dcopobject.h>
-#include <kglobalaccel.h>
+#include <tdeglobalaccel.h>
class CDDBDlg;
class DockWidget;
@@ -71,7 +71,7 @@ typedef TQValueList<int> RandomList;
class KSCD : public kscdPanelDlg, public KSessionManaged, virtual public DCOPObject {
- Q_OBJECT
+ TQ_OBJECT
//
K_DCOP
diff --git a/kscd/kscdmagic/main.cpp b/kscd/kscdmagic/main.cpp
index 312b4b14..f0ae7df8 100644
--- a/kscd/kscdmagic/main.cpp
+++ b/kscd/kscdmagic/main.cpp
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <errno.h>
-#if defined(__linux__) || defined(__svr4__) || defined(__osf__)
+#if defined(__linux__) || defined(__svr4__)
#include <signal.h>
#include <time.h>
diff --git a/kscd/kscdmagic/syna.h b/kscd/kscdmagic/syna.h
index d359a8c2..98725dd8 100644
--- a/kscd/kscdmagic/syna.h
+++ b/kscd/kscdmagic/syna.h
@@ -28,7 +28,7 @@
#define __SYNA_H__
-#if defined(__linux__) || defined(__svr4__) || defined(__osf__)
+#if defined(__linux__) || defined(__svr4__)
void error(const char *str, bool syscall=false); //Display error and exit
void warning(const char *str, bool syscall=false); //Display error
@@ -64,11 +64,7 @@ typedef short sampleType;
#endif
#endif
-#ifdef __osf__
-#include <machine/endian.h>
-#else
#include <endian.h>
-#endif
#if BYTE_ORDER == BIG_ENDIAN
#define BIGENDIAN
#else
diff --git a/kscd/kscdmagic/xlibwrap.cpp b/kscd/kscdmagic/xlibwrap.cpp
index e0ff74ba..b893ea84 100644
--- a/kscd/kscdmagic/xlibwrap.cpp
+++ b/kscd/kscdmagic/xlibwrap.cpp
@@ -21,7 +21,7 @@
27 Bond St., Mt. Waverley, 3149, Melbourne, Australia
*/
-#if defined(__linux__) || defined (__svr4__) || defined(__osf__)
+#if defined(__linux__) || defined (__svr4__)
#include <string.h>
diff --git a/kscd/ledlamp.h b/kscd/ledlamp.h
index 03dece91..e9eb98cb 100644
--- a/kscd/ledlamp.h
+++ b/kscd/ledlamp.h
@@ -28,7 +28,7 @@
class LedLamp : public TQFrame
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kscd/libwm/CMakeLists.txt b/kscd/libwm/CMakeLists.txt
index 4613f544..ae7832b0 100644
--- a/kscd/libwm/CMakeLists.txt
+++ b/kscd/libwm/CMakeLists.txt
@@ -29,10 +29,10 @@ tde_add_library( workman STATIC_PIC
database.c index.c scsi.c cdda.c plat_linux_cdda.c plat_sun_cdda.c
plat_aix.c plat_bsd386.c plat_freebsd.c plat_hpux.c plat_irix.c
plat_linux.c plat_netbsd.c plat_svr4.c plat_ultrix.c plat_news.c
- plat_openbsd.c plat_osf1.c plat_sun.c plat_scor5.c
+ plat_openbsd.c plat_sun.c plat_scor5.c
drv_sony.c drv_toshiba.c
EMBED
workmanaudio-static
LINK
- ${ALSA_LIBRARIES} pthread
+ ${ALSA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
)
diff --git a/kscd/libwm/ConfigureChecks.cmake b/kscd/libwm/ConfigureChecks.cmake
index 31ce9815..b6a12244 100644
--- a/kscd/libwm/ConfigureChecks.cmake
+++ b/kscd/libwm/ConfigureChecks.cmake
@@ -28,6 +28,7 @@ if( WITH_KSCD_CDDA AND NOT BUILD_CDDA )
#include <linux/cdrom.h>
#undef asm
#undef inline
+#include <sys/ioctl.h>
int main() {
#if defined(__linux__)
diff --git a/kscd/libwm/Makefile.am b/kscd/libwm/Makefile.am
index ae2a9144..b46b371a 100644
--- a/kscd/libwm/Makefile.am
+++ b/kscd/libwm/Makefile.am
@@ -16,7 +16,7 @@ libworkman_la_SOURCES = cddb.c cdinfo.c cdrom.c wm_helpers.c cdtext.c\
database.c index.c scsi.c cdda.c plat_linux_cdda.c plat_sun_cdda.c\
plat_aix.c plat_bsd386.c plat_freebsd.c plat_hpux.c plat_irix.c \
plat_linux.c plat_svr4.c plat_ultrix.c plat_news.c plat_openbsd.c \
-plat_osf1.c plat_sun.c plat_scor5.c \
+plat_sun.c plat_scor5.c \
drv_sony.c drv_toshiba.c
#libworkmanincludedir = $(includedir)/libwm
diff --git a/kscd/libwm/PLAT_IMPL_STATUS b/kscd/libwm/PLAT_IMPL_STATUS
index d1919728..93ac8c5c 100644
--- a/kscd/libwm/PLAT_IMPL_STATUS
+++ b/kscd/libwm/PLAT_IMPL_STATUS
@@ -8,41 +8,41 @@ X function available
\ function dummy, null implementation or commented out
(X) function available in special configurations
-function |aix |bsd386|freebsd|hpux |irix |linux|news |openbsd|osf1 |scor5|sun |svr4 |ultrix|
-------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+-----+-----+------+
-find_cdrom() | - | - | - | - | - | - | - | - | X | - | X | X | X |
-gen_init() | \ | \ | \ | \ | (X) | \ | \ | \ | \ | \ | X | \ | \ |
-wmcd_open() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-wmcd_close() | - | - | - | - | - | - | X | - | - | - | - | - | - |
-wmcd_reopen() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-wm_scsi() | \ | \ | \ | X | \ | X | \ | \ | \ | X | X | X | \ |
-keep_cd_open() | - | - | - | - | - | \ | - | - | - | \ | - | - | - |
-gen_get_drive_status() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+-----+-----+------+
-gen_get_trackcount() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_get_trackinfo() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_get_cdlen() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+-----+-----+------+
-gen_play() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_pause() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_resume() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_stop() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_eject() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_closetray() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+-----+-----+------+
-scale_volume() | X | X | X | - | - | X | - | X | X | - | - | - | X |
-unscale_volume() | X | X | X | - | - | - | - | X | X | - | - | - | X |
-gen_set_volume() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-gen_get_volume() | X | X | X | X | X | X | X | X | X | X | X | X | X |
-------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+-----+-----+------+
-cdda_init() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-get_ack() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-cdda_kill() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-gen_set_direction() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-gen_set_speed() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-gen_set_loudness() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-gen_save() | - | - | - | - | - | \ | - | - | - | - | X | - | - |
-------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+-----+-----+------+
+function |aix |bsd386|freebsd|hpux |irix |linux|news |openbsd|sun |svr4 |ultrix|
+------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+------+
+find_cdrom() | - | - | - | - | - | - | - | - | X | X | X |
+gen_init() | \ | \ | \ | \ | (X) | \ | \ | \ | \ | \ | \ |
+wmcd_open() | X | X | X | X | X | X | X | X | X | X | X |
+wmcd_close() | - | - | - | - | - | - | X | - | - | - | - |
+wmcd_reopen() | X | X | X | X | X | X | X | X | X | X | X |
+wm_scsi() | \ | \ | \ | X | \ | X | \ | \ | \ | X | \ |
+keep_cd_open() | - | - | - | - | - | \ | - | - | - | - | - |
+gen_get_drive_status() | X | X | X | X | X | X | X | X | X | X | X |
+------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+------+
+gen_get_trackcount() | X | X | X | X | X | X | X | X | X | X | X |
+gen_get_trackinfo() | X | X | X | X | X | X | X | X | X | X | X |
+gen_get_cdlen() | X | X | X | X | X | X | X | X | X | X | X |
+------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+------+
+gen_play() | X | X | X | X | X | X | X | X | X | X | X |
+gen_pause() | X | X | X | X | X | X | X | X | X | X | X |
+gen_resume() | X | X | X | X | X | X | X | X | X | X | X |
+gen_stop() | X | X | X | X | X | X | X | X | X | X | X |
+gen_eject() | X | X | X | X | X | X | X | X | X | X | X |
+gen_closetray() | X | X | X | X | X | X | X | X | X | X | X |
+------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+------+
+scale_volume() | X | X | X | - | - | X | - | X | X | - | X |
+unscale_volume() | X | X | X | - | - | - | - | X | X | - | X |
+gen_set_volume() | X | X | X | X | X | X | X | X | X | X | X |
+gen_get_volume() | X | X | X | X | X | X | X | X | X | X | X |
+------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+------+
+cdda_init() | - | - | - | - | - | \ | - | - | - | - | - |
+get_ack() | - | - | - | - | - | \ | - | - | - | - | - |
+cdda_kill() | - | - | - | - | - | \ | - | - | - | - | - |
+gen_set_direction() | - | - | - | - | - | \ | - | - | - | - | - |
+gen_set_speed() | - | - | - | - | - | \ | - | - | - | - | - |
+gen_set_loudness() | - | - | - | - | - | \ | - | - | - | - | - |
+gen_save() | - | - | - | - | - | \ | - | - | - | - | - |
+------------------------+-----+------+-------+-----+-----+-----+-----+-------+-----+-----+------+
diff --git a/kscd/libwm/cddb.c b/kscd/libwm/cddb.c
index e972ef0d..1d6e7026 100644
--- a/kscd/libwm/cddb.c
+++ b/kscd/libwm/cddb.c
@@ -41,6 +41,7 @@
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netdb.h>
#include "include/wm_config.h"
@@ -234,7 +235,6 @@ connect_open(void)
static struct in_addr defaddr;
static char *alist[1];
static char namebuf[128];
- int inet_addr();
defaddr.s_addr = inet_addr(host);
if ((int) defaddr.s_addr == -1)
diff --git a/kscd/libwm/include/wm_config.h b/kscd/libwm/include/wm_config.h
index caf7d17e..a2f2640a 100644
--- a/kscd/libwm/include/wm_config.h
+++ b/kscd/libwm/include/wm_config.h
@@ -45,7 +45,6 @@
* Linux
* News (Sony NewsOS)
* OpenBSD
- * OSF1
* Sun (SunOS/Solaris, Sparc or x86)
* SVR4
* Ultrix
@@ -288,22 +287,6 @@
#endif
/******************************************************************
- * OSF1
- ******************************************************************
- **** **** *** *** *** *******************************
- *** ** ** ****** ****** ** *******************************
- *** ** **** **** *** ***** *******************************
- *** ** ****** ** **** ****** *******************************
- **** **** *** *** ***** *****************************
- ******************************************************************/
-#if defined(__osf__) || defined(__osf)
-
-/* not needed here, it's figured out by plat_osf1.c */
-/* #define DEFAULT_CD_DEVICE "/dev/rcdrom/cd0" */
-
-#endif
-
-/******************************************************************
* SunOS/Solaris
******************************************************************
**** *** ** ** *** ***************************************
diff --git a/kscd/libwm/include/wm_struct.h b/kscd/libwm/include/wm_struct.h
index 71afce07..4369c925 100644
--- a/kscd/libwm/include/wm_struct.h
+++ b/kscd/libwm/include/wm_struct.h
@@ -104,33 +104,34 @@ struct wm_cdinfo
/* The global variable "cd" points to the struct for the CD that's playing. */
extern struct wm_cdinfo *cd;
-extern struct wm_playlist *new_playlist();
+extern struct wm_playlist *new_playlist(struct wm_cdinfo*, char*);
#define WM_STR_GENVENDOR "Generic"
#define WM_STR_GENMODEL "drive"
#define WM_STR_GENREV "type"
+struct wm_drive;
/*
* Drive descriptor structure. Used for access to low-level routines.
*/
struct wm_drive_proto
{
- int (*gen_init)();
- int (*gen_close)();
- int (*gen_get_trackcount)();
- int (*gen_get_cdlen)();
- int (*gen_get_trackinfo)();
- int (*gen_get_drive_status)();
- int (*gen_get_volume)();
- int (*gen_set_volume)();
- int (*gen_pause)();
- int (*gen_resume)();
- int (*gen_stop)();
- int (*gen_play)();
- int (*gen_eject)();
- int (*gen_closetray)();
- int (*gen_get_cdtext)();
+ int (*gen_init)(struct wm_drive*);
+ int (*gen_close)(struct wm_drive*);
+ int (*gen_get_trackcount)(struct wm_drive*, int*);
+ int (*gen_get_cdlen)(struct wm_drive*, int*);
+ int (*gen_get_trackinfo)(struct wm_drive*, int, int*, int*);
+ int (*gen_get_drive_status)(struct wm_drive*, int, int*, int*, int*, int*);
+ int (*gen_get_volume)( struct wm_drive*, int*, int*);
+ int (*gen_set_volume)( struct wm_drive*, int, int);
+ int (*gen_pause)(struct wm_drive*);
+ int (*gen_resume)(struct wm_drive*);
+ int (*gen_stop)(struct wm_drive*);
+ int (*gen_play)(struct wm_drive*, int, int, int);
+ int (*gen_eject)(struct wm_drive*);
+ int (*gen_closetray)(struct wm_drive*);
+ int (*gen_get_cdtext)(struct wm_drive*, unsigned char**, int*);
};
struct wm_drive
diff --git a/kscd/libwm/plat_linux_cdda.c b/kscd/libwm/plat_linux_cdda.c
index 22f24a9d..dc634f3f 100644
--- a/kscd/libwm/plat_linux_cdda.c
+++ b/kscd/libwm/plat_linux_cdda.c
@@ -25,6 +25,7 @@
* Linux CDDA functions. Derived from the SUN module.
*/
+#include <stdlib.h>
#include "include/wm_cdda.h"
#if defined(__linux__) && defined(BUILD_CDDA)
diff --git a/kscd/libwm/plat_osf1.c b/kscd/libwm/plat_osf1.c
deleted file mode 100644
index 2ccfc49c..00000000
--- a/kscd/libwm/plat_osf1.c
+++ /dev/null
@@ -1,674 +0,0 @@
-/*
- * This file is part of WorkMan, the civilized CD player library
- * (c) 1991-1997 by Steven Grimm (original author)
- * (c) by Dirk Försterling (current 'author' = maintainer)
- * The maintainer can be contacted by his e-mail address:
- * milliByte@DeathsDoor.com
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- *
- * OSF drive control routines.
- */
-
-
-#if defined(__osf__) || defined(__osf)
-
-
-#include <errno.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/ststfd.h>
-#include <sys/time.h>
-#include <string.h>
-/* #include <sys/rzdisk.h>
-#include <sys/cdrom.h> */
-#include <io/cam/rzdisk.h>
-#include <io/cam/cdrom.h>
-
-#include "include/wm_config.h"
-#include "include/wm_struct.h"
-#include "include/wm_helpers.h"
-#include "include/wm_cdtext.h"
-
-
-#define WM_MSG_CLASS WM_MSG_CLASS_PLATFORM
-
-/*
- * This structure will be filled with the TOC header and all entries.
- * Ultrix doesn't seem to allow getting single TOC entries.
- * - Chris Ross (cross@eng.umd.edu)
- */
-struct cd_toc_header_and_entries
-{
- struct cd_toc_header cdth;
- struct cd_toc_entry cdte[CDROM_MAX_TRACK+1];
-};
-
-void *malloc();
-char *strchr();
-
-int min_volume = 128;
-int max_volume = 255;
-static char* osf_cd_device = NULL;
-
-/*
- * fgetline()
- *
- * Simulate fgets, but joining continued lines in the output of uerf.
- *
- * platform specific internal function
- *
- */
-
-#define BUF_SIZE 85 /* Max length of a (real) line */
-
-char *
-fgetline( FILE *fp )
-{
- static char *retval = NULL;
- static char holdbuf[BUF_SIZE + 1];
- char tmp[BUF_SIZE + 1];
- char *stmp;
-
- if (!retval)
- {
- retval = malloc(BUF_SIZE * 3); /* 3 lines can be joined */
- if (!retval)
- return(NULL);
- else
- *retval = '\0';
- }
-
- if (*holdbuf)
- {
- strcpy(retval, holdbuf);
- retval[strlen(retval)-1] = '\0';
- memset(holdbuf, 0, BUF_SIZE+1);
- }
-
- while (fgets(tmp, BUF_SIZE, fp))
- {
- stmp = tmp + strspn(tmp, " \t");
- if (*stmp == '_') { /* Continuation line */
- retval[strlen(retval)-1] = '\0'; /* Trim off C/R */
- strcat(retval, stmp+1);
- } else {
- if (*retval)
- {
- strcpy(holdbuf, tmp);
- holdbuf[strlen(holdbuf)-1] = -1;
- return retval;
- } else { /* First line read, keep reading */
- strcat(retval, stmp);
- retval[strlen(retval)-1] = '\0';
- }
- }
- }
- return NULL;
-} /* fgetline() */
-
-
-/*
- * find_cdrom
- *
- * Determine the name of the CD-ROM device.
- *
- * Read through the boot records (via a call to uerf) and find the SCSI
- * address of the CD-ROM.
- */
-const char*
-find_cdrom()
-{
- char *data;
- FILE *uerf;
- int fds[2];
- int pid;
- extern char *getenv();
- const char *device = NULL;
-
- pipe(fds);
-
- device = getenv("CDROM");
- /*
- ** the path of the device has to start w/ /dev
- ** otherwise we are vulnerable to race conditions
- ** Thomas Biege <thomas@suse.de>
- */
- if ( device == NULL ||
- strncmp("/dev/", device, 5) ||
- strstr(device, "/../")
- )
- return NULL;
-
- if ((pid = fork()) == 0)
- {
- close(fds[0]);
- dup2(fds[1], 1);
- execl("/etc/uerf", "uerf", "-R", "-r", "300", (void *)0);
- execl("/usr/sbin/uerf", "uerf", "-R", "-r", "300", (void *)0);
- return NULL; /* _exit(1); */
- } else if (pid < 0) {
- perror("fork");
- return NULL;
- }
-
- close(fds[1]);
- uerf = fdopen(fds[0], "r");
-
- while (data = fgetline(uerf))
- if (strstr(data, "RRD42"))
- {
- char *device_p;
-
- osf_cd_device = (char *)malloc(sizeof("/dev/rrz##c"));
- strcpy(osf_cd_device, "/dev/r");
- device_p = strstr(data, "rz");
- device_p[(int)(strchr(device_p, ' ') - device_p)] = '\0';
- strcat(osf_cd_device, device_p);
- strcat(osf_cd_device, "c");
- device = osf_cd_device;
- break;
- }
-
- fclose(uerf);
-
- if (device == NULL)
- {
- fprintf(stderr,
- "No cdrom (RRD42) is installed on this system\n");
- return NULL;
- }
-
- kill(pid, 15);
- (void)wait((int *)NULL);
- return device;
-} /* find_cdrom() */
-
-/*
- * Initialize the drive. A no-op for the generic driver.
- */
-int
-gen_init( struct wm_drive *d )
-{
- return (0);
-} /* gen_init() */
-
-/*
- * Open the CD device and figure out what kind of drive is attached.
- */
-int
-wmcd_open( struct wm_drive *d )
-{
- int fd;
- static int warned = 0;
-
- if (d->fd >= 0) /* Device already open? */
- {
- wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "wmcd_open(): [device is open (fd=%d)]\n", d->fd);
- return (0);
- }
-
- if (d->cd_device == NULL)
- d->cd_device = find_cdrom();
-
- d->fd = open(d->cd_device, O_RDWR);
- if (d->fd < 0)
- {
- if (errno == EACCES)
- {
- return -EACCES;
- }
- else if (errno != EINTR)
- {
- return (-6);
- }
-
- /* No CD in drive. */
- return (1);
- }
-
- /* Now fill in the relevant parts of the wm_drive structure. */
- find_drive_struct("", "", "");
- d->fd = fd;
-
- (d->init)(d);
-
- return (0);
-} /* wmcd_open() */
-
-/*
- * Re-Open the device if it is open.
- */
-int
-wmcd_reopen( struct wm_drive *d )
-{
- int status;
-
- do {
- wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "wmcd_reopen\n");
- status = gen_close( d );
- wm_susleep( 1000 );
- wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "calling wmcd_open()\n");
- status = wmcd_open( d ); /* open it as usual */
- wm_susleep( 1000 );
- } while ( status != 0 );
- return status;
-} /* wmcd_reopen() */
-
-/*
- * Send an arbitrary SCSI command to a device.
- */
-int
-wm_scsi(struct wm_drive *d, unsigned char *cdb, int cdblen,
- void *retbuf, int retbuflen, int getreply)
-{
- /* OSF1 doesn't have a SCSI passthrough interface, does it? */
- return (-1);
-} /* wm_scsi() */
-
-int
-gen_close( struct wm_drive *d )
-{
- if(d->fd != -1) {
- wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "closing the device\n");
- close(d->fd);
- d->fd = -1;
- }
- return 0;
-}
-
-/*
- * Get the current status of the drive: the current play mode, the absolute
- * position from start of disc (in frames), and the current track and index
- * numbers if the CD is playing or paused.
- */
-int
-gen_get_drive_status(struct wm_drive *d, int oldmode,
- int *mode, int *pos, int *track, int *index)
-{
- struct cd_sub_channel sc;
- struct cd_subc_channel_data scd;
-
- /* If we can't get status, the CD is ejected, so default to that. */
- *mode = WM_CDM_EJECTED;
-
- sc.sch_address_format = CDROM_MSF_FORMAT;
- sc.sch_data_format = CDROM_CURRENT_POSITION;
- sc.sch_track_number = 0;
- sc.sch_alloc_length = sizeof(scd);
- sc.sch_buffer = (caddr_t)&scd;
-
- /* Is the device open? */
- if (d->fd < 0)
- {
- switch (wmcd_open(d))
- {
- case -1: /* error */
- return (-1);
-
- case 1: /* retry */
- return (0);
- }
- }
-
- if (ioctl(d->fd, CDROM_READ_SUBCHANNEL, &sc))
- return (0); /* ejected */
-
- switch (scd.scd_header.sh_audio_status)
- {
- case AS_PLAY_IN_PROGRESS:
- *mode = WM_CDM_PLAYING;
- dopos:
- *pos = scd.scd_position_data.scp_absaddr.msf.m_units * 60 * 75 +
- scd.scd_position_data.scp_absaddr.msf.s_units * 75 +
- scd.scd_position_data.scp_absaddr.msf.f_units;
- *track = scd.scd_position_data.scp_track_number;
- *index = scd.scd_position_data.scp_index_number;
- break;
-
- case AS_PLAY_PAUSED:
- if (oldmode == WM_CDM_PLAYING || oldmode == WM_CDM_PAUSED)
- {
- *mode = WM_CDM_PAUSED;
- goto dopos;
- }
- else
- *mode = WM_CDM_STOPPED;
- break;
-
- case AS_PLAY_COMPLETED:
- *mode = WM_CDM_TRACK_DONE; /* waiting for next track. */
- break;
-
- case AS_NO_STATUS:
- *mode = WM_CDM_STOPPED;
- break;
- default:
- abort();
- }
-
- return (0);
-} /* gen_get_drive_status() */
-
-/*
- * Play the CD from one position to another (both in frames.)
- */
-int
-gen_play( struct wm_drive *d, int start, int end )
-{
- struct cd_play_audio_msf msf;
-
- msf.msf_starting_M_unit = start / (60*75);
- msf.msf_starting_S_unit = (start % (60*75)) / 75;
- msf.msf_starting_F_unit = start % 75;
- msf.msf_ending_M_unit = end / (60*75);
- msf.msf_ending_S_unit = (end % (60*75)) / 75;
- msf.msf_ending_F_unit = end % 75;
-
- if (ioctl(d->fd, SCSI_START_UNIT))
- return (-1);
- if (ioctl(d->fd, CDROM_PLAY_AUDIO_MSF, &msf))
- return (-2);
-
- return (0);
-} /* gen_play() */
-
-/*
- * Pause the CD.
- */
-int
-gen_pause( struct wm_drive *d )
-{
- return (ioctl(d->fd, CDROM_PAUSE_PLAY, 0));
-} /* gen_pause() */
-
-/*
- * Resume playing the CD (assuming it was paused.)
- */
-int
-gen_resume( struct wm_drive *d )
-{
- return (ioctl(d->fd, CDROM_RESUME_PLAY, 0));
-} /* gen_resume() */
-
-/*
- * Stop the CD.
- */
-int
-gen_stop( struct wm_drive *d )
-{
- return (ioctl(d->fd, SCSI_STOP_UNIT, 0));
-} /* gen_stop() */
-
-/*
- * Eject the current CD, if there is one.
- */
-int
-gen_eject(struct wm_drive *d)
-{
- /* On some systems, we can check to see if the CD is mounted. */
- struct stat stbuf;
- struct statfs sfsbuf;
-
- if (fstat(d->fd, &stbuf) != 0)
- return (-2);
-
- /* Is this a mounted filesystem? */
- if (fstatfs(d->fd, &sfsbuf) == 0)
- return (-3);
-
- return (ioctl(d->fd, CDROM_EJECT_CADDY, 0));
-} /* gen_eject() */
-
-/*----------------------------------------*
- * Close the CD tray
- *
- * Please edit and send changes to
- * milliByte@DeathsDoor.com
- *----------------------------------------*/
-
-int
-gen_closetray(struct wm_drive *d)
-{
-#ifdef CAN_CLOSE
- if(!close(d->fd))
- {
- d->fd=-1;
- return(wmcd_reopen(d));
- } else {
- return(-1);
- }
-#else
- /* Always succeed if the drive can't close */
- return(0);
-#endif /* CAN_CLOSE */
-} /* gen_closetray() */
-
-/*
- * Get the number of tracks on the CD.
- */
-int
-gen_get_trackcount(struct wm_drive *d, int *tracks)
-{
- struct cd_toc_header hdr;
-
- if (ioctl(d->fd, CDROM_TOC_HEADER, &hdr))
- return (-1);
-
- *tracks = hdr.th_ending_track;
-
- return (0);
-} /* gen_get_trackcount() */
-
-/*
- * Get the start time and mode (data or audio) of a track.
- *
- * XXX - this should get cached, but that means keeping track of ejects.
- */
-int
-gen_get_trackinfo(struct wm_drive *d, int track, int *data, int *startframe)
-{
- struct cd_toc toc;
- struct cd_toc_header hdr;
- struct cd_toc_header_and_entries toc_buffer;
-
- if (ioctl(d->fd, CDROM_TOC_HEADER, &hdr))
- return (-1);
-
- bzero((char *)&toc_buffer, sizeof(toc_buffer));
- toc.toc_address_format = CDROM_MSF_FORMAT;
- toc.toc_starting_track = 0;
- toc.toc_alloc_length = (u_short)(((hdr.th_data_len1 << 8) +
- hdr.th_data_len0) & 0xfff) + 2;
- toc.toc_buffer = (caddr_t)&toc_buffer;
-
- if (ioctl(d->fd, CDROM_TOC_ENTRYS, &toc))
- return (-1);
-
- if (track == 0)
- track = hdr.th_ending_track + 1;
-
- *data = (toc_buffer.cdte[track-1].te_control & CDROM_DATA_TRACK) ? 1:0;
- *startframe = toc_buffer.cdte[track - 1].te_absaddr.msf.m_units*60*75 +
- toc_buffer.cdte[track - 1].te_absaddr.msf.s_units * 75 +
- toc_buffer.cdte[track - 1].te_absaddr.msf.f_units;
-
- return (0);
-} /* gen_get_trackinfo() */
-
-/*
- * Get the number of frames on the CD.
- */
-int
-gen_get_cdlen( struct wm_drive *d, int *frames )
-{
- int tmp;
-
- return (gen_get_trackinfo(d, 0, &tmp, frames));
-} /* gen_get_cdlen() */
-
-/*
- * scale_volume(vol, max)
- *
- * Return a volume value suitable for passing to the CD-ROM drive. "vol"
- * is a volume slider setting; "max" is the slider's maximum value.
- *
- * On Sun and DEC CD-ROM drives, the amount of sound coming out the jack
- * increases much faster toward the top end of the volume scale than it
- * does at the bottom. To make up for this, we make the volume scale look
- * sort of logarithmic (actually an upside-down inverse square curve) so
- * that the volume value passed to the drive changes less and less as you
- * approach the maximum slider setting. The actual formula looks like
- *
- * (max^2 - (max - vol)^2) * (max_volume - min_volume)
- * v = --------------------------------------------------- + min_volume
- * max^2
- *
- * If your system's volume settings aren't broken in this way, something
- * like the following should work:
- *
- * return ((vol * (max_volume - min_volume)) / max + min_volume);
- */
-scale_volume(int vol, int max)
-{
- return ((max * max - (max - vol) * (max - vol)) *
- (max_volume - min_volume) / (max * max) + min_volume);
-} /* scale_volume() */
-
-/*
- * unscale_volume(cd_vol, max)
- *
- * Given a value between min_volume and max_volume, return the volume slider
- * value needed to achieve that value.
- *
- * Rather than perform floating-point calculations to reverse the above
- * formula, we simply do a binary search of scale_volume()'s return values.
- */
-static int
-unscale_volume( int cd_vol, int max )
-{
- int vol = 0, top = max, bot = 0, scaled;
-
- while (bot <= top)
- {
- vol = (top + bot) / 2;
- scaled = scale_volume(vol, max);
- if (cd_vol == scaled)
- break;
- if (cd_vol < scaled)
- top = vol - 1;
- else
- bot = vol + 1;
- }
-
- if (vol < 0)
- vol = 0;
- else if (vol > max)
- vol = max;
-
- return (vol);
-} /* unscale_volume() */
-
-/*
- * Set the volume level for the left and right channels. Their values
- * range from 0 to 100.
- */
-int
-gen_set_volume(struct wm_drive *d, int left, int right)
-{
- struct cd_playback pb;
- struct cd_playback_status ps;
- struct cd_playback_control pc;
-
- left = scale_volume(left, 100);
- right = scale_volume(right, 100);
-
- bzero((char *)&pb, sizeof(pb));
- bzero((char *)&ps, sizeof(ps));
- bzero((char *)&pc, sizeof(pc));
-
- pb.pb_alloc_length = sizeof(ps);
- pb.pb_buffer = (caddr_t)&ps;
-
- if (ioctl(d->fd, CDROM_PLAYBACK_STATUS, &pb))
- return (-1);
-
- pc.pc_chan0_select = ps.ps_chan0_select;
- pc.pc_chan0_volume = (left < CDROM_MIN_VOLUME) ?
- CDROM_MIN_VOLUME : (left > CDROM_MAX_VOLUME) ?
- CDROM_MAX_VOLUME : left;
- pc.pc_chan1_select = ps.ps_chan1_select;
- pc.pc_chan1_volume = (right < CDROM_MIN_VOLUME) ?
- CDROM_MIN_VOLUME : (right > CDROM_MAX_VOLUME) ?
- CDROM_MAX_VOLUME : right;
-
- pb.pb_alloc_length = sizeof(pc);
- pb.pb_buffer = (caddr_t)&pc;
-
- if (ioctl(d->fd, CDROM_PLAYBACK_CONTROL, &pb))
- return (-1);
-
- return (0);
-} /* gen_set_volume() */
-
-
-/*
- * Read the initial volume from the drive, if available. Each channel
- * ranges from 0 to 100, with -1 indicating data not available.
- */
-int
-gen_get_volume( struct wm_drive *d, int *left, int *right )
-{
- struct cd_playback pb;
- struct cd_playback_status ps;
-
- bzero((char *)&pb, sizeof(pb));
- bzero((char *)&ps, sizeof(ps));
-
- pb.pb_alloc_length = sizeof(ps);
- pb.pb_buffer = (caddr_t)&ps;
-
- if (d->fd >= 0)
- {
- if (ioctl(d->fd, CDROM_PLAYBACK_STATUS, &pb))
- *left = *right = -1;
- else
- {
- *left = unscale_volume(ps.ps_chan0_volume, 100);
- *right = unscale_volume(ps.ps_chan1_volume, 100);
- }
- }
- else
- *left = *right = -1;
-
- return (0);
-} /* gen_get_volume() */
-
-/*------------------------------------------------------------------------*
- * gen_get_cdtext(drive, buffer, length)
- *------------------------------------------------------------------------*/
-
-int
-gen_get_cdtext(struct wm_drive *d, unsigned char **pp_buffer, int *p_buffer_length)
-{
- return -1; /* no SCSI, no CDTEXT */
-} /* gen_get_cdtext() */
-
-
-#endif
diff --git a/kscd/libwm/scsi.c b/kscd/libwm/scsi.c
index d056fe34..37343107 100644
--- a/kscd/libwm/scsi.c
+++ b/kscd/libwm/scsi.c
@@ -90,7 +90,7 @@ int wm_scsi2_set_volume(struct wm_drive *d, int left, int right);
* d Drive structure
* buf Buffer for data, both sending and receiving
* len Size of buffer
- * dir TRUE if the command expects data to be returned in the buffer.
+ * dir true if the command expects data to be returned in the buffer.
* a0- CDB bytes. Either 6, 10, or 12 of them, depending on the command.
*/
/*VARARGS4*/
diff --git a/kscd/panel.ui b/kscd/panel.ui
index 2ef615ef..c3fd3a09 100644
--- a/kscd/panel.ui
+++ b/kscd/panel.ui
@@ -348,9 +348,6 @@
<property name="text">
<string>Stop</string>
</property>
- <property name="accel">
- <string></string>
- </property>
<property name="flat">
<bool>true</bool>
</property>
@@ -373,9 +370,6 @@
<property name="text">
<string>Loop</string>
</property>
- <property name="accel">
- <string></string>
- </property>
<property name="toggleButton">
<bool>true</bool>
</property>
@@ -457,12 +451,12 @@
<tabstop>cddbPB</tabstop>
<tabstop>infoPB</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot>playClicked()</slot>
<slot>stopClicked()</slot>
<slot>prevClicked()</slot>
<slot>ejectClicked()</slot>
<slot returnType="bool">nextClicked()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>