FreeCalypso > hg > ueda-linux
annotate pads2gpcb/util.c @ 153:c147a730271f
KWH020ST23-F01.fp corrections:
1) Y geometry for the solder pads was wrong
2) add silk dots matching alignment holes in the FPC tail
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 24 Jun 2021 06:38:02 +0000 |
parents | 455a0051f9d2 |
children |
rev | line source |
---|---|
63
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include <stdio.h> |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 #include <stdlib.h> |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 #include <string.h> |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 #include <strings.h> |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 char * |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 savestr(srcstr) |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 char *srcstr; |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 { |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 char *buf; |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 buf = malloc(strlen(srcstr) + 1); |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 if (!buf) { |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 perror("malloc in savestr"); |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 exit(1); |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 } |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 strcpy(buf, srcstr); |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 return(buf); |
455a0051f9d2
pads2gpcb: PARTTYPE parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 } |