Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /* pads_main*/ |
11 | mjames | 2 | /* $Id: eagle_main.c,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $ |
2 | mjames | 3 | * |
4 | * $Log: eagle_main.c,v $ |
||
5 | * Revision 1.1.1.1 2003/11/04 23:34:56 mjames |
||
6 | * Imported into local repositrory |
||
7 | * |
||
8 | * Revision 1.1 2002/12/04 22:28:28 mjames |
||
9 | * Initial release Eagle PCB reader |
||
10 | * |
||
11 | mjames | 11 | */ |
2 | mjames | 12 | /* |
13 | @title |
||
14 | PROGRAM eagle_read: Converter for Eagle .net files |
||
15 | @application external |
||
16 | @text |
||
17 | PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like: |
||
18 | @listing |
||
19 | Netlist |
||
20 | |||
11 | mjames | 21 | Exported from H02SM05.brd at 11-10-2002 12:15:48 |
2 | mjames | 22 | |
23 | EAGLE Version 4.09r1 Copyright (c) 1988-2002 CadSoft |
||
24 | |||
25 | Net Part Pad |
||
26 | |||
27 | @text |
||
28 | Commonly seen with a '.net' file suffix. This file is from Eagle PCB. |
||
11 | mjames | 29 | @text |
2 | mjames | 30 | Usage |
11 | mjames | 31 | @listing |
2 | mjames | 32 | eagle_read <eagle_file> [ d ] |
11 | mjames | 33 | @text |
34 | If a lower |
||
35 | case 'd' is present as the second argument, the Bison parser |
||
2 | mjames | 36 | (interpreter of keywords and syntax) prints extremely verbose diagnostics. |
37 | @break |
||
38 | Normally the acfp file produced on standard output is redirected to a file e.g. |
||
39 | @listing |
||
40 | eagle_read file.net > file.acfp |
||
41 | @text |
||
42 | Will produce file.acfp from file.net. |
||
43 | @break |
||
44 | Following this it is necessary to run the output through Vertical again in order to |
||
11 | mjames | 45 | set up properties on nets (power and ground being made not routable for instance) using the |
2 | mjames | 46 | del routable command. Alternatively the acfp file can be edited to set the net routing |
47 | flags for these nets. |
||
48 | @end |
||
49 | */ |
||
50 | |||
51 | #include <stdio.h> |
||
11 | mjames | 52 | |
53 | #include <string.h> |
||
54 | |||
2 | mjames | 55 | #include <stdlib.h> |
56 | #if defined HAS_TCL |
||
57 | #include "tcl_l.h" |
||
58 | #endif |
||
59 | #include "expression.h" |
||
60 | #include "generic.h" |
||
11 | mjames | 61 | #include "database.h" |
2 | mjames | 62 | #include "printout.h" |
63 | #include "routing.h" |
||
11 | mjames | 64 | #include "cmdparse.h" |
65 | #include "cmdlog.h" |
||
66 | #include "yacc_common.h" |
||
2 | mjames | 67 | |
11 | mjames | 68 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/eagle_src/eagle_main.c,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $" |
2 | mjames | 69 | |
70 | |||
11 | mjames | 71 | int main(int argc , char * argv[]) |
72 | { |
||
73 | InitialiseData(); |
||
74 | ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc-1, (argv+1)); |
||
75 | ExecuteString("do $(VERTICAL_INIT) ", argc-2, (argv+2)); |
||
76 | Log(LOG_GENERAL, |
||
77 | "# Finished initialisation script\n"); |
||
78 | print_header(stdout,"'Eagle_Read': From Eagle PCB .net file"); |
||
79 | yydebug = 0; |
||
80 | if (argc>2 && argv[2][0]=='d') |
||
81 | yydebug = 1; |
||
82 | if (argc>1) |
||
83 | yyin = fopen(argv[1],"r"); |
||
84 | else |
||
85 | yyin = stdin; |
||
86 | if(!yyin) |
||
87 | printf("cannot open input file (%s)\n",argv[1]); |
||
88 | else |
||
89 | while(yyparse()==0); |
||
2 | mjames | 90 | |
11 | mjames | 91 | perform_routing(Free); |
92 | list_database(stdout,0); /*no jumpers so flatten jumpers arg=0 */ |
||
93 | list_devices(stdout, |
||
94 | PRINT_TYPE|PRINT_EXPAND_BUS| |
||
95 | PRINT_GENERIC|PRINT_GROUP| |
||
96 | PRINT_ROUTE_FLAGS | PRINT_EQUIVALENT_PINS); |
||
97 | } |
||
98 | |||
99 | |||
100 |