FreeCalypso > hg > ueda-linux
diff 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 |
line wrap: on
line diff
--- a/pads2gpcb/decals.c Sun Jan 31 01:57:38 2016 +0000 +++ b/pads2gpcb/decals.c Sun Jan 31 02:14:57 2016 +0000 @@ -528,6 +528,28 @@ valid = 0; if (valid) { /* good, save it */ + if (num_silk_lines) { + fpbody.silk_lines = + malloc(sizeof(struct element_line) * num_silk_lines); + if (!fpbody.silk_lines) { + perror("malloc to save silk lines"); + exit(1); + } + bcopy(silk_lines, fpbody.silk_lines, + sizeof(struct element_line) * num_silk_lines); + fpbody.num_silk_lines = num_silk_lines; + } + if (num_silk_arcs) { + fpbody.silk_arcs = + malloc(sizeof(struct element_arc) * num_silk_arcs); + if (!fpbody.silk_arcs) { + perror("malloc to save silk arcs"); + exit(1); + } + bcopy(silk_arcs, fpbody.silk_arcs, + sizeof(struct element_arc) * num_silk_arcs); + fpbody.num_silk_arcs = num_silk_arcs; + } current_decal->body = malloc(sizeof(struct footprint_body)); if (!current_decal->body) { perror("malloc to save footprint body");