changeset 73:bdfd0b802bb0

pads2gpcb/main.c: preparations for main output of named and placed elements
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 01 Feb 2016 00:29:36 +0000
parents fab9fc646044
children 58f11f06d831
files pads2gpcb/main.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pads2gpcb/main.c	Mon Feb 01 00:26:04 2016 +0000
+++ b/pads2gpcb/main.c	Mon Feb 01 00:29:36 2016 +0000
@@ -33,6 +33,7 @@
 	char **argv;
 {
 	int c;
+	char *main_output;
 	extern int optind;
 	extern char *optarg;
 
@@ -47,13 +48,15 @@
 			continue;
 		default:
 		usage:
-			fprintf(stderr, "usage: %s [options] pads-file.asc\n",
+			fprintf(stderr,
+			"usage: %s [options] pads-file.asc [output.pcb]\n",
 				argv[0]);
 			exit(1);
 		}
-	if (argc != optind + 1)
+	if (argc < optind + 1 || argc > optind + 2)
 		goto usage;
 	input_filename = argv[optind];
+	main_output = argv[optind+1];
 	open_input_file();
 
 	/* parse the header line with the units specification */