home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: Template.ClearAll.c
- Author: Copyright © 1992 Jason Williams
- Thanks to John Winters for supplying the code that I hacked
- changed, hacked, rewrote, and then wrote again from scratch!
- Version: 1.10 (29 Mar 1992)
- Purpose: Loading, cacheing, and retrieval of window templates
- */
-
- #include "TempDefs.h"
-
-
- extern void Template_ClearAll(void)
- /* Wipes all templates currently known to the system.
- * Deallocates ALL memory used by these templates
- */
- {
- template_record *t, *n;
-
- t = (template_record *) template_list.next;
-
- while (t != NULL)
- {
- Template_Free(&(t->windowdef));
- free(t->indirectdata);
-
- n = (template_record *) t->header.next;
- LinkList_Unlink(&template_list, &(t->header));
- free(t);
- t = n;
- }
-
- LinkList_Init(&template_list); /* just to be on the safe side! */
- }
-