FreeCalypso > hg > ueda-linux
changeset 72:fab9fc646044
pads2gpcb: single -f option to write loose footprint files
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Feb 2016 00:26:04 +0000 |
parents | a3d47129ebdc |
children | bdfd0b802bb0 |
files | pads2gpcb/decals.c pads2gpcb/globals.c pads2gpcb/globals.h pads2gpcb/main.c |
diffstat | 4 files changed, 7 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/pads2gpcb/decals.c Mon Feb 01 00:13:20 2016 +0000 +++ b/pads2gpcb/decals.c Mon Feb 01 00:26:04 2016 +0000 @@ -561,7 +561,7 @@ exit(1); } *current_decal->body = fpbody; - if (write_decal_files) + if (write_footprint_files) write_decal_as_element(); } else { printf("decal to gpcb fp conversion FAILED\n");
--- a/pads2gpcb/globals.c Mon Feb 01 00:13:20 2016 +0000 +++ b/pads2gpcb/globals.c Mon Feb 01 00:26:04 2016 +0000 @@ -3,4 +3,4 @@ struct part_type *part_type_list; struct part_instance *part_inst_list; int do_footprint_silk; -int write_decal_files, write_parttype_files, write_final_elements; +int write_footprint_files;
--- a/pads2gpcb/globals.h Mon Feb 01 00:13:20 2016 +0000 +++ b/pads2gpcb/globals.h Mon Feb 01 00:26:04 2016 +0000 @@ -4,7 +4,7 @@ extern struct part_type *part_type_list; extern struct part_instance *part_inst_list; extern int do_footprint_silk; -extern int write_decal_files, write_parttype_files, write_final_elements; +extern int write_footprint_files; /* readpads.c */ extern char *input_filename;
--- a/pads2gpcb/main.c Mon Feb 01 00:13:20 2016 +0000 +++ b/pads2gpcb/main.c Mon Feb 01 00:26:04 2016 +0000 @@ -29,30 +29,6 @@ return(0); } -static void -process_write_option() -{ - extern char *optarg; - - if (strlen(optarg) != 1) { -inv: fprintf(stderr, "usage error: invalid -w option\n"); - exit(1); - } - switch (optarg[0]) { - case 'd': - write_decal_files = 1; - return; - case 'p': - write_parttype_files = 1; - return; - case 'e': - write_final_elements = 1; - return; - default: - goto inv; - } -} - main(argc, argv) char **argv; { @@ -60,15 +36,15 @@ extern int optind; extern char *optarg; - while ((c = getopt(argc, argv, "s:w:")) != EOF) + while ((c = getopt(argc, argv, "fs:")) != EOF) switch (c) { + case 'f': + write_footprint_files = 1; + continue; case 's': do_footprint_silk = 1; select_drawlevel_for_silk(atoi(optarg)); continue; - case 'w': - process_write_option(); - continue; default: usage: fprintf(stderr, "usage: %s [options] pads-file.asc\n",