Re: [Mono-dev] [PATCH] Bugs in StaticSiteMapProvider.cs
Hi Marek, All tests were ok. Committed with Dictionaries instead of Hashtables and a few more cleanups. - Juraj On Wed, 2007-10-17 at 11:42 +0200, Marek Habersack wrote: On Wed, 17 Oct 2007 11:18:21 +0200, Juraj Skripsky [EMAIL PROTECTED] scribbled: Hi Marek, Hey Juraj, The attached patch fixes a few issues with StaticSiteMapProvider: - AddNode doesn't check for key dups before adding items to hashtables - RemoveNode doesn't remove item from keyToNode - full urls (e.g. http://www.google.com) are not supported And it cleans up a few dirty spots. May I commit? Can you use the generic Dictionary instead of Hashtable? it will make the code faster. Otherwise, if no tests fail - do commit. Thanks! regards, marek ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] String.Split() broken behavior
Just a small comment: ... [ComVisible (false)] - [MonoDocumentationNote (optimization)] Since the code is not optimized, please don't remove this. ... Please use [MonoInternalNote (optimization)]. Since this is not something one would like to document. It doesn't help the developer using Mono and will only confuse her. Thanks, Eyal. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] Marshaling booleans as U1
On 10/17/07 Bill Holmes wrote: I ran across some code in my app that marshaled boolean types as U1 and was receiving a g_warning from the mono runtime. marshalling bool as native type %x is currently not supported Changing my code to I1 is easy enough but I wonder if U1 should be supported. This patch does that. You need to also add a test case to the test suite to exercise the new code. Thanks! lupus -- - [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] execv fails with error status 126
On 10/17/07 C S Vadiraj wrote: Yes I've not used fork() but do have lot of threads running at this point of time. If that makes a difference too? Well, let's make a deal: you'll first reply to my questions in my original mail and then I'll reply to your additional questions:) Here again, if you forgot them: What is the signature of the method that dllimports execv and what is the code that inokes it. Please cutpaste the exact lines of code you're using. Thanks! lupus -- - [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] execv fails with error status 126
On Thu, Oct 18, 2007 at 4:02 PM, in message [EMAIL PROTECTED], Paolo Molaro [EMAIL PROTECTED] wrote: On 10/17/07 C S Vadiraj wrote: Yes I've not used fork() but do have lot of threads running at this point of time. If that makes a difference too? Well, let's make a deal: you'll first reply to my questions in my original mail and then I'll reply to your additional questions:) Here again, if you forgot them: What is the signature of the method that dllimports execv and what is the code that inokes it. Please cutpaste the exact lines of code you're using. Here you go. Sorry for having missed it in my previous reply. [DllImport (libc)] private static extern int execv (string cmd, string[] args); execv (/tmp/myscript, (string[]) list.ToArray (typeof (string))); list is Array list with set of arguments. Not NULL terminated. I have further error messages on this application which failed with mono 1.2.0 version too. Please fine it below. Stacktrace: at (wrapper managed-to-native) System.Diagnostics.Process.ShellExecuteEx_internal (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process/ProcInfo) 0x4 at (wrapper managed-to-native) System.Diagnostics.Process.ShellExecuteEx_internal (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process/ProcInfo) 0x at System.Diagnostics.Process.Start_shell (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process) 0x00096 at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process) 0x0006e at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo) 0x00040 at System.Diagnostics.Process.Start (string,string) 0x00025 at Novell.Zenworks.Tess.EventSystem.EventListenerThread.Run () 0x00073 at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void () 0x at Novell.Zenworks.Zmd.ZenThread.WorkerLoop () 0x00216 at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void () 0x at (wrapper runtime-invoke) System.Object.runtime_invoke_void (object,intptr,intptr,intptr) 0x Thanks, Vadiraj ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] FastCGI Mono Server
Philippe Monnet wrote: I recently read with interest Brian Nickel's project during the Google Summer Of Code on FastCGI (see http://kerrick.wordpress.com/ and http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/doc/index.html). Especially since I am operating in a shared host with Apache 1.3. As such I cannot compile/install mod_mono into Apache (no access to headers / modules, etc.). Access to httpd.conf is not provided either, just .htaccess support. So mod_mono is out of reach for me. As is fastcgi in this case, unless it's already enabled by your provider. Is anyone on the core team looking to port / adapt some of his work? Or provide any other mechanism outside Apache modules? Are other users in the same situation too? I'm working on the integration of fastcgi-mono-server in Mono's build process, but I cannot give you an ETA for its landing other than this month. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] execv fails with error status 126
C S Vadiraj wrote: Here you go. Sorry for having missed it in my previous reply. [DllImport (libc)] private static extern int execv (string cmd, string[] args); execv (/tmp/myscript, (string[]) list.ToArray (typeof (string))); list is Array list with set of arguments. Not NULL terminated. It must be null terminated and it should contain /tmp/myscript at index 0. See execv(3). Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Silverlight/Moonlight questions
Hello. Maybe this is not the correct list (mono-list, instead of mono-devel-list?) for this: - As you guys have managed to make widgets for the desktop using Moonlight, could this be done also with Silverlight? If yes, how one could do that from a normal .NET application that could call a Silverlight widget? Would this be cross-platform if you used only managed code? I ask this because here[1] you can see that Silverlight is only understood as a browser plugin, which I think it's incorrect, given the first assumption. [1] http://en.wikipedia.org/wiki/Microsoft_Silverlight - Is the moonlight designer already usable (it's called lunareclipse right?). If yes, is there some page to download tarballs with it? BTW, in a similar way as previous bullet: can lunareclipse be run from the desktop without a browser? If yes, can it be launched from Windows? Or from a .NET application? I ask this because, as I understand, Silverlight CLR runs in a Sandbox and thus it should not allow to write/read from disk, so then how can anyone save the contents made by lunareclipse in the home directory or whenever on the local computer? Many thanks in advance, Andrés [ knocte ] -- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Mono, zedgraph and System.Drawing
Hi, I thought that mono implementation of System.Drawing for .NET 1.1 was enough complete... I was wrong... I need to generate some graph for our intranet and i've take a look on ZedGraph which is referenced on the mono website : I try a simple program : private void ZedGraphWeb1_RenderGraph(ZedGraph.Web.ZedGraphWeb webObject, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane) { GraphPane myPane=masterPane[0]; myPane.Title.Text = Nombre d'accès total mensuel; myPane.XAxis.Title.Text = ; myPane.YAxis.Title.Text = ; // Make up some random data points double[] y = { 10, 20, 40,10, 10 }; double[] y2 = { 70, 50, 85, 54, 63 }; string[] str = { Jan 2007, Fev 2007, Mar 2007, Avr 2007, Mai 2007 }; // Add a bar to the graph BarItem myCurve = myPane.AddBar( Curve 1, null, y, Color.White );// Access an image from a file (use your own filename here) // create a brush with the image myCurve.Bar.Fill = new Fill(new Color[]{Color.LightGray,Color.DarkGray}); // turn off the bar border myCurve.Bar.Border.IsVisible = true; myPane.XAxis.Scale.TextLabels = str; myPane.XAxis.Type = AxisType.Text; myPane.Legend.IsVisible = false; // Calculate the Axis Scale Ranges //myPane.AxisChange(); } } First Problem i've to disable myPane.AxisChange() because it crash mono with : [EMAIL PROTECTED] /tmp/TestZDGraph $ xsp --port 8090 xsp Listening on port: 8090 (non-secure) Listening on address: 0.0.0.0 Root directory: /tmp/TestZDGraph Hit Return to stop the server. X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 14 (X_GetGeometry) Resource id in failed request: 0x0 Serial number of failed request: 7 Current serial number in output stream: 7 And with myPane.AxisChange(); commented out : Here are the result of dotnet and mono output... MS.NET 1.1 Mono 1.2.5 (and mono 1.2.5 svn) PS : please note that the mono version is unusable because of the Y Axis... Could someone help me Thanks ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. attachment: mono.pngattachment: dotnet.png___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Silverlight/Moonlight questions
Hi, - As you guys have managed to make widgets for the desktop using Moonlight, could this be done also with Silverlight? I think so yes. There are Vista gadgets done with Silverlight somewhere. If yes, how one could do that from a normal .NET application that could call a Silverlight widget? I have no idea how the Vista gadgets are made, but one idea is to use the System.Windows.Forms.WebBrowser to embed a browser inside a desktop app. Would this be cross-platform if you used only managed code? I ask this because here[1] you can see that Silverlight is only understood as a browser plugin, which I think it's incorrect, given the first assumption. In theory yes, but it's still a long way to go. [1] http://en.wikipedia.org/wiki/Microsoft_Silverlight - Is the moonlight designer already usable (it's called lunareclipse right?). I haven't tried it yet, so I don't know :) If yes, is there some page to download tarballs with it? No, you have to use SVN to get it. BTW, in a similar way as previous bullet: can lunareclipse be run from the desktop without a browser? Yes (it is a desktop application) If yes, can it be launched from Windows? No. It requires Moonlight, and Moonlight doesn't run on Windows. Or from a .NET application? I ask this because, as I understand, Silverlight CLR runs in a Sandbox and thus it should not allow to write/read from disk, so then how can anyone save the contents made by lunareclipse in the home directory or whenever on the local computer? It is a .NET application already. Rolf Many thanks in advance, Andrés [ knocte ] -- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono, zedgraph and System.Drawing
Hubert FONGARNAND wrote: First Problem i've to disable myPane.AxisChange() because it crash mono with : [EMAIL PROTECTED] /tmp/TestZDGraph $ xsp --port 8090 xsp Listening on port: 8090 (non-secure) Listening on address: 0.0.0.0 Root directory: /tmp/TestZDGraph Hit Return to stop the server. X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 14 (X_GetGeometry) Resource id in failed request: 0x0 Serial number of failed request: 7 Current serial number in output stream: 7 Unsetting your DISPLAY variable might help. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono, zedgraph and System.Drawing
Ok, in fact i must do masterPane.AxisChange( g ); it doesn't crash, but the Y-Axis is still bad. Le jeudi 18 octobre 2007 à 16:53 +0100, Robert Jordan a écrit : Hubert FONGARNAND wrote: First Problem i've to disable myPane.AxisChange() because it crash mono with : [EMAIL PROTECTED] /tmp/TestZDGraph $ xsp --port 8090 xsp Listening on port: 8090 (non-secure) Listening on address: 0.0.0.0 Root directory: /tmp/TestZDGraph Hit Return to stop the server. X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 14 (X_GetGeometry) Resource id in failed request: 0x0 Serial number of failed request: 7 Current serial number in output stream: 7 Unsetting your DISPLAY variable might help. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] execv fails with error status 126
On 10/18/07 C S Vadiraj wrote: Here you go. Sorry for having missed it in my previous reply. [DllImport (libc)] private static extern int execv (string cmd, string[] args); execv (/tmp/myscript, (string[]) list.ToArray (typeof (string))); list is Array list with set of arguments. Not NULL terminated. And there is your error in your code. That answers also the question you made in your last email:) Read the man page, the array must be null-terminated. I have further error messages on this application which failed with mono 1.2.0 version too. Please fine it below. If you bind incorrectly to a dllimport method anything can happen. Fix the bug in your code and then report back if you have any issue in mono. Thanks. lupus -- - [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono, zedgraph and System.Drawing
Bonjour, In our applications which have to run on both Windows and Linux, we've been testing for a few weeks various graph libraries. Many if not all show minor differences between Windows and Linux, notably due to the different fonts used on both platforms. Zedgraph, that we tested, had a couple of issues on Mono. We did not solve them as we had to drop Zedgraph for its lack of 2,5D 3D capabilities. The solution we're likely to take is a commercial one, NetAdvantage, whose graphs look very close on both platforms (it's quite cheap but its drawback is that the designer itself only runs on Windows). Cordialement, Lionel Cuir ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono, zedgraph and System.Drawing
Bonjour! On Thu, 2007-10-18 at 18:51 +0200, Lionel Cuir wrote: Bonjour, In our applications which have to run on both Windows and Linux, we've been testing for a few weeks various graph libraries. Many if not all show minor differences between Windows and Linux, notably due to the different fonts used on both platforms. Zedgraph, that we tested, had a couple of issues on Mono. Please fill the bugs into bugzilla.novell.com as it could prove useful to others (and quite possibly to yourself too as the same bugs probbly affects other libraries too). We did not solve them as we had to drop Zedgraph for its lack of 2,5D 3D capabilities. The solution we're likely to take is a commercial one, NetAdvantage, whose graphs look very close on both platforms (it's quite cheap but its drawback is that the designer itself only runs on Windows). I'm happy to learn it works :) as I never tried this library myself. Dundas Charts also had great success running on both web and SWF demos (but it's been a while since I tested it myself). Cordialement, Lionel Cuir ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Silverlight/Moonlight questions
Hey Rolf thanks for replying! Rolf Bjarne Kvinge escribió: Hi, - As you guys have managed to make widgets for the desktop using Moonlight, could this be done also with Silverlight? I think so yes. There are Vista gadgets done with Silverlight somewhere. If yes, how one could do that from a normal .NET application that could call a Silverlight widget? I have no idea how the Vista gadgets are made, but one idea is to use the System.Windows.Forms.WebBrowser to embed a browser inside a desktop app. Hugh, but why launching whole browser core just to show a Silverlight widget? I would bet current moonlight gadgets don't launch gecko at all. Would this be cross-platform if you used on managed code? I ask this because here[1] you can see that Silverlight is only understood as a browser plugin, which I think it's incorrect, given the first assumption. In theory yes, but it's still a long way to go. [1] http://en.wikipedia.org/wiki/Microsoft_Silverlight - Is the moonlight designer already usable (it's called lunareclipse right?). I haven't tried it yet, so I don't know :) If yes, is there some page to download tarballs with it? No, you have to use SVN to get it. BTW, in a similar way as previous bullet: can lunareclipse be run from the desktop without a browser? Yes (it is a desktop application) Then, is it a Silverlight application that can save XAML files locally or is it a .NET application that launches the Silverlight lunareclupse widget and does the job of dealing with the OS also? If yes, can it be launched from Windows? No. It requires Moonlight, and Moonlight doesn't run on Windows. But, shouldn't it be done in a way that in Windows could be launched using Silverlight instead of Moonlight? Or from a .NET application? I ask this because, as I understand, Silverlight CLR runs in a Sandbox and thus it should not allow to write/read from disk, so then how can anyone save the contents made by lunareclipse in the home directory or whenever on the local computer? It is a .NET application already. Then, how this .NET application launches a Silverlight widget? Regards, Andrés [ knocte ] -- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Mono, zedgraph and System.Drawing
Bonjour Hubert, On Thu, 2007-10-18 at 17:47 +0200, Hubert FONGARNAND wrote: Hi, I thought that mono implementation of System.Drawing for .NET 1.1 was enough complete... I was wrong... It depends on what you require. Bugs apart there's a list of missing things on the Wiki: http://www.mono-project.com/Libgdiplus I need to generate some graph for our intranet and i've take a look on ZedGraph which is referenced on the mono website : I try a simple program : private void ZedGraphWeb1_RenderGraph(ZedGraph.Web.ZedGraphWeb webObject, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane) { GraphPane myPane=masterPane[0]; myPane.Title.Text = Nombre d'accès total mensuel; myPane.XAxis.Title.Text = ; myPane.YAxis.Title.Text = ; // Make up some random data points double[] y = { 10, 20, 40,10, 10 }; double[] y2 = { 70, 50, 85, 54, 63 }; string[] str = { Jan 2007, Fev 2007, Mar 2007, Avr 2007, Mai 2007 }; // Add a bar to the graph BarItem myCurve = myPane.AddBar( Curve 1, null, y, Color.White );// Access an image from a file (use your own filename here) // create a brush with the image myCurve.Bar.Fill = new Fill(new Color[]{Color.LightGray,Color.DarkGray}); // turn off the bar border myCurve.Bar.Border.IsVisible = true; myPane.XAxis.Scale.TextLabels = str; myPane.XAxis.Type = AxisType.Text; myPane.Legend.IsVisible = false; // Calculate the Axis Scale Ranges //myPane.AxisChange(); } } First Problem i've to disable myPane.AxisChange() because it crash mono with : [EMAIL PROTECTED] /tmp/TestZDGraph $ xsp --port 8090 xsp Listening on port: 8090 (non-secure) Listening on address: 0.0.0.0 Root directory: /tmp/TestZDGraph Hit Return to stop the server. X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 14 (X_GetGeometry) Resource id in failed request: 0x0 Serial number of failed request: 7 Current serial number in output stream: 7 And with myPane.AxisChange(); commented out : Here are the result of dotnet and mono output... MS.NET 1.1 Mono 1.2.5 (and mono 1.2.5 svn) PS : please note that the mono version is unusable because of the Y Axis... Could someone help me Please fill a bug at bugzilla.novell.com and include a small but complete (not just some code snippet) test case. Merci, Sebastien Thanks ___ Ce message et les éventuels documents joints peuvent contenir des informations confidentielles. Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] Marshaling booleans as U1
On 10/18/07, Paolo Molaro [EMAIL PROTECTED] wrote: You need to also add a test case to the test suite to exercise the new code. Here are the tests for my previous commit. OK to commit? -bill Index: mono/mono/tests/pinvoke2.cs === --- mono/mono/tests/pinvoke2.cs (revision 87787) +++ mono/mono/tests/pinvoke2.cs (working copy) @@ -157,6 +157,24 @@ [DllImport (libtest, EntryPoint=mono_test_marshal_bool_byref)] public static extern int mono_test_marshal_bool_byref (int a, ref bool b, int c); + [DllImport (libtest, EntryPoint=mono_test_marshal_bool_in_as_I1_U1)] + public static extern int mono_test_marshal_bool_in_as_I1 ([MarshalAs (UnmanagedType.I1)] bool bTrue, [MarshalAs (UnmanagedType.I1)] bool bFalse); + + [DllImport (libtest, EntryPoint=mono_test_marshal_bool_in_as_I1_U1)] + public static extern int mono_test_marshal_bool_in_as_U1 ([MarshalAs (UnmanagedType.U1)] bool bTrue, [MarshalAs (UnmanagedType.U1)] bool bFalse); + + [DllImport (libtest, EntryPoint=mono_test_marshal_bool_out_as_I1_U1)] + public static extern int mono_test_marshal_bool_out_as_I1 ([MarshalAs (UnmanagedType.I1)] out bool bTrue, [MarshalAs (UnmanagedType.I1)] out bool bFalse); + + [DllImport (libtest, EntryPoint=mono_test_marshal_bool_out_as_I1_U1)] + public static extern int mono_test_marshal_bool_out_as_U1 ([MarshalAs (UnmanagedType.U1)] out bool bTrue, [MarshalAs (UnmanagedType.U1)] out bool bFalse); + + [DllImport (libtest, EntryPoint=mono_test_marshal_bool_ref_as_I1_U1)] + public static extern int mono_test_marshal_bool_ref_as_I1 ([MarshalAs (UnmanagedType.I1)] ref bool bTrue, [MarshalAs (UnmanagedType.I1)] ref bool bFalse); + + [DllImport (libtest, EntryPoint=mono_test_marshal_bool_ref_as_I1_U1)] + public static extern int mono_test_marshal_bool_ref_as_U1 ([MarshalAs (UnmanagedType.U1)] ref bool bTrue, [MarshalAs (UnmanagedType.U1)] ref bool bFalse); + [DllImport (libtest, EntryPoint=mono_test_marshal_array)] public static extern int mono_test_marshal_array (int [] a1); @@ -619,6 +637,62 @@ return 0; } + public static int test_0_marshal_bool_as_I1 () { + + int ret; + bool bTrue, bFalse; + if ((ret = mono_test_marshal_bool_in_as_I1 (true, false)) != 0) + return ret; + + if ((ret = mono_test_marshal_bool_out_as_I1 (out bTrue, out bFalse)) != 0) + return ret; + + if(!bTrue) + return 10; + + if(bFalse) + return 11; + + if ((ret = mono_test_marshal_bool_ref_as_I1 (ref bTrue, ref bFalse)) != 0) + return ret; + + if(bTrue) + return 12; + + if(!bFalse) + return 13; + + return 0; + } + + public static int test_0_marshal_bool_as_U1 () { + + int ret; + bool bTrue, bFalse; + if ((ret = mono_test_marshal_bool_in_as_U1 (true, false)) != 0) + return ret; + + if ((ret = mono_test_marshal_bool_out_as_U1 (out bTrue, out bFalse)) != 0) + return ret; + + if(!bTrue) + return 10; + + if(bFalse) + return 11; + + if ((ret = mono_test_marshal_bool_ref_as_U1 (ref bTrue, ref bFalse)) != 0) + return ret; + + if(bTrue) + return 12; + + if(!bFalse) + return 13; + + return 0; + } + public static int test_0_return_vtype () { SimpleStruct ss = mono_test_return_vtype (new IntPtr (5)); Index: mono/mono/tests/ChangeLog === --- mono/mono/tests/ChangeLog (revision 87787) +++ mono/mono/tests/ChangeLog (working copy) @@ -1,3 +1,10 @@ +2007-10-18 William Holmes [EMAIL PROTECTED] + + * pinvoke2.cs, libtest.c Adding test cases for marshaling + booleans as I1 and U1. Tests commit r87725. + + Code is contributed under MIT/X11 license. + 2007-10-17 Mark Probst [EMAIL PROTECTED] * bug-331798-tb.2.cs: added for Rodrigo Index: mono/mono/tests/libtest.c === --- mono/mono/tests/libtest.c (revision 87787) +++ mono/mono/tests/libtest.c (working copy) @@ -252,6 +252,45 @@ return res; } +STDCALL int +mono_test_marshal_bool_in_as_I1_U1 (char bTrue, char bFalse) +{ + if (!bTrue) +return 1; + if (bFalse) +return 2; +return 0; +} + +STDCALL int +mono_test_marshal_bool_out_as_I1_U1 (char* bTrue, char* bFalse) +{ +if (!bTrue || !bFalse) + return 3; + + *bTrue = 1; + *bFalse = 0; + + return 0; +} + +STDCALL int +mono_test_marshal_bool_ref_as_I1_U1 (char* bTrue, char* bFalse) +{ + if (!bTrue || !bFalse) +return 4; + + if (!(*bTrue)) +return 5; +if (*bFalse) +return 6; + + *bFalse = 1; +*bTrue = 0; + + return 0; +} + STDCALL int mono_test_marshal_array (int *a1) { ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Silverlight/Moonlight questions
- Is the moonlight designer already usable (it's called lunareclipse right?). Sadly, no. If yes, is there some page to download tarballs with it? BTW, in a similar way as previous bullet: can lunareclipse be run from the desktop without a browser? Yes. If yes, can it be launched from Windows? No. Or from a .NET application? I No. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] win-4-i386 build hung
Builds are back up... The start times are in UTC on the webserver, but I try some javascript to make them local to the browser timezone. Wade On Wed, 2007-10-17 at 11:47 +0100, Andy Hume wrote: Err. Seems still running... http://mono.ximian.com/monobuild/python/monobuild.py/packagestatus?platf orm=win-4-i386package=monoHEAD_or_RELEASE=HEAD BTW is the start time reported in UTC or +4? Andy -Original Message- From: Wade Berrier [mailto:[EMAIL PROTECTED] Sent: 16 October 2007 22:58 To: Andy Hume Cc: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] win-4-i386 build hung I restarted it today... Thanks! Wade On Tue, 2007-10-16 at 09:13 +0100, Andy Hume wrote: It's still hung! install-deps inprogress [ Running for 1682 min(s) ] Can it be killed? Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Hume Sent: 15 October 2007 13:49 To: mono-devel-list@lists.ximian.com Subject: [Mono-dev] win-4-i386 build hung Looks like the win-4-i386 build is broken. It's been at install-deps for 517 mins. There log appears empty. (http://mono.ximian.com/monobuild/python/monobuild.py/packages tatus?platform=win-4-i386package=monoHEAD_or_RELEASE=HEAD) Should it/can it be killed? Andy ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Silverlight/Moonlight questions
-Original Message- From: Andrés G. Aragoneses [ knocte ] [mailto:[EMAIL PROTECTED] Sent: jueves, 18 de octubre de 2007 19:12 To: Rolf Bjarne Kvinge Cc: mono-devel-list@lists.ximian.com Subject: Re: Silverlight/Moonlight questions Hey Rolf thanks for replying! Rolf Bjarne Kvinge escribió: Hi, - As you guys have managed to make widgets for the desktop using Moonlight, could this be done also with Silverlight? I think so yes. There are Vista gadgets done with Silverlight somewhere. If yes, how one could do that from a normal .NET application that could call a Silverlight widget? I have no idea how the Vista gadgets are made, but one idea is to use the System.Windows.Forms.WebBrowser to embed a browser inside a desktop app. Hugh, but why launching whole browser core just to show a Silverlight widget? Maybe because there's no other way? I would bet current moonlight gadgets don't launch gecko at all. Of course not :) Would this be cross-platform if you used on managed code? I ask this because here[1] you can see that Silverlight is only understood as a browser plugin, which I think it's incorrect, given the first assumption. In theory yes, but it's still a long way to go. [1] http://en.wikipedia.org/wiki/Microsoft_Silverlight - Is the moonlight designer already usable (it's called lunareclipse right?). I haven't tried it yet, so I don't know :) If yes, is there some page to download tarballs with it? No, you have to use SVN to get it. BTW, in a similar way as previous bullet: can lunareclipse be run from the desktop without a browser? Yes (it is a desktop application) Then, is it a Silverlight application that can save XAML files locally or is it a .NET application that launches the Silverlight lunareclupse widget and does the job of dealing with the OS also? It's a .NET application with moonlight embedded. If yes, can it be launched from Windows? No. It requires Moonlight, and Moonlight doesn't run on Windows. But, shouldn't it be done in a way that in Windows could be launched using Silverlight instead of Moonlight? Lunareclipse uses pinvokes to call into moonlight, and that part isn't portable. Or from a .NET application? I ask this because, as I understand, Silverlight CLR runs in a Sandbox and thus it should not allow to write/read from disk, so then how can anyone save the contents made by lunareclipse in the home directory or whenever on the local computer? It is a .NET application already. Then, how this .NET application launches a Silverlight widget? Lunareclipse uses moonlight (which is just a native library) to draw the xaml in a window. That's all there is to it actually. Rolf Regards, Andrés [ knocte ] -- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] String.Split() broken behavior
Paolo, can you have a look at the revised patch? This should fix everything that was wrong with the previous version. Paolo Molaro wrote: --- mcs/class/corlib/System/String.cs (revision 87045) +++ mcs/class/corlib/System/String.cs (working copy) @@ -216,12 +216,11 @@ if (count == 1) return new String[1] { ToString() }; - return InternalSplit (separator, count); + return InternalSplit (separator, count, 0); } #if NET_2_0 [ComVisible (false)] - [MonoDocumentationNote (optimization)] Since the code is not optimized, please don't remove this. On the contrary, the code IS optimized, which is why I removed it that attribute. In fact, the original code, to which that attribute applied, is no longer even there. This is a fundamentally new implementation. In particular, the old code was a two-pass algorithm that scanned the string building an array of pieces, then scanned the array removing the empties. The new code is a single-pass algorithm that scans the string, building an array of pieces while leaving out the empties. The need for this optimization is exactly why the attribute was there to begin with. What the original author didn't know what that aside being inefficient, the original implementation also produced incorrect results. The optimization I wrote is also, therefore, a bugfix. @@ -2461,7 +2441,7 @@ private extern void InternalCopyTo (int sIndex, char[] dest, int destIndex, int count); [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern String[] InternalSplit (char[] separator, int count); + private extern String[] InternalSplit (char[] separator, int count, int options); A change in an icall signature requires a change to the corlib internal version. Fixed (I think). Please double-check my work and make sure I did it right. When the changes are made and the tests actually pass, since this is runtime code we need either an explicit signoff that the code is contributed under the X11 license or a copyright assignment. Sorry it took so long for the patch review. Thanks! lupus OK, then. This patch is hereby officially contributed under the X11 license. -Tyler Index: mcs/class/corlib/System/String.cs === --- mcs/class/corlib/System/String.cs (revision 87803) +++ mcs/class/corlib/System/String.cs (working copy) @@ -216,12 +216,11 @@ if (count == 1) return new String[1] { ToString() }; - return InternalSplit (separator, count); + return InternalSplit (separator, count, 0); } #if NET_2_0 [ComVisible (false)] - [MonoDocumentationNote (optimization)] public String[] Split (char[] separator, int count, StringSplitOptions options) { if (separator == null || separator.Length == 0) @@ -232,28 +231,9 @@ if ((options != StringSplitOptions.None) (options != StringSplitOptions.RemoveEmptyEntries)) throw new ArgumentException (options must be one of the values in the StringSplitOptions enumeration, options); - bool removeEmpty = (options StringSplitOptions.RemoveEmptyEntries) == StringSplitOptions.RemoveEmptyEntries; + if (count==0) return new String[0]; - if (!removeEmpty) -return Split (separator, count); - else { -/* FIXME: Optimize this */ -String[] res = Split (separator, count); -int n = 0; -for (int i = 0; i res.Length; ++i) - if (res [i] == String.Empty) - n ++; -if (n 0) { - String[] arr = new String [res.Length - n]; - int pos = 0; - for (int i = 0; i res.Length; ++i) - if (res [i] != String.Empty) - arr [pos ++] = res [i]; - return arr; -} -else - return res; - } + return InternalSplit (separator, count, (int) (options StringSplitOptions.RemoveEmptyEntries) ); } [ComVisible (false)] @@ -2461,7 +2441,7 @@ private extern void InternalCopyTo (int sIndex, char[] dest, int destIndex, int count); [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern String[] InternalSplit (char[] separator, int count); + private extern String[] InternalSplit (char[] separator, int count, int options); [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern String InternalTrim (char[] chars, int typ); Index: mcs/class/corlib/System/Environment.cs === --- mcs/class/corlib/System/Environment.cs (revision 87045) +++ mcs/class/corlib/System/Environment.cs (working copy) @@ -63,7 +63,7 @@ * Changes which are already detected at runtime, like the addition * of icalls, do not require an increment. */ - private const int mono_corlib_version = 58; + private const int mono_corlib_version = 59; public enum SpecialFolder { // TODO: Determine if these windoze style folder identifiers Index:
Re: [Mono-dev] FastCGI Mono Server
Great news since my host has FastCGI enabled. I am not expecting an ETA and am grateful you're working on it. I'll be a guinea pig when the time comes. :-) Robert Jordan wrote: Philippe Monnet wrote: I recently read with interest Brian Nickel's project during the Google Summer Of Code on FastCGI (see http://kerrick.wordpress.com/ and http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/doc/index.html). Especially since I am operating in a shared host with Apache 1.3. As such I cannot compile/install mod_mono into Apache (no access to headers / modules, etc.). Access to httpd.conf is not provided either, just .htaccess support. So mod_mono is out of reach for me. As is fastcgi in this case, unless it's already enabled by your provider. Is anyone on the core team looking to port / adapt some of his work? Or provide any other mechanism outside Apache modules? Are other users in the same situation too? I'm working on the integration of fastcgi-mono-server in Mono's build process, but I cannot give you an ETA for its landing other than "this month". Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list