FreeCalypso > hg > ueda-linux
annotate pads2gpcb/partinst.c @ 67:e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 31 Jan 2016 22:59:36 +0000 |
parents | 68900e8dcda1 |
children | b7f49f029bc3 |
rev | line source |
---|---|
65
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include <stdio.h> |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 #include <stdlib.h> |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 #include <ctype.h> |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 #include <string.h> |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 #include <strings.h> |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 #include "globals.h" |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 #include "struct.h" |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 extern struct part_type *find_parttype_by_name(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 extern struct part_decal *find_decal_by_name(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 extern long convert_input_dim(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 static struct part_instance *our_part; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 static void |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 enter_part_inst() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 struct part_instance *p, **pp; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 char *name = input_line_fields[0]; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 for (pp = &part_inst_list; p = *pp; pp = &p->next) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 if (!strcmp(p->name, name)) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 fprintf(stderr, |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 "%s line %d: part instance \"%s\" already defined\n", |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 input_filename, input_lineno, name); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 p = malloc(sizeof(struct part_instance) + strlen(name) + 1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 if (!p) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 perror("malloc of struct part_instance"); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 bzero(p, sizeof(struct part_instance)); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 p->name = (char *)(p + 1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 strcpy(p->name, name); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 *pp = p; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 our_part = p; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 static void |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 select_decal_by_name(decalname) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 char *decalname; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 our_part->decal = find_decal_by_name(decalname); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 if (!our_part->decal) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 fprintf(stderr, |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 "%s line %d: part instantiation refers to unknown decal name \"%s\"\n", |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 input_filename, input_lineno, decalname); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 static void |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 select_decal_by_number() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 char *strnum = input_line_fields[7]; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 int num = atoi(strnum); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 if (num < 0 || num >= our_part->type->ndecals) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 fprintf(stderr, |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 "%s line %d: invalid decal number \"%s\" in PART line\n", |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 input_filename, input_lineno, strnum); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 our_part->decal = our_part->type->decals[num]; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 static void |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 find_type_and_decal() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 char *typename = input_line_fields[1]; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 char *decalname; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 decalname = index(typename, '@'); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 if (decalname) |
66
68900e8dcda1
pads2gpcb/partinst.c: buglet fixed, swallows GTA02*.asc now
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
65
diff
changeset
|
76 *decalname++ = '\0'; |
65
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 our_part->type = find_parttype_by_name(typename); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 if (!our_part->type) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 fprintf(stderr, |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 "%s line %d: part instantiation refers to unknown part type \"%s\"\n", |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 input_filename, input_lineno, typename); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 if (decalname) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 select_decal_by_name(decalname); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 else |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 select_decal_by_number(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 static void |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 one_attr_label() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 int i; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 /* just skip it for now */ |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 for (i = 0; i < 3; i++) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 if (!get_input_line()) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 fprintf(stderr, |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 "error: EOF when expecting a part label line\n"); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 static void |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 read_one_part() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 int num_attr_labels, i; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 if (input_line_nfields < 8 || input_line_nfields > 12) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 fprintf(stderr, |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 "%s line %d: expected beginning of part instance, wrong # of fields\n", |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 input_filename, input_lineno); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 enter_part_inst(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 printf("Processing part instance %s\n", our_part->name); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 find_type_and_decal(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 our_part->mark_x = convert_input_dim(input_line_fields[2]); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 our_part->mark_y = -convert_input_dim(input_line_fields[3]); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 our_part->ori = parse_input_angle_90s(input_line_fields[4]); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 if (!strcmp(input_line_fields[6], "N")) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 our_part->onbottom = 0; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 else if (!strcmp(input_line_fields[6], "M")) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 our_part->onbottom = 1; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 else { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 fprintf(stderr, "%s line %d: expected 'N' or 'M' in field 6\n", |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 input_filename, input_lineno); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 if (input_line_nfields > 11) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 num_attr_labels = atoi(input_line_fields[11]); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 else |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 num_attr_labels = 0; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 for (i = 0; i < num_attr_labels; i++) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 one_attr_label(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 static void |
67
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
140 copy_footprint_body() |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
141 { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
142 struct footprint_body *origfp = our_part->decal->body; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
143 struct footprint_body *newbody; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
144 |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
145 newbody = malloc(sizeof(struct footprint_body)); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
146 if (!newbody) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
147 perror("malloc to copy footprint body"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
148 exit(1); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
149 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
150 bcopy(origfp, newbody, sizeof(struct footprint_body)); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
151 newbody->pins = malloc(sizeof(struct footprint_pad) * origfp->npins); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
152 if (!newbody->pins) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
153 perror("malloc to copy footprint pads"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
154 exit(1); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
155 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
156 bcopy(origfp->pins, newbody->pins, |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
157 sizeof(struct footprint_pad) * origfp->npins); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
158 if (origfp->silk_lines) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
159 newbody->silk_lines = |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
160 malloc(sizeof(struct element_line) * |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
161 origfp->num_silk_lines); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
162 if (!newbody->silk_lines) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
163 perror("malloc to copy footprint silk lines"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
164 exit(1); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
165 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
166 bcopy(origfp->silk_lines, newbody->silk_lines, |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
167 sizeof(struct element_line) * origfp->num_silk_lines); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
168 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
169 if (origfp->silk_arcs) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
170 newbody->silk_arcs = |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
171 malloc(sizeof(struct element_arc) * |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
172 origfp->num_silk_arcs); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
173 if (!newbody->silk_arcs) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
174 perror("malloc to copy footprint silk arcs"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
175 exit(1); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
176 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
177 bcopy(origfp->silk_arcs, newbody->silk_arcs, |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
178 sizeof(struct element_arc) * origfp->num_silk_arcs); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
179 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
180 our_part->body = newbody; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
181 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
182 |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
183 static void |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
184 part_inst_fail(reason) |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
185 char *reason; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
186 { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
187 printf("Omitting component %s: %s\n", our_part->name, reason); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
188 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
189 |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
190 static void |
65
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 process_one_part() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 read_one_part(); |
67
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
194 /* analyze it */ |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
195 if (!our_part->decal->body) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
196 part_inst_fail("bad decal"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
197 return; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
198 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
199 if (our_part->type->num_alpha_pins && |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
200 our_part->type->num_alpha_pins != our_part->decal->body->npins) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
201 part_inst_fail("alpha pins count mismatch"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
202 return; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
203 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
204 if (our_part->ori < 0) { |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
205 part_inst_fail("non-rectangular orientation"); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
206 return; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
207 } |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
208 |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
209 /* subsetting and renaming logic will go here */ |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
210 our_part->newname = our_part->name; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
211 copy_footprint_body(); |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
212 our_part->body->mark_x = our_part->mark_x; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
213 our_part->body->mark_y = our_part->mark_y; |
e14cd5433e83
pads2gpcb/partinst.c: checkpoint before adding mirroring and rotation
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
66
diff
changeset
|
214 /* rotation and mirroring to be implemented */ |
65
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 process_part_section() |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 input_units_current = input_units_global; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 for (;;) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 if (!get_input_line()) { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 fprintf(stderr, "error: EOF in PART section\n"); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 exit(1); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 if (input_line_buf[0] == '*') { |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 parse_starline(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 if (strcmp(input_line_starkw, "REMARK")) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 break; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 else |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 continue; |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 parse_input_line_fields(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 if (input_line_nfields) |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 process_one_part(); |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 } |
2b71943a311b
pads2gpcb: PART section parsing implemented, compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 } |