Link Here
|
|
|
1 |
--- netmenu/NMnetlist.c.orig 2006-04-11 07:03:14.000000000 +0900 |
2 |
+++ netmenu/NMnetlist.c 2012-09-13 00:05:02.000000000 +0900 |
3 |
@@ -223,12 +223,12 @@ |
4 |
HashEntry *h; |
5 |
NetEntry *entry; |
6 |
|
7 |
- if ((name == 0) || (nmCurrentNetlist == NULL)) return; |
8 |
+ if ((name == 0) || (nmCurrentNetlist == NULL)) return 0; |
9 |
|
10 |
h = HashLookOnly(&nmCurrentNetlist->nl_table, name); |
11 |
- if (h == NULL) return; |
12 |
+ if (h == NULL) return 0; |
13 |
entry = (NetEntry *) HashGetValue(h); |
14 |
- if (entry == 0) return; |
15 |
+ if (entry == 0) return 0; |
16 |
nmCurrentNetlist->nl_flags |= NL_MODIFIED; |
17 |
HashSetValue(h, 0); |
18 |
NMUndo(entry->ne_name, entry->ne_next->ne_name, NMUE_REMOVE); |
19 |
@@ -264,8 +264,8 @@ |
20 |
HashEntry *ha, *hb; |
21 |
NetEntry *netA, *netB, *tmp; |
22 |
|
23 |
- if ((termA == NULL) || (termB == NULL)) return; |
24 |
- if (nmCurrentNetlist == NULL) return; |
25 |
+ if ((termA == NULL) || (termB == NULL)) return 0; |
26 |
+ if (nmCurrentNetlist == NULL) return 0; |
27 |
|
28 |
/* Lookup the two nets, and make sure that they both exist |
29 |
* and aren't already the same. |
30 |
@@ -275,12 +275,12 @@ |
31 |
netA = (NetEntry *) HashGetValue(ha); |
32 |
hb = HashFind(&nmCurrentNetlist->nl_table, termB); |
33 |
netB = (NetEntry *) HashGetValue(hb); |
34 |
- if ((netA == 0) || (netB == 0)) return; |
35 |
+ if ((netA == 0) || (netB == 0)) return 0; |
36 |
nmCurrentNetlist->nl_flags |= NL_MODIFIED; |
37 |
tmp = netA; |
38 |
while (TRUE) |
39 |
{ |
40 |
- if (tmp == netB) return; |
41 |
+ if (tmp == netB) return 0; |
42 |
tmp = tmp->ne_next; |
43 |
if (tmp == netA) break; |
44 |
} |
45 |
@@ -336,11 +336,11 @@ |
46 |
HashEntry *h; |
47 |
NetEntry *ne, *next; |
48 |
|
49 |
- if ((net == NULL) || (nmCurrentNetlist == NULL)) return; |
50 |
+ if ((net == NULL) || (nmCurrentNetlist == NULL)) return 0; |
51 |
h = HashLookOnly(&nmCurrentNetlist->nl_table, net); |
52 |
- if (h == NULL) return; |
53 |
+ if (h == NULL) return 0; |
54 |
ne = (NetEntry *) HashGetValue(h); |
55 |
- if (ne == 0) return; |
56 |
+ if (ne == 0) return 0; |
57 |
nmCurrentNetlist->nl_flags |= NL_MODIFIED; |
58 |
|
59 |
/* The order of processing is a bit tricky. Since we use net for |
60 |
@@ -402,7 +402,7 @@ |
61 |
if ((name == NULL) || (name[0] == 0)) |
62 |
{ |
63 |
nmCurrentNetlist = NULL; |
64 |
- return; |
65 |
+ return 0; |
66 |
} |
67 |
|
68 |
/* First of all, see if this netlist is already loaded. */ |
69 |
@@ -412,7 +412,7 @@ |
70 |
if (strcmp(name, new->nl_name) == 0) |
71 |
{ |
72 |
nmCurrentNetlist = new; |
73 |
- return; |
74 |
+ return 0; |
75 |
} |
76 |
} |
77 |
|
78 |
@@ -440,7 +440,7 @@ |
79 |
TxError("Creating new netlist.\n"); |
80 |
new->nl_fileName = mallocMagic((unsigned) (5 + strlen(name))); |
81 |
(void) sprintf(new->nl_fileName, "%s.net", name); |
82 |
- return; |
83 |
+ return 0; |
84 |
} |
85 |
(void) StrDup(&new->nl_fileName, fullName); |
86 |
if ((fgets(line, MAXLINESIZE, file) == NULL) |
87 |
@@ -450,7 +450,7 @@ |
88 |
TxError("%s isn't a legal netlist file.\n", new->nl_fileName); |
89 |
TxError("Creating new netlist.\n"); |
90 |
(void) fclose(file); |
91 |
- return; |
92 |
+ return 0; |
93 |
} |
94 |
|
95 |
/* Read nets from the file one at a time. Each net consists of |
96 |
@@ -756,7 +756,7 @@ |
97 |
if (nmCurrentNetlist == NULL) |
98 |
{ |
99 |
TxError("There isn't a current net list to write.\n"); |
100 |
- return; |
101 |
+ return 0; |
102 |
} |
103 |
|
104 |
/* Decide what file to use to write the file (if an explicit name |
105 |
@@ -776,8 +776,8 @@ |
106 |
(void) fclose(file); |
107 |
TxPrintf("Net list file %s already exists.", realName); |
108 |
TxPrintf(" Should I overwrite it? [no] "); |
109 |
- if (TxGetLine(line, 50) == (char *) NULL) return; |
110 |
- if ((strcmp(line, "y") != 0) && (strcmp(line, "yes") != 0)) return; |
111 |
+ if (TxGetLine(line, 50) == (char *) NULL) return 0; |
112 |
+ if ((strcmp(line, "y") != 0) && (strcmp(line, "yes") != 0)) return 0; |
113 |
} |
114 |
} |
115 |
|
116 |
@@ -786,7 +786,7 @@ |
117 |
if (file == NULL) |
118 |
{ |
119 |
TxError("Couldn't write file %s.\n", realName); |
120 |
- return; |
121 |
+ return 0; |
122 |
} |
123 |
fprintf(file, " Netlist File\n"); |
124 |
(void) NMEnumNets(nmWriteNetsFunc, (ClientData) file); |
125 |
@@ -906,12 +906,12 @@ |
126 |
case 1: |
127 |
break; |
128 |
case 2: |
129 |
- return; |
130 |
+ return 0; |
131 |
} |
132 |
} |
133 |
|
134 |
nmCurrentNetlist = saveCurrent; |
135 |
- return; |
136 |
+ return 0; |
137 |
} |
138 |
|
139 |
/* |