All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add function for diplaying text attributes as html
@ 2010-06-24 14:00 Kristen Carlson Accardi
  2010-06-24 14:00 ` [PATCH 1/2] stkutil: display " Kristen Carlson Accardi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kristen Carlson Accardi @ 2010-06-24 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

Kristen Carlson Accardi (2):
  stkutil: display text attributes as html
  test-stkutil: add html attribute display tests

 src/stkutil.c       |  167 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/stkutil.h       |   32 ++++++++++
 unit/test-stkutil.c |   64 +++++++++++++++++++
 3 files changed, 263 insertions(+), 0 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] stkutil: display text attributes as html
  2010-06-24 14:00 [PATCH 0/2] Add function for diplaying text attributes as html Kristen Carlson Accardi
@ 2010-06-24 14:00 ` Kristen Carlson Accardi
  2010-06-25  0:10   ` Marcel Holtmann
  2010-06-25 20:24   ` Denis Kenzior
  2010-06-24 14:00 ` [PATCH 2/2] test-stkutil: add html attribute display tests Kristen Carlson Accardi
  2010-06-25  0:11 ` [PATCH 0/2] Add function for diplaying text attributes as html Andrzej Zaborowski
  2 siblings, 2 replies; 6+ messages in thread
From: Kristen Carlson Accardi @ 2010-06-24 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 7113 bytes --]

---
 src/stkutil.c |  167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/stkutil.h |   32 +++++++++++
 2 files changed, 199 insertions(+), 0 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 6f072e7..73449e2 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdint.h>
+#include <stdio.h>
 
 #include <glib.h>
 
@@ -5819,3 +5820,169 @@ const unsigned char *stk_pdu_from_envelope(const struct stk_envelope *envelope,
 
 	return pdu;
 }
