6170 int forward_edges_count = 0;
6172 int backward_edges_count = 0;
6178 forward_edges_count = 0;
6180 backward_edges_count = 0;
6182 for ( i=0; i<ring->
size; ++i )
6189 LWDEBUGF(3,
"Forward edge %d is %d", forward_edges_count,
id);
6190 forward_edges[forward_edges_count].
edge_id = id;
6191 forward_edges[forward_edges_count++].
face_left = face;
6196 LWDEBUGF(3,
"Backward edge %d is %d", forward_edges_count,
id);
6197 backward_edges[backward_edges_count].
edge_id = id;
6198 backward_edges[backward_edges_count++].
face_right = face;
6204 if ( forward_edges_count )
6207 forward_edges_count,
6212 lwfree( backward_edges );
6216 if ( ret != forward_edges_count )
6219 lwfree( backward_edges );
6220 lwerror(
"Unexpected error: %d edges updated when expecting %d (forward)",
6221 ret, forward_edges_count);
6227 if ( backward_edges_count )
6230 backward_edges_count,
6235 lwfree( backward_edges );
6239 if ( ret != backward_edges_count )
6242 lwfree( backward_edges );
6243 lwerror(
"Unexpected error: %d edges updated when expecting %d (backward)",
6244 ret, backward_edges_count);
6250 lwfree( backward_edges );
void * lwalloc(size_t size)
#define LWT_COL_EDGE_FACE_RIGHT
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define LWT_COL_EDGE_FACE_LEFT
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
const char * lwt_be_lastErrorMessage(const LWT_BE_IFACE *be)
static int lwt_be_updateEdgesById(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, int numedges, int upd_fields)
LWT_EDGERING_ELEM ** elems
const LWT_BE_IFACE * be_iface