Simplify code using ATOMIC().
[bertos.git] / mware / text.c
index c73ef075b065d1a52dcca78a7ab46bcfe9e9edcc..a68b7bbbadc846ce8185fc2f9174f08a5bbb9943 100755 (executable)
@@ -1,9 +1,9 @@
 /*!
  * \file
  * <!--
- * Copyright (C) 1999 Bernardo Innocenti <bernie@develer.com>
- * Copyright (C) 2003,2004 Develer S.r.l. (http://www.develer.com/)
- * All Rights Reserved.
+ * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 1999 Bernardo Innocenti <bernie@develer.com>
+ * This file is part of DevLib - See devlib/README for information.
  * -->
  *
  * \version $Id$
  * \brief Text graphic routines
  */
 
-/*
- * $Log$
- * Revision 1.1  2004/05/23 15:43:16  bernie
- * Import mware modules.
- *
- * Revision 1.17  2004/05/15 16:57:01  aleph
- * Fixes for non-DEBUG build
- *
- * Revision 1.16  2004/04/03 20:42:49  aleph
- * Add text_clear()
- *
- * Revision 1.15  2004/03/24 15:03:45  bernie
- * Use explicit include paths; clean Doxygen comments
- *
- * Revision 1.14  2004/03/19 16:52:28  bernie
- * Move printf() like functions from text.c to text_format.c and add PROGMEM versions.
- *
- * Revision 1.13  2004/03/17 18:23:32  bernie
- * Oops.
- *
- * Revision 1.12  2004/03/17 18:03:22  bernie
- * Make diagnostic message shorter
- *
- * Revision 1.11  2004/03/13 22:52:54  aleph
- * documentation fixes
- */
+/*#*
+ *#* $Log$
+ *#* Revision 1.4  2004/08/29 22:04:53  bernie
+ *#* Fix Doxygen markup and indentation.
+ *#*
+ *#* Revision 1.3  2004/08/25 14:12:09  rasky
+ *#* Aggiornato il comment block dei log RCS
+ *#*
+ *#* Revision 1.2  2004/06/03 11:27:09  bernie
+ *#* Add dual-license information.
+ *#*
+ *#* Revision 1.1  2004/05/23 15:43:16  bernie
+ *#* Import mware modules.
+ *#*
+ *#* Revision 1.17  2004/05/15 16:57:01  aleph
+ *#* Fixes for non-DEBUG build
+ *#*
+ *#* Revision 1.16  2004/04/03 20:42:49  aleph
+ *#* Add text_clear()
+ *#*
+ *#* Revision 1.15  2004/03/24 15:03:45  bernie
+ *#* Use explicit include paths; clean Doxygen comments
+ *#*
+ *#* Revision 1.14  2004/03/19 16:52:28  bernie
+ *#* Move printf() like functions from text.c to text_format.c and add PROGMEM versions.
+ *#*
+ *#* Revision 1.13  2004/03/17 18:23:32  bernie
+ *#* Oops.
+ *#*
+ *#* Revision 1.12  2004/03/17 18:03:22  bernie
+ *#* Make diagnostic message shorter
+ *#*
+ *#* Revision 1.11  2004/03/13 22:52:54  aleph
+ *#* documentation fixes
+ *#*/
 
 #include "gfx.h"
 #include "font.h"
@@ -48,6 +57,7 @@
 
 /*!
  * Flags degli stili algoritmici
+ *
  * La routine di rendering del testo e' in grado di applicare
  * delle semplici trasformazioni al font interno per generare
  * automaticamente degli stili predefiniti (bold, italic,
@@ -86,7 +96,7 @@ void text_setcoord(struct Bitmap *bm, int x, int y)
 
 
 /*!
- * Render char <code>c</code>
+ * Render char \a c on Bitmap \a bm
  */
 static int text_putglyph(char c, struct Bitmap *bm)
 {
@@ -188,14 +198,14 @@ int text_putchar(char c, struct Bitmap *bm)
        {
                switch (c)
                {
-                       case ANSI_ESC_CLEARSCREEN:
-                               gfx_ClearBitmap(bm);
-                               bm->penX = 0;
-                               bm->penY = 0;
-                               text_style(0, STYLEF_MASK);
-                               break;
-                       DB(default:
-                               kprintf("Unknown ANSI esc code: %x\n", c);)
+               case ANSI_ESC_CLEARSCREEN:
+                       gfx_ClearBitmap(bm);
+                       bm->penX = 0;
+                       bm->penY = 0;
+                       text_style(0, STYLEF_MASK);
+                       break;
+               DB(default:
+                       kprintf("Unknown ANSI esc code: %x\n", c);)
                }
                ansi_mode = false;
        }