24 #include <sys/types.h>
46 int main(
int argc,
char **argv)
60 GNO_OPTION(
"o",
"graphout",
NULL, &pszGraphOut,
"Output Graph file")
70 if (pszVertex ==
NULL) {
74 nVertex = atol(pszVertex);
76 printf(
"Graph read:\n");
77 if ((fd = open(pszGraph, O_RDONLY)) < 0) {
83 fprintf(stderr,
"dglRead error: %s\n",
dglStrerror(&graph));
89 printf(
"Graph minimum spanning:\n");
92 fprintf(stderr,
"dglMinimumSpanning error: %s\n",
99 printf(
"Graph flatten:\n");
107 printf(
"Graph write:\n");
109 open(pszGraphOut, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
115 fprintf(stderr,
"dglWrite error: %s\n",
124 printf(
"Empty span. No output produced.\n");