blob: f48cb39f501183a2263cce090ab8f1432ae4c420 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
diff -U 3 -H -d -r -N -- src/os_dependent.cc src/os_dependent.cc
--- src/os_dependent.cc 2005-08-25 22:57:41.000000000 +0100
+++ src/os_dependent.cc 2005-12-27 01:00:16.000000000 +0000
@@ -229,6 +229,11 @@
}
}
+bool bHasAbsolutePath(string &fname)
+{
+ return fname[0] == FOLDERDELIMITER;
+}
+
//---------------------------
//OS agnostic library loader
diff -U 3 -H -d -r -N -- src/processor.cc src/processor.cc
--- src/processor.cc 2005-10-01 22:12:55.000000000 +0100
+++ src/processor.cc 2005-12-27 01:00:00.000000000 +0000
@@ -2244,9 +2244,12 @@
return -1;
}
+extern bool bHasAbsolutePath(string &fname);
+
int FileContextList::Add(string &new_name)
{
- string sFull = sSourcePath + new_name;
+ string sFull = bHasAbsolutePath(new_name) ? new_name : (sSourcePath + new_name);
+// string sFull = sSourcePath + new_name;
push_back(FileContext(sFull));
lastFile++;
if(CSimulationContext::GetContext()->IsSourceEnabled()) {
@@ -2261,6 +2264,9 @@
int FileContextList::Add(char *new_name)
{
+ string sNewName(new_name);
+ return Add (sNewName);
+ /*
string sFull = sSourcePath + new_name;
push_back(FileContext(sFull));
lastFile++;
@@ -2270,6 +2276,7 @@
<< " id = " << lastFile << endl;
return lastFile-1;
+ */
}
FileContext *FileContextList::operator [] (int file_id)
diff -U 3 -H -d -r -N -- src/symbol.cc src/symbol.cc
--- src/symbol.cc 2005-09-07 14:34:24.000000000 +0100
+++ src/symbol.cc 2005-12-23 19:26:05.000000000 +0000
@@ -697,9 +697,8 @@
void Symbol_Table::clear() {
iterator it;
- iterator itEnd = end();
int i = 0;
- for(it = begin(); it != itEnd;) {
+ for(it = begin(); it != end();) {
Value *value = *it;
if(value->isClearable()) {
delete value;
|