Пример #1
0
int16_t make_graph()
//
//	This procedure constructs the graph of (shortened) Ed_lines
//	of given component.
//
//	ON ENTER: Line presentation of turned raster.
//	ON EXIT : Shortened lines and graph of their connectivity.
//
{

	Z = &string;
	if (!init_list())
		return -1; // make initial list of lines
	max_line = n_lines;
	order_list(); // order of initial list and making one side links in it
	first_line = 0;
	init_graph(); // initialization of graph
	n_verts = 0;
	while (n_lines) {
		if (!merge_split())
			return -1;
		// find merging or splitting line and
		//   make separation of first line in list */
		n_verts++;
		first_line = Ed_lines[first_line].next; // to next line in list
		n_lines = max_line - n_verts;
	}
	return n_verts;
}
Пример #2
0
void create()
{
  seteuid(getuid());
  m_keys=order_list(keys(quests_armor));
}