Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 11 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * $Id: chck_names.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ |
2 | * $Id: chck_names.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ |
3 | * |
3 | * |
4 | * $Log: chck_names.c,v $ |
4 | * $Log: chck_names.c,v $ |
5 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
5 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
6 | * Imported into local repositrory |
6 | * Imported into local repositrory |
Line 35... | Line 35... | ||
35 | * |
35 | * |
36 | * |
36 | * |
37 | * Revision 1.35 2000/10/04 10:37:02 10:37:02 mjames (Mike James) |
37 | * Revision 1.35 2000/10/04 10:37:02 10:37:02 mjames (Mike James) |
38 | * Modified to become part of vertical2, complete |
38 | * Modified to become part of vertical2, complete |
39 | * with VHDL COMPONENT and SIGNAL declarations. |
39 | * with VHDL COMPONENT and SIGNAL declarations. |
40 | * |
40 | * |
41 | */ |
41 | */ |
42 | 42 | ||
43 | #include <ctype.h> |
- | |
44 | #include <stdio.h> |
43 | #include <stdio.h> |
45 | #include <stdlib.h> |
- | |
46 | #include <string.h> |
44 | #include <string.h> |
- | 45 | #include <stdlib.h> |
|
- | 46 | #include <ctype.h> |
|
47 | 47 | ||
48 | /* TCL/Tk declarations */ |
48 | /* TCL/Tk declarations */ |
49 | #include "chck_names.h" |
49 | #include "vertcl_main.h" |
50 | #include "cmdlog.h" |
- | |
51 | #include "cmdparse.h" |
- | |
52 | #include "database.h" |
- | |
53 | #include "expression.h" |
50 | #include "expression.h" |
54 | #include "generic.h" |
51 | #include "generic.h" |
- | 52 | #include "database.h" |
|
55 | #include "lx_support.h" |
53 | #include "lx_support.h" |
- | 54 | #include "chck_names.h" |
|
56 | #include "statistics.h" |
55 | #include "statistics.h" |
57 | #include "vertcl_main.h" |
56 | #include "cmdparse.h" |
- | 57 | #include "cmdlog.h" |
|
- | 58 | ||
- | 59 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/vertlib/chck_names.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $" |
|
58 | 60 | ||
59 | #ident \ |
- | |
60 | "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/vertlib/chck_names.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $" |
- | |
61 | 61 | ||
62 | /* exported flag */ |
62 | /* exported flag */ |
63 | 63 | ||
64 | int need_validate_names = 0; |
64 | int need_validate_names = 0; |
65 | 65 | ||
66 | static void list_dodgy_net_id_names (net_t *netlist) |
66 | static void list_dodgy_net_id_names(net_t * netlist) { |
67 | { |
- | |
68 | while (netlist) |
67 | while(netlist) { |
69 | { |
68 | /* |
70 | /* |
- | |
71 | printf("'%s' '%s'\n",netlist->name,netlist->identifier); |
69 | printf("'%s' '%s'\n",netlist->name,netlist->identifier); |
72 | */ |
70 | */ |
73 | if (strchr (netlist->name, ' ')) |
71 | if (strchr(netlist->name,' ')) |
74 | Log ( |
- | |
75 | LOG_ERROR, |
- | |
76 | "# Warning : Net name '%s' has a SPACE in it\n", |
72 | Log(LOG_ERROR,"# Warning : Net name '%s' has a SPACE in it\n", |
77 | netlist->name); |
73 | netlist->name); |
78 | if (strchr (netlist->identifier, ' ')) |
74 | if (strchr(netlist->identifier,' ')) |
79 | Log ( |
- | |
80 | LOG_ERROR, |
- | |
81 | "# Warning : Net identifier '%s' has a SPACE in it\n", |
75 | Log(LOG_ERROR,"# Warning : Net identifier '%s' has a SPACE in it\n", |
82 | netlist->identifier); |
76 | netlist->identifier); |
83 | netlist = netlist->next; |
77 | netlist = netlist->next; |
84 | } |
78 | } |
85 | } |
79 | } |
- | 80 | ||
86 | 81 | ||
87 | void validate_names (void) |
82 | void validate_names(void) |
88 | { |
83 | { |
89 | list_dodgy_net_id_names (unrouted_list); |
84 | list_dodgy_net_id_names(unrouted_list); |
90 | list_dodgy_net_id_names (routed_list); |
85 | list_dodgy_net_id_names(routed_list); |
91 | list_dodgy_net_id_names (named_list); |
86 | list_dodgy_net_id_names(named_list); |
92 | } |
87 | } |
93 | 88 | ||
94 | /*************************************************/ |
89 | /*************************************************/ |
95 | /* check to see if a wildcard is formed 'old' or */ |
90 | /* check to see if a wildcard is formed 'old' or */ |
96 | /* 'new' regexp style */ |
91 | /* 'new' regexp style */ |
97 | /*************************************************/ |
92 | /*************************************************/ |
98 | int check_wildcard (char *patt) |
93 | int check_wildcard(char *patt) |
99 | { |
94 | { |
100 | int l; |
95 | int l; |
101 | if (ISNULLSTR (patt)) |
96 | if(ISNULLSTR(patt)) |
102 | { |
97 | { |
103 | Log (LOG_ERROR, "-- problem with zero length regular expression pattern\n"); |
98 | Log(LOG_ERROR,"-- problem with zero length regular expression pattern\n"); |
104 | return TCL_ERROR; |
99 | return TCL_ERROR; |
105 | } |
100 | } |
106 | l = strlen (patt); |
101 | l = strlen(patt); |
107 | /* |
102 | /* |
108 | if ( patt[0] == '$' ) |
103 | if ( patt[0] == '$' ) |
109 | { |
104 | { |
110 | Log(LOG_ERROR,"-- Need to use '\$' NOT '$' at beginning of regular expression |
105 | Log(LOG_ERROR,"-- Need to use '\$' NOT '$' at beginning of regular expression pattern '%s'\n",patt); |
111 | pattern '%s'\n",patt); return TCL_ERROR; |
106 | return TCL_ERROR; |
112 | } |
107 | } |
113 | 108 | ||
114 | */ |
109 | */ |
115 | 110 | ||
116 | if (patt[l - 1] == '*' && ((l == 1) || (l >= 2 && patt[l - 2] != '.'))) |
111 | if ( patt[l-1]=='*' && ((l==1)||(l>=2 && patt[l-2]!='.'))) |
117 | { |
112 | { |
118 | Log ( |
- | |
119 | LOG_ERROR, |
- | |
120 | "-- May Need to use '.*' NOT '*' in regular expression pattern '%s'\n", |
113 | Log(LOG_ERROR,"-- May Need to use '.*' NOT '*' in regular expression pattern '%s'\n",patt); |
121 | patt); |
- | |
122 | } |
114 | } |
123 | return TCL_OK; |
115 | return TCL_OK; |
- | 116 | ||
124 | } |
117 | } |