Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | /* |
| 11 | mjames | 2 | * $Header: c:\\cygwin\\cvsroot/Vert03/acf_src/acf_main.c,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ |
| 2 | mjames | 3 | * |
| 4 | * $Log: acf_main.c,v $ |
||
| 5 | * Revision 1.1.1.1 2003/11/04 23:34:58 mjames |
||
| 6 | * Imported into local repositrory |
||
| 7 | * |
||
| 8 | * Revision 1.17 2002/10/02 19:37:30 MJAMES |
||
| 9 | * Moved dummy functions to a separate support file. |
||
| 10 | * |
||
| 11 | * Used correct number of arguments to define_pin |
||
| 12 | * |
||
| 13 | * Revision 1.16 2002/08/14 11:59:42 mjames |
||
| 14 | * Initialised the include file stack pointer as this was not done previously |
||
| 15 | * |
||
| 16 | * Revision 1.15 2002/08/06 12:56:20 mjames |
||
| 17 | * Merge in from latest version |
||
| 18 | * |
||
| 19 | * |
||
| 20 | * Revision 1.16 2002/08/06 08:57:16 mjames |
||
| 21 | * Updated copyright message |
||
| 22 | * |
||
| 23 | * Revision 1.15 2002/03/21 17:18:00 mjames |
||
| 24 | * Added search path to vertical file opening for read, |
||
| 25 | * altered order of setting up initial variable values and |
||
| 26 | * then reading init file before handling the user's file |
||
| 27 | * |
||
| 28 | * Revision 1.14 2002/01/16 10:05:17 mjames |
||
| 29 | * Tidied up copyright messages |
||
| 30 | * |
||
| 31 | * Revision 1.13 2002/01/02 10:47:07 mjames |
||
| 32 | * Changed year on date in copyright message |
||
| 33 | * |
||
| 34 | * Revision 1.12 2001/12/24 21:15:23 mjames |
||
| 35 | * Switched to #ident |
||
| 36 | * |
||
| 37 | * Revision 1.11 2001/11/19 10:41:54 mjames |
||
| 38 | * Merged back DTC release |
||
| 39 | * |
||
| 40 | * Revision 1.10.2.1 2001/11/16 15:10:23 mjames |
||
| 41 | * Suppressed an error message that TH was worried about |
||
| 42 | * |
||
| 43 | * Revision 1.10 2001/10/31 22:19:57 mjames |
||
| 44 | * Tidying up problematical comments caused by CVS |
||
| 45 | * 'intelligent' comment guessing |
||
| 46 | * |
||
| 47 | * Revision 1.9 2001/09/28 14:34:13 mjames |
||
| 48 | * FIxed yydebug variable to exist when YYDEBUG macro |
||
| 49 | * is not defined. Otherwise linker error will be reported. |
||
| 50 | * |
||
| 51 | * Revision 1.8 2001/09/16 20:01:49 mjames |
||
| 52 | * changed command prompt |
||
| 53 | * |
||
| 54 | * Revision 1.7 2001/07/09 10:05:27 mjames |
||
| 55 | * Placed the version string in an independent file to save time on building |
||
| 56 | * all of the variants of Vertical |
||
| 57 | * |
||
| 58 | * Revision 1.6 2001/06/19 05:26:12 mjames |
||
| 59 | * reordered the error message about inability to open file and |
||
| 60 | * modifying argc to correctly print missing file name if given on |
||
| 61 | * the command line |
||
| 62 | * |
||
| 63 | * Revision 1.5 2001/06/06 12:10:27 mjames |
||
| 64 | * Move from HPUX |
||
| 65 | * |
||
| 66 | * Revision 1.4 2001/02/06 22:41:14 mjames |
||
| 67 | * Added correct argument passing for 'read file comp_suffix arg0 arg1 arg2 ... |
||
| 68 | * |
||
| 69 | * Revision 1.3 2001/01/04 21:26:53 mjames |
||
| 70 | * Modifications to add in the TCL style |
||
| 71 | * argument list to all of the functions |
||
| 72 | * . |
||
| 73 | * |
||
| 74 | * Revision 1.2 2000/10/19 22:35:44 mjames |
||
| 75 | * Moved VERTICAL banner accross |
||
| 76 | * |
||
| 77 | * Revision 1.1.1.1 2000/10/19 21:58:34 mjames |
||
| 78 | * Mike put it here |
||
| 79 | |||
| 80 | */ |
||
| 81 | #include <stdio.h> |
||
| 11 | mjames | 82 | #include <string.h> |
| 2 | mjames | 83 | #include <stdlib.h> |
| 84 | |||
| 85 | #if defined HAS_TCL |
||
| 86 | #include "tcl_l.h" |
||
| 87 | #endif |
||
| 11 | mjames | 88 | #include "vertcl_main.h" |
| 2 | mjames | 89 | #include "expression.h" |
| 90 | #include "generic.h" |
||
| 11 | mjames | 91 | #include "database.h" |
| 2 | mjames | 92 | #include "printout.h" |
| 93 | #include "routing.h" |
||
| 11 | mjames | 94 | #include "cmdparse.h" |
| 95 | #include "cmdutil.h" |
||
| 96 | #include "cmdlog.h" |
||
| 97 | #include "lx_support.h" |
||
| 2 | mjames | 98 | #if defined YYDEBUG |
| 99 | extern int yydebug; |
||
| 100 | #else |
||
| 101 | int yydebug = 0; |
||
| 102 | #endif |
||
| 103 | |||
| 11 | mjames | 104 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/acf_src/acf_main.c,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $" |
| 2 | mjames | 105 | |
| 106 | extern int include_stack_ptr; |
||
| 107 | |||
| 108 | |||
| 11 | mjames | 109 | int main(int argc , char * argv[]){ |
| 110 | FILE * TopFile; |
||
| 111 | int Status; |
||
| 2 | mjames | 112 | |
| 11 | mjames | 113 | include_stack_ptr = 0; |
| 2 | mjames | 114 | |
| 115 | |||
| 11 | mjames | 116 | /* setup intial path */ |
| 117 | InitialiseData(); |
||
| 2 | mjames | 118 | |
| 11 | mjames | 119 | InitErrorLog(); |
| 2 | mjames | 120 | |
| 121 | |||
| 122 | |||
| 11 | mjames | 123 | LogSilent(); |
| 124 | ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc, argv); |
||
| 125 | /* this may change search path before argv[1] is opened */ |
||
| 126 | ExecuteString("do $(VERTICAL_INIT) ", argc, argv); |
||
| 127 | |||
| 128 | LogVerbose(); |
||
| 129 | |||
| 130 | |||
| 131 | if (argc>1) |
||
| 132 | TopFile = trap_fopen(argv[1],"r"); |
||
| 133 | else |
||
| 134 | TopFile = stdin; |
||
| 135 | |||
| 136 | |||
| 137 | if (argc <2) |
||
| 138 | argc = 0; |
||
| 139 | else { |
||
| 140 | argc -=2; |
||
| 141 | argv+=2; |
||
| 142 | } |
||
| 143 | yy_nArgs = argc; |
||
| 144 | yy_Args = argv; |
||
| 145 | |||
| 146 | |||
| 147 | |||
| 148 | |||
| 149 | /* sort out potential argument lists */ |
||
| 150 | if(!TopFile) |
||
| 151 | Log(LOG_ERROR,"ERROR : cannot open input file (%s)\n",argv[1]); |
||
| 152 | else { |
||
| 153 | Log(LOG_GENERAL, |
||
| 154 | "# ---------------------------------------------------- \n"); |
||
| 155 | Log(LOG_GENERAL, |
||
| 156 | "# | # |\n"); |
||
| 157 | Log(LOG_GENERAL, |
||
| 158 | "# | # # |\n"); |
||
| 159 | Log(LOG_GENERAL, |
||
| 160 | "# | Mikes # |\n"); |
||
| 161 | Log(LOG_GENERAL, |
||
| 162 | "# | EDA METAL # |\n"); |
||
| 163 | Log(LOG_GENERAL, |
||
| 164 | "# | Tools # |\n"); |
||
| 165 | Log(LOG_GENERAL, |
||
| 166 | "# | And # |\n"); |
||
| 167 | Log(LOG_GENERAL, |
||
| 168 | "# | Libraries ### |\n"); |
||
| 169 | Log(LOG_GENERAL, |
||
| 170 | "# |----------------------------------------------------|\n"); |
||
| 2 | mjames | 171 | #if defined PC |
| 11 | mjames | 172 | Log(LOG_GENERAL, |
| 173 | "# | Version: %30s (PC-CygWin)|\n",Vertical_Version); |
||
| 2 | mjames | 174 | #else |
| 11 | mjames | 175 | Log(LOG_GENERAL, |
| 176 | "# | Version: %30s (HPUX) |\n",Vertical_Version); |
||
| 2 | mjames | 177 | #endif |
| 11 | mjames | 178 | Log(LOG_GENERAL, |
| 179 | "# | Compiled: %30s |\n",Vertical_Time); |
||
| 180 | Log(LOG_GENERAL, |
||
| 181 | "# | |\n"); |
||
| 182 | Log(LOG_GENERAL, |
||
| 183 | "# | (C) Mike James 1995-2021 mike@hamble.online |\n"); |
||
| 184 | Log(LOG_GENERAL, |
||
| 185 | "# ---------------------------------------------------- \n"); |
||
| 2 | mjames | 186 | |
| 11 | mjames | 187 | |
| 188 | |||
| 189 | |||
| 190 | |||
| 191 | do { |
||
| 192 | if(TopFile == stdin) |
||
| 193 | printf("Vertical : "); |
||
| 194 | Status = ExecuteCommand(TopFile, argc, argv); /* execute the command from the stdin input stream */ |
||
| 195 | } |
||
| 196 | while (Status != QUITCMD); |
||
| 197 | } |
||
| 198 | EndErrorLog(); |
||
| 199 | return(0); |
||
| 200 | } |
||
| 201 |