comparison pads2gpcb/decals.c @ 55:e93375570f91

pads2gpcb/decals.c: saving of silk lines and arcs implemented
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 31 Jan 2016 02:14:57 +0000
parents a930e05cf908
children 05fd0b432e8c
comparison
equal deleted inserted replaced
54:a930e05cf908 55:e93375570f91
526 for (i = 0; i < fpbody.npins; i++) 526 for (i = 0; i < fpbody.npins; i++)
527 if (convert_pad_to_gpcb(i) < 0) 527 if (convert_pad_to_gpcb(i) < 0)
528 valid = 0; 528 valid = 0;
529 if (valid) { 529 if (valid) {
530 /* good, save it */ 530 /* good, save it */
531 if (num_silk_lines) {
532 fpbody.silk_lines =
533 malloc(sizeof(struct element_line) * num_silk_lines);
534 if (!fpbody.silk_lines) {
535 perror("malloc to save silk lines");
536 exit(1);
537 }
538 bcopy(silk_lines, fpbody.silk_lines,
539 sizeof(struct element_line) * num_silk_lines);
540 fpbody.num_silk_lines = num_silk_lines;
541 }
542 if (num_silk_arcs) {
543 fpbody.silk_arcs =
544 malloc(sizeof(struct element_arc) * num_silk_arcs);
545 if (!fpbody.silk_arcs) {
546 perror("malloc to save silk arcs");
547 exit(1);
548 }
549 bcopy(silk_arcs, fpbody.silk_arcs,
550 sizeof(struct element_arc) * num_silk_arcs);
551 fpbody.num_silk_arcs = num_silk_arcs;
552 }
531 current_decal->body = malloc(sizeof(struct footprint_body)); 553 current_decal->body = malloc(sizeof(struct footprint_body));
532 if (!current_decal->body) { 554 if (!current_decal->body) {
533 perror("malloc to save footprint body"); 555 perror("malloc to save footprint body");
534 exit(1); 556 exit(1);
535 } 557 }