+
+static const char *html_colors[] = {
+	"#000000", /* Black */
+	"#808080", /* Dark Grey */
+	"#C11B17", /* Dark Red */
+	"#FBB117", /* Dark Yellow */
+	"#347235", /* Dark Green */
+	"#307D7E", /* Dark Cyan */
+	"#0000A0", /* Dark Blue */
+	"#C031C7", /* Dark Magenta */
+	"#C0C0C0", /* Grey */
+	"#FFFFFF", /* White */
+	"#FF0000", /* Bright Red */
+	"#FFFF00", /* Bright Yellow */
+	"#00FF00", /* Bright Green */
+	"#00FFFF", /* Bright Cyan */
+	"#0000FF", /* Bright Blue */
+	"#FF00FF", /* Bright Magenta */
+};
+
+static void end_format(GString *string, guint8 code)
+{
+	g_string_append(string, "</span>");
+
+	if ((code & STK_TEXT_FORMAT_ALIGN_MASK) != STK_TEXT_FORMAT_NO_ALIGN)
+		g_string_append(string, "</div>");
+}
+
+static void start_format(GString *string, guint8 code, guint8 color)
+{
+	guint8 align = code & STK_TEXT_FORMAT_ALIGN_MASK;
+	guint8 font = code & STK_TEXT_FORMAT_FONT_MASK;
+	guint8 style = code & STK_TEXT_FORMAT_STYLE_MASK;
+	int fg = color & 0x0f;
+	int bg = (color >> 4) & 0x0f;
+
+	/* align formatting applies to a block of test */
+	if (align != STK_TEXT_FORMAT_NO_ALIGN)
+		g_string_append(string, "<div style=\"");
+
+	if (align == STK_TEXT_FORMAT_RIGHT_ALIGN)
+		g_string_append(string, "text-align: right;\">");
+	else if (align == STK_TEXT_FORMAT_CENTER_ALIGN)
+		g_string_append(string, "text-align: center;\">");
+	else if (align == STK_TEXT_FORMAT_LEFT_ALIGN)
+		g_string_append(string, "text-align: left;\">");
+
+	/* font, style, and color are inline */
+	g_string_append(string, "<span style=\"");
+
+	if (font == STK_TEXT_FORMAT_FONT_SIZE_LARGE)
+		g_string_append(string, "font-size: big;");
+	else if (font == STK_TEXT_FORMAT_FONT_SIZE_SMALL)
+		g_string_append(string, "font-size: small;");
+
+	if (style == STK_TEXT_FORMAT_STYLE_BOLD)
+		g_string_append(string, "font-weight: bold;");
+	else if (style == STK_TEXT_FORMAT_STYLE_ITALIC)
+		g_string_append(string, "font-style: italic;");
+	else if (style == STK_TEXT_FORMAT_STYLE_UNDERLINED)
+		g_string_append(string, "text-decoration: underline;");
+	else if (style == STK_TEXT_FORMAT_STYLE_STRIKETHROUGH)
+		g_string_append(string, "text-decoration: line-through;");
+
+	/* add any color */
+	if (fg)
+		g_string_append_printf(string, "color: %s;", html_colors[fg]);
+	if (bg)
+		g_string_append_printf(string, "background-color: %s;",
+						html_colors[bg]);
+	g_string_append(string, "\">");
+}
+
+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);
+	gint formats[257];  /* maximum number of chars in text + 1 */
+	int pos = 0, attr, i, j, 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;
+
+	i = 0;
+
+	while (i < attrs_len) {
+		start = attrs[i++];
+		len = attrs[i++];
+		code = attrs[i++];
+
+		if (i < attrs_len)
+			color = attrs[i++];
+		else
+			color = 0;
+
+		if (len == 0)
+			end = text_len;
+		else
+			end = start + len;
+
+		/* sanity check values */
+		if (start > end || end > text_len)
+			continue;
+
+		/*
+		 * if the alignment is the same as either the default
+		 * or the last alignment used, don't set any alignment
+		 * value.
+		 */
+		if (start == 0)
+			align = STK_DEFAULT_TEXT_ALIGNMENT;
+		else {
+			align = get_align(formats[start - 1]);
+			if (align == STK_TEXT_FORMAT_NO_ALIGN)
+				align = STK_DEFAULT_TEXT_ALIGNMENT;
+		}
+
+		if ((code & STK_TEXT_FORMAT_ALIGN_MASK) == align)
+			code |= STK_TEXT_FORMAT_NO_ALIGN;
+
+		attr = make_attr(start, code, color);
+
+		for (j = start; j < end; j++)
+			formats[j] = attr;
+	}
+
+	prev_attr = STK_TEXT_FORMAT_INIT;
+
+	while (pos <= text_len) {
+		attr = formats[pos];
+		if (attr != prev_attr) {
+			if (prev_attr != STK_TEXT_FORMAT_INIT)
+				end_format(string, get_code(attr));
+
+			if (attr != STK_TEXT_FORMAT_INIT)
+				start_format(string, get_code(attr),
+						get_color(attr));
+
+			prev_attr = attr;
+		}
+
+		if (pos == text_len)
+			break;
+
+		if (text[pos] == '\n')
+			g_string_append(string, "<br/>");
+		else if (text[pos] == '\r') {
+			g_string_append(string, "<br/>");
+			if ((pos + 1 < text_len) && (text[pos + 1] == '\n'))
+				pos++;
+		} else if (text[pos] == '<')
+			g_string_append(string, "&lt;");
+		else if (text[pos] == '>')
+			g_string_append(string, "&gt;");
+		else if (text[pos] == '&')
+			g_string_append(string, "&amp;");
+		else
+			g_string_append_c(string, text[pos]);
+		pos++;
+	}
+
+	/* return characters from string. Caller must free char data */
+	return g_string_free(string, FALSE);
+}
diff --git a/src/stkutil.h b/src/stkutil.h
index ca4817e..fbdbc21 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -1635,6 +1635,36 @@ struct stk_envelope {
 	};
 };
 
