aboutsummaryrefslogtreecommitdiffstats
path: root/icon.c
diff options
context:
space:
mode:
authorreinelt <>2003-09-19 03:51:29 +0000
committerreinelt <>2003-09-19 03:51:29 +0000
commit955c709b2271e3ab54ca5095e2d94199aa94fbc7 (patch)
treefe72bbf5e3abaae0c4e33e2920f7ebf041eaa058 /icon.c
parentb5a1a122615d491296ab27d33f1c8b1efa797051 (diff)
downloadlcd4linux-955c709b2271e3ab54ca5095e2d94199aa94fbc7.tar.gz
[lcd4linux @ 2003-09-19 03:51:29 by reinelt]
minor fixes, widget.c added
Diffstat (limited to 'icon.c')
-rw-r--r--icon.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/icon.c b/icon.c
index b52fe95..6e31276 100644
--- a/icon.c
+++ b/icon.c
@@ -1,4 +1,4 @@
-/* $Id: icon.c,v 1.7 2003/09/11 04:09:53 reinelt Exp $
+/* $Id: icon.c,v 1.8 2003/09/19 03:51:29 reinelt Exp $
*
* generic icon and heartbeat handling
*
@@ -20,6 +20,9 @@
*
*
* $Log: icon.c,v $
+ * Revision 1.8 2003/09/19 03:51:29 reinelt
+ * minor fixes, widget.c added
+ *
* Revision 1.7 2003/09/11 04:09:53 reinelt
* minor cleanups
*
@@ -143,28 +146,20 @@ int icon_init (int rows, int cols, int xres, int yres, int chars, int icons,
CHARS=chars,
ICONS=icons;
- if (Screen) {
- free (Screen);
- }
-
if ((Screen=malloc(ROWS*COLS*sizeof(*Screen)))==NULL) {
- error ("icon buffer allocation failed: out of memory");
+ error ("icon buffer allocation failed: out of memory?");
return -1;
}
- icon_clear();
-
- if (Bitmap) {
- free (Bitmap);
- }
-
if ((Bitmap=malloc(icons*sizeof(*Bitmap)))==NULL) {
- error ("icon allocation failed: out of memory");
+ error ("icon allocation failed: out of memory?");
return -1;
}
Defchar=defchar;
+ icon_clear();
+
for (n=0; n<icons; n++) {
Bitmap[n].nData=1;
Bitmap[n].lData=0;