annotate netdiff/match/main2.c @ 150:bcf011f6d7a5

KWH020ST23-F01.fp created
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 22 Jun 2021 22:20:53 +0000
parents 5e91200bf609
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #include <stdio.h>
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 #include <stdlib.h>
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 #include "struct.h"
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 char *infnames[2];
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 struct pin_info *database;
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 emit_output()
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 {
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 struct pin_info *p;
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 for (p = database; p; p = p->next) {
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 if (!p->netnames[0])
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 p->netnames[0] = "-";
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 if (!p->netnames[1])
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 p->netnames[1] = "-";
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 printf("%s\t%s\t%s\n", p->pin_name, p->netnames[0],
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 p->netnames[1]);
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 }
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 }
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 main(argc, argv)
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 char **argv;
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 {
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 int i;
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 if (argc != 3) {
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 fprintf(stderr, "usage: %s net1 net2\n", argv[0]);
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 exit(1);
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 }
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 infnames[0] = argv[1];
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 infnames[1] = argv[2];
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 for (i = 0; i < 2; i++)
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 read_pass(i);
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 emit_output();
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 exit(0);
5e91200bf609 netdiff: donl-pinreport utility written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 }