+#define STK_TEXT_FORMAT_ALIGN_MASK 0x03
+#define STK_TEXT_FORMAT_FONT_MASK 0x0C
+#define STK_TEXT_FORMAT_STYLE_MASK 0xF0
+#define STK_DEFAULT_TEXT_ALIGNMENT 0x00
+#define STK_TEXT_FORMAT_INIT -1
+
+#define get_code(attr) \
+	((attr >> 16) & 0xFF)
+#define get_align(attr) \
+	((attr >> 16) & STK_TEXT_FORMAT_ALIGN_MASK)
+#define get_color(attr) \
+	((attr >> 24) & 0xFF)
+#define make_attr(start, code, color) \
+	(start | (code << 16) | (color << 24))
+
+/* Defined in ETSI 123 40 9.2.3.24.10.1.1 */
+enum stk_text_format_code {
+	STK_TEXT_FORMAT_LEFT_ALIGN = 0x00,
+	STK_TEXT_FORMAT_CENTER_ALIGN = 0x01,
+	STK_TEXT_FORMAT_RIGHT_ALIGN = 0x02,
+	STK_TEXT_FORMAT_NO_ALIGN = 0x03,
+	STK_TEXT_FORMAT_FONT_SIZE_LARGE = 0x04,
+	STK_TEXT_FORMAT_FONT_SIZE_SMALL = 0x08,
+	STK_TEXT_FORMAT_FONT_SIZE_RESERVED = 0x0c,
+	STK_TEXT_FORMAT_STYLE_BOLD = 0x10,
+	STK_TEXT_FORMAT_STYLE_ITALIC = 0x20,
+	STK_TEXT_FORMAT_STYLE_UNDERLINED = 0x40,
+	STK_TEXT_FORMAT_STYLE_STRIKETHROUGH = 0x80,
+};
+
 struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 						unsigned int len);
 void stk_command_free(struct stk_command *command);
@@ -1643,3 +1673,5 @@ const unsigned char *stk_pdu_from_response(const struct stk_response *response,
 						unsigned int *out_length);
 const unsigned char *stk_pdu_from_envelope(const struct stk_envelope *envelope,
 						unsigned int *out_length);
+char *stk_text_to_html(char *text, int text_len,
+				const unsigned char *attrs, int attrs_len);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] test-stkutil: add html attribute display tests
  2010-06-24 14:00 [PATCH 0/2] Add function for diplaying text attributes as html Kristen Carlson Accardi
  2010-06-24 14:00 ` [PATCH 1/2] stkutil: display " Kristen Carlson Accardi
@ 2010-06-24 14:00 ` Kristen Carlson Accardi
  2010-06-25  0:11 ` [PATCH 0/2] Add function for diplaying text attributes as html Andrzej Zaborowski
  2 siblings, 0 replies; 6+ messages in thread
From: Kristen Carlson Accardi @ 2010-06-24 14:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2969 bytes --]

---
 unit/test-stkutil.c |   64 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 8b7e254..3c0ac78 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -21923,6 +21923,63 @@ static const struct envelope_test timer_expiration_data_221a = {
 	},
 };
 
+struct html_attr_test {
+	char *text;
+	const unsigned char *attrs;
+	unsigned int attrs_len;
+	char *output;
+};
+
+unsigned char html_attr_1[] = { 0x19, 0x06, 0x20, 0x00, 0x21, 0x04, 0x10, 0x00,
+				0x27, 0x05, 0x04, 0x00, 0x2E, 0x05, 0x08, 0x00,
+				0x38, 0x07, 0x00, 0x2B };
+
+unsigned char html_attr_2[] = {	0x00, 0x00, 0x00, 0x94, 0x00, 0x04, 0x00, 0x96 };
+
+unsigned char html_attr_3[] = { 0x00, 0x02, 0x00, 0x94, 0x01, 0x02, 0x00, 0x96 };
+
+static struct html_attr_test html_attr_data_1 = {
+	.text = "EMS messages can contain italic, bold, large, small and "
+		"colored text",
+	.attrs = html_attr_1,
+	.attrs_len = sizeof(html_attr_1),
+	.output = "EMS messages can contain <span style=\"font-style: italic;\">"
+		"italic</span>, <span style=\"font-weight: bold;\">bold</span>, "
+		"<span style=\"font-size: big;\">large</span>, "
+		"<span style=\"font-size: small;\">small</span> and "
+		"<span style=\"color: #FFFF00;background-color: #C11B17;\">colored"
+		"</span> text",
+};
+
+static struct html_attr_test html_attr_data_2 = {
+	.text = "Blue green green green",
+	.attrs = html_attr_2,
+	.attrs_len = sizeof(html_attr_2),
+	.output = "<span style=\"color: #0000A0;background-color: #FFFFFF;\">Blue"
+		"</span><span style=\"color: #347235;background-color: #FFFFFF;\">"
+		" green green green</span>",
+};
+
+static struct html_attr_test html_attr_data_3 = {
+	.text = "abc",
+	.attrs = html_attr_3,
+	.attrs_len = sizeof(html_attr_3),
+	.output = "<span style=\"color: #347235;background-color: #FFFFFF;\">"
+		"a</span><span style=\"color: #0000A0;background-color: #FFFFFF;\""
+		">bc</span>",
+};
+
+static void test_html_attr(gconstpointer data)
+{
+	const struct html_attr_test *test = data;
+	char *html;
+
+	html = stk_text_to_html(test->text, strlen(test->text), test->attrs,
+					test->attrs_len);
+	g_assert(memcmp(html, test->output, strlen(test->output)) == 0);
+	g_free(html);
+}
+
 int main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, NULL);
@@ -23930,5 +23987,12 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/Timer Expiration 2.2.1A",
 			&timer_expiration_data_221a, test_envelope_encoding);
 
+	g_test_add_data_func("/teststk/HTML Attribute Test 1",
+				&html_attr_data_1, test_html_attr);
+	g_test_add_data_func("/teststk/HTML Attribute Test 2",
+				&html_attr_data_2, test_html_attr);
+	g_test_add_data_func("/teststk/HTML Attribute Test 3",
+				&html_attr_data_3, test_html_attr);
+
 	return g_test_run();
 }
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] stkutil: display text attributes as html
  2010-06-24 14:00 ` [PATCH 1/2] stkutil: display " Kristen Carlson Accardi
