From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/3] stkutil: display text attributes as html
Date: Thu, 01 Jul 2010 17:35:09 -0500 [thread overview]
Message-ID: <4C2D181D.2060609@gmail.com> (raw)
In-Reply-To: <AANLkTinbEd4WdRbbEYB-zSCdMmh0k6oZ-1mXonMwy_3e@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]
Hi Andrew,
On 07/01/2010 05:10 PM, Andrzej Zaborowski wrote:
> Hi
>
> On 1 July 2010 18:30, Denis Kenzior <denkenz@gmail.com> wrote:
>>> +char *stk_text_to_html(char *text, int text_len,
>>> + const unsigned char *attrs, int attrs_len)
>>> +{
>>> + GString *string = g_string_sized_new(text_len + 1);
>>> + int formats[257]; /* maximum number of chars in text + 1 */
>>> + int pos = 0, i, j, attr, prev_attr;
>>> + guint8 start, end, code, color, len, align;
>>> +
>>> + /* we will need formatting at the position beyond the last char */
>>> + for (i = 0; i <= text_len; i++)
>>> + formats[i] = STK_TEXT_FORMAT_INIT;
>>> +
>>
>> Please note that the same formatting can be used for EMS messages
>> (23.040). These messages have a fairly large max-len (255 segments *
>> ~153 characters) I'd like to have this function useable for EMS
>> messages as well.
>
> It would have a different signature because as far as I understand a
> separate array of attributes is sent in each segment (the start/len
> fields can't address more than 256 characters anyway). So that
> function can be a wrapper around this function.
>
It depends actually. I'd like to avoid writing a separate EMS
concatenator, and re-use sms_decode_text. This means that if possible,
I'd like this function to work on arbitrary length strings. The text
attributes can be massaged pretty easily without knowing what's inside
the SMS message.
Regards,
-Denis
next prev parent reply other threads:[~2010-07-01 22:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 11:22 [PATCH 0/3] html text attribute patches Kristen Carlson Accardi
2010-06-29 11:22 ` [PATCH 1/3] stkutil: display text attributes as html Kristen Carlson Accardi
2010-07-01 16:30 ` Denis Kenzior
2010-07-01 18:29 ` Kristen Carlson Accardi
2010-07-01 18:54 ` Denis Kenzior
2010-07-01 20:54 ` Kristen Carlson Accardi
2010-07-01 21:15 ` Denis Kenzior
2010-07-01 22:56 ` Kristen Carlson Accardi
2010-07-01 23:08 ` Denis Kenzior
2010-07-01 23:05 ` Kristen Carlson Accardi
2010-07-01 23:47 ` Denis Kenzior
2010-07-01 22:10 ` Andrzej Zaborowski
2010-07-01 22:35 ` Denis Kenzior [this message]
2010-07-01 22:47 ` Andrzej Zaborowski
2010-07-01 22:50 ` Denis Kenzior
2010-06-29 11:22 ` [PATCH 2/3] test-stkutil: add unit test for html text attributes Kristen Carlson Accardi
2010-06-29 11:22 ` [PATCH 3/3] test-stkutil: add html attribute test for Display Text tests Kristen Carlson Accardi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2D181D.2060609@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.