From bff790d692333fe8e43605682c4a980821e82b53 Mon Sep 17 00:00:00 2001 From: Johannes Schwarz Date: Thu, 2 Jul 2009 17:02:47 +0000 Subject: reduce size of the instance of struct style_text in lib/display.h (thanks to Teruaki Kawashima) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21614 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/display_text.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/plugins/lib/display_text.h') diff --git a/apps/plugins/lib/display_text.h b/apps/plugins/lib/display_text.h index 9f21d236ea..39b5f76a14 100644 --- a/apps/plugins/lib/display_text.h +++ b/apps/plugins/lib/display_text.h @@ -24,9 +24,9 @@ * basic usage: * #define WORDS (sizeof text / sizeof (char*)) * char *text[] = {"normal", "centering", "red,underline"}; - * struct style_text formation[WORDS]={ - * [1] = { TEXT_CENTER }, - * [2] = { C_RED|TEXT_UNDERLINE }, + * struct style_text formation[]={ + * { 1, TEXT_CENTER }, + * { 2, C_RED|TEXT_UNDERLINE }, * }; * if (display_text(WORDS, text, formation, NULL)) * return PLUGIN_USB_CONNECTED; @@ -38,10 +38,11 @@ enum ecolor { STANDARD, C_YELLOW, C_RED, C_BLUE, C_GREEN , C_ORANGE }; #define TEXT_UNDERLINE 0x0200 struct style_text { + unsigned short index; unsigned short flags; }; -/* style and vp_text is optional. +/* style and vp_text are optional. * return true if usb is connected. */ bool display_text(short words, char** text, struct style_text* style, struct viewport* vp_text); -- cgit v1.2.3