projects
/
sort-networks.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
src/sn_population.[ch]: Add `sn_population_best_rating'.
[sort-networks.git]
/
src
/
sn-show.c
1
#include <stdlib.h>
2
#include <stdio.h>
3
4
#include "sn_network.h"
5
6
int main (int argc, char **argv)
7
{
8
sn_network_t *n;
9
FILE *fh = NULL;
10
11
if (argc == 1)
12
fh = stdin;
13
else if (argc == 2)
14
fh = fopen (argv[1], "r");
15
16
if (fh == NULL)
17
{
18
printf ("fh == NULL!\n");
19
return (1);
20
}
21
22
n = sn_network_read (fh);
23
24
if (n == NULL)
25
{
26
printf ("n == NULL!\n");
27
return (1);
28
}
29
30
sn_network_show (n);
31
32
return (0);
33
} /* int main */
34
35
/* vim: set shiftwidth=2 softtabstop=2 : */