Make the TWI driver more generic to work with devices other than EEPROMS.
[bertos.git] / gfx / text_format.c
index e1452d8a0015f0f354d1f40c4b9c1b0e7b236ca9..1b0e8a340571b976f160a7466807a7bb2ea1d500 100755 (executable)
@@ -15,6 +15,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.6  2006/03/13 02:05:54  bernie
+ *#* Mark slow paths as UNLIKELY.
+ *#*
  *#* Revision 1.5  2006/03/07 22:18:04  bernie
  *#* Correctly compute text width for prop fonts; Make styles a per-bitmap attribute.
  *#*
@@ -219,7 +222,7 @@ static int text_charWidth(int c, struct TextWidthData *twd)
        coord_t glyph_width;
 
 
-       if (index < bm->font->first || index > bm->font->last)
+       if (UNLIKELY(index < bm->font->first || index > bm->font->last))
        {
                if ('?' >= bm->font->first && '?' <= bm->font->last)
                        index = '?';