@ 2010-06-25  0:10   ` Marcel Holtmann
  2010-06-25 20:24   ` Denis Kenzior
  1 sibling, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2010-06-25  0:10 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 7183 bytes --]

Hi Kristen,

>  src/stkutil.c |  167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  src/stkutil.h |   32 +++++++++++
>  2 files changed, 199 insertions(+), 0 deletions(-)
> 
> diff --git a/src/stkutil.c b/src/stkutil.c
> index 6f072e7..73449e2 100644
> --- a/src/stkutil.c
> +++ b/src/stkutil.c
> @@ -26,6 +26,7 @@
>  #include <string.h>
>  #include <stdlib.h>
>  #include <stdint.h>
> +#include <stdio.h>
>  
>  #include <glib.h>
>  
> @@ -5819,3 +5820,169 @@ const unsigned char *stk_pdu_from_envelope(const struct stk_envelope *envelope,
>  
>  	return pdu;
>  }
> +
> +static const char *html_colors[] = {
> +	"#000000", /* Black */
> +	"#808080", /* Dark Grey */
> +	"#C11B17", /* Dark Red */
> +	"#FBB117", /* Dark Yellow */
> +	"#347235", /* Dark Green */
> +	"#307D7E", /* Dark Cyan */
> +	"#0000A0", /* Dark Blue */
> +	"#C031C7", /* Dark Magenta */
> +	"#C0C0C0", /* Grey */
> +	"#FFFFFF", /* White */
> +	"#FF0000", /* Bright Red */
> +	"#FFFF00", /* Bright Yellow */
> +	"#00FF00", /* Bright Green */
> +	"#00FFFF", /* Bright Cyan */
> +	"#0000FF", /* Bright Blue */
> +	"#FF00FF", /* Bright Magenta */
> +};
> +
> +static void end_format(GString *string, guint8 code)
> +{
> +	g_string_append(string, "</span>");
> +
> +	if ((code & STK_TEXT_FORMAT_ALIGN_MASK) != STK_TEXT_FORMAT_NO_ALIGN)
> +		g_string_append(string, "</div>");
> +}
> +
> +static void start_format(GString *string, guint8 code, guint8 color)
> +{
> +	guint8 align = code & STK_TEXT_FORMAT_ALIGN_MASK;
> +	guint8 font = code & STK_TEXT_FORMAT_FONT_MASK;
> +	guint8 style = code & STK_TEXT_FORMAT_STYLE_MASK;
> +	int fg = color & 0x0f;
> +	int bg = (color >> 4) & 0x0f;
> +
> +	/* align formatting applies to a block of test */
> +	if (align != STK_TEXT_FORMAT_NO_ALIGN)
> +		g_string_append(string, "<div style=\"");
> +
> +	if (align == STK_TEXT_FORMAT_RIGHT_ALIGN)
> +		g_string_append(string, "text-align: right;\">");
> +	else if (align == STK_TEXT_FORMAT_CENTER_ALIGN)
> +		g_string_append(string, "text-align: center;\">");
> +	else if (align == STK_TEXT_FORMAT_LEFT_ALIGN)
> +		g_string_append(string, "text-align: left;\">");

using a switch {} statement seems more appropriate here.

> +
> +	/* font, style, and color are inline */
> +	g_string_append(string, "<span style=\"");
> +
> +	if (font == STK_TEXT_FORMAT_FONT_SIZE_LARGE)
> +		g_string_append(string, "font-size: big;");
> +	else if (font == STK_TEXT_FORMAT_FONT_SIZE_SMALL)
> +		g_string_append(string, "font-size: small;");

Same here. I prefer switch {} since it is more readable.

> +
> +	if (style == STK_TEXT_FORMAT_STYLE_BOLD)
> +		g_string_append(string, "font-weight: bold;");
> +	else if (style == STK_TEXT_FORMAT_STYLE_ITALIC)
> +		g_string_append(string, "font-style: italic;");
> +	else if (style == STK_TEXT_FORMAT_STYLE_UNDERLINED)
> +		g_string_append(string, "text-decoration: underline;");
> +	else if (style == STK_TEXT_FORMAT_STYLE_STRIKETHROUGH)
> +		g_string_append(string, "text-decoration: line-through;");

And also here please.

> +
> +	/* add any color */
> +	if (fg)
> +		g_string_append_printf(string, "color: %s;", html_colors[fg]);
> +	if (bg)
> +		g_string_append_printf(string, "background-color: %s;",
> +						html_colors[bg]);
> +	g_string_append(string, "\">");
> +}
> +
> +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);
> +	gint formats[257];  /* maximum number of chars in text + 1 */
> +	int pos = 0, attr, i, j, 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;
> +
> +	i = 0;
> +
> +	while (i < attrs_len) {
> +		start = attrs[i++];
> +		len = attrs[i++];
> +		code = attrs[i++];
> +
> +		if (i < attrs_len)
> +			color = attrs[i++];
> +		else
> +			color = 0;
> +
> +		if (len == 0)
> +			end = text_len;
> +		else
> +			end = start + len;
> +
> +		/* sanity check values */
> +		if (start > end || end > text_len)
> +			continue;
> +
> +		/*
> +		 * if the alignment is the same as either the default
> +		 * or the last alignment used, don't set any alignment
> +		 * value.
> +		 */
> +		if (start == 0)
> +			align = STK_DEFAULT_TEXT_ALIGNMENT;
> +		else {
> +			align = get_align(formats[start - 1]);
> +			if (align == STK_TEXT_FORMAT_NO_ALIGN)
> +				align = STK_DEFAULT_TEXT_ALIGNMENT;
> +		}
> +
> +		if ((code & STK_TEXT_FORMAT_ALIGN_MASK) == align)
> +			code |= STK_TEXT_FORMAT_NO_ALIGN;
> +
> +		attr = make_attr(start, code, color);
> +
> +		for (j = start; j < end; j++)
> +			formats[j] = attr;
> +	}
> +
> +	prev_attr = STK_TEXT_FORMAT_INIT;
> +
> +	while (pos <= text_len) {
> +		attr = formats[pos];
> +		if (attr != prev_attr) {
> +			if (prev_attr != STK_TEXT_FORMAT_INIT)
> +				end_format(string, get_code(attr));
> +
> +			if (attr != STK_TEXT_FORMAT_INIT)
> +				start_format(string, get_code(attr),
> +						get_color(attr));
> +
> +			prev_attr = attr;
> +		}
> +
> +		if (pos == text_len)
> +			break;
> +
> +		if (text[pos] == '\n')
> +			g_string_append(string, "<br/>");
> +		else if (text[pos] == '\r') {
> +			g_string_append(string, "<br/>");
> +			if ((pos + 1 < text_len) && (text[pos + 1] == '\n'))
> +				pos++;
> +		} else if (text[pos] == '<')
> +			g_string_append(string, "&lt;");
> +		else if (text[pos] == '>')
> +			g_string_append(string, "&gt;");
> +		else if (text[pos] == '&')
> +			g_string_append(string, "&amp;");
> +		else
> +			g_string_append_c(string, text[pos]);

Also this one is better done as a switch {} statement. It becomes way
more easier to read that way.

> +		pos++;
> +	}
> +
> +	/* return characters from string. Caller must free char data */
> +	return g_string_free(string, FALSE);
> +}
> diff --git a/src/stkutil.h b/src/stkutil.h
> index ca4817e..fbdbc21 100644
> --- a/src/stkutil.h
> +++ b/src/stkutil.h
> @@ -1635,6 +1635,36 @@ struct stk_envelope {
>  	};
>  };
>  
> +#define STK_TEXT_FORMAT_ALIGN_MASK 0x03
> +#define STK_TEXT_FORMAT_FONT_MASK 0x0C
> +#define STK_TEXT_FORMAT_STYLE_MASK 0xF0
> +#define STK_DEFAULT_TEXT_ALIGNMENT 0x00
> +#define STK_TEXT_FORMAT_INIT -1
> +
> +#define get_code(attr) \
> +	((attr >> 16) & 0xFF)
> +#define get_align(attr) \
> +	((attr >> 16) & STK_TEXT_FORMAT_ALIGN_MASK)
> +#define get_color(attr) \
> +	((attr >> 24) & 0xFF)
> +#define make_attr(start, code, color) \
> +	(start | (code << 16) | (color << 24))

