summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-06 10:57:48 (UTC)
committer zecke <zecke>2004-09-06 10:57:48 (UTC)
commit8bf99aaa1b31e770b21b7bf50407a650a8f5d646 (patch) (unidiff)
tree4aadf040fb94085f54080c2b2b112ab5ff236b24
parent97a40bb7f35a8323dd99712bf014387add283177 (diff)
downloadopie-8bf99aaa1b31e770b21b7bf50407a650a8f5d646.zip
opie-8bf99aaa1b31e770b21b7bf50407a650a8f5d646.tar.gz
opie-8bf99aaa1b31e770b21b7bf50407a650a8f5d646.tar.bz2
GCC 2.95 compile fix for switch/case statement
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 127fee9..64fa199 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -302,60 +302,63 @@ int status; /* set new led status if you call SHARP_LED_SETSTATUS */
302 302
303#define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ 303#define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */
304#define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ 304#define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */
305#define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ 305#define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */
306 306
307// #include <asm/sharp_apm.h> // including kernel headers is evil ... 307// #include <asm/sharp_apm.h> // including kernel headers is evil ...
308 308
309#define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) 309#define APM_IOCGEVTSRC OD_IOR( 'A', 203, int )
310#define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) 310#define APM_IOCSEVTSRC OD_IORW( 'A', 204, int )
311#define APM_EVT_POWER_BUTTON (1 << 0) 311#define APM_EVT_POWER_BUTTON (1 << 0)
312 312
313#define FL_IOCTL_STEP_CONTRAST 100 313#define FL_IOCTL_STEP_CONTRAST 100
314 314
315 315
316void Zaurus::buzzer ( int sound ) 316void Zaurus::buzzer ( int sound )
317{ 317{
318#ifndef QT_NO_SOUND 318#ifndef QT_NO_SOUND
319 Sound *snd = 0; 319 Sound *snd = 0;
320 320
321 // Not all devices have real sound 321 // Not all devices have real sound
322 if ( d->m_model == Model_Zaurus_SLC7x0 322 if ( d->m_model == Model_Zaurus_SLC7x0
323 || d->m_model == Model_Zaurus_SLB600 ){ 323 || d->m_model == Model_Zaurus_SLB600 ){
324 324
325 switch ( sound ){ 325 switch ( sound ){
326 case SHARP_BUZ_TOUCHSOUND: 326 case SHARP_BUZ_TOUCHSOUND: {
327 static Sound touch_sound("touchsound"); 327 static Sound touch_sound("touchsound");
328 snd = &touch_sound; 328 snd = &touch_sound;
329 }
329 break; 330 break;
330 case SHARP_BUZ_KEYSOUND: 331 case SHARP_BUZ_KEYSOUND: {
331 static Sound key_sound( "keysound" ); 332 static Sound key_sound( "keysound" );
332 snd = &key_sound; 333 snd = &key_sound;
334 }
333 break; 335 break;
334 case SHARP_BUZ_SCHEDULE_ALARM: 336 case SHARP_BUZ_SCHEDULE_ALARM:
335 default: 337 default: {
336 static Sound alarm_sound("alarm"); 338 static Sound alarm_sound("alarm");
337 snd = &alarm_sound; 339 snd = &alarm_sound;
340 }
338 break; 341 break;
339 } 342 }
340 } 343 }
341 344
342 // If a soundname is defined, we expect that this device has 345 // If a soundname is defined, we expect that this device has
343 // sound capabilities.. Otherwise we expect to have the buzzer 346 // sound capabilities.. Otherwise we expect to have the buzzer
344 // device.. 347 // device..
345 if ( snd ){ 348 if ( snd ){
346 changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); 349 changeMixerForAlarm( 0, "/dev/sound/mixer", snd );
347 snd-> play(); 350 snd-> play();
348 } else { 351 } else {
349 int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); 352 int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK );
350 353
351 if ( fd >= 0 ) { 354 if ( fd >= 0 ) {
352 ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); 355 ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound );
353 ::close ( fd ); 356 ::close ( fd );
354 } 357 }
355 358
356 } 359 }
357#endif 360#endif
358} 361}
359 362
360 363
361void Zaurus::playAlarmSound() 364void Zaurus::playAlarmSound()