[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing ringtones
From: |
Pavel Machek |
Subject: |
Re: Fixing ringtones |
Date: |
Fri, 24 May 2002 00:41:16 +0200 |
User-agent: |
Mutt/1.3.28i |
Hi!
> > int GSM_EncodeSMSRingtone(char *message, GSM_Ringtone *ringtone)
> > {
> > int j = GSM_MAX_8BIT_SMS_LENGTH;
> > - return GSM_PackRingtone(ringtone, message, &j);
> > + GSM_PackRingtone(ringtone, message, &j);
> > + return j;
> > }
>
> It's ugly. Can we change GSM_PackRingtone singature to:
Agreed its ugly, but it already returns u8 number of notes written,
plus this is api exported function. Should I still touch it?
> int (*a)(..., ..., int);
> so we could implement GSM_EncodeSMSRingtone just as:
> int GSM_EncodeSMSRingtone(char *message, GSM_Ringtone *ringtone)
> {
> return GSM_PackRingtone(ringtone, message, GSM_MAX_8BIT_SMS_LENGTH);
> }
>
> > Index: common/gsm-sms.c
> > ===================================================================
> > RCS file: /cvsroot/gnokii/gnokii/common/gsm-sms.c,v
> > retrieving revision 1.64
> > diff -u -u -r1.64 gsm-sms.c
> > --- common/gsm-sms.c 21 May 2002 09:05:54 -0000 1.64
> > +++ common/gsm-sms.c 23 May 2002 09:08:20 -0000
> > @@ -1044,8 +1044,10 @@
> > bitmap_index = i; break;
> > case SMS_RingtoneData:
> > ringtone_index = i; break;
> > - default:
> > + case SMS_NoData:
> > break;
> > + default:
> > + fprintf(stderr, "What kind of ninja-mutant UserData is
> > this?\n");
>
> add break here;
Is break mandatory at the end of switch? [Added anyway.]
> > rawsms->UserDataLength += size;
> > + rawsms->DCS = 0xf5;
>
> Is it just = 0xf5 or maybe |= 0xf5?
Just =, as far as I can tell.
Pavel
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa