Mercurial > MadButterfly
comparison src/coord.c @ 139:1695a4b02b14
Members of coords are geos instead of shapes, now.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 22 Sep 2008 19:22:57 +0800 |
parents | 9f4fc9ecfd1f |
children | 0de8fd11271e |
comparison
equal
deleted
inserted
replaced
138:9f4fc9ecfd1f | 139:1695a4b02b14 |
---|---|
165 | 165 |
166 return next; | 166 return next; |
167 } | 167 } |
168 | 168 |
169 void sh_attach_coord(shape_t *sh, coord_t *coord) { | 169 void sh_attach_coord(shape_t *sh, coord_t *coord) { |
170 STAILQ_INS_TAIL(coord->members, shape_t, coord_mem_next, sh); | |
171 sh->coord = coord; | 170 sh->coord = coord; |
172 } | 171 } |
173 | 172 |
174 void sh_detach_coord(shape_t *sh) { | 173 void sh_detach_coord(shape_t *sh) { |
175 STAILQ_REMOVE(sh->coord->members, shape_t, coord_mem_next, sh); | |
176 sh->coord = NULL; | 174 sh->coord = NULL; |
177 } | 175 } |
178 | 176 |
179 #ifdef UNITTEST | 177 #ifdef UNITTEST |
180 | 178 |