comparison ueda/sverp-bind/main.c @ 12:51893347bc42

unet-bind implementation started
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sat, 01 Aug 2015 23:33:05 +0000
parents
children c59f52e4bacf
comparison
equal deleted inserted replaced
11:73abf2c13884 12:51893347bc42
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <strings.h>
5 #include <unistd.h>
6
7 extern char *MCLfile;
8
9 char *input_filename, *output_filename;
10
11 static void
12 usage()
13 {
14 fprintf(stderr, "usage: unet-bind input.unet [output.unet]\n");
15 exit(1);
16 }
17
18 static void
19 process_options(argc, argv)
20 char **argv;
21 {
22 extern char *optarg;
23 register int c;
24
25 while ((c = getopt(argc, argv, "I:M:")) != EOF) {
26 switch (c) {
27 case 'I':
28 add_symfile_dir(optarg);
29 continue;
30 case 'M':
31 MCLfile = optarg;
32 break;
33 default:
34 usage();
35 }
36 }
37 }
38
39 main(argc, argv)
40 char **argv;
41 {
42 extern int optind;
43
44 process_options(argc, argv);
45 if (argc < optind + 1 || argc > optind + 2)
46 usage();
47 input_filename = argv[optind];
48 output_filename = argv[optind+1];
49
50 /* process all inputs from the MCL */
51 read_MCL();
52 set_default_sympath();
53 read_pinouts();
54 init_outcomp_from_MCL();
55
56 /* remaining functionality remains to be implemented */
57 exit(0);
58 }