Mercurial > MadButterfly
comparison src/coord.c @ 140:0de8fd11271e
Use macro to simplify the code.
Many code snippets are repeated annoying. Just because we manipulate
a common structure of data. They are move to macros to make it
simple and meaning.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 23 Sep 2008 08:28:14 +0800 |
parents | 1695a4b02b14 |
children | d11aa8fc06c7 |
comparison
equal
deleted
inserted
replaced
139:1695a4b02b14 | 140:0de8fd11271e |
---|---|
164 next = STAILQ_HEAD(next->children); | 164 next = STAILQ_HEAD(next->children); |
165 | 165 |
166 return next; | 166 return next; |
167 } | 167 } |
168 | 168 |
169 void sh_attach_coord(shape_t *sh, coord_t *coord) { | |
170 sh->coord = coord; | |
171 } | |
172 | |
173 void sh_detach_coord(shape_t *sh) { | |
174 sh->coord = NULL; | |
175 } | |
176 | |
177 #ifdef UNITTEST | 169 #ifdef UNITTEST |
178 | 170 |
179 #include <CUnit/Basic.h> | 171 #include <CUnit/Basic.h> |
180 | 172 |
181 void test_update_aggr_matrix(void) { | 173 void test_update_aggr_matrix(void) { |