view netdiff/match/match.c @ 149:d1a507d34e77

netdiff: donl-netmatch2 factored out
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Nov 2020 04:18:47 +0000
parents netdiff/match/main.c@d3eb3790386d
children
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>
#include "struct.h"

char *infnames[2];
struct pin_info *database;

write_matching_nets()
{
	struct pin_info *p;

	for (p = database; p; p = p->next) {
		if (!p->netnames[0] || !p->netnames[1])
			continue;
		printf("%s\t%s\n", p->netnames[0], p->netnames[1]);
	}
}

main(argc, argv)
	char **argv;
{
	int i;

	if (argc != 3) {
		fprintf(stderr, "usage: %s net1 net2\n", argv[0]);
		exit(1);
	}
	infnames[0] = argv[1];
	infnames[1] = argv[2];
	for (i = 0; i < 2; i++)
		read_pass(i);
	write_matching_nets();
	exit(0);
}