diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2003-09-19 03:51:29 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2003-09-19 03:51:29 +0000 |
commit | 2f8b80242a07e24a663dce4200e0104ec6f553e9 (patch) | |
tree | fe72bbf5e3abaae0c4e33e2920f7ebf041eaa058 /icon.c | |
parent | 27b91cea68aa3d71b8316d450a60b3199c80a6b8 (diff) | |
download | lcd4linux-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.c | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -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; |