aboutsummaryrefslogtreecommitdiffstats
path: root/icon.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2003-09-19 03:51:29 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2003-09-19 03:51:29 +0000
commit2f8b80242a07e24a663dce4200e0104ec6f553e9 (patch)
treefe72bbf5e3abaae0c4e33e2920f7ebf041eaa058 /icon.c
parent27b91cea68aa3d71b8316d450a60b3199c80a6b8 (diff)
downloadlcd4linux-2f8b80242a07e24a663dce4200e0104ec6f553e9.tar.gz
[lcd4linux @ 2003-09-19 03:51:29 by reinelt]
minor fixes, widget.c added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@245 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-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;