Please put these defines inside the C file right before the function
where you actually use them. Not namespaced defines in a header file are
a bad idea.

Also do we have that many users of these defines that it makes sense to
create defines for it. They all lock pretty simple anyway. And in case
of 1 or 2 users, then sometimes it is better to just put a comment there
and repeat the code. I haven't actually counted.

Regards

Marcel



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Add function for diplaying text attributes as html
  2010-06-24 14:00 [PATCH 0/2] Add function for diplaying text attributes as html Kristen Carlson Accardi
  2010-06-24 14:00 ` [PATCH 1/2] stkutil: display " Kristen Carlson Accardi
  2010-06-24 14:00 ` [PATCH 2/2] test-stkutil: add html attribute display tests Kristen Carlson Accardi
@ 2010-06-25  0:11 ` Andrzej Zaborowski
  2 siblings, 0 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-06-25  0:11 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

Hi,

On 24 June 2010 16:00, Kristen Carlson Accardi <kristen@linux.intel.com> wrote:
> Kristen Carlson Accardi (2):
>  stkutil: display text attributes as html
>  test-stkutil: add html attribute display tests

Both patches look fine to me if that matters.

Regards

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] stkutil: display text attributes as html
  2010-06-24 14:00 ` [PATCH 1/2] stkutil: display " Kristen Carlson Accardi
  2010-06-25  0:10   ` Marcel Holtmann
@ 2010-06-25 20:24   ` Denis Kenzior
  1 sibling, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2010-06-25 20:24 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

Hi Kristen,

> --- a/src/stkutil.c
> +++ b/src/stkutil.c
> @@ -26,6 +26,7 @@
>  #include <string.h>
>  #include <stdlib.h>
>  #include <stdint.h>
> +#include <stdio.h>

Minor nitpick, but this include is not needed.

> 
>  #include <glib.h>
> 

Regards,
-Denis

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-25 20:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-24 14:00 [PATCH 0/2] Add function for diplaying text attributes as html Kristen Carlson Accardi
2010-06-24 14:00 ` [PATCH 1/2] stkutil: display " Kristen Carlson Accardi
2010-06-25  0:10   ` Marcel Holtmann
2010-06-25 20:24   ` Denis Kenzior
2010-06-24 14:00 ` [PATCH 2/2] test-stkutil: add html attribute display tests Kristen Carlson Accardi
2010-06-25  0:11 ` [PATCH 0/2] Add function for diplaying text attributes as html Andrzej Zaborowski

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.