[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing ringtones
From: |
Pawel Kot |
Subject: |
Re: Fixing ringtones |
Date: |
Thu, 23 May 2002 19:16:51 +0200 (CEST) |
On Thu, 23 May 2002, Pavel Machek wrote:
> 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:
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;
> }
> }
>
> #ifdef RINGTONE_SUPPORT
> size = GSM_EncodeSMSRingtone(message + rawsms->Length,
> &sms->UserData[ringtone_index].u.Ringtone);
> rawsms->Length += size;
> rawsms->UserDataLength += size;
> + rawsms->DCS = 0xf5;
Is it just = 0xf5 or maybe |= 0xf5?
Well done, Pavel.
pkot
--
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku