[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix EMS + concat message, cleanup gnokii.c
From: |
Pavel Machek |
Subject: |
Re: Fix EMS + concat message, cleanup gnokii.c |
Date: |
Fri, 7 Jun 2002 23:33:19 +0200 |
User-agent: |
Mutt/1.3.28i |
Hi!
> > diff -u -u -r1.29 gsm-bitmaps.c
> > --- common/gsm-bitmaps.c 3 Jun 2002 22:59:48 -0000 1.29
> > +++ common/gsm-bitmaps.c 7 Jun 2002 09:51:26 -0000
> > @@ -260,7 +267,7 @@
> > fprintf(stderr, "EMS needs bitmap size 8, 16, 24, ...
> > \n");
> > return GE_NOTSUPPORTED;
> > }
> > - message[current++] = bitmap->width/8*bitmap->height+5;
> > + current += AddUDH(rawsms, bitmap->width/8*bitmap->height+5);
> > message[current++] = 0x12; /* Picture code */
> > message[current++] = bitmap->width/8*bitmap->height+3; /*
> > Picture size */;
> > message[current++] = 0; /* Position in text this
> > picture is at */
> > @@ -269,7 +276,7 @@
> > break;
> > case GSM_EMSAnimation:
> > dprintf("EMS animation\n");
> > - message[current++] = 128+3;
> > + current += AddUDH(rawsms, 128+3);
> > message[current++] = 0x0e; /* Animation code */
> > message[current++] = 128+1; /* Picture size */;
> > message[current++] = 0x00; /* Position where to display */
>
> Bitmaps know NOTHING about UDH. Don't mess it.
They have to. Whole bitmap is in the UDH. Yep, UDH is then 128+
bytes. I do not want to encode whole bitmap inside EncodeUDH...
> > +int AddUDH(GSM_SMSMessage *rawsms, int length)
> > +{
> > + rawsms->UserData[0] += length;
> > + if (!rawsms->UDHIndicator) {
> > + rawsms->UDHIndicator = 1;
> > + return 1;
> > + }
> > + return 0;
> > +}
>
> This is AddUDHIndicator, not AddUDH.
Well, it adds both length and udh indicator.... I can change it to
AddUDHIndicator, but its not completely right, either.
> > diff -u -u -r1.16 gsm-bitmaps.h
> > --- include/gsm-bitmaps.h 3 Jun 2002 20:30:43 -0000 1.16
> > +++ include/gsm-bitmaps.h 7 Jun 2002 09:52:14 -0000
> > @@ -76,7 +76,6 @@
> > API void GSM_PrintBitmap(GSM_Bitmap *bitmap);
> >
> > /* SMS bitmap functions */
> > -int GSM_EncodeSMSBitmap(GSM_Bitmap *bitmap, char *message);
>
> Why?
To solve dependency hell. If I try to add GSM_SMSMessage *rawsms in
the prototype, compilation fails and I'm unable to fix it.
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
- Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/07
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/07
- Re: Fix EMS + concat message, cleanup gnokii.c,
Pavel Machek <=
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/08
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/10
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/10
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/12
- Re: Fix EMS + concat message, cleanup gnokii.c, Pawel Kot, 2002/06/12
- Re: Fix EMS + concat message, cleanup gnokii.c, Pavel Machek, 2002/06/13