Mercurial > hg > Members > koba > t_dandy
view object.c @ 67:21ac9f57a6d4
Mac OS X 64bit
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 May 2011 16:27:41 +0900 |
parents | 435ac1cdb64e |
children |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <libxml/parser.h> #include "object.h" void init_object(OBJECT *obj) { obj->name = NULL; obj->surfaces = NULL; } void free_object(OBJECT *obj) { SURFACE *cur,*next; if (obj == NULL) { printf("obj is NULL\n"); return; } for(cur=obj->surfaces;cur;cur=next) { next = cur->next; free(cur); } free(obj->free_me); }