view ueda/sverp-bind/main.c @ 13:1f3283f8e482

unet-bind: instance hash implemented
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sun, 02 Aug 2015 00:00:15 +0000
parents 51893347bc42
children c59f52e4bacf
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>

extern char *MCLfile;

char *input_filename, *output_filename;

static void
usage()
{
	fprintf(stderr, "usage: unet-bind input.unet [output.unet]\n");
	exit(1);
}

static void
process_options(argc, argv)
	char **argv;
{
	extern char *optarg;
	register int c;

	while ((c = getopt(argc, argv, "I:M:")) != EOF) {
		switch (c) {
		case 'I':
			add_symfile_dir(optarg);
			continue;
		case 'M':
			MCLfile = optarg;
			break;
		default:
			usage();
		}
	}
}

main(argc, argv)
	char **argv;
{
	extern int optind;

	process_options(argc, argv);
	if (argc < optind + 1 || argc > optind + 2)
		usage();
	input_filename = argv[optind];
	output_filename = argv[optind+1];

	/* process all inputs from the MCL */
	read_MCL();
	set_default_sympath();
	read_pinouts();
	init_outcomp_from_MCL();

	/* remaining functionality remains to be implemented */
	exit(0);
}