FreeCalypso > hg > ueda-linux
annotate pads2gpcb/main.c @ 38:aa0539cc3d41
pads2gpcb project started, skeleton compiles
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 11 Jan 2016 04:56:51 +0000 |
parents | |
children | 242f73e61ef0 |
rev | line source |
---|---|
38
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include <stdio.h> |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 #include <stdlib.h> |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 #include <ctype.h> |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 #include <string.h> |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 #include <strings.h> |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 #include "globals.h" |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 main(argc, argv) |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 char **argv; |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 { |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 if (argc != 2) { |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 fprintf(stderr, "usage: %s pads-file.asc\n", argv[0]); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 exit(1); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 } |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 input_filename = argv[1]; |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 open_input_file(); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 while (get_input_line()) { |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 if (input_line_buf[0] != '*') |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 continue; |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 parse_starline(); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #if 0 |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 loop: if (!strcmp(input_line_starkw, "PARTDECAL")) { |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 process_partdecal_section(); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 goto loop; |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 } |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 if (!strcmp(input_line_starkw, "PARTTYPE")) { |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 process_parttype_section(); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 goto loop; |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 } |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 if (!strcmp(input_line_starkw, "PART")) { |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 process_part_section(); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 goto loop; |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 } |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #endif |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 } |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 exit(0); |
aa0539cc3d41
pads2gpcb project started, skeleton compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 } |