[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    [Mono-devel-list] Small patch will make monotalk compile
From:       Philip Van Hoof <me () freax ! org>
Date:       2003-08-31 21:12:33
Message-ID: 1062364353.17882.21.camel () localhost ! localdomain
[Download RAW message or body]

Okay to commit this?
-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
work: Philip dot VanHoof at cronos dot be
http://www.freax.be, http://www.freax.eu.org


["monotalk_small_compilerfixes.diff" (monotalk_small_compilerfixes.diff)]

Index: Indexer/Indexer.cs
===================================================================
RCS file: /cvs/public/monotalk/Indexer/Indexer.cs,v
retrieving revision 1.1
diff -u -r1.1 Indexer.cs
--- Indexer/Indexer.cs	9 Feb 2003 21:48:06 -0000	1.1
+++ Indexer/Indexer.cs	31 Aug 2003 21:22:08 -0000
@@ -28,7 +28,8 @@
 			int id;
 
 			if (fileIDs [filename] == null) {
-				id = fileIDs [filename] = files;
+				fileIDs [filename] = (object)files;
+				id = (int)fileIDs [filename];
 				fileNames [id] = filename;
 				files ++;
 			} else
Index: SourceView/Highlights.cs
===================================================================
RCS file: /cvs/public/monotalk/SourceView/Highlights.cs,v
retrieving revision 1.2
diff -u -r1.2 Highlights.cs
--- SourceView/Highlights.cs	20 Feb 2003 09:01:09 -0000	1.2
+++ SourceView/Highlights.cs	31 Aug 2003 21:22:08 -0000
@@ -416,20 +416,20 @@
 	    }
 
 	    int state = 0;
-	    int i = 0;
+	    int y = 0;
 
-	    while ( i < text.Length )
+	    while ( y < text.Length )
 	    {
-		int next = GetNext ((State) idx[state], text[i]);
+		int next = GetNext ((State) idx[state], text[y]);
 
 		if ( next < 0 )
 		{
-		    AppendSuffix (state, text.Substring(i), pattern_no);
+		    AppendSuffix (state, text.Substring(y), pattern_no);
 		    return;
 		}
-		else if ( i == text.Length - 1 )
+		else if ( y == text.Length - 1 )
 		{
-			State s = new State ( ((State) idx[state]).id, text[i]);
+			State s = new State ( ((State) idx[state]).id, text[y]);
 
 			s.final = true;
 			s.next  = -pattern_no;
@@ -440,7 +440,7 @@
 		}
 
 		state = next;
-		i++;
+		y++;
 	    }
 
 Console.WriteLine("here we go, not matched: pat {0}", text);
@@ -471,4 +471,3 @@
 	}
     }
 }
-


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic