Compare commits

...
1759 Commits
Author SHA1 Message Date
nobody 8d12301369 This commit was manufactured by cvs2svn to create tag 'MONO_0_23'.
svn path=/tags/MONO_0_23/mono/; revision=12327
2003-03-07 19:30:37 +00:00
Miguel de Icaza 2d3817802d 2003-03-07 Miguel de Icaza <[email protected]>
* class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
	fixing a warning for a miss-used prototype, would have cause
	random memory corruption.

svn path=/trunk/mono/; revision=12326
2003-03-07 19:30:37 +00:00
Miguel de Icaza 9685359e9f Add prototype
svn path=/trunk/mono/; revision=12325
2003-03-07 19:22:31 +00:00
Miguel de Icaza 815b0998c7 Add Windows.Forms back again
svn path=/trunk/mcs/; revision=12323
2003-03-07 19:22:12 +00:00
Alp Toker 32fe1cc2a2 Reference the newly-built PEAPI.dll
svn path=/trunk/mcs/; revision=12322
2003-03-07 19:19:08 +00:00
Gonzalo Paniagua Javier 0f62bbab30 2003-03-07 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: fixed bug #39280.

svn path=/trunk/mcs/; revision=12321
2003-03-07 18:47:04 +00:00
Gonzalo Paniagua Javier f5af57621e 2003-03-07 Gonzalo Paniagua Javier <[email protected]>
* StreamReaderTest.cs: added test for exception when the nase stream is
	closed. Make the reader.CurrentEncoding test work.

svn path=/trunk/mcs/; revision=12320
2003-03-07 18:45:08 +00:00
Miguel de Icaza a58b26be52 Prepare new release
svn path=/trunk/mono/; revision=12318
2003-03-07 18:11:46 +00:00
Miguel de Icaza 6bdff04c53 Prepare new release
svn path=/trunk/mcs/; revision=12318
2003-03-07 18:11:46 +00:00
Alp Toker 6e0bf6461e 2003-03-07 Alp Toker <[email protected]>
* makefile, makefile.gnu: reference PEAPI.dll instead of including
        PEAPI.cs

svn path=/trunk/mcs/; revision=12317
2003-03-07 18:10:43 +00:00
Martin Baulig 22a852a834 2003-03-07 Martin Baulig <[email protected]>
* debug-jit.c: #include <config.h>.

svn path=/trunk/mono/; revision=12315
2003-03-07 15:37:52 +00:00
Martin Baulig 4837d2aeda 2003-03-07 Martin Baulig <[email protected]>
* marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
	getting really annoying ....

svn path=/trunk/mono/; revision=12311
2003-03-07 14:46:24 +00:00
Dick Porter 5388febb0d Thread doc
svn path=/trunk/mono/; revision=12307
2003-03-07 14:26:53 +00:00
Dick Porter d8a85c658c Fix build
svn path=/trunk/mcs/; revision=12306
2003-03-07 14:20:57 +00:00
Paolo Molaro 7249a78449 Using make RUNTIME=something really works for all the modules now.
svn path=/trunk/mcs/; revision=12305
2003-03-07 12:13:50 +00:00
Zoltan Varga 4de19ff60d 2003-03-07 Zoltan Varga <[email protected]>
* reflection.c (fixup_method): added support for array methods.

svn path=/trunk/mono/; revision=12304
2003-03-07 11:28:33 +00:00
Jackson Harper 6cf1cd4875 * makefile, makefile.gnu: Add AssemblyInfo.cs to build
svn path=/trunk/mcs/; revision=12303
2003-03-07 07:21:25 +00:00
Jackson Harper 7c9c58a074 * AssemblyInfo.cs: Bump up version number, this new version is a major
structural change, PEAPI is now being used for code emission.

svn path=/trunk/mcs/; revision=12302
2003-03-07 07:18:22 +00:00
Jackson Harper 3745b4498a * makefile: add some tests
* test-5.il, test-6.il, test-7.il: New tests, test field declaration

svn path=/trunk/mcs/; revision=12301
2003-03-07 07:14:32 +00:00
Jackson Harper 70aa518b5b * codegen/ClassTable.cs: Add method to check for undefined types
* Driver.cs: Check that all types are defined before writing pe file

svn path=/trunk/mcs/; revision=12300
2003-03-07 07:09:27 +00:00
Jackson Harper 562bf06fac * ClassTable.cs: Return ClassDef when defining types
svn path=/trunk/mcs/; revision=12299
2003-03-07 06:50:07 +00:00
Jackson Harper a823dba480 * CodeGen.cs: Use class table for adding type definitions
svn path=/trunk/mcs/; revision=12298
2003-03-07 06:47:20 +00:00
Jackson Harper ad6f78a87a * ILParser.jay: Pass null Location when adding class, concat dottedName pieces
svn path=/trunk/mcs/; revision=12297
2003-03-07 06:42:40 +00:00
Gonzalo Paniagua Javier e8646f87f5 2003-03-07 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: readded mkdir -p behavior. Thanks to kiwnix for
	pointing it out.

svn path=/trunk/mcs/; revision=12296
2003-03-07 06:01:57 +00:00
Jackson Harper ea21a88cf5 changelog
svn path=/trunk/mcs/; revision=12295
2003-03-07 05:56:28 +00:00
Jackson Harper f5253e8cd2 * ClassTable.cs: Add method for adding class definitions to the
the table.

svn path=/trunk/mcs/; revision=12294
2003-03-07 05:54:37 +00:00
Jackson Harper f0467745ce * makefile, makefile.gnu: Include PEAPI.cs instead of linking to it, this fixes build but is not ideal.
svn path=/trunk/mcs/; revision=12293
2003-03-07 05:52:10 +00:00
Jackson Harper d7ab125adb * Driver.cs: Change a few calls to match new CodeGen
* makefile: Build with PEAPI
	* makefile.gnu: Build with PEAPI

svn path=/trunk/mcs/; revision=12288
2003-03-07 04:52:24 +00:00
Jackson Harper 1d402fd23b * ILParser.jay: Reconfigure to work with new PEAPI emission system
svn path=/trunk/mcs/; revision=12287
2003-03-07 04:47:20 +00:00
Jackson Harper 70308609be changelog
svn path=/trunk/mcs/; revision=12286
2003-03-07 04:44:34 +00:00
Jackson Harper b4137a6590 * CodeGen.cs: Reconfigure to work with new PEAPI emission system
svn path=/trunk/mcs/; revision=12285
2003-03-07 04:44:00 +00:00
Jackson Harper b99f1dfa0b * ClassTable.cs: Add file, this is a 'table' for storing classes
* Location.cs: Add file, this will eventually be used for marking
	locations in IL files

svn path=/trunk/mcs/; revision=12284
2003-03-07 04:40:00 +00:00
Gonzalo Paniagua Javier 70b2f8cb22 2003-03-07 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: implemented IDisposable, make the request stream
	read only. Changed the way of disposing the socket.

	* HttpWebResponse.cs: wrapped the socket in a write-only NetworkStream,
	handle chunked transfer encoding (no more hangs), added serialization
	stuff, call CheckDisposed at the beginning of methods/properties (not
	in a finally clause).

svn path=/trunk/mcs/; revision=12283
2003-03-07 04:21:25 +00:00
Jackson Harper 05bc7718e1 Forgot ChangeLog
svn path=/trunk/mcs/; revision=12282
2003-03-07 04:21:17 +00:00
Jackson Harper 58dc608f72 * makefile.gnu: Add PEAPI to the build
svn path=/trunk/mcs/; revision=12281
2003-03-07 04:20:41 +00:00
Jackson Harper 1b50e22003 * makefile.gnu: Add file
* list.unix: Add file

svn path=/trunk/mcs/; revision=12280
2003-03-07 04:17:45 +00:00
Jackson Harper 75e221ebc0 * PEAPI.cs: Do not add file extensions to output names
svn path=/trunk/mcs/; revision=12279
2003-03-07 04:17:02 +00:00
Sebastien Pouliot 18c931d4a4 2003-03-06 Sebastien Pouliot <[email protected]>
* list.unix: New. All C# files required to build the assembly.
	* makefile.gnu: New. Makefile to build the assembly under Linux.

svn path=/trunk/mcs/; revision=12278
2003-03-07 03:22:31 +00:00
Sebastien Pouliot 8d979f1d63 2003-03-06 Sebastien Pouliot <[email protected]>
* cert2spc.cs: Update to use the new PKCS7 class (from Mono.Security
	assembly) and AssemblyInfo.cs. Older version was located in /mcs/tools.
	* makefile: New. PROTOTYPE makefile (not tested) for Linux.
	* secutil.cs: Updated to use AssemblyInfo.cs. Older version was located
	in /mcs/tools.
	* sectools.build: New. NAnt build file to build all security tools.

svn path=/trunk/mcs/; revision=12277
2003-03-07 03:04:42 +00:00
Sebastien Pouliot 811c42fb59 2003-03-06 Sebastien Pouliot <[email protected]>
* library.build: added Mono.Security to build, test and clean.

svn path=/trunk/mcs/; revision=12276
2003-03-07 03:02:04 +00:00
Sebastien Pouliot d193ac5650 2003-03-06 Sebastien Pouliot <[email protected]>
* SoftwarePublisherCertificateTest.cs: New. Unit tests for
	using some SPC files generated by cert2spc.

svn path=/trunk/mcs/; revision=12275
2003-03-07 02:42:46 +00:00
Sebastien Pouliot ff27b5062d 2003-03-06 Sebastien Pouliot <[email protected]>
* Mono.Security_test.build: New. NAnt build file for unit tests.

svn path=/trunk/mcs/; revision=12274
2003-03-07 02:40:37 +00:00
Sebastien Pouliot fea6edcaa6 2003-03-06 Sebastien Pouliot <[email protected]>
* SoftwarePublisherCertificate.cs: New. Class to load or create
	SPC files (which are PKCS#7 files containing only certificates
	and CRL).

svn path=/trunk/mcs/; revision=12273
2003-03-07 02:33:43 +00:00
Sebastien Pouliot 10ca74767f 2003-03-06 Sebastien Pouliot <[email protected]>
* ASN1.cs: Updated ASN1 class (from corlib). This file will,
	eventually, be automagically synched with corlib.
	* ASN1Convert.cs: New. Helper class to convert from and to
	ASN1 structures.
	* PKCS7.cs: New. Basic implementation of CMS (Cryptographic
	Message Syntax Standard).

svn path=/trunk/mcs/; revision=12272
2003-03-07 02:32:12 +00:00
Sebastien Pouliot 7d059777c3 2003-03-06 Sebastien Pouliot <[email protected]>
* Mono.Security.build: New. NAnt build file.

svn path=/trunk/mcs/; revision=12271
2003-03-07 02:28:59 +00:00
Miguel de Icaza df1971778d Flush
svn path=/trunk/mono/; revision=12269
2003-03-07 00:31:30 +00:00
Sebastien Pouliot edd1a2ed03 2003-03-06 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: New. Global assembly attributes (version and
	  copyright) for security tools.
	* README: New. Important information about the Mono's security tools

svn path=/trunk/mcs/; revision=12268
2003-03-07 00:30:09 +00:00
Miguel de Icaza c9b36989e5 Flush
svn path=/trunk/mono/; revision=12267
2003-03-07 00:18:55 +00:00
Per Arneng 0ebd723f3d updated
svn path=/trunk/mcs/; revision=12266
2003-03-06 21:19:28 +00:00
Per Arneng ba2c0d13f4 Updated the changelog nd removed the obsolete SmtpMessage.cs
svn path=/trunk/mcs/; revision=12265
2003-03-06 21:16:58 +00:00
Per Arneng 065c9875d8 Added MailMessageWrapper to replace SmtpMessage
svn path=/trunk/mcs/; revision=12264
2003-03-06 21:13:04 +00:00
Gonzalo Paniagua Javier 23dc65d036 forgot this
svn path=/trunk/mcs/; revision=12262
2003-03-06 19:05:53 +00:00
Miguel de Icaza dc8fc64ad0 Flush
svn path=/trunk/mono/; revision=12260
2003-03-06 17:49:31 +00:00
Zoltan Varga c91733841b 2003-03-06 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Do not pop the arguments off the stack for
	ldftn etc. Fixes #39196.

svn path=/trunk/mcs/; revision=12258
2003-03-06 17:12:25 +00:00
Ville Palo 26b0823111 2003-03-06 Ville Palo <[email protected]>
* DataTableTest.cs: More tests for Select ()

svn path=/trunk/mcs/; revision=12257
2003-03-06 15:34:57 +00:00
Nick Drochak b2102cdaae 2003-03-06 Nick Drochak <[email protected]>
* TimeSpan.cs (Negate): Throw exception when value is MinValue.

svn path=/trunk/mcs/; revision=12256
2003-03-06 13:12:52 +00:00
Duncan Mak 7d910decd1 Release 0.22
svn path=/trunk/mono/; revision=12247
2003-03-06 04:55:01 +00:00
Duncan Mak 1ed76d1bd6 Forgot to commit before tagging for the release ;-(
svn path=/trunk/mcs/; revision=12246
2003-03-06 04:07:58 +00:00
Duncan Mak d840117172 Forgot to commit before my tag ;-(
svn path=/trunk/mono/; revision=12245
2003-03-06 04:07:05 +00:00
Aleksey Demakov 6701757fca *** empty log message ***
svn path=/trunk/mcs/; revision=12244
2003-03-06 02:22:49 +00:00
Miguel de Icaza 394fcbfa43 Add key file
svn path=/trunk/mcs/; revision=12243
2003-03-06 02:02:21 +00:00
Miguel de Icaza 1de5080573 2003-03-05 Miguel de Icaza <[email protected]>
* cfold.cs: Catch division by zero in modulus operator during
	constant folding.

svn path=/trunk/mcs/; revision=12242
2003-03-06 02:02:03 +00:00
Miguel de Icaza 8a84316e5f Streams
svn path=/trunk/mcs/; revision=12241
2003-03-06 01:19:14 +00:00
Miguel de Icaza ef0cdbc087 Flush
svn path=/trunk/mcs/; revision=12240
2003-03-06 01:18:27 +00:00
Miguel de Icaza e0dc4d545e Add Compression directory
svn path=/trunk/mcs/; revision=12239
2003-03-06 01:17:58 +00:00
Miguel de Icaza 46908626ab Add SharpZiplib
svn path=/trunk/mcs/; revision=12238
2003-03-06 01:17:10 +00:00
Miguel de Icaza 1e802f2552 release-o-rama preparations
svn path=/trunk/mono/; revision=12237
2003-03-06 00:04:37 +00:00
Gonzalo Paniagua Javier f3609d9a4f 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* ASCIIEncoding.cs: fixed bug #38984.

svn path=/trunk/mcs/; revision=12235
2003-03-05 23:45:51 +00:00
Gonzalo Paniagua Javier 5ea869194c 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* ASCIIEncodingTest.cs: added a couple of asserts fot zero-length
	arrays.

svn path=/trunk/mcs/; revision=12234
2003-03-05 23:40:43 +00:00
Gonzalo Paniagua Javier 8f389f0504 2003-03-05 Aleksey Demakov <[email protected]>
* ASCIIEncoding.cs:
	* Latin1Encoding.cs: fix GetString (byte[]) and
	GetString (byte[], int, int) for zero-length case.

svn path=/trunk/mcs/; revision=12233
2003-03-05 23:37:21 +00:00
Per Arneng cb9e18ec9d Added classes:
SmtpMessage - A more sofisticated mail container than MailMessage
	MailAddress - A class that represents a mail address
	MailAddressCollection - A collection of mail adresses

Theese classes where added to support the funtionality of serveral
recievers and Cc and Bcc. And also to ensure the format of the
address strings.

svn path=/trunk/mcs/; revision=12230
2003-03-05 21:26:26 +00:00
Miguel de Icaza b585e440d2 2003-03-05 Miguel de Icaza <[email protected]>
* category.cs (CategoryUtils.CategoryFromName): Use StartsWith
	("Is") instead of a substring for (0,2) which was throwing an
	exception causing Category.None to be returned

svn path=/trunk/mcs/; revision=12228
2003-03-05 20:28:45 +00:00
Miguel de Icaza 8ea6302fef Flush
svn path=/trunk/mono/; revision=12224
2003-03-05 20:01:31 +00:00
Alexandre Pigolkine c16696b4ac check in for Dennis Hayes, see ChangeLog
svn path=/trunk/mcs/; revision=12222
2003-03-05 19:18:52 +00:00
Dick Porter e2ec869918 2003-03-05 Dick Porter <[email protected]>
* MemoryStreamTest.cs: Some more tests

svn path=/trunk/mcs/; revision=12219
2003-03-05 15:25:18 +00:00
Dietmar Maurer b89e80ddd2 2003-03-05 Dietmar Maurer <[email protected]>
* monobitset.c (mono_bitset_set_all): impl.

svn path=/trunk/mono/; revision=12218
2003-03-05 14:47:51 +00:00
Martin Baulig 4f16b08e11 2003-03-05 Martin Baulig <[email protected]>
* debug-jit.c, debug-jit.h: New files.  Moved all JIT-specific
	stuff here.

	* debug.c (mono_debug_add_method): Moved to debug-jit.c.
	(mono_debug_handle, mono_debug_initialized): Made them global.
	(replace_suffix): Removed, this isn't used anymore.
	(record_line_number): Moved to debug-jit.c.
	(debug_generate_method_lines): Moved to debug-jit.c
	(generate_line_number): Renamed to
	_mono_debug_generate_line_number() and made it global.
	(debug_update_il_offsets): Moved to debug-jit.c
	(mono_debug_get_image): Renamed to _mono_debug_get_image() and made
	it global.
	(address_from_il_offset): Renamed to
	_mono_debug_address_from_il_offset() and made it global.
	(il_offset_from_position): Moved to debug-jit.c
	(lookup_method): Renamed to _mono_debug_lookup_method() and made
	it global.
	(mono_debug_add_method): Moved to debug-jit.c.
	(mono_debug_create_notification_function): Use two new functions
	mono_debug_codegen_breakpoint() and mono_debug_codegen_ret()
	instead of x86_breakpoint() and x86_ret().

svn path=/trunk/mono/; revision=12217
2003-03-05 13:08:39 +00:00
Gonzalo Paniagua Javier 8428d51a90 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs: general fixes and reformatted. Passes all tests in
	the new MemoryStreamTest.

svn path=/trunk/mcs/; revision=12213
2003-03-05 11:12:52 +00:00
Gonzalo Paniagua Javier 1d71da917c 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* MemoryStreamTest.cs: some nunit2 love. Added a bunch of new tests.

svn path=/trunk/mcs/; revision=12212
2003-03-05 11:06:42 +00:00
Paolo Molaro 7b9054aa4f Wed Mar 5 11:35:54 CET 2003 Paolo Molaro <[email protected]>
* monoresgen.cs: patch from Ian MacLean <[email protected]>
	to add the /compile option.

svn path=/trunk/mcs/; revision=12211
2003-03-05 10:40:28 +00:00
Gonzalo Paniagua Javier b89975d19e 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs: undo my bogus fix in ToArray. Allow GetBuffer and
	ToArray even after closing the stream.

svn path=/trunk/mcs/; revision=12204
2003-03-05 02:24:44 +00:00
Gonzalo Paniagua Javier 0cc2a5b351 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* Queue.cs: fixed bug #39046.

svn path=/trunk/mcs/; revision=12202
2003-03-05 00:17:19 +00:00
Sebastien Pouliot b837de481d 2003-03-04 Sebastien Pouliot <[email protected]>
* crypto: Updated crypto status and plan

svn path=/trunk/mono/; revision=12201
2003-03-04 23:39:06 +00:00
Sebastien Pouliot cf3674f046 2003-03-04 Sebastien Pouliot <[email protected]>
* System.Security.build: Added a new output System.Security_cmp.dll
	which links with mscorlib. This version is to be used to generate
	the class status web page (required for CorCompare).

svn path=/trunk/mcs/; revision=12200
2003-03-04 23:35:13 +00:00
Sebastien Pouliot bba3d6b99d 2003-03-04 Sebastien Pouliot <[email protected]>
* makefile: System.Security (corlib) class status now compared
	with System.Security_cmp.dll (mscorlib) as required for CorCompare.

svn path=/trunk/mono/; revision=12199
2003-03-04 23:33:56 +00:00
Gonzalo Paniagua Javier c5fad80d07 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* SqlException.cs: implemented GetObjectData ().

svn path=/trunk/mcs/; revision=12195
2003-03-04 20:47:52 +00:00
Gonzalo Paniagua Javier fd91897a61 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* Win32Exception.cs: implemented GetObjectData ().

svn path=/trunk/mcs/; revision=12194
2003-03-04 20:44:31 +00:00
Gonzalo Paniagua Javier a05736ef43 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* list.unix: added RunInstallerAttribute.cs
	* System.ComponentModel/RunInstallerAttribute.cs: New file.

svn path=/trunk/mcs/; revision=12193
2003-03-04 20:27:43 +00:00
Gonzalo Paniagua Javier 44d61c55f9 Added missing file
svn path=/trunk/mcs/; revision=12192
2003-03-04 20:13:17 +00:00
Rafael Teixeira 442bf03103 2003/03/04 Rafael Teixeira <[email protected]>
* mb-parser.jay: added rule for Imports with alias
	* mb-parser.jay: Friend (internal) modifier was missing,
					 Shared modifier was expecting Static token erroneously
					 Modules must accept only a static constructor rule added
					 Constant declaration rule added
	* makefile & makefile.gnu : actually run the compiled program on test target

svn path=/trunk/mcs/; revision=12191
2003-03-04 19:58:58 +00:00
Tim Coleman 193d88d82e 2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
		fix again

svn path=/trunk/mcs/; revision=12188
2003-03-04 19:29:38 +00:00
Tim Coleman ec3b48576b 2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/OciDefineHandle.cs :
	* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs :
	* System.Data.OracleClient.Oci/OciLobLocator.cs :
	* System.Data.OracleClient/OracleLob.cs :
		Fix win32 build

svn path=/trunk/mcs/; revision=12187
2003-03-04 19:27:36 +00:00
Atsushi Eno f6a5fc26b6 2003-03-05 Atsushi Enomoto <[email protected]>
* XmlDocumentFragment.cs, XmlElement.cs :
	  modified InnerXml (fragment type from Element to DocumentFragment).

	* XmlElement.cs : fixed WriteTo() ns check.
	* XmlNamespaceManager.cs : MS.NET allows Add() used two or more times.
	* XmlNode.cs : fixed ConstructNamespaceManager().

	* XmlConstructs.cs : added IsSpace, IsName, IsNameStart, IsNCName,
	  IsPubid with an int arg.
	* XmlReader.cs : changed to use XmlChar.cs (its role is as same as
	  XmlConstructs.cs).
	* XmlTextReader.cs :
	  improved error messages with line info.
	  / checking matching start and end tags.
	  / prevents the apperance of multiple root elements. (patch by Erik)
	  fixed and refactored ReadInnerXml() and ReadOuterXml()
	  changed to use XmlChar.cs.

	* XmlTextWriter.cs : changed to put element's xmlns at CloseStartTag ()
	  (It will help c14n implementation.)
	  / blocks multiple attribute output with element node.

svn path=/trunk/mcs/; revision=12186
2003-03-04 18:39:58 +00:00
Paolo Molaro 5b0dbd3c3f Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <[email protected]>
* socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
	(pointed out by Michael Adams).

svn path=/trunk/mono/; revision=12184
2003-03-04 17:08:50 +00:00
Gonzalo Paniagua Javier 307f7f0f90 use the freshly built mcs.exe
svn path=/trunk/mcs/; revision=12181
2003-03-04 15:31:23 +00:00
Tim Coleman 8c246fd3c7 2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/IOciDescriptorHandle.cs:
	* System.Data.OracleClient.Oci/IOciHandle.cs:
	* System.Data.OracleClient.Oci/OciDescriptorType.cs:
		Removed. These are no longer used.
	* System.Data.OracleClient.Oci/OciParameterDescriptor.cs:
		Add new class
	* list:
		Add System.Data.OracleClient.Oci/OciParameterDescriptor.cs
		Rem System.Data.OracleClient.Oci/IOciDescriptorHandle.cs
		Rem System.Data.OracleClient.Oci/IOciHandle.cs
		Rem System.Data.OracleClient.Oci/OciDescriptorType.cs
	* System.Data.OracleClient/OciGlue.cs:
		Move the OCIAttrGet* methods into OciHandle
	* System.Data.OracleClient/OracleDataReader.cs:
	* System.Data.OracleClient/OracleParameter.cs:
		Change the way that columns are bound and described
	* System.Data.OracleClient.Oci/OciBindHandle.cs:
	* System.Data.OracleClient.Oci/OciDefineHandle.cs:
	* System.Data.OracleClient.Oci/OciDescriptorHandle.cs:
	* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
	* System.Data.OracleClient.Oci/OciErrorHandle.cs:
	* System.Data.OracleClient.Oci/OciHandle.cs:
	* System.Data.OracleClient.Oci/OciLobLocator.cs:
	* System.Data.OracleClient.Oci/OciServerHandle.cs:
	* System.Data.OracleClient.Oci/OciServiceHandle.cs:
	* System.Data.OracleClient.Oci/OciSessionHandle.cs:
	* System.Data.OracleClient.Oci/OciStatementHandle.cs:
	* System.Data.OracleClient.Oci/OciTransactionHandle.cs:
		All handles now derive from OciHandle, and these classes
		have been rewritten as such.  Also attempted to implement
		the Dispose () methods for these classes.
	* System.Data.OracleClient.Oci/OciHandleType.cs:
		Add descriptor types into here because handles and
		descriptors are used in many of the same OCI functions.

svn path=/trunk/mcs/; revision=12176
2003-03-04 13:50:35 +00:00
Dick Porter 7efdf97a06 And the changelog
svn path=/trunk/mcs/; revision=12173
2003-03-04 12:56:00 +00:00
Dick Porter 24bb51445f 2003-03-04 Dick Porter <[email protected]>
* icall.c: Temporarily reverted the Double and Single ToString()
	change, because it broke nunit.

svn path=/trunk/mono/; revision=12172
2003-03-04 12:55:46 +00:00
Dick Porter 0230634cf9 2003-03-04 Dick Porter <[email protected]>
* Single.cs: Temporarily reverted the Double and Single ToString()
	change, because it broke nunit.

svn path=/trunk/mcs/; revision=12171
2003-03-04 12:52:51 +00:00
Paolo Molaro 3f3eaf781b Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <[email protected]>
* object.h, threads.h: make include files compatible with C++
	(patch by Jerome Laban <[email protected]>).

svn path=/trunk/mono/; revision=12168
2003-03-04 11:46:08 +00:00
Gonzalo Paniagua Javier a58d7e54e8 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* makefile:
	* class/library.build:
	* class/makefile.gnu: added Mono.Posix and System.Management.

svn path=/trunk/mcs/; revision=12167
2003-03-04 01:28:55 +00:00
Gonzalo Paniagua Javier 4db56925dc 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* HttpSessionState.cs: reworked to use SessionDictionary.
	* SessionDictionary.cs: implemented serialization/deserialization.

svn path=/trunk/mcs/; revision=12166
2003-03-04 01:23:51 +00:00
Tim Coleman a69be26d7d 2003-03-03 Tim Coleman <[email protected]>
* unix.args: Added
                System.Runtime.InteropServices/HandleRef.cs

svn path=/trunk/mcs/; revision=12165
2003-03-03 23:56:18 +00:00
Tim Coleman 78c4ae6e8e 2003-03-03 Tim Coleman <[email protected]>
* HandleRef.cs: Add this struct

svn path=/trunk/mcs/; revision=12164
2003-03-03 23:55:11 +00:00
Miguel de Icaza 77c3b5453b 2003-03-03 Miguel de Icaza <[email protected]>
* NameValueCollection.cs: Uncoment constructor, an old MCS bug
	prevented this from working.  Removed test for nullitude of col,
	as it would have aborted anyways on the dereference in the base
	constructor call.

svn path=/trunk/mcs/; revision=12163
2003-03-03 23:13:02 +00:00
Pedro Martínez Juliá 0e27d1f07a 2003-03-04 Pedro Mart�nez Juli� <[email protected]>
* Double.cs: Changed ToString method. Added NumberFormatInfo support
    with DoubleFormatter class.
    * Single.cs: Changed ToString method. Added NumberFormatInfo support
    with SingleFormatter class.
    * DoubleFormatter.cs: New class with Double formatting functions.
    * SingleFormatter.cs: New class with Single formatting functions.

svn path=/trunk/mono/; revision=12162
2003-03-03 23:02:31 +00:00
Pedro Martínez Juliá a11e947126 2003-03-04 Pedro Mart�nez Juli� <[email protected]>
* Double.cs: Changed ToString method. Added NumberFormatInfo support
    with DoubleFormatter class.
    * Single.cs: Changed ToString method. Added NumberFormatInfo support
    with SingleFormatter class.
    * DoubleFormatter.cs: New class with Double formatting functions.
    * SingleFormatter.cs: New class with Single formatting functions.

svn path=/trunk/mcs/; revision=12162
2003-03-03 23:02:31 +00:00
Sebastien Pouliot 1f51cf036a 2003-03-03 Sebastien Pouliot <[email protected]>
* RSACryptoServiceProvider.cs: Delay keypair generation event when
	keysize is a constructor parameter (major speed improvment when
	importing keys). Removed NotSupportedException when CspParameter is
	used in constructor (required for forthcoming security tools).

svn path=/trunk/mcs/; revision=12161
2003-03-03 22:55:21 +00:00
Sebastien Pouliot 96e4254985 2003-03-03 Sebastien Pouliot <[email protected]>
* XmlDsigBase64TransformTest.cs: Simplified some parts when fixing
	XPath test.

svn path=/trunk/mcs/; revision=12160
2003-03-03 22:46:24 +00:00
Sebastien Pouliot 15e8f4607c 2003-03-03 Sebastien Pouliot <[email protected]>
* System.Security_test.build: Updated build file to stop linking
	with MS assemblies (and like with Mono's corlib instead).

svn path=/trunk/mcs/; revision=12159
2003-03-03 22:44:33 +00:00
Sebastien Pouliot 8aeb1c2772 2003-03-03 Sebastien Pouliot <[email protected]>
* DSAKeyValue.cs: Added patch from Atsushi Eno (to remove string
	XML generation).
	* RSAKeyValue.cs: Added patch from Atsushi Eno (to remove string
	XML generation).
	* XmlDsigBase64Transform.cs: Fixed problem when using XPath.

svn path=/trunk/mcs/; revision=12158
2003-03-03 22:43:28 +00:00
Sebastien Pouliot ef46767f99 2003-03-03 Sebastien Pouliot <[email protected]>
* System.Security.build: Updated build file to stop linking with
	MS assemblies (and like with Mono's corlib instead).

svn path=/trunk/mcs/; revision=12157
2003-03-03 22:42:35 +00:00
Jean-Marc Andre 7f67f25643 2003-03-03 Jean-Marc Andre <[email protected]>
* RemotingServicesTest.cs: New unit test added

svn path=/trunk/mcs/; revision=12156
2003-03-03 21:24:31 +00:00
Miguel de Icaza 89a1c3131a 2003-03-03 Miguel de Icaza <[email protected]>
* interface.cs (Interface.DefineMembers): Avoid defining members
	twice.

svn path=/trunk/mcs/; revision=12152
2003-03-03 19:54:34 +00:00
Paolo Molaro 280ba73ac7 Speeling.
svn path=/trunk/mono/; revision=12151
2003-03-03 19:14:54 +00:00
Gonzalo Paniagua Javier 3a14f3caf3 New assembly and new class.
svn path=/trunk/mcs/; revision=12150
2003-03-03 19:10:00 +00:00
Paolo Molaro 14fdc4cc45 New entry.
svn path=/trunk/mono/; revision=12148
2003-03-03 17:51:20 +00:00
Lluis Sanchez 87e33fb506 Added IContributeDynamicSink.cs, IContributeEnvoySink.cs, IContributeObjectSink.cs
svn path=/trunk/mcs/; revision=12145
2003-03-03 17:16:13 +00:00
Lluis Sanchez 67f0439956 Added ContextAttribute.cs
svn path=/trunk/mcs/; revision=12144
2003-03-03 16:57:58 +00:00
Lluis Sanchez e84f2a9426 Added UrlAttribute.cs
svn path=/trunk/mcs/; revision=12143
2003-03-03 16:54:15 +00:00
Lluis Sanchez 07f0b96bc0 * unix.args: added ConstructionLevelActivator.cs, ContextLevelActivator.cs,
RemoteActivationAttribute.cs

svn path=/trunk/mcs/; revision=12142
2003-03-03 16:45:02 +00:00
Lluis Sanchez 21a8a1c413 * Thread.cs: Changed implementation of CurrentContext, adapted to the changes
in the runtime.

svn path=/trunk/mcs/; revision=12141
2003-03-03 16:44:10 +00:00
Lluis Sanchez 6f0ebcd9a5 * ProxyAttribute.cs: Implemented.
* RealProxy.cs: Added stubs for some missing methods.
	* RemotingProxy.cs: The activation constructor now creates the ConstructionCall
	  message and collects the context properties.
	  Activation of objects now use IActivator instances.

svn path=/trunk/mcs/; revision=12140
2003-03-03 16:42:50 +00:00
Lluis Sanchez ca2024d4b8 * ConstructionCall.cs: Added internal constructor. Added setter for activation attributes.
Some other minor corrections.
	* EnvoyTerminatorSink.cs: Message now redirected to current context's client sink chain.
	* MethodCall.cs: Added method for copying messages.

svn path=/trunk/mcs/; revision=12139
2003-03-03 16:42:17 +00:00
Lluis Sanchez d0ee41d86a * LeaseManager.cs: Added method for removing an object from the lease manager.
* LifetimeServices.cs: Added method for removing an object from the lease manager.

svn path=/trunk/mcs/; revision=12138
2003-03-03 16:41:36 +00:00
Lluis Sanchez ceb4b2a9b2 * Contexts.cs : Management of the default context moved to the runtime.
Implemented creation of the client context, server context, object and envoy sinks.
	  Added method for creating a new context.
	* CrossContextChannel.cs : Removed check for construction messages. Now construction
	  go through the IActivators.

svn path=/trunk/mcs/; revision=12137
2003-03-03 16:41:06 +00:00
Lluis Sanchez ae2aa396a8 * ChannelServices.cs: Minor corrections.
* CrossAppDomainChannel.cs: Context is now restored when exiting the domain.

svn path=/trunk/mcs/; revision=12136
2003-03-03 16:40:35 +00:00
Lluis Sanchez 42a1ccef13 * ActivationServices.cs: Added method for creating a proxy from a list
of activation attributes. This is used by System.Activator.
	  Added method for creating a ConstructionCall from a list of activation attributes.
	  This is used from RemotingProxy.
	* ConstructionLevelActivator.cs: Added. Implements an IActivator that constructs an object.
	* ContextLevelActivator.cs: Added. Implements an IActivator that constructs a context.
	* RemoteActivationAttribute.cs: Added.
	* RemoteActivator.cs: Used RemoteActivationAttribute in the creation of the server object.
	* UrlAttribute.cs: Removed some "throw new NotImplementedException ()".

svn path=/trunk/mcs/; revision=12135
2003-03-03 16:39:42 +00:00
Lluis Sanchez d521b3e35c * Identity.cs: Added property to check if an identity is connected (it is remotely accesible)
* ObjRef.cs: Added internal helper method for getting the server type of an ObjRef.
	* RemotingServices.cs: Implemented Disconnect method. Added support for custom proxy
	  creating using ProxyAttribute. Added support for activation attributes in creation
	  of proxies. Some other minor corrections.
	* ServerIdentity.cs: minor corrections.

svn path=/trunk/mcs/; revision=12134
2003-03-03 16:39:13 +00:00
Rafael Teixeira 5e05883f3a 2003/03/03 Rafael Teixeira <[email protected]>
* mb-tokenizer.cs : new semi-keywords: Compare, Explicit, Strict, On, Off, Binary, Text
	* mb-parser.jay: tokens for above semi-keywords, and rules for option directives
	* driver.cs: integrates command line options with parser flags for option directives
	* makefile & makefile.gnu : added 'verbose' target that uses --verbose switch to compile 
	  the test source and pipes it through 'less', also added a Extended Syntax source

svn path=/trunk/mcs/; revision=12133
2003-03-03 16:39:09 +00:00
Lluis Sanchez 638444081f * Activator.cs: Added support for activation using activation attributes.
* AppDomain.cs: Added internal method to get the default context from the runtime.

svn path=/trunk/mcs/; revision=12132
2003-03-03 16:38:21 +00:00
Lluis Sanchez fdda64a77a * appdomain.c: Added method for initializing the default context of
a domain. Added internal call for getting the default context.
	* appdomain.h: Added context variable in MonoDomain struct.
	* domain.c: mono_domain_set also sets the default context of the domain
	* icall.c: Mapped internal method InternalGetDefaultContext.
	* object.c: mono_object_get_virtual_method returns always a remoting
	wrapper if the object is a transparent proxy.
	mono_runtime_invoke_array: when creating an object by calling the
	constructor, if the created object is a proxy, then the constructor should
	be called using the a remoting wrapper.

svn path=/trunk/mono/; revision=12131
2003-03-03 16:35:22 +00:00
Dick Porter 3420a036b9 2003-03-03 Dick Porter <[email protected]>
* io.c (CreateFile): Try opening directories readonly, so that
	timestamps can be adjusted.  Patch by Elan Feingold
	<[email protected]>.

svn path=/trunk/mono/; revision=12121
2003-03-03 13:23:20 +00:00
Dick Porter 86593032da 2003-03-03 Dick Porter <[email protected]>
* socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
	variable so it compiles on solaris.  Problem spotted by
	Christopher Taylor <[email protected]>

svn path=/trunk/mono/; revision=12120
2003-03-03 13:19:26 +00:00
Gonzalo Paniagua Javier 054a3a3368 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added default sessionState section and handler.

svn path=/trunk/mono/; revision=12119
2003-03-03 12:23:11 +00:00
Gonzalo Paniagua Javier 2342462642 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* list: added SessionConfig.cs and SessionStateSectionHandler.cs

	* System.Web/HttpHelper.cs: store the values in an ArrayList to get
	them in correct order.

	* System.Web.Configuration/ModuleItem.cs: it's not public.
	* System.Web.Configuration/ModulesConfiguration.cs: it's not public.

	* System.Web.SessionState/SessionConfig.cs:
	* System.Web.SessionState/SessionStateSectionHandler.cs: new files to
	read <sessionState> configuration.

svn path=/trunk/mcs/; revision=12118
2003-03-03 12:21:34 +00:00
Gonzalo Paniagua Javier 1727ec736b 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs:
	(Move): don't use File.Move.

	* DirectoryInfo.cs: fixed Name property.

	Fixes bug #37755.

svn path=/trunk/mcs/; revision=12116
2003-03-03 10:33:05 +00:00
Nick Drochak 66b156e640 2003-03-03 Nick Drochak <[email protected]>
* StringTest.cs: Catch exception the .NET docs say should not be thrown

svn path=/trunk/mcs/; revision=12115
2003-03-03 09:25:57 +00:00
Jackson Harper f4575fd229 * PEAPI.cs: Add file
* README.txt: Add file

svn path=/trunk/mcs/; revision=12113
2003-03-03 00:29:47 +00:00
Jackson Harper 3eb9288a4c Add PEAPI directory
svn path=/trunk/mcs/; revision=12112
2003-03-03 00:27:40 +00:00
Gonzalo Paniagua Javier c6b2a68290 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs:
	(SendTo): fix from Jerome Laban <[email protected]>.

svn path=/trunk/mcs/; revision=12111
2003-03-03 00:12:24 +00:00
Miguel de Icaza cc1640ad2a Fix typo
svn path=/trunk/mcs/; revision=12110
2003-03-02 23:00:30 +00:00
Miguel de Icaza c4c409cc20 flush
svn path=/trunk/mono/; revision=12109
2003-03-02 22:54:56 +00:00
Miguel de Icaza c15b0b5e01 Flushety flush
svn path=/trunk/mono/; revision=12108
2003-03-02 22:26:59 +00:00
Miguel de Icaza b459bf6d1e Flush Flush
svn path=/trunk/mono/; revision=12106
2003-03-02 21:15:44 +00:00
Gonzalo Paniagua Javier 875ad2454d 2003-03-02 Gonzalo Paniagua Javier <[email protected]>
* DirectoryInfo.cs: changed ToString to match MS behavior.
	* Path.cs: further fixes to GetDirectoryName to return null in the
	same cases that MS does.

	Fixes bug #38387.

svn path=/trunk/mcs/; revision=12105
2003-03-02 17:18:51 +00:00
Gonzalo Paniagua Javier d4182fdfac 2003-03-02 Gonzalo Paniagua Javier <[email protected]>
* Path.cs: fixed a couple of bugs reported in #35906.

svn path=/trunk/mcs/; revision=12104
2003-03-02 16:42:52 +00:00
Sebastien Pouliot a89d081fef 2003-03-02 Sebastien Pouliot <[email protected]>
* list.unix: Added XmlSignature.cs.

svn path=/trunk/mcs/; revision=12103
2003-03-02 16:13:14 +00:00
Gonzalo Paniagua Javier 01a8a4e3cb 2003-03-02 Gonzalo Paniagua Javier <[email protected]>
* AppSettingsReader.cs: fixed bug #38755.

svn path=/trunk/mcs/; revision=12102
2003-03-02 16:12:55 +00:00
Sebastien Pouliot 18e37330b6 2003-03-02 Sebastien Pouliot <[email protected]>
* KeyInfoNameTest.cs: Better naming.
	* KeyInfoRetrievalMethodTest.cs: Splitted a test.

svn path=/trunk/mcs/; revision=12101
2003-03-02 16:12:33 +00:00
Sebastien Pouliot 2d91f6724f 2003-03-02 Sebastien Pouliot <[email protected]>
* DSAKeyValue.cs: New XML generation is commented. Old string technique
	did a better job to match MS implementation.
	* DataObject.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfo.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoName.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoNode.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoRetrievalMethod.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoX509Data.cs: Replaced XML generation from StringBuilder to XmlElement.
	* RSAKeyValue.cs: New XML generation is commented. Old string technique
	did a better job to match MS implementation.
	* Reference.cs: Replaced XML generation from StringBuilder to XmlElement.
	* Signature.cs: Replaced XML generation from StringBuilder to XmlElement.
	* SignedInfo.cs: Replaced XML generation from StringBuilder to XmlElement.
	* SignedXml.cs: Replaced XML generation from StringBuilder to XmlElement.
	* Transform.cs: Replaced XML generation from StringBuilder to XmlElement.
	* XmlDsigEnvelopedSignatureTransform.cs: Added missing Algorithm URL.
	* XmlDsigXPathTransform.cs: Added missing Algorithm URL.
	* XmlSignature.cs: New. Private contants (construct similar to WSE).

svn path=/trunk/mcs/; revision=12100
2003-03-02 16:09:19 +00:00
Alexandre Pigolkine edde6cf456 checkin for Dennis Hayes, see changeLog for details
svn path=/trunk/mcs/; revision=12099
2003-03-02 09:12:37 +00:00
Sebastien Pouliot a2bdd1500f 2003-03-01 Sebastien Pouliot <[email protected]>
* PKCS1.cs: Fix for some (lame) PKCS1 v1.5 signatures done
	without specifying an OID.

svn path=/trunk/mcs/; revision=12097
2003-03-01 22:29:49 +00:00
Alexandre Pigolkine 9e7d9a15bd see ChangeLog for details
svn path=/trunk/mcs/; revision=12096
2003-03-01 22:24:20 +00:00
Alexandre Pigolkine ba55638ad6 see ChangeLog for details
svn path=/trunk/mcs/; revision=12092
2003-03-01 21:20:31 +00:00
Sebastien Pouliot 4926072584 2003-03-01 Sebastien Pouliot <[email protected]>
* X509CertificateCollection.cs: Fixed bugs in AddRange
	(added the collection not the certificates in the collection).

svn path=/trunk/mcs/; revision=12091
2003-03-01 21:16:05 +00:00
Alexandre Pigolkine 949c372713 added stubs to compile SWF
svn path=/trunk/mcs/; revision=12090
2003-03-01 20:49:10 +00:00
Gonzalo Paniagua Javier 37659d83e3 the cvsroot's been changed to 'mono'
svn path=/trunk/mono/; revision=12089
2003-03-01 19:41:41 +00:00
Miguel de Icaza 980892ae50 Fix from Gonz
svn path=/trunk/mcs/; revision=12088
2003-03-01 19:40:35 +00:00
Jackson Harper 00d6b70cf6 * Image.cs: Write Metadata root
svn path=/trunk/mcs/; revision=12087
2003-03-01 19:27:35 +00:00
Jackson Harper 5ea6e1b9fc * MDStream.cs: Add methods to write metadata streams
svn path=/trunk/mcs/; revision=12086
2003-03-01 19:21:03 +00:00
Gonzalo Paniagua Javier c8ed8a5d53 2003-03-01 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c:
	(get_info_from_assembly_name): don't leak value.

	* icall.c:
	(ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
	result.

svn path=/trunk/mono/; revision=12085
2003-03-01 19:19:58 +00:00
Miguel de Icaza 946769ee24 Patch from Aleksey Ryabchuk <[email protected]>
svn path=/trunk/mcs/; revision=12084
2003-03-01 19:13:08 +00:00
Gonzalo Paniagua Javier 3472c164c3 2003-03-01 Gonzalo Paniagua Javier <[email protected]>
* unix.args: added ModuleResolveEventHandler.cs

	* System.Reflection/Assembly.cs: added missing stuff. Only ModuleResolve
	event is left out to avoid changing MonoReflectionAssembly by now.
	* System.Reflection/ModuleResolveEventHandler.cs: delegate.

svn path=/trunk/mcs/; revision=12083
2003-03-01 18:57:54 +00:00
Jackson Harper d036dd6f19 * MetaDataRoot.cs: Add method to write Metadata
svn path=/trunk/mcs/; revision=12082
2003-03-01 18:54:54 +00:00
Gonzalo Paniagua Javier 9b9cbe14c1 2003-03-01 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: fixed bugs #38939 and #38940. No need for separate
	unix/windows/unc shares code paths.

svn path=/trunk/mcs/; revision=12081
2003-03-01 17:32:30 +00:00
Gonzalo Paniagua Javier 065279f2be documented MONO_CFG_DIR environment variable
svn path=/trunk/mono/; revision=12080
2003-03-01 16:02:36 +00:00
Paolo Molaro aa392b5f39 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <[email protected]>
* assembly.c: export mono_image_load_references ().
	* class.c: handle function pointers. mono_class_from_name() now
	supports nested type names directly.

svn path=/trunk/mono/; revision=12079
2003-03-01 14:38:59 +00:00
Paolo Molaro 5fc61b3a3b Sat Mar 1 12:36:45 CET 2003 Paolo Molaro <[email protected]>
* jit.c: remove unnecessary assert when inlining.

svn path=/trunk/mono/; revision=12075
2003-03-01 11:40:46 +00:00
Miguel de Icaza fbcf51142f Flush
svn path=/trunk/mono/; revision=12069
2003-02-28 20:08:10 +00:00
Zoltan Varga 53f7fd7b57 2003-02-28 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Add fixup for already created methods and
	fields. Do not add fixup for types since their table index do not
	change any more.

svn path=/trunk/mcs/; revision=12067
2003-02-28 18:41:17 +00:00
Zoltan Varga eb4a498e41 2003-02-28 Zoltan Varga <[email protected]>
* reflection.h reflection.c: Encode already created dynamic methods
	and fields correctly as a DEF instead of a REF.

	* reflection.c: Get rid of the force_ref argument to
	mono_image_typedef_or_ref since it was wrong in the first place.

svn path=/trunk/mono/; revision=12066
2003-02-28 18:36:47 +00:00
Zoltan Varga fd41207b81 2003-02-28 Zoltan Varga <[email protected]>
* StringTest.cs: added String constructor tests.

svn path=/trunk/mcs/; revision=12064
2003-02-28 16:25:03 +00:00
Zoltan Varga 6e9001f1e2 2003-02-28 Zoltan Varga <[email protected]>
* string-icalls.c: add error checking to string constructors according
	to the MSDN docs.

svn path=/trunk/mono/; revision=12063
2003-02-28 16:24:03 +00:00
Zoltan Varga 14f6bf0594 2003-02-28 Zoltan Varga <[email protected]>
* reflection.c: Emit types in the order their TypeBuilders were
	created. Previously, a new table index was assigned to each type before
	the tables were emitted. This was wrong because the signature blob
	might already refer to a type by its original table index.

svn path=/trunk/mono/; revision=12062
2003-02-28 15:24:37 +00:00
Gonzalo Paniagua Javier 3ca2ba376e added 3 missing assemblies for windows install target
svn path=/trunk/mcs/; revision=12061
2003-02-28 14:51:49 +00:00
Per Arneng f4c01192b0 Updated with a change to the parsing code. some servers
send 200-xxxxx instead of 200 xxxxxx. Thnx Elan Feingold

svn path=/trunk/mcs/; revision=12059
2003-02-28 10:55:57 +00:00
Reggie Burnett dd52b9a794 * Added several external functions to Win32funcs.cs
* Added necessary LoadLibrary to RichTextEdit to load common control library

svn path=/trunk/mcs/; revision=12058
2003-02-28 08:43:13 +00:00
Aleksey Demakov 658b2bb4a2 *** empty log message ***
svn path=/trunk/mcs/; revision=12057
2003-02-28 08:39:18 +00:00
Gonzalo Paniagua Javier dcc8dfb3af 2003-02-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: patch from Elan Feingold <[email protected]>. Fixes
	NullReferenceException when the callback is null.

svn path=/trunk/mcs/; revision=12056
2003-02-28 08:00:46 +00:00
Christopher Bockner d670275678 Removed the unsafe dependencies from the driver.
svn path=/trunk/mcs/; revision=12049
2003-02-28 03:48:13 +00:00
Miguel de Icaza 0b975bbbb3 update release page
svn path=/trunk/mono/; revision=12048
2003-02-27 23:13:33 +00:00
Miguel de Icaza 8df3cb190c bump
svn path=/trunk/mcs/; revision=12046
2003-02-27 22:22:37 +00:00
Miguel de Icaza f74ec6eee5 Bump
svn path=/trunk/mono/; revision=12044
2003-02-27 22:22:27 +00:00
Zoltan Varga 308a67b9c3 2003-02-27 Zoltan Varga <[email protected]>
* metadata.c (mono_metadata_nesting_typedef): fix bug in previous
	change.

svn path=/trunk/mono/; revision=12042
2003-02-27 20:30:36 +00:00
Ville Palo aacbfb8210 2003-02-28 Ville Palo <[email protected]>
* DataColumnCollectionTest.cs: Added more tests.
	* DataRowCollectionTest.cs: Added more tests.

svn path=/trunk/mcs/; revision=12041
2003-02-27 20:29:14 +00:00
Gonzalo Paniagua Javier 3ec6689a51 oops. Thanks to danmorg for pointing this out.
svn path=/trunk/mono/; revision=12040
2003-02-27 20:21:04 +00:00
Ville Palo bb6ef3268f 2003-02-28 Ville Palo <[email protected]>
* ExpressionElement.cs: More implementation.

svn path=/trunk/mcs/; revision=12039
2003-02-27 20:14:36 +00:00
Alan Tam dc0812150d 2003-02-28 Elan Feingold <[email protected]>
* DateTime.cs: FileTime is expressed in Universal time, and as such must
	be converted before subtracting the magic offset.
	* DateTime.cs: Strings in the format "2003-02-27T10:05:03-11:00" (note
	the timezone at the end) *must* be parsed by DateTime.Parse() for
	compatibility with Microsoft.

svn path=/trunk/mcs/; revision=12038
2003-02-27 20:01:32 +00:00
Miguel de Icaza ad4821f26a 2003-02-27 Miguel de Icaza <[email protected]>
* driver.cs: handle the +/- options for -noconfig

svn path=/trunk/mcs/; revision=12037
2003-02-27 19:48:17 +00:00
Gonzalo Paniagua Javier eaf0aa7fbe 2003-02-27 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am: make assemblies dir have \ instead of / on windows.

svn path=/trunk/mono/; revision=12036
2003-02-27 19:46:51 +00:00
Zoltan Varga 89d747ea99 2003-02-27 Zoltan Varga <[email protected]>
* metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
	iterate over the NESTEDCLASS table using a linear search since the
	table is not guaranteed to be sorted by the secondary key.

	* class.c (mono_class_create_from_typedef): fixed up call to
	mono_metadata_nesting_typedef.

svn path=/trunk/mono/; revision=12035
2003-02-27 19:06:41 +00:00
Miguel de Icaza ca97f02e5c 2003-02-27 Miguel de Icaza <[email protected]>
* statement.cs (Unchecked.Resolve): Also track the state in the Resolve phase.

svn path=/trunk/mcs/; revision=12034
2003-02-27 18:59:06 +00:00
Miguel de Icaza af43004774 Flush
svn path=/trunk/mono/; revision=12033
2003-02-27 17:41:42 +00:00
Alan Tam 6d9d8d4224 2003-02-28 Alan Tam <[email protected]>
* DataSet.cs: Changed WriteTable so that it now calls the newly written
        WriteObjectXml to direct the call to the respective XmlConvert method.
        This fixes the wrong format written to XML files of bool, float,
        double, DateTime and TimeSpan types.

svn path=/trunk/mcs/; revision=12032
2003-02-27 17:18:05 +00:00
Alan Tam f8abecbb7f 2003-02-28 Alan Tam <[email protected]>
* XmlConvert.cs: fixed the most ToXXX(string) and ToString(XXX)
        methods to make them compatible with the XML Schema Spec from W3C
        ToString(TimeSpan) is still outstanding

svn path=/trunk/mcs/; revision=12031
2003-02-27 17:11:41 +00:00
Gonzalo Paniagua Javier 3786083fc6 2003-02-27 Gonzalo Paniagua Javier <[email protected]>
* File.cs: fix by Elan Feingold <[email protected]> for
	SetCreationTime, SetLastAccessTime and SetLastWriteTime.

svn path=/trunk/mcs/; revision=12029
2003-02-27 16:20:24 +00:00
Martin Baulig a56a1a0f39 2003-02-27 Martin Baulig <[email protected]>
* ecore.cs (Expression.MemberLookup): Don't create a
	MethodGroupExpr for something which is not a method.  Fixes #38291.

svn path=/trunk/mcs/; revision=12027
2003-02-27 14:21:50 +00:00
Dietmar Maurer 5844cd840c added class init test from zoltan
svn path=/trunk/mono/; revision=12025
2003-02-27 11:56:34 +00:00
Dietmar Maurer 63f894376b new test
svn path=/trunk/mono/; revision=12024
2003-02-27 11:52:55 +00:00
Dietmar Maurer d808f4cd2c 2003-02-27 Dietmar Maurer <[email protected]>
* marshal.c (mono_string_to_byvalstr): clear the memory as
	suggested by Jerome Laban <[email protected]>

svn path=/trunk/mono/; revision=12023
2003-02-27 11:41:40 +00:00
Tim Coleman 47cbf3c66b 2003-02-26 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleConnection.cs:
		Rollback transactions when connection closes if they
		are open.
	* System.Data.OracleClient/OracleDataReader.cs:
		Implement GetOracleLob ()
	* System.Data.OracleClient/OracleLob.cs:
		Implement some of the details, like Read/Write/Seek
	* System.Data.OracleClient.Oci/OciBindHandle.cs:
		Remove debug message.
	* System.Data.OracleClient.Oci/OciDefineHandle.cs:
		Add LOB support.
	* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
		Minor formatting changes
	* System.Data.OracleClient.Oci/OciLobLocator.cs:
		Huge amounts of code to make it work.  Lots of ugly
		OCI P/Invoke code.
	* Test/TestOracleClient.cs:
		Improve the LOBTest.

svn path=/trunk/mcs/; revision=12021
2003-02-27 05:20:06 +00:00
Gonzalo Paniagua Javier 6ff5c436a3 2003-02-27 Gonzalo Paniagua Javier <[email protected]>
* AuthenticationConfigHandler.cs: 'name' is optional in <forms>.

svn path=/trunk/mcs/; revision=12019
2003-02-27 03:48:36 +00:00
Gonzalo Paniagua Javier 029b4e1fce 2003-02-27 Gonzalo Paniagua Javier <[email protected]>
* CultureInfo.cs:
	(NameToID): make it case insensitive and use a hashtable instead of
	comparing all the strings.

svn path=/trunk/mcs/; revision=12018
2003-02-27 02:08:56 +00:00
Gonzalo Paniagua Javier 047c999e9e Reverted last patch. It breaks configuration reading
svn path=/trunk/mcs/; revision=12017
2003-02-27 01:20:59 +00:00
Per Arneng 6c729d5040 Removed an old FIXME
svn path=/trunk/mcs/; revision=12016
2003-02-27 00:32:32 +00:00
Per Arneng c836c2b8e7 added author comment
svn path=/trunk/mcs/; revision=12015
2003-02-26 23:47:19 +00:00
Per Arneng e9adfe4a34 Added the MailEncdoder class to be responsible for base64,UU encoding
The base64 method is now diff tested against uuencode

svn path=/trunk/mcs/; revision=12014
2003-02-26 22:50:45 +00:00
Per Arneng 83591627cb Fixed subject encoding.. does like ms now
svn path=/trunk/mcs/; revision=12006
2003-02-26 19:21:26 +00:00
Atsushi Eno b4d47f5448 2003-02-27 Atsushi Enomoto <[email protected]>
* XmlDocument.cs: modified Load().
	  Uri.Parse might not allow non-uri string.
	* XmlInputStream.cs: patch by Gonzalo (CanSeek).
	  added some constructors for convenience.
	* XmlTextReader.cs: modified some constructors.

svn path=/trunk/mcs/; revision=12005
2003-02-26 19:11:46 +00:00
Dick Porter 7132e98736 2003-02-26 Dick Porter <[email protected]>
* process.c: Cope with padding in .rsrc blocks

svn path=/trunk/mono/; revision=12001
2003-02-26 16:03:29 +00:00
Zoltan Varga 260fcb6b93 2003-02-26 Zoltan Varga <[email protected]>
* TypeBuilder.cs (DefineInitializedData): Removed unnecessary assignments.

	* ModuleBuilder.cs (DefineInitializedData): Do not call
	TypeBuilder::DefineInitializedData since that would mean defining a
	nested type of the global type, which is wrong. Instead define a
	new public type as MS does.

	* ModuleBuilder.cs (DefineUninitializedData): Ditto.

svn path=/trunk/mcs/; revision=11999
2003-02-26 14:40:21 +00:00
Dietmar Maurer 191a65c1ec 2003-02-26 Dietmar Maurer <[email protected]>
* metadata.h: reverted the filter_len change, it breaks reflection

svn path=/trunk/mono/; revision=11997
2003-02-26 11:29:53 +00:00
Dietmar Maurer efb4caccc5 2003-02-26 Dietmar Maurer <[email protected]>
* metadata.h: added a new field to store the filter_len

svn path=/trunk/mono/; revision=11996
2003-02-26 10:21:22 +00:00
Nick Drochak 43d6c847f4 2003/02/26 Nick Drochak <[email protected]>
* ActivatorTest.cs: Unregister the channel like it should.
	* MarshalByRefTest.cs: Take out my hack.
	  Both from Jean-Marc Andr [[email protected]].

svn path=/trunk/mcs/; revision=11995
2003-02-26 09:37:18 +00:00
Reggie Burnett 31f33f23a3 * Form.Close now actually destroys the Window
* Application now closes when launching form is closed

svn path=/trunk/mcs/; revision=11992
2003-02-26 07:53:25 +00:00
Per Arneng 2dddb5bd02 Added myself :)
svn path=/trunk/mcs/; revision=11991
2003-02-26 06:23:13 +00:00
Per Arneng a771ee1188 Added a FIXME comment on boundaries
svn path=/trunk/mcs/; revision=11990
2003-02-26 06:04:11 +00:00
Per Arneng b2c2697cf8 SmtpServer now defaults to localhost
svn path=/trunk/mcs/; revision=11989
2003-02-26 05:57:18 +00:00
Per Arneng bd922647f4 application/octet-stream for attatchment mimetypes
svn path=/trunk/mcs/; revision=11988
2003-02-26 05:35:44 +00:00
Dave Bettin b80347938e o Modified WebService to house a HttpContext member instead of HttpApplication
svn path=/trunk/mcs/; revision=11987
2003-02-26 04:58:37 +00:00
Per Arneng a3df14a694 Body is now encoded with BodyEncoding.GetBytes
svn path=/trunk/mcs/; revision=11986
2003-02-26 04:58:25 +00:00
Dave Bettin a3fda2d3f8 o Moved tests to nunit2 guidelines
o Added build for linux test(s)

svn path=/trunk/mcs/; revision=11985
2003-02-26 04:51:32 +00:00
Per Arneng 9984280aca Set the Content-Transfet-Encoding based on contents ASCII 7bit other 8bit
svn path=/trunk/mcs/; revision=11984
2003-02-26 04:36:00 +00:00
Miguel de Icaza b7f52847d5 2003-02-25 Miguel de Icaza <[email protected]>
* class.cs (MemberBase.CheckParameters): Also check that the type
	is unmanaged if it is a pointer.

	* expression.cs (SizeOf.Resolve): Add location information.

	* statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
	a managed type is declared.

svn path=/trunk/mcs/; revision=11983
2003-02-26 04:25:47 +00:00
Miguel de Icaza 12f5301d37 Add new test
svn path=/trunk/mcs/; revision=11982
2003-02-26 04:10:34 +00:00
Per Arneng 832b6c0b5e Content-Type:..; charset= is now set to the correct value
svn path=/trunk/mcs/; revision=11981
2003-02-26 04:09:55 +00:00
Gonzalo Paniagua Javier 6d7b6e68dd 2003-02-26 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs:
	(ToArray): return only the portion of the buffer that contains
	data, not the whole buffer. (note: this makes XmlDocument.Load work
	again with documents that have a <?xml without the 'encoding'
	attribute, which makes gtk-sharp generator work again).

svn path=/trunk/mcs/; revision=11979
2003-02-26 03:40:35 +00:00
Miguel de Icaza 99d0fb74a3 Add new error
svn path=/trunk/mcs/; revision=11978
2003-02-26 03:37:58 +00:00
Miguel de Icaza e97d71bc98 2003-02-25 Miguel de Icaza <[email protected]>
* class.cs: Very sad.  Am backing out the speed up changes
	introduced by the ArrayList -> Array in the TypeContainer, as they
	were not actually that much faster, and introduced a bug (no error
	reports on duplicated methods).

svn path=/trunk/mcs/; revision=11977
2003-02-26 03:13:08 +00:00
Miguel de Icaza a74e0bd2c6 Improve test
svn path=/trunk/mcs/; revision=11975
2003-02-26 02:13:30 +00:00
Miguel de Icaza cbe579519f Test the right variable, avoid a crash
svn path=/trunk/mcs/; revision=11974
2003-02-26 02:13:07 +00:00
Miguel de Icaza 2ae1fd351e Another change. Use target.Resolve instead of LValueResolve.
Although we are resolving for LValues, we will let the Assign code
	take care of that (it will be called again from Resolve).  This
	basically allows code like this:

	class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
	class Y { void A (X x) { x [0] += o; }

	The problem was that the indexer was trying to resolve for
	set_Item (idx, object o) and never finding one.  The real set_Item
	was set_Item (idx, X).  By delaying the process we get the right
	semantics.

	Fixes bug: 36505

svn path=/trunk/mcs/; revision=11973
2003-02-26 02:06:46 +00:00
Miguel de Icaza eba56b9643 2003-02-25 Miguel de Icaza <[email protected]>
* assign.cs (CompoundAssign.DoLResolve): Resolve the original
	source first, this will guarantee that we have a valid expression
	before calling in lower levels functions that will require a
	resolved object.  Then use this original_source in the
	target.ResolveLValue instead of the original source that was
	passed to us.

svn path=/trunk/mcs/; revision=11972
2003-02-25 22:46:33 +00:00
Miguel de Icaza 1af72c5084 Add new test
svn path=/trunk/mcs/; revision=11971
2003-02-25 22:45:04 +00:00
Miguel de Icaza 9f7b2c132a Fix
svn path=/trunk/mcs/; revision=11970
2003-02-25 22:29:35 +00:00
Miguel de Icaza 2fbf90ef01 2003-02-25 Miguel de Icaza <[email protected]>
* makefile (all): Make it so that doing `make' will run the
	default tests depending on Windows/Linux.

svn path=/trunk/mcs/; revision=11969
2003-02-25 22:25:38 +00:00
Lluis Sanchez 3accd72948 * BinaryFormatter.cs: Implemented support for binders.
* MessageFormatter.cs: Implemented support for binders.
    * ObjectReader.cs: Implemented support for binders.

svn path=/trunk/mcs/; revision=11968
2003-02-25 20:31:53 +00:00
Miguel de Icaza d783a927f4 update man page
svn path=/trunk/mono/; revision=11967
2003-02-25 17:34:19 +00:00
Dick Porter 7217ade08e 2003-02-25 Dick Porter <[email protected]>
* shared.c (_wapi_shm_attach): Return a failure code on system
	call errors, rather than exiting.

svn path=/trunk/mono/; revision=11966
2003-02-25 17:26:54 +00:00
Miguel de Icaza 2ed502499e Flush
svn path=/trunk/mono/; revision=11965
2003-02-25 17:00:08 +00:00
Alan Tam 8b911be307 2003-02-25 Alan Tam <[email protected]>
* DbDataAdapter.cs: Added support for filling when schema is present.
        Fixed incorrect behavior when ColumnMapping is present
        when more than one fields have the same name. Implemented Dispose.
        Fixed error when there is no ColumnMapping at all.
        Still have some problems in finding the correct TableMapping
        because the SourceTable name is not present in BuildSchema

svn path=/trunk/mcs/; revision=11963
2003-02-25 16:19:29 +00:00
Rafael Teixeira 61b1685675 bits
svn path=/trunk/mcs/; revision=11962
2003-02-25 15:52:06 +00:00
Nick Drochak 2352aa0cf1 2003-02-25 Nick Drochak <[email protected]>
* File.cs (GetCreationTime): Throw proper execption when path is not
	found.

svn path=/trunk/mcs/; revision=11960
2003-02-25 14:40:10 +00:00
Nick Drochak f55ca996ab 2003-02-25 Nick Drochak <[email protected]>
* TimeSpanTest.cs: Isolate test for Negate bug. Same as previous
	'checked' bug in ByteTest?

svn path=/trunk/mcs/; revision=11956
2003-02-25 14:02:33 +00:00
Paolo Molaro 2c5bcddb86 Tue Feb 25 11:55:35 CET 2003 Paolo Molaro <[email protected]>
* MemoryStream.cs: make it behave sanely when the stream is
	incrementally expanded.

svn path=/trunk/mcs/; revision=11953
2003-02-25 11:00:02 +00:00
Paolo Molaro f80ac8be85 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <[email protected]>
* reflection.c: handle custom attributes for types and members
	created with Reflection.Emit (bug#38422).

svn path=/trunk/mono/; revision=11947
2003-02-25 10:00:58 +00:00
Alan Tam db03364a32 2003-02-25 Alan Tam <[email protected]>
* DataRelation.cs: Added SetDataSet for DataSetRelationCollection to use.
        * DataRelationCollection.cs: Implemented AddRange and Contains.
        Implemented AddRange, Clear, List and RemoveCore for DataSetRelationColletion.
        Implemented AddCore, List and RemoveCore for DataTableRelationCollection.
        Reimplemented most Add methods to eliminate duplicated checks.
        Centralized RelationName generation procedure in GetNextDefaultRelationName.

svn path=/trunk/mcs/; revision=11945
2003-02-25 08:48:29 +00:00
Alan Tam 5f12cfc8d7 2003-02-25 Alan Tam <[email protected]>
* DataColumn.cs: Fixed wrong storage representation of Expression
        (using empty string instead of null) so that ToString() returns nothing.
        * DataColumnCollection.cs: Reimplemented GetNextDefaultColumnName so that
        auto column naming now works as expected. Reimplemented some Add methods
        to eliminate code duplication.

svn path=/trunk/mcs/; revision=11943
2003-02-25 07:25:05 +00:00
Miguel de Icaza 07feaea8d0 Add
svn path=/trunk/mono/; revision=11939
2003-02-24 22:13:22 +00:00
Gonzalo Paniagua Javier 6ca7b36d86 2003-02-24 Gonzalo Paniagua Javier <[email protected]>
* Attribute.cs:
	* MonoCustomAttrs.cs: fix for the regression test failure (see bug
	#38238).

	* IntPtr.cs: added serialization .ctor

svn path=/trunk/mcs/; revision=11937
2003-02-24 21:38:45 +00:00
Alan Tam d4a29fe97a 2003-02-24 Aleksey Demakov <[email protected]>
* DbDataAdapter.cs: The original code might pass a null DataTableMapping
	value which is then used to create a RowUpdatingEventArgs
	instance. So RowUpdatingEvent handler (for instance
	CommandBuilder) could get null DataTableMapping which
	might be unexpected. The patch makes sure that a non-null
	DataTableMapping is passed.

svn path=/trunk/mcs/; revision=11930
2003-02-24 17:47:28 +00:00
Gonzalo Paniagua Javier bf9ad10d34 2003-02-24 Gonzalo Paniagua Javier <[email protected]>
* OracleMonthSpan.cs: fixed compilation.

svn path=/trunk/mcs/; revision=11929
2003-02-24 16:51:17 +00:00
Peter Williams f4ad42ac18 2003-02-23 Peter Williams <[email protected]>
* makefile.gnu (all): Take two.

svn path=/trunk/mcs/; revision=11915
2003-02-24 04:38:04 +00:00
Miguel de Icaza 67ff9f4b28 Patches from Daniel Campos
svn path=/trunk/mcs/; revision=11914
2003-02-24 03:39:13 +00:00
Miguel de Icaza e11a99439c too late
svn path=/trunk/mcs/; revision=11912
2003-02-24 01:07:26 +00:00
Miguel de Icaza e6522fa2d6 Add NEWS file
svn path=/trunk/mono/; revision=11911
2003-02-24 01:07:08 +00:00
Miguel de Icaza 5694aa2301 Update update
svn path=/trunk/mono/; revision=11910
2003-02-24 01:06:27 +00:00
Duncan Mak 8c0cd7c8bc Add
svn path=/trunk/mcs/; revision=11908
2003-02-24 00:08:31 +00:00
Miguel de Icaza 4f056fd1c0 chain
svn path=/trunk/mcs/; revision=11907
2003-02-23 23:53:22 +00:00
Miguel de Icaza f58722a26e Remove all target, because that cancels the creation of Mono.PEToolkit
svn path=/trunk/mcs/; revision=11906
2003-02-23 23:51:22 +00:00
Miguel de Icaza 73cab5d584 Add System.Security
svn path=/trunk/mcs/; revision=11905
2003-02-23 23:36:07 +00:00
Duncan Mak 6a0fb29045 Add to the distro
svn path=/trunk/mono/; revision=11903
2003-02-23 23:34:54 +00:00
Duncan Mak 8433f6ba46 Add alpha
svn path=/trunk/mono/; revision=11902
2003-02-23 23:31:59 +00:00
Per Arneng da2c60f5b8 Changed a comment to more descibing
svn path=/trunk/mcs/; revision=11901
2003-02-23 21:27:30 +00:00
Per Arneng 9ae50db590 Exception throwing cleanup
svn path=/trunk/mcs/; revision=11900
2003-02-23 21:22:18 +00:00
Per Arneng d7e625fc8f Updated with info that SmtMail.Send is working
svn path=/trunk/mcs/; revision=11899
2003-02-23 20:52:30 +00:00
Peter Williams 8b65ff0319 2003-02-23 Peter Williams <[email protected]>
* makefile.gnu (all): Give this dependencies
	so that we don't rebuild every time.

svn path=/trunk/mcs/; revision=11898
2003-02-23 20:49:01 +00:00
Per Arneng f64332a418 Added my name to author list :)
svn path=/trunk/mcs/; revision=11897
2003-02-23 20:44:27 +00:00
Rafael Teixeira 8381e73ac4 Dummy methods and fields
svn path=/trunk/mcs/; revision=11895
2003-02-23 20:32:42 +00:00
Rafael Teixeira fc50e037ad Dummy version of needed class ServiceBase added
svn path=/trunk/mcs/; revision=11893
2003-02-23 20:21:42 +00:00
Rafael Teixeira 5f9d7602b5 some forgotten bits
svn path=/trunk/mcs/; revision=11891
2003-02-23 20:07:24 +00:00
Rafael Teixeira ac6d4cbb65 oops: mispelling corrected
svn path=/trunk/mcs/; revision=11890
2003-02-23 19:58:04 +00:00
Rafael Teixeira 3346309151 head -n 2 ChangeLog
svn path=/trunk/mcs/; revision=11889
2003-02-23 19:53:51 +00:00
Per Arneng cd75d407a5 Added the new System.Web.Mail files
svn path=/trunk/mcs/; revision=11888
2003-02-23 19:52:27 +00:00
Per Arneng b31cffbf1f SmtpMail.Send is now working but needs testing
svn path=/trunk/mcs/; revision=11887
2003-02-23 19:51:36 +00:00
Per Arneng 97a1dd514f SMTP Internal classes added to make SmtpMail.Send work
svn path=/trunk/mcs/; revision=11885
2003-02-23 19:50:45 +00:00
Rafael Teixeira aa46a5386a Just a local makefile, to facilitate MonoQLE
svn path=/trunk/mcs/; revision=11884
2003-02-23 19:39:14 +00:00
Ravi Pratap M 4d45418b34 Add test-177 to the right category
svn path=/trunk/mcs/; revision=11883
2003-02-23 19:38:02 +00:00
Jackson Harper 186273f3ed * CompilerError.cs: Use fields not properties, and remove unneeded finalizer
svn path=/trunk/mcs/; revision=11882
2003-02-23 19:27:24 +00:00
Rafael Teixeira 42a2078151 some bits that were lacking
svn path=/trunk/mcs/; revision=11881
2003-02-23 19:26:43 +00:00
Martin Baulig 41e28d2465 2003-02-23 Martin Baulig <[email protected]>
* statement.cs (Block.Emit): Override this and set ec.CurrentBlock
	while calling DoEmit ().

	* codegen.cs (EmitContext.Mark): Don't mark locations in other
	source files; if you use the #line directive inside a method, the
	compiler stops emitting line numbers for the debugger until it
	reaches the end of the method or another #line directive which
	restores the original file.

svn path=/trunk/mcs/; revision=11880
2003-02-23 19:17:40 +00:00
Rafael Teixeira 05843aee0c With it, we can make locally, wont change dirs list in mcs/class makefile for now
svn path=/trunk/mcs/; revision=11879
2003-02-23 19:13:11 +00:00
Miguel de Icaza 96aceda235 Add documentation missing of tests, and add new test.
svn path=/trunk/mcs/; revision=11878
2003-02-23 19:08:21 +00:00
Martin Baulig 10ae2b144f Removed two Console.WriteLine's.
svn path=/trunk/mcs/; revision=11877
2003-02-23 18:42:39 +00:00
Rafael Teixeira ab47d60645 I still have to learn lots about CVS
svn path=/trunk/mcs/; revision=11876
2003-02-23 18:41:37 +00:00
Martin Baulig c015d3a3d7 2003-02-23 Martin Baulig <[email protected]>
* test-185.cs: New test for bug #37708.

svn path=/trunk/mcs/; revision=11875
2003-02-23 18:39:31 +00:00
Martin Baulig a32e55fb66 2003-02-23 Martin Baulig <[email protected]>
* statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.

svn path=/trunk/mcs/; revision=11874
2003-02-23 18:38:52 +00:00
Rafael Teixeira b056e2889a AHEM: doing it again, using mono directories rules this time
svn path=/trunk/mcs/; revision=11873
2003-02-23 18:36:52 +00:00
Rafael Teixeira dcdb15a41e bringing System.Messaging to Mono (from MonoQLE)
svn path=/trunk/mcs/; revision=11872
2003-02-23 18:25:03 +00:00
Gaurav Vaish ba9aa7713a 2003-02-23 Gaurav Vaish <gvaish_mono AT lycos.com>
* CustomValidator.cs     : Completed.
	* DeviceSpecific.cs      : Initial implementation.
	* DeviceSpecificChoiceTemplateContainer.cs
	                         : Completed.
	* DeviceSpecificChoiceCollection.cs
	                         : Completed.
	* DeviceSpecificChoice.cs: Initial implementation.

svn path=/trunk/mcs/; revision=11871
2003-02-23 16:11:52 +00:00
Gaurav Vaish d05bf9fbc2 2003-02-23 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileCapabilities.cs    : Initial implementation.

svn path=/trunk/mcs/; revision=11870
2003-02-23 16:02:23 +00:00
Martin Baulig 961235859c Make this compile.
svn path=/trunk/mcs/; revision=11869
2003-02-23 13:30:34 +00:00
Martin Baulig 03935d4b06 2003-02-23 Martin Baulig <[email protected]>
* statement.cs (Block.AddChildVariableNames): We need to call this
	recursively, not just for our immediate children.

svn path=/trunk/mcs/; revision=11868
2003-02-23 13:27:54 +00:00
Martin Baulig e038afb2a6 2003-02-23 Martin Baulig <[email protected]>
* class.cs (Event.Define): Always make the field private, like csc does.

	* typemanager.cs (TypeManager.RealMemberLookup): Make events
	actually work, fixes bug #37521.

svn path=/trunk/mcs/; revision=11867
2003-02-23 13:20:30 +00:00
Martin Baulig bd05db97e6 2003-02-23 Martin Baulig <[email protected]>
When adding any tests here, please do also add them to the
	README.tests !

	The following tests are still missing:

	test-176 test-177 test-179 test-180 test-181 test-182 test-183
	test-184

svn path=/trunk/mcs/; revision=11864
2003-02-23 11:45:23 +00:00
Gaurav Vaish 4aad18b2f3 2003-02-23 Gaurav Vaish <gvaish_mono AT lycos.com>
* Calendar.cs            : Completed.
* BaseValidator.cs       : Completed.
* CompareValidator.cs    : Completed.

svn path=/trunk/mcs/; revision=11859
2003-02-23 07:42:11 +00:00
Miguel de Icaza 1d65971a97 2003-02-23 Miguel de Icaza <[email protected]>
* delegate.cs: When creating the various temporary "Parameters"
	classes, make sure that we call the ComputeAndDefineParameterTypes
	on those new parameters (just like we do with the formal ones), to
	allow them to be resolved in the context of the DeclSpace.

	This fixes the bug that Dick observed in Bugzilla #38530.

svn path=/trunk/mcs/; revision=11857
2003-02-23 06:41:56 +00:00
Jackson Harper c81cda6e5c ChangeLog
svn path=/trunk/mcs/; revision=11856
2003-02-23 01:30:13 +00:00
Jackson Harper 8e7f1191fb * Image.cs: Write CorHeader
svn path=/trunk/mcs/; revision=11855
2003-02-23 01:29:38 +00:00
Miguel de Icaza c4c3d949e9 Add System.Security
svn path=/trunk/mono/; revision=11854
2003-02-23 00:03:31 +00:00
Jackson Harper 0b7e7031c5 * Image.cs: Write Sections
svn path=/trunk/mcs/; revision=11853
2003-02-23 00:03:30 +00:00
Miguel de Icaza 4b6f996569 Add to the Linux build
svn path=/trunk/mcs/; revision=11852
2003-02-23 00:01:47 +00:00
Miguel de Icaza 5b604db708 Add a small explanatory comment
svn path=/trunk/mcs/; revision=11851
2003-02-22 23:16:57 +00:00
Miguel de Icaza d484fcef9b 2003-02-22 Miguel de Icaza <[email protected]>
* expression.cs (ResolveMemberAccess): When resolving a constant,
	do not attempt to pull a constant if the value was not able to
	generate a valid constant.

	* const.cs (LookupConstantValue): Do not report more errors than required.

svn path=/trunk/mcs/; revision=11848
2003-02-22 21:58:09 +00:00
Miguel de Icaza d9f8cc931d Commit on behalf of Mike Kestner
svn path=/trunk/mono/; revision=11847
2003-02-22 20:59:58 +00:00
Rafael Teixeira 5884cfe9e6 2003/02/22 Rafael Teixeira <[email protected]>
* class.cs : As, per vbc, there is a rootnamespace now, --main wasn't working anymore, 
				 because it was expecting a fully qualified class name. 
				 We now also test the name passed prepended by the rootnamespace.
	* class.cs : Corrected warning "The keyword new is required on `Mono.CSharp.Property.Emit'
				 because it hides inherited member `PropertyBase.Emit'", by making it virtual
				 in PropertyBase and override in Property.
	* makefile.gnu : test and test-gtk targets now depend on mbas.exe

svn path=/trunk/mcs/; revision=11845
2003-02-22 20:04:41 +00:00
Martin Baulig c2fc4ec6c3 2003-02-22 Martin Baulig <[email protected]>
* makefile(s): Added `MCS' and `MCS_FLAGS' variables.

svn path=/trunk/mcs/; revision=11844
2003-02-22 19:48:48 +00:00
Rafael Teixeira e63234c20f Spurious text in Options.cs, was stopping compilation. Removed...
svn path=/trunk/mcs/; revision=11841
2003-02-22 18:52:55 +00:00
Zoltan Varga a525556b38 2003-02-22 Zoltan Varga <[email protected]>
* reflection.c: define RTSpecialName automatically for constructors for
	compatibility with MS.NET.

	* reflection.c (mono_reflection_create_runtime_class): initialize
	nested_in field of dynamically created classes.

svn path=/trunk/mono/; revision=11840
2003-02-22 18:45:50 +00:00
Jackson Harper eeb6dc142d * Section.cs: Add method for writing Sections
svn path=/trunk/mcs/; revision=11837
2003-02-22 17:37:48 +00:00
Martin Baulig 4022942513 2003-02-22 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Incremented version number.

svn path=/trunk/mono/; revision=11836
2003-02-22 17:10:26 +00:00
Martin Baulig 677ca39c5b 2003-02-22 Martin Baulig <[email protected]>
* MonoSymbolTable.cs: Incremented version number.

svn path=/trunk/mcs/; revision=11835
2003-02-22 17:09:06 +00:00
Martin Baulig d4d4e18a45 .cvsignore ......
svn path=/trunk/mcs/; revision=11834
2003-02-22 17:08:13 +00:00
Martin Baulig fb6b37aaa6 2003-02-22 Martin Baulig <[email protected]>
* library.make: Pass `MCS_FLAGS' to MCS.

svn path=/trunk/mcs/; revision=11833
2003-02-22 17:04:47 +00:00
Martin Baulig aaaac0ba68 2003-02-22 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (MonoSymbolFile.FindMethod): Fixed a bug.
	(MonoSymbolFile.MethodLookup): New method.

svn path=/trunk/mcs/; revision=11832
2003-02-22 17:03:22 +00:00
Jackson Harper 91f02c5320 * Driver.cs: Add version option, fix bug that allowed -- switches to be invoked with /-
svn path=/trunk/mcs/; revision=11831
2003-02-22 16:25:32 +00:00
Alexandre Pigolkine e1eaf58f4b few test files deletes, new will be added
svn path=/trunk/mcs/; revision=11829
2003-02-22 09:20:52 +00:00
Tim Coleman 842cca7222 2003-02-21 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleDateTime.cs:
        * System.Data.OracleClient/OracleInfoMessageEventArgs.cs:
        * System.Data.OracleClient/OracleInfoMessageEventHandler.cs:
        * System.Data.OracleClient/OracleMonthSpan.cs:
        * System.Data.OracleClient/OraclePermission.cs:
        * System.Data.OracleClient/OraclePermissionAttribute.cs:
        * System.Data.OracleClient/OracleTimeSpan.cs:
        * System.Data.OracleClient.Oci/IOciDescriptorHandle.cs:
        * System.Data.OracleClient.Oci/OciDescriptorHandle.cs:
        * System.Data.OracleClient.Oci/OciLobLocator.cs:
                New classes added.  Some based on .NET docs,
                others (internal) based on getting some LOB
                support (doesn't actually work yet).
        * list:
                Add new files
        * System.Data.OracleClient/OracleBFile.cs:
        * System.Data.OracleClient/OracleBinary.cs:
        * System.Data.OracleClient/OracleLob.cs:
        * System.Data.OracleClient/OracleNumber.cs:
        * System.Data.OracleClient/OracleString.cs:
                Change handling of NULL object based on new
                discovery.
        * System.Data.OracleClient/OracleCommand.cs:
        * System.Data.OracleClient/OracleDataReader.cs:
                Typo fix.
        * System.Data.OracleClient.Oci/OciDefineHandle.cs:
        * System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
                Add some code to handle LOBs.  Still more to
                come.
        * Test/TestOracleClient.cs:
                New test for LOB added.

svn path=/trunk/mcs/; revision=11828
2003-02-22 08:53:02 +00:00
Jackson Harper 9aa0e78f63 * AssemblyInfo.cs: Add file
* makefile: Add AssemblyInfo to build
       * makefile.gnu: Add AssemblyInfo to build

svn path=/trunk/mcs/; revision=11826
2003-02-22 05:45:03 +00:00
Jackson Harper 524bab53fa * Section.cs: Add Method to write Headers
svn path=/trunk/mcs/; revision=11825
2003-02-22 05:24:32 +00:00
Jackson Harper 027fda3a99 * Section.cs: Make Read method safe
svn path=/trunk/mcs/; revision=11822
2003-02-22 03:24:35 +00:00
Miguel de Icaza 8cbfe36eab Adding this patch on behalf of Patrik, as he does not have CVS access,
and this in fact fixes appdomain2 and remoting4 tests.

svn path=/trunk/mono/; revision=11819
2003-02-21 23:45:03 +00:00
Alexandre Pigolkine ba3d71a09e implementation added
svn path=/trunk/mcs/; revision=11817
2003-02-21 22:54:41 +00:00
Alexandre Pigolkine 24d300a580 small changes to be able to run SWF apps
svn path=/trunk/mcs/; revision=11815
2003-02-21 22:48:53 +00:00
Zoltan Varga b309a721a2 2003-02-21 Zoltan Varga <[email protected]>
* object.h icall.c process.c: fix warnings.

svn path=/trunk/mono/; revision=11814
2003-02-21 22:42:16 +00:00
Zoltan Varga f172b9782a 2003-02-21 Zoltan Varga <[email protected]>
* appdomain.h appdomain.c:
	(mono_domain_try_type_resolve): split the
	name_or_tb argument into a name and a tb argument.
	(mono_domain_has_type_resolve): new function to check whenever the
	application has registered a TypeResolve event handler.

	* icall.c reflection.h reflection.c: move the type resolve logic into
	mono_reflection_get_type () so it will be invoked when
	Assembly::GetType () is called.

	* reflection.c:
	(mono_reflection_get_type): renamed to get_type_internal.
	(mono_reflection_get_type): fixed type name generation so it works
	for nested types too.
	(mono_reflection_get_type): call has_type_resolve () to avoid the
	costly type name generation if there is no resolve event handler.

svn path=/trunk/mono/; revision=11813
2003-02-21 22:25:46 +00:00
Miguel de Icaza 852c8a4c09 Add Ilasm to the distro
svn path=/trunk/mono/; revision=11812
2003-02-21 22:24:02 +00:00
Miguel de Icaza b4d16bcbae flush docs
svn path=/trunk/mono/; revision=11811
2003-02-21 22:05:07 +00:00
Miguel de Icaza cf02ffd0b0 Just a small change
svn path=/trunk/mono/; revision=11810
2003-02-21 22:04:49 +00:00
Dick Porter 311cbb1af3 2003-02-21 Dick Porter <[email protected]>
* processes.c (GetCurrentProcessId): Use the current process
	handle to return the process ID, as getpid() is unreliable
	(linuxthreads gives each thread a different pid).  Fixes bug
	37550.

svn path=/trunk/mono/; revision=11804
2003-02-21 13:22:10 +00:00
Dick Porter 476a6daeab 2003-02-21 Dick Porter <[email protected]>
* FileStream.cs: Use locks around buffer manipulations.  Fixes bug
	32344

svn path=/trunk/mcs/; revision=11803
2003-02-21 12:22:59 +00:00
Dick Porter b52cdf8dfa 2003-02-21 Dick Porter <[email protected]>
* io.c (FindNextFile): Skip over dangling symlinks.  Fixes bug
	34076.

svn path=/trunk/mono/; revision=11802
2003-02-21 12:20:47 +00:00
Miguel de Icaza 6a5eb47932 Add linker flags to the mono.pc.in to include the -lpthread in a pkg-config
invocation for the Mono runtime.

Dick and Paolo reported:

	pthread remappes the sigrtmin signal, so it needs to be loaded from the start of the lifetime of the app

svn path=/trunk/mono/; revision=11801
2003-02-21 11:28:10 +00:00
Paolo Molaro 94a679522d Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <[email protected]>
* class.c, image.c: load exported types from file references.

svn path=/trunk/mono/; revision=11800
2003-02-21 10:41:33 +00:00
Jackson Harper 28e6515ea5 * Section.cs: Convert Header to a class and lowers it accesability.
svn path=/trunk/mcs/; revision=11799
2003-02-21 08:30:51 +00:00
Jackson Harper 24ec98a874 ChangeLog
svn path=/trunk/mcs/; revision=11798
2003-02-21 08:25:30 +00:00
Jackson Harper a3f2cdadc7 * MDStream.cs: Make Header a class and use a Read method to load it. Because it is no longer
being loaded by a utility method I can lower some accesibility levels.

svn path=/trunk/mcs/; revision=11797
2003-02-21 07:26:03 +00:00
Tim Coleman 0b62244267 2003-02-20 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleBFile.cs:
        * System.Data.OracleClient/OracleBinary.cs:
        * System.Data.OracleClient/OracleBoolean.cs:
        * System.Data.OracleClient/OracleLob.cs:
        * System.Data.OracleClient/OracleLobOpenMode.cs:
        * System.Data.OracleClient/OracleNumber.cs:
        * list:
                New class stubs added
        * System.Data.OracleClient/OracleCommand.cs:
        * System.Data.OracleClient/OracleDataReader.cs:
                Minor touch-ups
        * Test/TestOracleClient.cs:
                Add required Prepare () call in parameter test.

svn path=/trunk/mcs/; revision=11793
2003-02-21 04:50:08 +00:00
Nick Drochak 8267161d5e 2003/02/21 Nick Drochak <[email protected]>
* EnumTest.cs: Add test for bug 38452 (Parsing numeric enum values).

svn path=/trunk/mcs/; revision=11792
2003-02-21 03:52:05 +00:00
Nick Drochak e1f80efa82 Flush
svn path=/trunk/mcs/; revision=11789
2003-02-21 02:51:07 +00:00
Miguel de Icaza aab8ac62b5 Fix from Marcus Urban to bug #38452
svn path=/trunk/mcs/; revision=11788
2003-02-21 02:48:57 +00:00
Miguel de Icaza 9411f86182 Update news; Paolo and Gonzalo
svn path=/trunk/mono/; revision=11783
2003-02-20 19:49:44 +00:00
Dick Porter 5c113d5c22 Need to request optimisation on windows build to get "extern inline"
functions.

svn path=/trunk/mono/; revision=11778
2003-02-20 15:06:57 +00:00
Nick Drochak 353a8c5442 2003-02-20 Nick Drochak <[email protected]>
* ByteTest.cs: Isolate test for mcs 'checked' bug.

svn path=/trunk/mcs/; revision=11776
2003-02-20 10:36:28 +00:00
Nick Drochak ad5dfadf0c 2003-02-20 Nick Drochak <[email protected]>
* XslTransform.cs: Remove confusing and unused parameter.

svn path=/trunk/mcs/; revision=11775
2003-02-20 10:32:48 +00:00
Miguel de Icaza 8476e0b206 2003-02-01 Miguel de Icaza <[email protected]>
* Uri.cs (LocalPath): Local path should return un-escaped
	strings.  Patch from [email protected] (Thong (Tum) Nguyen)

svn path=/trunk/mcs/; revision=11773
2003-02-20 07:21:10 +00:00
Miguel de Icaza 77dd78f6a2 Just a comment
svn path=/trunk/mcs/; revision=11772
2003-02-20 07:20:31 +00:00
Miguel de Icaza 0f06dfdd00 Add new Microsoft.VisualC assembly
svn path=/trunk/mcs/; revision=11771
2003-02-20 07:17:00 +00:00
Miguel de Icaza a30e285862 Add Microsoft.VisualC makefile
svn path=/trunk/mcs/; revision=11770
2003-02-20 07:15:49 +00:00
Miguel de Icaza 38efc26107 2003-02-20 Alfonso Ali <[email protected]>
* CodeGenerator.cs: Generates the entry point method.

svn path=/trunk/mcs/; revision=11769
2003-02-20 07:03:25 +00:00
Sebastien Pouliot 74a87fcfc7 2003-02-19 Sebastien Pouliot <[email protected]>
* AllTests.cs: Removed. No more required with NUnit2.
	* makefile.gnu, security_linux_test.args: untested makefile
	* System.Security_test.build: Updated for NUnit2.

svn path=/trunk/mcs/; revision=11755
2003-02-20 02:08:43 +00:00
Sebastien Pouliot e357665885 2003-02-19 Sebastien Pouliot <[email protected]>
* All: Updated tests for NUnit2. Some big tests where splited in
	smaller ones.
	* XmlDsigC14NTransformTest.cs: New, but almost empty, test suite.
	* XmlDsigC14NWithCommentsTransformTest.cs: New, but almost empty,
	test suite.

svn path=/trunk/mcs/; revision=11751
2003-02-20 00:55:52 +00:00
Sebastien Pouliot 355327100c 2003-02-19 Sebastien Pouliot <[email protected]>
* All: Corrected class indentation, minor fixes, added many MonoTODO (so class status
	will reflect reality).

svn path=/trunk/mcs/; revision=11750
2003-02-20 00:49:58 +00:00
Christopher Bockner 7738b02267 Added a describe function so that parameters can get their information from DB2.
svn path=/trunk/mcs/; revision=11748
2003-02-19 21:48:37 +00:00
Christopher Bockner bbf13e603c Added parameter Describe functionality.
svn path=/trunk/mcs/; revision=11746
2003-02-19 21:47:02 +00:00
Ville Palo 277c94c8c3 2003-02-19 Ville Palo <[email protected]>
* DataTable.cs: DataTable.CaseSensitive follows parent
	DataSet.CaseSensitive property if DataTable.CaseSensitive has never
	been changed directly from DataTable

svn path=/trunk/mcs/; revision=11744
2003-02-19 19:26:48 +00:00
Gonzalo Paniagua Javier ffd5f68616 Return the default context when no context set. Thanks to Patrik.
svn path=/trunk/mcs/; revision=11740
2003-02-19 18:26:06 +00:00
Ville Palo 6822d1d620 2003-02-19 Ville Palo <[email protected]>
* DataSet.cs: When CaseSensitive property is changed all of the Tables
	of DataSet have to change too

svn path=/trunk/mcs/; revision=11739
2003-02-19 18:23:43 +00:00
Gonzalo Paniagua Javier 3f904f5033 added 'clean' target
svn path=/trunk/mcs/; revision=11738
2003-02-19 17:52:56 +00:00
Gonzalo Paniagua Javier 81f0febea2 2003-02-19 Gonzalo Paniagua Javier <[email protected]>
* MethodCall.cs:
	(MethodBase): resolve the method if it's not already done.

svn path=/trunk/mcs/; revision=11737
2003-02-19 17:01:54 +00:00
Gonzalo Paniagua Javier 8b51478ae5 2003-02-19 Gonzalo Paniagua Javier <[email protected]>
* AppDomain.cs: check for null in Unload and changed method name.

svn path=/trunk/mcs/; revision=11736
2003-02-19 16:53:02 +00:00
Gonzalo Paniagua Javier 4a1fb62925 2003-02-19 Gonzalo Paniagua Javier <[email protected]>
* Thread.cs: implemented CurrentContext.

svn path=/trunk/mcs/; revision=11735
2003-02-19 16:49:29 +00:00
Miguel de Icaza d89a7fb835 Flush
svn path=/trunk/mono/; revision=11734
2003-02-19 16:48:29 +00:00
Gonzalo Paniagua Javier a9d3913a6c 2003-02-19 Gonzalo Paniagua Javier <[email protected]>
* Latin1Encoding.cs: added Serializable attribute.

svn path=/trunk/mcs/; revision=11733
2003-02-19 16:47:51 +00:00
Miguel de Icaza a405284d0e Pending changes
svn path=/trunk/mono/; revision=11732
2003-02-19 16:40:36 +00:00
Tim Coleman f0e7f36bad 2003-02-19 Tim Coleman <[email protected]>
* oracle: update oracle status page

svn path=/trunk/mono/; revision=11731
2003-02-19 16:36:34 +00:00
Gonzalo Paniagua Javier 92dfad552e 2003-02-19 Gonzalo Paniagua Javier <[email protected]>
* TargetInvocationException.cs: added serialization ctor.

svn path=/trunk/mcs/; revision=11730
2003-02-19 16:12:10 +00:00
Paolo Molaro 8a93fa7496 Fix field placement in MonoVTable.
svn path=/trunk/mono/; revision=11729
2003-02-19 14:16:12 +00:00
Rafael Teixeira 610816668b 2003/02/19 Rafael Teixeira <[email protected]>
* mb-parser.jay : eliminated reduce/reduce conflict on duplicated rank_specifier rule
	  by renaming the one using brackets to bracketed_rank_specifier

svn path=/trunk/mcs/; revision=11728
2003-02-19 13:44:45 +00:00
Lluis Sanchez b65f8ff197 * RealProxy.cs: Changed constructor to allow only ClientIdentity instances.
* RemotingProxy.cs: Added new constructor for client activated objects.
	  Added method that handles construction messages.

svn path=/trunk/mcs/; revision=11727
2003-02-19 12:39:39 +00:00
Lluis Sanchez 5c132ca21d * IInternalMessage.cs: Added. Provides some useful methods for method messages.
* ServerContextTerminatorSink.cs: Added support for construction messages.
	* MethodCall.cs: Implemented serialization support. Added support for IInternalMessage.
	* MethodDictionary.cs: Added support for IInternalMessage.
	* MethodResponse.cs: Added serialization support. Added support for IInternalMessage.
	* MonoMethodMessage.cs: Added support for IInternalMessage.
	* ReturnMessage.cs: Added support for IInternalMessage.
	* ClientContextTerminatorSink.cs: Added.
	* ConstructionCall.cs: Added.
	* ConstructionCallDictionary.cs: Added.
	* ConstructionResponse.cs: Added.
	* EnvoyTerminatorSink.cs: Added.

svn path=/trunk/mcs/; revision=11726
2003-02-19 12:38:28 +00:00
Lluis Sanchez f929ec50c4 * Contexts.cs : Added methods for getting the client context sink chain and the
envoy sink chain. Also added stub methods for context switch and creation.
	* CrossContextChannel.cs : Added.

svn path=/trunk/mcs/; revision=11725
2003-02-19 12:37:48 +00:00
Lluis Sanchez c99ad0afa1 * ChannelServices.cs: Added static property for getting the CrossContextChannel.
svn path=/trunk/mcs/; revision=11724
2003-02-19 12:37:19 +00:00
Lluis Sanchez 9304566e82 * RemoteActivator.cs: Instance creation implemented.
* ActivationServices.cs: Added.

svn path=/trunk/mcs/; revision=11723
2003-02-19 12:36:33 +00:00
Lluis Sanchez 367bc2553f * Identity.cs: Added envoy message sink.
* ObjRef.cs: Implemented EnvoySink property
	* RemotingConfiguration.cs: now enables proxy creation for types registered
	  as ClientActivatedType or WellKnownClientType.
	* RemotingServices.cs: Added support for ContextBoundObjects.
	  Added methods for creating proxies.
	* ServerIdentity.cs: Added initialization of envoy sink.
	* EnvoyInfo.cs: Added. It is an implementation on IEnvoyInfo.

svn path=/trunk/mcs/; revision=11722
2003-02-19 12:36:01 +00:00
Lluis Sanchez 1d01e9761b * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
used to cache the managed methods used to create proxies and make
	  remote invocation of methods.
	* class.h: Added in MonoVTable a flag to indicate that a class needs
	  to be remotely created.
	* object.c: Modified the method mono_class_vtable(). It now initializes
	  the remote flag of the vtable. Modified mono_object_new_specific(),
	  so now it checks the remote flag.
	* icall.c: Added a couple of internal methods, one for enabling instance
	  creation interception for a type, and one for creating objects bypassing
	  the remote check.

svn path=/trunk/mono/; revision=11721
2003-02-19 12:32:54 +00:00
Daniel Morgan 65225813d4 2003-02-19 Daniel Morgan <[email protected]>
* InternalDataCollectionBase.cs: revert change to field
	to fix build

	* DataViewManager.cs
	* DataView.cs
	* DataTable.cs
	* DataSet.cs: commented use of DesignerAttribute
	because it broke the build.  According to MSDN,
	DesignerAttribute does not have a zero-argument constructor

svn path=/trunk/mcs/; revision=11716
2003-02-19 07:06:50 +00:00
Tim Coleman 7aa6feb8b4 2003-02-18 Tim Coleman <[email protected]>
* System.Data.OracleClient/OciBindHandle.cs:
        * list:
                Add new class
        * System.Data.OracleClient/OracleCommand.cs:
                Add transaction logic for rollback/commit,
                attaching to oracle service context, and a
                couple of test cases.
                Add Parameter handling
        * System.Data.OracleClient/OracleDataReader.cs:
                Change GetValue call
        * System.Data.OracleClient/OracleParameter.cs:
                Make this work
        * System.Data.OracleClient/OracleType.cs:
                Add values to enum
        * System.Data.OracleClient.Oci/OciDefineHandle.cs:
                Add GetValue call which is used by data reader
        * System.Data.OracleClient.Oci/OciStatementHandle.cs:
                Add parameter logic
        * Test/TestOracleClient.cs:
                Add some new test cases.

svn path=/trunk/mcs/; revision=11709
2003-02-19 02:46:22 +00:00
Miguel de Icaza 06d6192295 2003-02-18 Miguel de Icaza <[email protected]>
* class.cs: Changed all the various members that can be part of a
	class from being an ArrayList to be an Array of the right type.
	During the DefineType type_list, interface_list, delegate_list and
	enum_list are turned into types, interfaces, delegates and enums
	arrays.

	And during the member population, indexer_list, event_list,
	constant_list, field_list, instance_constructor_list, method_list,
	operator_list and property_list are turned into their real arrays.

	Although we could probably perform this operation earlier, for
	good error reporting we need to keep the lists and remove the
	lists for longer than required.

	This optimization was triggered by Paolo profiling the compiler
	speed on the output of `gen-sample-program.pl' perl script.

	* decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
	not crash in methods like MemberLookupFailed that use this field.

	This problem arises when the compiler fails to resolve a type
	during interface type definition for example.

svn path=/trunk/mcs/; revision=11708
2003-02-19 00:01:33 +00:00
Miguel de Icaza 20a2b89c9a Add another test file
svn path=/trunk/mcs/; revision=11707
2003-02-18 23:26:15 +00:00
Martin Baulig e80a798592 2003-02-18 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (monoSymbolFile.GetMethod): Added overloaded
	version which takes a MethodBase.

svn path=/trunk/mcs/; revision=11704
2003-02-18 19:43:56 +00:00
Martin Baulig 2dc8d4a396 2003-02-18 Martin Baulig <[email protected]>
* Assembly.cs (MonoDebugger_GetMethodToken): New method to get a
	method's metadata token.

svn path=/trunk/mcs/; revision=11703
2003-02-18 19:43:08 +00:00
Martin Baulig 56cacad31a 2003-02-18 Martin Baulig <[email protected]>
* debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
	New interncall to get a method's metadata token.

	* icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
	New interncall for the debugger.

svn path=/trunk/mono/; revision=11702
2003-02-18 19:42:04 +00:00
Martin Baulig 2e29242d2f Reflect latest API changes.
svn path=/trunk/mono/; revision=11701
2003-02-18 19:33:10 +00:00
Martin Baulig 45585130de 2003-02-18 Martin Baulig <[email protected]>
* MonoSymbolTable.cs (MethodIndexEntry): New public struct.

	* MonoSymbolFile.cs (MonoSymbolFile.GetMethodByToken): New method.

svn path=/trunk/mcs/; revision=11700
2003-02-18 19:32:12 +00:00
Atsushi Eno a2815032ab 2003-02-19 Atsushi Enomoto <[email protected]>
* XmlSchemaAnnotation.cs : expect the correct closing tag on <appinfo>
		and <documentation> elements. (patch by Peter Pentchev)
	* XmlSchemaObjectEnumerator.cs : cast properly to XmlSchemaObject
		instead of XmlSchema. (patch by Peter Pentchev)

svn path=/trunk/mcs/; revision=11699
2003-02-18 18:17:45 +00:00
Gonzalo Paniagua Javier 20e4eb747e 2003-02-18 Gonzalo Paniagua Javier <[email protected]>
* MonoCustomAttrs.cs: fixed bug #38238.

svn path=/trunk/mcs/; revision=11698
2003-02-18 17:58:15 +00:00
Ville Palo e9fe7d0fd2 2003-02-18 Ville Palo <[email protected]>
* DataColumnCollectin.cs: Little fix for indexer and case sensitivity

svn path=/trunk/mcs/; revision=11697
2003-02-18 17:51:15 +00:00
Alan Tam 4de81b55de 2003-02-18 Alan Tam <[email protected]>
* list.unix (): Add DesignerCategoryAttribute.cs

svn path=/trunk/mcs/; revision=11695
2003-02-18 16:20:48 +00:00
Alan Tam 6f09056d0d 2003-02-18 Alan Tam <[email protected]>
* DataRow.cs: Implemented GetParentRow and GetParentRows.
	* DataSet.cs: Added stub for HasChanges, InferXmlSchema,
		      OnPropertyChanging, OnRemoveRelation, OnRemoveTable,
		      RaisePropertyChanging.
	* DataTable.cs: Implemented NewRowArray.
	* DataTablePropertyDescriptor: Fixed a modifier.
	* InternalDataCollectionBase.cs: Fixed modifiers. Implemented SyncRoot.
	* PropertyCollection.cs: Minor fix.
	* ConstraintCollection.cs DataColumn.cs DataColumnCollection.cs
	* DataRelation.cs DataRelationCollection.cs DataRow.cs
	* DataRowCollection.cs DataRowState.cs DataSet.cs DataTable.cs
	* DataTableCollection.cs DataTablePropertyDescriptor.cs DataView.cs
	* DataViewManager.cs DataViewRowState.cs DataViewSettingCollection.cs
	* ForeignKeyConstraint.cs InternalDataCollectionBase.cs
	* PropertyCollection.cs UniqueConstraint.cs

svn path=/trunk/mcs/; revision=11694
2003-02-18 15:09:50 +00:00
Dick Porter 3e5a13b411 2003-02-18 Dick Porter <[email protected]>
* FileStream.cs: Make FileMode.Append work, and check for Seeking
	back over old data (undocumented ms behaviour, throws an exception
	if you try).  Fixes bug 35975.

svn path=/trunk/mcs/; revision=11693
2003-02-18 15:01:16 +00:00
Jonathan Pryor 78c15f1e87 Fix Spelling Error.
Reported by Torsten Rendelmann <[email protected]>.

svn path=/trunk/mcs/; revision=11692
2003-02-18 11:52:28 +00:00
Rafael Teixeira 9ae5293e0f Marco comments included on mb-parser.jay
svn path=/trunk/mcs/; revision=11691
2003-02-18 11:40:53 +00:00
Dietmar Maurer cbb31f44a7 2003-02-18 Dietmar Maurer <[email protected]>
* class.c (mono_class_setup_vtable): allocate supertype array

svn path=/trunk/mono/; revision=11690
2003-02-18 11:04:56 +00:00
Martin Baulig cfbeb5ad01 2003-02-18 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (MonoSymbolFile.Assembly): New public property.

	* MonoSymbolTable.cs (MethodEntry.MethodBase): New public property.
	(MethodEntry.LocalTypes): New public variable.

svn path=/trunk/mcs/; revision=11688
2003-02-18 10:23:22 +00:00
Martin Baulig c36260bab4 2003-02-18 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.

svn path=/trunk/mono/; revision=11686
2003-02-18 10:09:33 +00:00
Martin Baulig 29657db467 2003-02-18 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (MethodEntry.ThisTypeIndex): Renamed to
	ClassTypeIndex; provide this for all methods so we can get the
	class of static methods.

svn path=/trunk/mcs/; revision=11685
2003-02-18 10:08:21 +00:00
Jackson Harper fd621002ea forgot ChangeLog savation ;-)
svn path=/trunk/mcs/; revision=11684
2003-02-18 07:21:56 +00:00
Jackson Harper a9e1f121ad * COFFHeader.cs: Convert to class, use Read and Write methods.
Compress some code
        * CheckSum.cs: Access Lfanew through property not field.
        * CorHeader.cs: Convert to class, use Read and Write methods.
        * DOSHeader.cs: Convert to class, use Read and Write methods,
	                and Init method for creating new DOSHeaders
        * DataDir.cs: Convert to class, use Read and Write methods.
        * Image.cs: Access lfanew through property, add Write method.
        * PEHeader.cs: Convert to class, use Read and Write methods.
        * PEUtils.cs: Add GetString method for converting byte pointers
	             to strings.
        * RVA.cs: Add Write method
        * Section.cs: Use PEUtils.GetString method instead of new string (byte*)
        * makefuile.gnu: Compile all the files I want compiled ;-)

svn path=/trunk/mcs/; revision=11683
2003-02-18 07:18:00 +00:00
Jackson Harper 5f7d8d9976 * MDStream.cs: Use PEUtils.GetString instead of new string (byte*)
* Rows.cs: Cast a bunch of enums to int when displaying
		   them otherwise an Exception is thrown.,
                   this is probably a bug but I haven't had
		   time to track it down yet.
        * StringHeap.cs: Use PEUtils.GetString instead of new string (byte*)

svn path=/trunk/mcs/; revision=11682
2003-02-18 07:16:00 +00:00
Jackson Harper 3035378a39 * mddump.cs: Comment out some stuff that does not need to be seen.
svn path=/trunk/mcs/; revision=11681
2003-02-18 07:14:37 +00:00
Miguel de Icaza e3d6141747 Fix
svn path=/trunk/mono/; revision=11680
2003-02-18 07:14:14 +00:00
Miguel de Icaza 3ef3b0d330 Fix
svn path=/trunk/mono/; revision=11679
2003-02-18 07:11:05 +00:00
Gaurav Vaish 594b7c1434 2003-02-18 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileListItem.cs      : SetIndex(int)       - Stubbed.
	* MobileListItemCollection.cs
	                         : Completed stub-ing.

svn path=/trunk/mcs/; revision=11678
2003-02-18 07:05:04 +00:00
Miguel de Icaza 4cc45d2981 Fix
svn path=/trunk/mono/; revision=11677
2003-02-18 07:04:11 +00:00
Miguel de Icaza dc7291f347 fix
svn path=/trunk/mono/; revision=11675
2003-02-18 06:56:40 +00:00
Miguel de Icaza d735ab1a60 Flush
svn path=/trunk/mono/; revision=11673
2003-02-18 06:46:42 +00:00
Daniel Morgan 6a75e837b8 2003-02-18 Daniel Morgan <[email protected]>
* DataTableRelationCollection.cs: removed file
	because its internally in file DataRelationCollection.cs

2003-02-18  Alan Tam <[email protected]>

	* DataRelation.cs: Added storage required to hold the relations.
	  Checking of constraints are not implemented yet.
	* DataRelationCollection.cs: Implemented DataSetRelationCollection
	  and DataTableRelationCollection, both as inner class of the abstract class
	  DataRelationCollection (like Microsoft although not documented in ECMA).
	* DataRow.cs: Implemented GetChildRows in a extremely slow way.
	  Need to implement caching like Microsoft later.
	* DataSet.cs: Uncomment DataRelation related members. Uncomment
	  code for Nested XML. Implemented WriteTable(XmlWriter, DataRow[],
	  XmlWriteMode) for use of Nested XML. Fixed a wrong modifier in
	  GetSerializationData.
	* DataTable.cs: Uncomment DataRelation related members.

svn path=/trunk/mcs/; revision=11670
2003-02-18 06:14:54 +00:00
Tim Coleman a3aee1c872 2003-02-18 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleCommand.cs:
        * System.Data.OracleClient/OracleTransaction.cs:
        * System.Data.OracleClient.Oci/OciTransactionHandle.cs:
        * Test/TestOracleClient.cs:
                Add transaction logic for rollback/commit,
                attaching to oracle service context, and a
                couple of test cases.

svn path=/trunk/mcs/; revision=11669
2003-02-18 05:32:32 +00:00
Miguel de Icaza 376031a3fd remove fixed directive
svn path=/trunk/mono/; revision=11668
2003-02-18 05:26:21 +00:00
Tim Coleman c6d5150769 2003-02-17 Tim Coleman <[email protected]>
* Test/TestOracleClient.cs:
                Add OracleDataAdapter test.

svn path=/trunk/mcs/; revision=11667
2003-02-18 04:28:30 +00:00
Tim Coleman b4aff94ab6 2003-02-17 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleDataReader.cs:
		changes to make it work with the oracle data adapter

svn path=/trunk/mcs/; revision=11666
2003-02-18 04:17:02 +00:00
Tim Coleman c945e6ce62 2003-02-17 Tim Coleman <[email protected]>
* System.Data.OracleClient/OciDefineHandle.cs:
		Remove OCIDateGetDate

svn path=/trunk/mcs/; revision=11665
2003-02-18 03:42:39 +00:00
Tim Coleman c5fd5f9344 2003-02-17 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleDataAdapter.cs:
        * System.Data.OracleClient/OracleRowUpdatedEventArgs.cs:
        * System.Data.OracleClient/OracleRowUpdatedEventHandler.cs:
        * System.Data.OracleClient/OracleRowUpdatingEventArgs.cs:
        * System.Data.OracleClient/OracleRowUpdatingEventHandler.cs:
        * list:
                New classes added.
        * System.Data.OracleClient/OracleDataReader.cs:
        * System.Data.OracleClient.Oci/OciDefineHandle.cs:
                Add handling for number and date types in OracleDataReader
                GetValue

svn path=/trunk/mcs/; revision=11664
2003-02-18 03:31:43 +00:00
Lluis Sanchez 032fcf581e * MessageFormatter.cs: Fixed bug in serialization of arguments.
* ObjectReader.cs: Fixed bug causing array of structs to fail.

svn path=/trunk/mcs/; revision=11661
2003-02-18 00:51:52 +00:00
Lluis Sanchez a7a4e09ae6 * ObjectManager.cs: Corrected a problem with arrays of structs. Elements where
not correctly updated by the final fixup.

svn path=/trunk/mcs/; revision=11660
2003-02-18 00:51:24 +00:00
Gonzalo Paniagua Javier 9c96dc9de2 2003-02-18 Gonzalo Paniagua Javier <[email protected]>
* XmlDocument.cs:
	(Load (string)): hack to workaround some issues with Uri.Parse. Once
	Parse is fixed, remove the hack.

svn path=/trunk/mcs/; revision=11659
2003-02-18 00:46:26 +00:00
Miguel de Icaza ca9e6be887 Flush
svn path=/trunk/mono/; revision=11654
2003-02-17 21:27:20 +00:00
Miguel de Icaza 06533c0a67 Flush
svn path=/trunk/mcs/; revision=11654
2003-02-17 21:27:20 +00:00
Gonzalo Paniagua Javier 5005bcfc48 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: Global.asax takes precedence
	over global.asax if it exists.

	* System.Web/HttpRequest.cs: use allowCrossAppMapping in MapPath.

	* System.Web.Hosting/AppDomainFactory.cs: Web.config takes precedence
	over web.config.

	* System.Web.Hosting/ApplicationHost.cs: removed hacks to work around
	an old bug.

svn path=/trunk/mcs/; revision=11649
2003-02-17 20:54:24 +00:00
Gonzalo Paniagua Javier 45a8d661be 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* NetworkStream.cs: allow 0 size array in Write.

svn path=/trunk/mcs/; revision=11648
2003-02-17 20:23:26 +00:00
Martin Baulig 729a1d22ba 2003-02-17 Martin Baulig <[email protected]>
* jit.c (mono_jit_compile_method): Don't emit a `nop' at the start
	of each method.

svn path=/trunk/mono/; revision=11645
2003-02-17 17:56:33 +00:00
Martin Baulig 94fdd07e5d 2003-02-17 Martin Baulig <[email protected]>
* Exception.cs (Exception.ToString): Print a newline between the
	exception message and the stack trace.

svn path=/trunk/mcs/; revision=11644
2003-02-17 17:55:06 +00:00
Gonzalo Paniagua Javier f7aaa744e4 forgot this one
svn path=/trunk/mcs/; revision=11643
2003-02-17 16:28:09 +00:00
Gonzalo Paniagua Javier dcd2278d3f 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplication.cs: CreateHttpHandler is now internal.

	* System.Web/HttpRequest.cs: allow setting QueryStringRaw, which
	invalidates the data obtained from the previous value. Added internal
	SetFilePath method.

	* System.Web/HttpServerUtility.cs: implemented Execute and GetLastError.

	* System.Web.Configuration/HandlerFactoryConfiguration.cs: first search
	in the mappings of this instance, then in the parent.

svn path=/trunk/mcs/; revision=11642
2003-02-17 16:22:26 +00:00
Dick Porter 186fc816f7 2003-02-17 Dick Porter <[email protected]>
* FileStream.cs: Don't close the handle if the stream doesn't own
	it.  Patch from Raymond Penners ([email protected]), bug
	35623.

svn path=/trunk/mcs/; revision=11641
2003-02-17 16:15:37 +00:00
Gonzalo Paniagua Javier b64f5b2c6c 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* reflection.c:
	(assembly_name_to_aname): jump over unknown properties (i've found
	something like: 'type, assembly, version=xxx, custom=null, public...',
	so now will ignore custom=null and still get the rest of the values).

svn path=/trunk/mono/; revision=11640
2003-02-17 15:55:21 +00:00
Daniel Morgan 192ac46f0a 2003-02-17 Daniel Morgan <[email protected]>
* doc/provider-factory: add new web page
	about Mono.Data's ProviderFactory

	* doc/web/commands
	* doc/web/makefile: add provider-factory web page to build

	* doc/ado-net
	* doc/ibmdb2
	* doc/postgresql
	* doc/sqlclient
	* doc/tdsclient
	* doc/sybase
	* doc/mysql
	* doc/firebird
	* doc/oracle
	* doc/oledb
	* doc/odbc
	* doc/sqlite: updated web pages

svn path=/trunk/mono/; revision=11639
2003-02-17 15:03:43 +00:00
Gonzalo Paniagua Javier f369737334 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* System/AppDomain.cs: implemented GetCurrentThreadId ().
	* System.Threading/Thread.cs: made the thread_id for the current thread
	accesible through an internal property.

svn path=/trunk/mcs/; revision=11638
2003-02-17 14:46:34 +00:00
Dick Porter d6c9704a79 2003-02-17 Dick Porter <[email protected]>
* threads.c: Have Thread.Start() wait for a semaphore to signal
	that the thread has set up all its local data.  This fixes bug
	34323, where Abort() raced the new thread's TLS data.

	Also removes the handle_store() call from start_wrapper, because
	threads are now always created suspended and there is no longer a
	race between the parent and child threads to store the info.

svn path=/trunk/mono/; revision=11637
2003-02-17 13:44:29 +00:00
Dick Porter 85be35cf99 2003-02-17 Dick Porter <[email protected]>
* Thread.cs: Added the Start semaphore field to the class.  Update
	the thread state after Start() has returned, not before.

svn path=/trunk/mcs/; revision=11636
2003-02-17 13:43:53 +00:00
Paolo Molaro 259fd130e0 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <[email protected]>
* image.c: explain the #- heap issue in a message, hopefully
	avoiding FAQs on mono-list.

svn path=/trunk/mono/; revision=11635
2003-02-17 12:17:56 +00:00
Nick Drochak 91bb988c97 2003-02-17 Nick Drochak <[email protected]>
* WebClient.cs : Implemented Credentials property.

svn path=/trunk/mcs/; revision=11634
2003-02-17 09:14:19 +00:00
Gonzalo Paniagua Javier 97879b91b7 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* HttpServerUtility.cs: style.

svn path=/trunk/mcs/; revision=11633
2003-02-17 08:06:51 +00:00
Gonzalo Paniagua Javier f16558ea6d 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
* icall.c:
	(GetEntryAssembly): if the domain has not invoked
	AppDomain.ExecuteAssembly yet, return the assembly of the default
	AppDomain.

svn path=/trunk/mono/; revision=11632
2003-02-17 07:03:37 +00:00
Miguel de Icaza b96a55870b Improve test
svn path=/trunk/mcs/; revision=11631
2003-02-17 07:01:16 +00:00
Miguel de Icaza 1a696d51e1 2003-02-17 Miguel de Icaza <[email protected]>
* typemanager.cs (IsSpecialMethod): The correct way of figuring
	out if a method is special is to see if it is declared in a
	property or event, or whether it is one of the predefined operator
	names.   This should fix correctly #36804.

svn path=/trunk/mcs/; revision=11630
2003-02-17 05:16:38 +00:00
Gonzalo Paniagua Javier 58ac3c61d1 2003-02-16 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: make Worker.Connect and Receive work with non-blocking
	sockets. May be Receive* and Send* in Worker need to do the same. I'll
	wait for bug reports. Set IsCompleted to true before invoking the end
	callback. Fixes bug #38136.

svn path=/trunk/mcs/; revision=11629
2003-02-16 22:13:26 +00:00
Lluis Sanchez 022abadb2e Small correction
svn path=/trunk/mcs/; revision=11628
2003-02-16 19:37:32 +00:00
Zoltan Varga 41c0bf5de4 2003-02-16 Zoltan Varga <[email protected]>
* class.c (mono_ldtoken): make it work in dynamic assemblies.

svn path=/trunk/mono/; revision=11627
2003-02-16 17:42:08 +00:00
Daniel Morgan c1c8601025 2003-02-16 Daniel Morgan <[email protected]>
* TdsConnection.cs: - parse data source for 2 possible uses:
	"Server=hostname",
	"Server=hostname,port" and open the connection based on the
	resulting server name and port.

svn path=/trunk/mcs/; revision=11626
2003-02-16 15:13:13 +00:00
Daniel Morgan 0fb926e9ed 2003-02-16 Daniel Morgan <[email protected]>
* SybaseConnection.cs: - parse data source for 2 possible uses:
	"Server=hostname",
	"Server=hostname,port" and open the connection based on the
	resulting server name and port.

svn path=/trunk/mcs/; revision=11625
2003-02-16 15:11:40 +00:00
Daniel Morgan db73cf5f48 2003-02-16 Daniel Morgan <[email protected]>
* TestSqlConnection.cs: added test file
	to test SqlClient, SybaseClient, and TdsClient
	and connections

	* System.Data_test.build: excluded
	TestSqlConnection.cs from NUnit tests

svn path=/trunk/mcs/; revision=11624
2003-02-16 15:08:25 +00:00
Daniel Morgan 4af8156695 2003-02-16 Daniel Morgan <[email protected]>
* ChangeLog: added this file

	* SqlConnection.cs: - parse data source for 3 possible uses:
	"Server=hostname",
	"Server=hostname\\instancename",
	"Server=hostname,port" and open the connection based on the
	resulting server name and port.
	- Added support for named instances
	by discovery of the sql server tcp port via the sql monitor (udp port 1434)
	thanks to Phillip Jerkins ([email protected]) contribution.
	Also, thanks to Gonzalo and Tim for their help with timeouts.

svn path=/trunk/mcs/; revision=11623
2003-02-16 14:48:40 +00:00
Atsushi Eno 494777747a 2003-02-16 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs: added TestLoadExternalUri
	* XmlTextReaderTests.cs: added TestAttributeWithEntityReference

svn path=/trunk/mcs/; revision=11622
2003-02-16 14:31:47 +00:00
Atsushi Eno beb936e904 2003-02-16 Atsushi Enomoto <[email protected]>
* XmlQualifiedName.cs : fixed GetHashCode() to avoid null reference
	* XmlTextReader.cs : fixed ReadAttributeValue() to handle
		entity reference, and some refactory.

svn path=/trunk/mcs/; revision=11621
2003-02-16 14:31:06 +00:00
Atsushi Eno 16bc71e8f1 2003-02-16 Atsushi Enomoto <[email protected]>
* XmlUrlResolver.cs : WebClient.Credentials was not implemented yet.

svn path=/trunk/mcs/; revision=11620
2003-02-16 12:32:19 +00:00
Paolo Molaro 642da61401 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <[email protected]>
* metadata.c, reflection.c: simple speedup to type hash
	and equals code.

svn path=/trunk/mono/; revision=11619
2003-02-16 12:14:11 +00:00
Martin Baulig 1408deaa7d 2003-02-16 Martin Baulig <[email protected]>
* doc/jit-debug-sample
	* doc/jit-debug-sample2: Removed.

	* doc/jit-debug: Updated.

svn path=/trunk/mono/; revision=11618
2003-02-16 11:46:23 +00:00
Martin Baulig 1f7a01ccfb 2003-02-16 Martin Baulig <[email protected]>
* docs/compiler: Added a few works about the new `Location' code.

svn path=/trunk/mcs/; revision=11617
2003-02-16 11:21:53 +00:00
Daniel Morgan d1ad4ea6b6 2003-02-16 Daniel Morgan <[email protected]>
* SqlSharpCli.cs: fix typos and when the
	provider is set to oracle, it should default
	to not using the simple reader

svn path=/trunk/mcs/; revision=11616
2003-02-16 10:48:14 +00:00
Daniel Morgan 73e7d1d111 2003-02-16 Daniel Morgan <[email protected]>
* sqlsharpgtk.cs: fixes to get data
	from an Oracle 8i database via
	Mono's System.Data.OracleClient.  It
	can only output the results to the TextView
	because the Oracle provider does not have
	a data adapter yet.

svn path=/trunk/mcs/; revision=11615
2003-02-16 10:44:01 +00:00
Daniel Morgan 1d31585645 2003-02-16 Daniel Morgan <[email protected]>
* System.Data.OracleClient.Oci/OciStatementHandle.cs
	* System.Data.OracleClient.Oci/OciColumnInfo.cs
	* System.Data.OracleClient/OciGlue.cs
	* System.Data.OracleClient/OracleDataReader.cs: fixes
	  to display character data in SQL# command-line
	  and GTK# versions

	* Test/TestOracleClient.cs: updated test to
	  include reading data via the OracleDataReader

	* System.Data.OracleClient/OracleConnection.cs: removed
	  debug code

svn path=/trunk/mcs/; revision=11614
2003-02-16 10:36:49 +00:00
Atsushi Eno 7a00fc77a5 2003-02-16 Atsushi Enomoto <[email protected]>
* added XmlInputStream.cs to list.unix and Mono.System.Xml.csproj.

svn path=/trunk/mcs/; revision=11613
2003-02-16 07:29:24 +00:00
Atsushi Eno cc86dade12 2003-02-16 Atsushi Enomoto <[email protected]>
* XmlSerializer.cs : serializing now works for interface member.

svn path=/trunk/mcs/; revision=11612
2003-02-16 07:27:47 +00:00
Atsushi Eno 615abae8f1 2003-02-16 Atsushi Enomoto <[email protected]>
* XmlInputStream.cs : added (also contains internal XmlStreamReader).
	* XmlDocument.cs : Load () now can specify URL using XmlUrlResolver,
		and can read non-UTF-8 stream.
	* XmlTextReader.cs : related to above stream fix.
	* XmlUrlResolver.cs : implemented GetEntity ().

svn path=/trunk/mcs/; revision=11611
2003-02-16 07:25:43 +00:00
Miguel de Icaza 81bfc0a71a 2003-02-15 Miguel de Icaza <[email protected]>
The goal here is to remove the dependency on EmptyCast.Peel ().
	Killing it completely.

	The problem is that currently in a number of places where
	constants are expected, we have to "probe" for an EmptyCast, and
	Peel, which is not the correct thing to do, as this will be
	repetitive and will likely lead to errors.

	The idea is to remove any EmptyCasts that are used in casts that
	can be reduced to constants, so we only have to cope with
	constants.

	This bug hunt was triggered by Bug 37363 and the desire to remove
	the duplicate pattern where we were "peeling" emptycasts to check
	whether they were constants.  Now constants will always be
	constants.

	* ecore.cs: Use an enumconstant here instead of wrapping with
	EmptyCast.

	* expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
	throwing me off.  By handling this we can get rid of a few hacks.

	* statement.cs (Switch): Removed Peel() code.

svn path=/trunk/mcs/; revision=11610
2003-02-15 22:12:44 +00:00
Zoltan Varga 6e13a2b089 2003-02-15 Zoltan Varga <[email protected]>
* makefile.gnu (test): do not install .dbg files since mcs no longer
	generates them.

svn path=/trunk/mcs/; revision=11609
2003-02-15 18:32:42 +00:00
Nick Drochak 88769b1c21 2003-02-15 Nick Drochak <[email protected]>
* makefile.gnu: Add testcorlib target to run just the corlib unit tests.

svn path=/trunk/mcs/; revision=11607
2003-02-15 16:01:18 +00:00
Nick Drochak 2c3354b5f5 2003-02-15 Nick Drochak <[email protected]>
* CollectionBaseTest.cs: Make it a better NUnit v2 example

svn path=/trunk/mcs/; revision=11606
2003-02-15 14:59:06 +00:00
Paolo Molaro 53d588843b Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <[email protected]>
* image.c, image.h, class.c, assembly.c: move module loading
	to MonoImage. When loading metadata, consider alignemnet from
	the start of metadata, not from the metadata address in memory.

svn path=/trunk/mono/; revision=11605
2003-02-15 14:21:46 +00:00
Pedro Martínez Juliá 7378a8a117 Hashtable.cs: Finish the work on the serialization and. Add TestCase for
the serialization with Binary Formatter.

svn path=/trunk/mcs/; revision=11604
2003-02-15 12:04:43 +00:00
Gonzalo Paniagua Javier 4bf7143482 2003-02-15 Gonzalo Paniagua Javier <[email protected]>
* list: forgot to add this one.

	* System.Web.Compilation/AspGenerator.cs: corrected typo and wrong fix.

	* System.Web.UI/Control.cs: have i definitely fixed naming container
	stuff this time?

	* System.Web.UI/LosFormatter.cs: activated binary serialization code.

	* System.Web.UI.WebControls/ButtonColumn.cs: fixed a couple of infinite
	loop problems and render correctly the header of the column.

	* System.Web.UI.WebControls/DataGridTableInternal.cs: don't assign a
	default ID to this control.

	* System.Web.UI.WebControls/LinkButton.cs: raise bubble event in
	OnCommand.

	* System.Web.UI.WebControls/TableCellCollection.cs: fixed the index
	returned by Add.

	* System.Web.UI.WebControls/TableRowCollection.cs: ditto.

svn path=/trunk/mcs/; revision=11601
2003-02-15 04:08:30 +00:00
Miguel de Icaza 997acc630c Add new test, for bug 37014
svn path=/trunk/mcs/; revision=11600
2003-02-15 03:58:37 +00:00
Sebastien Pouliot 6eccd57679 2003-02-14 Sebastien Pouliot <[email protected]>
* commands: Added System.Security to the list of assembly.
	* makefile: Added processing for System.Security.

svn path=/trunk/mono/; revision=11597
2003-02-15 00:43:34 +00:00
Sebastien Pouliot d723c925d2 2003-02-14 Sebastien Pouliot <[email protected]>
* class-status.in: Added assembly System.Security and link to crypto
	status page.
	* crypto: Corrected html typo (too bold ;-).

svn path=/trunk/mono/; revision=11596
2003-02-15 00:42:54 +00:00
Christopher Bockner f0991210c0 Changes to enable prepared statements, which sort of work now (need more testing).
svn path=/trunk/mcs/; revision=11592
2003-02-14 21:51:50 +00:00
Miguel de Icaza 42357eaf9b 2003-02-14 Miguel de Icaza <[email protected]>
* delegate.cs: The signature for EndInvoke should contain any ref
	or out parameters as well.  We were not doing this in the past.

svn path=/trunk/mcs/; revision=11591
2003-02-14 21:38:13 +00:00
Miguel de Icaza 27f43d377a More tests
svn path=/trunk/mcs/; revision=11590
2003-02-14 21:35:27 +00:00
Patrik Torstensson 10f6a0130b 2003-02-14 Patrik Torstensson
* x86.brg: Implemented CONV_OVF_[I|U]4 (freg), this fixes the issues
	with the "checked" keyword. Closes bugs #33421 and #35280 (JIT not mint)

svn path=/trunk/mono/; revision=11582
2003-02-14 14:41:29 +00:00
Patrik Torstensson 35dde25470 2003-02-14 Patrik Torstensson
* Makefile.am: Added checked.cs test.

svn path=/trunk/mono/; revision=11581
2003-02-14 12:57:58 +00:00
Patrik Torstensson 2bcd3194b5 2003-02-14 Patrik Torstensson
* checked.cs: Added checks for unsigned check keyword

svn path=/trunk/mono/; revision=11580
2003-02-14 12:54:56 +00:00
Rafael Teixeira 10ddb8a2b3 adjusting .cvsignore
svn path=/trunk/mcs/; revision=11579
2003-02-14 12:53:51 +00:00
Zoltan Varga dd0a3203e7 2003-02-14 Zoltan Varga <[email protected]>
* FileStream.cs (Write): flush after writing the last segment as well.

svn path=/trunk/mcs/; revision=11578
2003-02-14 10:36:15 +00:00
Patrik Torstensson 196c705599 2003-02-14 Patrik Torstensson
* x86-codegen.h: Added fstsw op code for getting fp flags

svn path=/trunk/mono/; revision=11577
2003-02-14 10:01:29 +00:00
Patrik Torstensson c4866cde97 2003-02-14 Patrik Torstensson
* checked.cs: New test that tests that the runtime throws correct overflow
		      exceptions during execution of checked keyword.

svn path=/trunk/mono/; revision=11576
2003-02-14 09:48:00 +00:00
Patrik Torstensson 4655a0eea1 2003-02-14 Patrik Torstensson
* Exception.cs: Fixed message output formating

svn path=/trunk/mcs/; revision=11575
2003-02-14 09:43:23 +00:00
Dietmar Maurer 05d003c788 2003-02-14 Dietmar Maurer <[email protected]>
* exception.c (mono_arch_find_jit_info): better way to handle
	situations where we have no MonoJitInfo

svn path=/trunk/mono/; revision=11574
2003-02-14 09:28:41 +00:00
Gonzalo Paniagua Javier 2aac73c7b6 2003-02-14 Gonzalo Paniagua Javier <[email protected]>
* Control.cs:
	(AddedControl): fixed default id assignation when the sequence of
	AddedControl until it's included in the page or one of its controls
	does not pass through a naming container.

svn path=/trunk/mcs/; revision=11573
2003-02-14 06:00:20 +00:00
Tim Coleman 3463119aa2 2003-02-13 Tim Coleman <[email protected]>
* makefile.gnu: Add System.Data.OracleClient to linux build.

svn path=/trunk/mcs/; revision=11572
2003-02-14 04:45:13 +00:00
Tim Coleman 1256a14783 2003-12-13 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/OciColumnInfo.cs:
	* System.Data.OracleClient.Oci/OciDataType.cs:
	* System.Data.OracleClient.Oci/OciDefineHandle.cs:
	* list:
		New classes added
	* System.Data.OracleClient/OciGlue.cs:
		Changes to AttrGet functions
	* System.Data.OracleClient/OracleCommand.cs:
	* System.Data.OracleClient/OracleDataReader.cs:
		Start some work on getting data reader going
	* System.Data.OracleClient.Oci/OciAttributeType.cs:
		Add DisplayName
	* System.Data.OracleClient.Oci/OciStatementHandle.cs:
		Add code to get schema for query, as well as
		define output values.

svn path=/trunk/mcs/; revision=11571
2003-02-14 04:32:30 +00:00
Gonzalo Paniagua Javier 9d920cdfb1 2003-02-14 Gonzalo Paniagua Javier <[email protected]>
* Int32.cs:
	(Parse): ignore everything after a \0 (MS parses: "512\0hola" as 512).

svn path=/trunk/mcs/; revision=11570
2003-02-14 04:29:25 +00:00
Gonzalo Paniagua Javier 20dbf7a0d0 2003-02-14 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: fixed code generation for Table/TableRow/TableCell
	when used explicitly.

svn path=/trunk/mcs/; revision=11568
2003-02-14 03:20:04 +00:00
Dennis Hayes 860d92e3f0 see last entry
svn path=/trunk/mcs/; revision=11567
2003-02-14 02:17:53 +00:00
Dennis Hayes 844e5e95d4 Samples\QuickStart\winforms\samples\controlreference\comboboxctl\cs
svn path=/trunk/mcs/; revision=11566
2003-02-14 02:17:26 +00:00
Daniel Morgan e0e8de2d7d 2003-02-13 Daniel Morgan <[email protected]>
* doc/screenshots
	* doc/ado-net
	* doc/oracle
	* doc/gtk-sharp: update web pages

svn path=/trunk/mono/; revision=11562
2003-02-13 23:41:06 +00:00
Miguel de Icaza 4b22b3f1f1 Push
svn path=/trunk/mono/; revision=11558
2003-02-13 23:04:57 +00:00
Zoltan Varga 5befaff2da 2003-02-13 Zoltan Varga <[email protected]>
* Thread.cs (Sleep): Timeout.Infinite is a value argument.

svn path=/trunk/mcs/; revision=11556
2003-02-13 19:12:54 +00:00
Paolo Molaro 606a0ec287 Thu Feb 13 18:40:52 CET 2003 Paolo Molaro <[email protected]>
* ModuleBuilder.cs: add the basic initialization call.

svn path=/trunk/mcs/; revision=11555
2003-02-13 17:44:46 +00:00
Miguel de Icaza d38aa4c0d6 update
svn path=/trunk/mono/; revision=11553
2003-02-13 16:56:14 +00:00
Gonzalo Paniagua Javier 30be3866c8 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* AspElements.cs: get the property Type for controls that use
	ParseChildren with a property name.

	* AspGenerator.cs: generate correct signature for the method that
	adds controls to the default property in ParseChildren.

svn path=/trunk/mcs/; revision=11552
2003-02-13 16:22:35 +00:00
Zoltan Varga a6407800bb 2003-02-13 Zoltan Varga <[email protected]>
* reflection.c (mono_reflection_get_custom_attrs): Added support for
	AssemblyBuilder objects. Factored out custom attribute creation into
	a separate function.
	(create_custom_attr): new function to create custom attributes.

svn path=/trunk/mono/; revision=11551
2003-02-13 12:43:51 +00:00
Zoltan Varga 5873ac9570 2003-02-13 Zoltan Varga <[email protected]>
* corlib_test.args: added AssemblyBuilderTest.cs

svn path=/trunk/mcs/; revision=11550
2003-02-13 12:40:19 +00:00
Zoltan Varga 72b6bb613d 2003-02-13 Zoltan Varga <[email protected]>
* AssemblyBuilderTest.cs: New file.

svn path=/trunk/mcs/; revision=11549
2003-02-13 12:39:31 +00:00
Zoltan Varga 02c3f7b1cd 2003-02-13 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: Added basic error checking to some methods
	according to the MSDN docs.

svn path=/trunk/mcs/; revision=11548
2003-02-13 12:38:14 +00:00
Nick Drochak 077dfc02e2 2003/02/13 Nick Drochak <[email protected]>
* ActivatorTest.cs:
	* MarshalByRefTest.cs: New unit tests from Jean-Marc Andr
	[[email protected]]. One failure on .NET in the latter.

svn path=/trunk/mcs/; revision=11547
2003-02-13 05:11:09 +00:00
Gonzalo Paniagua Javier e640c9f54b 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* GlobalizationConfiguration.cs: added internal fields to hold the
	values in the globalization node.

	* GlobalizationConfigurationHandler.cs: handler to load
	<system.web/globalization> section.

svn path=/trunk/mcs/; revision=11543
2003-02-13 02:47:50 +00:00
Gonzalo Paniagua Javier 12b4209f80 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added sample globalization section.

svn path=/trunk/mono/; revision=11542
2003-02-13 02:45:08 +00:00
Gonzalo Paniagua Javier dd7ba172ce 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: only execute the EndRequest step on error
	condition or request marked as completed. This prevent page events from
	being called when, for example, the url authorization module forbids
	the request.

svn path=/trunk/mcs/; revision=11541
2003-02-13 00:58:42 +00:00
Miguel de Icaza 3536718334 2003-02-12 Miguel de Icaza <[email protected]>
* ecore.cs (FieldExpr.AddressOf): In the particular case of This
	and structs, we do not want to load the instance variable

svn path=/trunk/mcs/; revision=11540
2003-02-13 00:56:24 +00:00
Gonzalo Paniagua Javier 4cd75e5715 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* UrlAuthorizationModule.cs: tell the application not to run any other
	step apart from EndRequest.

svn path=/trunk/mcs/; revision=11539
2003-02-13 00:55:42 +00:00
Tim Coleman c559a7bf4d 2003-02-12 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleException.cs:
	* System.Data.OracleClient.Oci/IOciHandle.cs:
	* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
	* System.Data.OracleClient.Oci/OciErrorHandle.cs:
	* System.Data.OracleClient.Oci/OciErrorInfo.cs:
	* System.Data.OracleClient.Oci/OciHandle.cs:
	* System.Data.OracleClient.Oci/OciServerHandle.cs:
	* System.Data.OracleClient.Oci/OciServiceHandle.cs:
	* System.Data.OracleClient.Oci/OciSessionHandle.cs:
	* System.Data.OracleClient.Oci/OciStatementHandle.cs:
	* System.Data.OracleClient.Oci/OciTransactionHandle.cs:
	* list:
		New classes added.  This encapsulates the OCI
		functionality into Handle objects.
	* System.Data.OracleClient/OciGlue.cs:
		Move a lot of code into Handle classes.
	* System.Data.OracleClient/OracleCommand.cs:
	* System.Data.OracleClient/OracleConnection.cs:
	* System.Data.OracleClient/OracleTransaction.cs:
		Retrofit for changes in OciGlue.

svn path=/trunk/mcs/; revision=11538
2003-02-13 00:50:39 +00:00
Piers Haken 7b8690a93c fix stopping after fix
svn path=/trunk/mcs/; revision=11537
2003-02-13 00:46:14 +00:00
Miguel de Icaza dbb885b9a1 Update tests
svn path=/trunk/mcs/; revision=11535
2003-02-13 00:34:47 +00:00
Miguel de Icaza b44fb5e4e5 2003-02-12 Miguel de Icaza <[email protected]>
* Makefile.am: Got tired of typing the full pathname to pedump.
	Until there is another option, am installing this.

svn path=/trunk/mono/; revision=11534
2003-02-13 00:08:07 +00:00
Miguel de Icaza b56489551b 2003-02-12 Miguel de Icaza <[email protected]>
* ecore.cs (ImplicitReferenceConversion,
	ImplicitReferenceConversionExists): enum_type has to be handled
	like an object reference (implicit conversions exists from this to
	object), but the regular IsClass and IsValueType tests will never
	return true for this one.

	Also we use TypeManager.IsValueType instead of type.IsValueType,
	just for consistency with the rest of the code (this is only
	needed if we ever use the construct exposed by test-180.cs inside
	corlib, which we dont today).

svn path=/trunk/mcs/; revision=11533
2003-02-12 23:24:07 +00:00
Miguel de Icaza a90a9d9f94 2003-02-12 Miguel de Icaza <[email protected]>
* Type.cs: IsClass should return false for Enumerations

svn path=/trunk/mcs/; revision=11532
2003-02-12 23:16:24 +00:00
Zoltan Varga e419439f92 2003-02-12 Zoltan Varga <[email protected]>
* MethodBuilderTest.cs: Added test for setting MethodImplAttributes
	using a custom attribute.

svn path=/trunk/mcs/; revision=11531
2003-02-12 20:37:23 +00:00
Zoltan Varga c84ac4051f 2003-02-12 Zoltan Varga <[email protected]>
* makefile (TEST_SOURCES): Added test-181.

svn path=/trunk/mcs/; revision=11530
2003-02-12 17:30:22 +00:00
Zoltan Varga c938c00ae6 2003-02-12 Zoltan Varga <[email protected]>
* attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
	just InternalCall.

svn path=/trunk/mcs/; revision=11529
2003-02-12 17:29:28 +00:00
Miguel de Icaza 940153a2d2 Update update
svn path=/trunk/mono/; revision=11528
2003-02-12 15:34:16 +00:00
Rafael Teixeira 844c910324 2003/02/12 Rafael Teixeira <[email protected]>
* added argument.cs (extracted from expression.cs) makefiles corrected
	* mb-parser.jay : eliminated reduce/reduce conflict on opt_argument_list rule,
	  by putting and if to make a argument list with just an empty argument list become an empty list

svn path=/trunk/mcs/; revision=11524
2003-02-12 13:53:05 +00:00
Dietmar Maurer d992488c00 (mono_ldtoken): use mono_defaults.fieldhandle_class;
svn path=/trunk/mono/; revision=11523
2003-02-12 12:18:20 +00:00
Daniel Morgan c4d22ba10c 2003-02-12 Daniel Morgan <[email protected]>
* README.TXT
    * System.Data.OracleClient/OciGlueLib_BCC_win32.make
    * System.Data.OracleClient/OciGlueLib_GCC_linux.make
    * System.Data.OracleClient/OciGlueLib_MSVC_win32.make
    * System.Data.OracleClient/ociglue.c
    * System.Data.OracleClient/ociglue.h
    * Test/Test.csproj
    * Test/Test.csproj.user: removed files because System.Data.OracleClient
    no longer uses a glue library

    * System.Data.OracleClient/TODOAttribute.cs: added file

    * System.Data.OracleClient/OracleCommand.cs
    * System.Data.OracleClient/OracleConnection.cs
    * System.Data.OracleClient/OciGlue.cs: modified -
    implement Disconnect and error handling (still need
    to create OracleException though)

    * Test/TestOracleClient.cs: clean up and accept
    connection parameters from command line

svn path=/trunk/mcs/; revision=11522
2003-02-12 12:08:18 +00:00
Martin Baulig 3e1c65ce14 Ooops, forgot to correct the size. This change only affects reading the symbol files, so we don't need to increment the version number.
svn path=/trunk/mcs/; revision=11521
2003-02-12 11:26:57 +00:00
Dietmar Maurer b85f0f2772 2003-02-12 Dietmar Maurer <[email protected]>
* class.c (class_compute_field_layout): always set field->parent

svn path=/trunk/mono/; revision=11520
2003-02-12 10:12:03 +00:00
Tim Coleman 57718c3451 2003-02-11 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/OciAttributeType.cs:
	* System.Data.OracleClient.Oci/OciCredentialType.cs:
	* System.Data.OracleClient.Oci/OciDescriptorType.cs:
	* System.Data.OracleClient.Oci/OciEnvironmentMode.cs:
	* System.Data.OracleClient.Oci/OciExecuteMode.cs:
	* System.Data.OracleClient.Oci/OciHandleType.cs:
	* System.Data.OracleClient.Oci/OciLobType.cs:
	* System.Data.OracleClient.Oci/OciPointerType.cs:
	* System.Data.OracleClient.Oci/OciSessionMode.cs:
	* System.Data.OracleClient.Oci/OciStatementLanguage.cs:
	* System.Data.OracleClient.Oci/OciStatementMode.cs:
	* System.Data.OracleClient.Oci/OciStatementType.cs:
	* System.Data.OracleClient.Oci/OciTransactionFlags.cs:
		New files for Oci namespace
	* list:
	* makefile.gnu:
		Update these files to fix linux build
	* System.Data.OracleClient/OciGlue.cs:
		Use OCI through P/Invoke directly, rename namespace
	* System.Data.OracleClient/OracleCommand.cs:
	* System.Data.OracleClient/OracleConnection.cs:
	* System.Data.OracleClient/OracleDataReader.cs:
	* System.Data.OracleClient/OracleParameter.cs:
	* System.Data.OracleClient/OracleParameterCollection.cs:
	* System.Data.OracleClient/OracleTransaction.cs:
		Retrofit these files for the changes in OciGlue.cs

svn path=/trunk/mcs/; revision=11516
2003-02-12 03:57:47 +00:00
Gonzalo Paniagua Javier 9b098982cf 2003-02-12 Gonzalo Paniagua Javier <[email protected]>
* list: added AuthorizationConfig and AuthorizationConfigHandler.

	* System.Web/HttpRequest.cs: implemented the indexer.

	* System.Web.Configuration/AuthorizationConfigHandler.cs: handler for
	system.web/authorization section.

	* System.Web.Configuration/AuthorizationConfig.cs: keeps record of
	authorization configuration.

	* System.Web.Security/FormsAuthentication.cs: implemented
	RedirectFromLoginPage and GetRedirectUrl.

	* System.Web.Security/FormsAuthenticationModule.cs: redirect to the
	login page when a 401 error happens.

	* System.Web.Security/UrlAuthorizationModule.cs: check for valid user
	or render error page.

svn path=/trunk/mcs/; revision=11512
2003-02-12 03:39:46 +00:00
Gonzalo Paniagua Javier 96f82806c5 2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* configure.in: added check for sys/un.h.
	* mono/metadata/socket-io.c: support AF_UNIX and use the same layout as
	MS, not the one they documented (bytes 0 and 1 are the family).

svn path=/trunk/mono/; revision=11511
2003-02-12 03:24:09 +00:00
Jaime Anguiano Olarra fc0bd945c4 More infoMore info..
svn path=/trunk/mono/; revision=11500
2003-02-12 00:36:40 +00:00
Miguel de Icaza 5ca8a55ee5 Flush
svn path=/trunk/mono/; revision=11496
2003-02-11 21:40:27 +00:00
Marco Ridoni cb871c7c6d A few minor fixes
svn path=/trunk/mcs/; revision=11495
2003-02-11 20:04:27 +00:00
Marco Ridoni 941d9a15f9 Variable and array initializers are properly implemented
Array creation is handled in a better fashion

svn path=/trunk/mcs/; revision=11494
2003-02-11 19:56:01 +00:00
Tim Coleman acf348e623 Fix changelog
svn path=/trunk/mcs/; revision=11493
2003-02-11 18:08:26 +00:00
Tim Coleman 89e3f2a012 2003-02-11 Tim Coleman <[email protected]>
* System.Data.SqlClient/SqlConnection.cs:
        * System.Data.SqlClient/SqlDataReader.cs:
                Close the data reader properly, and be sure
                to close the data reader when the connection
                is closed.

svn path=/trunk/mcs/; revision=11492
2003-02-11 18:02:38 +00:00
Tim Coleman 2168336c44 2003-02-11 Tim Coleman <[email protected]>
* data/config.in: Add mapping for Oracle call interface
        (OCI) native libraries.

svn path=/trunk/mono/; revision=11491
2003-02-11 17:52:21 +00:00
Jaime Anguiano Olarra aeeeabdf24 Added link to the MWN item and archives.
svn path=/trunk/mono/; revision=11490
2003-02-11 17:47:14 +00:00
Jaime Anguiano Olarra 70895c6935 Fix.
svn path=/trunk/mono/; revision=11489
2003-02-11 17:32:17 +00:00
Jaime Anguiano Olarra 0473fb6f61 Links to mwn today and mwn archives
svn path=/trunk/mono/; revision=11488
2003-02-11 17:06:22 +00:00
Gonzalo Paniagua Javier 1259587222 No comments.
svn path=/trunk/mcs/; revision=11487
2003-02-11 16:49:21 +00:00
Gonzalo Paniagua Javier bc2ec9054b 2003-02-11 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: rethrow exceptions that may can from parsing or
	compilation if a user control.

svn path=/trunk/mcs/; revision=11486
2003-02-11 16:37:57 +00:00
Gonzalo Paniagua Javier 1db7027fe6 2003-02-11 Gonzalo Paniagua Javier <[email protected]>
* MonoCustomAttrs.cs: return the correct array type in the short case.
	Fixes bug #37818.

svn path=/trunk/mcs/; revision=11485
2003-02-11 15:30:50 +00:00
Dick Porter ebcbf2b2fc 2003-02-11 Dick Porter <[email protected]>
* Monitor.cs: Infinite wait is Infinite, not 0 ms

svn path=/trunk/mcs/; revision=11484
2003-02-11 15:11:50 +00:00
Dick Porter 8702850b3f 2003-02-11 Dick Porter <[email protected]>
* threads-types.h:
	* monitor.c: Rewrote Monitor, making lock much faster and
	Pulse/Wait work as specified.  Also uses much fewer handles, and only
	creates them as needed.

	* exception.c: Added SynchronizationLockException

	* threads.c: Deleted old Monitor implementation.  The new one is
	in a new file.

2003-02-11  Dick Porter  <[email protected]>

	* timefuncs.h:
	* timefuncs.c: Added GetTickCount()

svn path=/trunk/mono/; revision=11483
2003-02-11 15:10:40 +00:00
Piers Haken a81f50b5fe *** empty log message ***
svn path=/trunk/mcs/; revision=11482
2003-02-11 12:48:30 +00:00
Patrik Torstensson caf229d10d 2003-02-11 Patrik Torstensson
* ObjectReader.cs: Fixed root object bug causing object reader to return root object
	  before fixup. Closes bug #37842.

svn path=/trunk/mcs/; revision=11481
2003-02-11 12:43:46 +00:00
Zoltan Varga fd6ded786c 2003-02-11 Zoltan Varga <[email protected]>
* trampoline.c (arch_create_jit_trampoline): This function should
	allways return a trampoline for managed methods. Fixes bug #29859.

svn path=/trunk/mono/; revision=11480
2003-02-11 11:06:12 +00:00
Zoltan Varga 2b55f54b9c Added regression test for bug #29859.
svn path=/trunk/mono/; revision=11479
2003-02-11 11:04:14 +00:00
Jackson Harper c90b57ea8c * makefile: remove unneeded rm's
svn path=/trunk/mcs/; revision=11478
2003-02-11 07:32:24 +00:00
Jackson Harper 0ec4055f30 * test-4.il: Add file
* makefile: Add new test

svn path=/trunk/mcs/; revision=11477
2003-02-11 07:28:15 +00:00
Jackson Harper 9ccd53016b Use arg_list for method signatures, set method parameters
svn path=/trunk/mcs/; revision=11476
2003-02-11 07:23:59 +00:00
Jackson Harper 57af9803b7 * Method.cs: Add method to set parameters,
set parameters when defining type
	* Class.cs: Fix very silly bug in GetMethod method

svn path=/trunk/mcs/; revision=11475
2003-02-11 07:22:08 +00:00
Gonzalo Paniagua Javier 980ac054de 2003-02-11 Gonzalo Paniagua Javier <[email protected]>
* debug.c: allocate debug->source_files. Fixes GLib-CRITICAL upon
	debugging clean up.

svn path=/trunk/mono/; revision=11474
2003-02-11 06:36:05 +00:00
Gonzalo Paniagua Javier 10e11ee302 2003-02-11 Gonzalo Paniagua Javier <[email protected]>
* StringReader.cs:
	(ReadLine): fixed the case when the string ends with a '\n'.

svn path=/trunk/mcs/; revision=11473
2003-02-11 05:42:51 +00:00
Gonzalo Paniagua Javier 97eba89dcb Fixes the build
svn path=/trunk/mcs/; revision=11470
2003-02-11 05:13:15 +00:00
Gonzalo Paniagua Javier 19bd9945fb Forgot this one.
svn path=/trunk/mcs/; revision=11468
2003-02-11 05:06:13 +00:00
Gonzalo Paniagua Javier 216bec00c9 2003-02-11 Gonzalo Paniagua Javier <[email protected]>
* list: added a couple of new files.
	* System.Web/HtmlizedException.cs: base class for exceptions that makes
	it easy to generate error pages.

	* System.Web/HttpException.cs: improved error displaying.

	* System.Web/HttpRuntime.cs: removed debugging output.

	* System.Web.Compilation/AspGenerator.cs: throw ParseException on parse
	error.

	* System.Web.Compilation/AspParser.cs: added Line and Column props.

	* System.Web.Compilation/CompilationException.cs: derives now from
	HtmlizedException.

	* System.Web.Compilation/CompilationResult.cs: added fileName field.
	Fixed set_ExitCode.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: pass the file name in
	the CompilationResult.

	* System.Web.Compilation/ParseException.cs: new exception.

svn path=/trunk/mcs/; revision=11467
2003-02-11 05:04:30 +00:00
Miguel de Icaza 0dc11cea68 Commit for Daniel: many improvements to the FileSystem code.
svn path=/trunk/mcs/; revision=11466
2003-02-11 05:01:35 +00:00
Tim Coleman a7170ffd21 2003-02-10 Tim Coleman <[email protected]>
* MonoOracleClient.csproj :
	* MonoOracleClient.csproj.user :
	* MonoOracleClient.sln :
	* MonoOracleClient.suo :
		Remove obsolete files

svn path=/trunk/mcs/; revision=11465
2003-02-11 04:44:31 +00:00
Tim Coleman 570d39cfa1 2003-02-10 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleDataReader.cs:
        * System.Data.OracleClient/OracleParameter.cs:
        * System.Data.OracleClient/OracleParameterCollection.cs:
        * System.Data.OracleClient/OracleString.cs:
        * System.Data.OracleClient/OracleTransaction.cs:
        * System.Data.OracleClient/OracleType.cs:
                Added some implementation of these required objects.
        * list:
                Add new files to the build.
        * System.Data.OracleClient/OciGlue.cs:
        * System.Data.OracleClient/ociglue.c:
        * System.Data.OracleClient/ociglue.h:
                Add transaction logic.
        * System.Data.OracleClient/OracleCommand.cs:
        * System.Data.OracleClient/OracleConnection.cs:
                Add some more implementation

svn path=/trunk/mcs/; revision=11457
2003-02-11 01:37:56 +00:00
Tim Coleman 97a15c7691 2003-02-10 Tim Coleman <[email protected]>
* library.build:
		Disable OracleClient build on Windows so that I don't
		break the build.  I'm developing on Linux at present.

svn path=/trunk/mcs/; revision=11456
2003-02-11 01:32:46 +00:00
Christopher Bockner f9a00324d8 DB2ClientPrototypes.cs
Added SQLDescribeParam and SQLBindParameter.

svn path=/trunk/mcs/; revision=11454
2003-02-10 21:31:37 +00:00
Christopher Bockner 1aa729a130 DB2ClientDataReader.cs:
Small change, cast to int instead of ToInt32()...

svn path=/trunk/mcs/; revision=11453
2003-02-10 21:29:04 +00:00
Christopher Bockner 05ec8fde09 DB2ClientConstants.cs:
Added a bunch of costants for SQL data types.

svn path=/trunk/mcs/; revision=11452
2003-02-10 21:22:57 +00:00
Christopher Bockner 0b75828378 DB2ClientConnection.cs: Added error checking on SQLDisconnect.
svn path=/trunk/mcs/; revision=11451
2003-02-10 21:20:22 +00:00
Christopher Bockner 0a0e24256b DB2ClientCommand.cs: Various changes, mostly to support prepared statements.
svn path=/trunk/mcs/; revision=11450
2003-02-10 21:17:55 +00:00
Christopher Bockner fffbdd3bc4 DB2ClientParameterCollection.cs: Adding this class to support prepared statements.
svn path=/trunk/mcs/; revision=11449
2003-02-10 21:10:53 +00:00
Christopher Bockner 9008b734ea DB2ClientParameter.cs: Adding the parameter class so we can implement prepared statements.
:

svn path=/trunk/mcs/; revision=11448
2003-02-10 21:06:18 +00:00
Paolo Molaro be2288ded6 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <[email protected]>
* class.c: handled TypedReference type code. Set the correct size for
	class data. Setup interface_offsets for interface classes, too.

svn path=/trunk/mono/; revision=11447
2003-02-10 16:58:57 +00:00
Nick Drochak 43ce1d515f 2003-02-10 Nick Drochak <[email protected]>
* makefile: Add testcorlib target to run just the corlib unit tests.

svn path=/trunk/mcs/; revision=11446
2003-02-10 14:46:30 +00:00
Nick Drochak 70dfcc7dd8 2003-02-10 Nick Drochak <[email protected]>
* library.build:
	* makefile: add testcorlib target to run unit tests just for corlib.

svn path=/trunk/mcs/; revision=11445
2003-02-10 14:44:58 +00:00
Gonzalo Paniagua Javier 1026d46505 2003-02-10 Gonzalo Paniagua Javier <[email protected]>
* Thread.cs: fixed bug #37759.

svn path=/trunk/mcs/; revision=11444
2003-02-10 14:14:13 +00:00
Nick Drochak 97c1a96048 2003-02-10 Nick Drochak <[email protected]>
* Registry.cs: Class should be sealed and have a private default ctor.

svn path=/trunk/mcs/; revision=11443
2003-02-10 14:14:06 +00:00
Nick Drochak f77ae165ac 2003-02-10 Nick Drochak <[email protected]>
* System.Data.build: Keep the standalone tests out of the dll. Fixes
	build breakage on cygwin.

svn path=/trunk/mcs/; revision=11442
2003-02-10 14:10:12 +00:00
Nick Drochak cf36ecd09d 2003-02-10 Nick Drochak <[email protected]>
* Mono.CSharp.Debugger.build: passing the /r using an 'arg' node works.
	The <include> node wasn't getting to the compiler. This fixes build
	breakage on cygwin.

	* MonoSymbolFile.cs: Qualify which Min method. Fixes build breakage
	on cygwin.

svn path=/trunk/mcs/; revision=11441
2003-02-10 13:58:05 +00:00
Zoltan Varga 6a3337c201 2003-02-10 Zoltan Varga <[email protected]>
* ConstructorBuilder.cs:
	- Added basic error checking to all methods according to the MSDN docs.
	- modified a lot of methods to throw NotSupportedException, to comply
	  with MS.NET.

svn path=/trunk/mcs/; revision=11440
2003-02-10 13:53:12 +00:00
Zoltan Varga bc6b91f88c 2003-02-10 Zoltan Varga <[email protected]>
* ConstructorBuilderTest.cs: added SetCustomAttribute() tests.

svn path=/trunk/mcs/; revision=11439
2003-02-10 13:17:31 +00:00
Zoltan Varga ea30af9f57 2003-02-10 Zoltan Varga <[email protected]>
* MethodBuilderTest.cs: updated to NUNIT2 conventions.

	* ConstructorBuilderTest.cs: New file.

svn path=/trunk/mcs/; revision=11438
2003-02-10 12:51:08 +00:00
Zoltan Varga 527221e06e 2003-02-09 Zoltan Varga <[email protected]>
* TypeBuilder.cs:
	- Added basic error checking to all methods according to the MSDN docs.
	- fixed AssemblyQualifiedName.
	- implemented 'Size'.
	- modified a lot of methods to throw NotSupportedException, to comply
	  with MS.NET.
	- changes tested by running a full bootstrap.

svn path=/trunk/mcs/; revision=11437
2003-02-10 10:41:09 +00:00
Dennis Hayes 0adef9c4cf checkin for Alexandre Pigolkine see chagelog
svn path=/trunk/mcs/; revision=11434
2003-02-10 06:28:51 +00:00
Jackson Harper d64fcfd51a * test-3.il: Add file
* makefile: Add new test

svn path=/trunk/mcs/; revision=11433
2003-02-10 05:32:31 +00:00
Jackson Harper 3e9a3556fa full names can be short names too (for members)
svn path=/trunk/mcs/; revision=11432
2003-02-10 05:30:01 +00:00
Jackson Harper 8390bcaedd * Class.cs: Resolve Methods before emiting
* InstrBase.cs: Take a Class instead of CodeGen when emiting
	* Method.cs: Replace MethodInfo property with MethodBuilder property,
        	Add resolve method
	* Instructions.cs: Take Class instead of CodeGen when emitting,
	        get member methods from Class.
	* TypeManager.cs: Add set indexer

svn path=/trunk/mcs/; revision=11431
2003-02-10 05:27:36 +00:00
Piers Haken 9bc3cff12a 2003-02-09 Piers Haken <[email protected]>
* SelectNodesTests.cs: added TestNamespaceSelect (from Jerome Laban)

svn path=/trunk/mcs/; revision=11428
2003-02-09 22:57:59 +00:00
Piers Haken 2a62fc4766 2003-02-09 Piers Haken <[email protected]>
* XPathNavigator.cs:
	* Iterator.cs:
	* Expression.cs: fix namespace handling

svn path=/trunk/mcs/; revision=11427
2003-02-09 22:54:50 +00:00
Martin Baulig 938050e712 Ooops.
svn path=/trunk/mcs/; revision=11424
2003-02-09 22:42:42 +00:00
Martin Baulig 8e4a2a5a2b 2003-02-09 Martin Baulig <[email protected]>
* AssemblyBuilder.cs (AssemblyBuilder.methods): Removed.  This was
	a hack for the symbol writer which is no longer needed.

svn path=/trunk/mcs/; revision=11423
2003-02-09 22:39:06 +00:00
Martin Baulig bef12dc160 2003-02-09 Martin Baulig <[email protected]>
* MonoSymbolWriter.cs (MonoSymbolWriter.ctor): We don't need the
	`mbuilder_array' anymore.

svn path=/trunk/mcs/; revision=11422
2003-02-09 22:37:32 +00:00
Martin Baulig 5214f2e39f Small fix.
svn path=/trunk/mcs/; revision=11421
2003-02-09 22:36:14 +00:00
Martin Baulig 12e57c40bc 2003-02-09 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Reflect latest symbol writer changes.

svn path=/trunk/mono/; revision=11420
2003-02-09 22:33:59 +00:00
Martin Baulig 06c897e1b0 2003-02-09 Martin Baulig <[email protected]>
* namespace.cs (Namespace..ctor): Added SourceFile argument.
	(Namespace.DefineNamespaces): New static public method; this is
	called when we're compiling with debugging to add all namespaces
	to the symbol file.

	* tree.cs (Tree.RecordNamespace): Added SourceFile argument and
	pass it to the Namespace's .ctor.

	* symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
	and MethodBase arguments; pass the namespace ID to the symwriter;
	pass the MethodBase instead of the token to the symwriter.
	(SymbolWriter.DefineNamespace): New method to add a namespace to
	the symbol file.

svn path=/trunk/mcs/; revision=11419
2003-02-09 22:32:46 +00:00
Martin Baulig 870fcd6bf8 Fixed typo.
svn path=/trunk/mcs/; revision=11418
2003-02-09 22:27:43 +00:00
Martin Baulig 12573167b7 2003-02-09 Martin Baulig <[email protected]>
* MonoSymbolWrtier.cs (SourceFile): Derive from SourceFileEntry.
	(SourceBlock): We don't need source lines here.
	(SourceMethod): We're always constructed with source info.

	* MonoSymbolTable.cs: Added support for namespaces.
	(NamespaceEntry): New struct.
	(SourceFileEntry.DefineNamespace): New method.
	(MethodEntry.BuildLineNumberTable): The table is already sorted,
	so we don't need to do this here.

svn path=/trunk/mcs/; revision=11417
2003-02-09 22:27:01 +00:00
Martin Baulig 5cc90d6524 2003-02-09 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs: Ooops, I forgot to remove this.

svn path=/trunk/mcs/; revision=11416
2003-02-09 22:24:18 +00:00
Martin Baulig 9d1953a5b3 2003-02-09 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs (DefineNamespace, OpenMethod): New methods.

svn path=/trunk/mcs/; revision=11415
2003-02-09 22:23:23 +00:00
Gonzalo Paniagua Javier aa59cf428b 2003-02-09 Gonzalo Paniagua Javier <[email protected]>
* interp.c: added a dummy mono_runtime_install_handlers function to
	avoid crashing when ves_pinvoke_method tries to call it.

svn path=/trunk/mono/; revision=11411
2003-02-09 21:29:26 +00:00
Martin Baulig 240a8d1ee0 2003-02-09 Martin Baulig <[email protected]>
* symbolwriter.cs: New file.  This is a wrapper around
	ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
	methods here in near future.

svn path=/trunk/mcs/; revision=11410
2003-02-09 21:15:10 +00:00
Martin Baulig 1ae4e1bd76 Hmm, sort the table for the moment, this is just a bit slower, but more stable.
svn path=/trunk/mcs/; revision=11409
2003-02-09 20:12:56 +00:00
Martin Baulig 157b960076 Reflect latest API changes.
svn path=/trunk/mcs/; revision=11408
2003-02-09 20:11:15 +00:00
Martin Baulig 6f8b5d6fd8 2003-02-09 Martin Baulig <[email protected]>
* codegen.cs (EmitContext.Mark): Just pass the arguments to
	ILGenerator.MarkSequencePoint() which are actually used by the
	symbol writer.

svn path=/trunk/mcs/; revision=11407
2003-02-09 20:10:53 +00:00
Martin Baulig b40f0a5f2a 2003-02-09 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs (MarkSequencePoint): New method which takes
	just the required arguments as scalars, not arrays.

	* ILGenerator.cs (ILGenerator.MarkSequencePoint): Use that new
	interface method; unnecessarily creating such a large number of
	arrays is both slow and too memory consuming.

svn path=/trunk/mcs/; revision=11406
2003-02-09 20:09:05 +00:00
Martin Baulig eb7680eb5b 2003-02-09 Martin Baulig <[email protected]>
* location.cs (SourceFile): New public sealed class.  This
	contains the name and an index which is used in the location's token.
	(Location): Reserve an appropriate number of bits in the token for
	the source file instead of walking over that list, this gives us a
	really huge performance improvement when compiling with debugging.

	* driver.cs (Driver.parse, Driver.tokenize_file): Take a
	`SourceFile' argument instead of a string.
	(Driver.ProcessFile): Add all the files via Location.AddFile(),
	but don't parse/tokenize here, we need to generate the list of all
	source files before we do that.
	(Driver.ProcessFiles): New static function.  Parses/tokenizes all
	the files.

	* cs-parser.jay (CSharpParser): Take a `SourceFile' argument
	instead of a string.

	* cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
	of a string.

svn path=/trunk/mcs/; revision=11405
2003-02-09 19:39:02 +00:00
Martin Baulig 3e51097a97 Hmm, no, this was wrong.
svn path=/trunk/mcs/; revision=11404
2003-02-09 19:23:20 +00:00
Zoltan Varga fb2ea3f479 2003-02-09 Zoltan Varga <[email protected]>
* TypeBuilderTest.cs: Added lots of new tests.

svn path=/trunk/mcs/; revision=11403
2003-02-09 19:17:12 +00:00
Rodrigo Moya 6f5a39d6d8 2003-02-09 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbConnection.cs:
	* System.Data.OleDb/libgda.cs: upgraded to libgda 0.10.

svn path=/trunk/mcs/; revision=11402
2003-02-09 19:15:42 +00:00
Paolo Molaro 6a35737bdb Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <[email protected]>
* loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
	* metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
	* object.c: fixed mono_object_get_virtual_method () for interfaces.
	* verify.c: check for code that runs after the end of the method.

svn path=/trunk/mono/; revision=11398
2003-02-09 17:45:09 +00:00
Martin Baulig 44f03173d5 2003-02-09 Martin Baulig <[email protected]>
* driver.cs (Driver.SetupDefaultDefines): Define `__MonoRuntime__'
	if we're using mono's corlib.

svn path=/trunk/mcs/; revision=11397
2003-02-09 16:41:32 +00:00
Martin Baulig b596330b38 2003-02-09 Martin Baulig <[email protected]>
* cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
	filename on `#line default'.

svn path=/trunk/mcs/; revision=11396
2003-02-09 16:39:03 +00:00
Martin Baulig 237d5155be 2003-02-09 Martin Baulig <[email protected]>
* output.c: Use `#line default' instead of source file "-".

svn path=/trunk/mcs/; revision=11395
2003-02-09 16:37:28 +00:00
Jackson Harper 211962f587 Use TypeManager to loopup types
svn path=/trunk/mcs/; revision=11394
2003-02-09 08:31:46 +00:00
Jackson Harper 79166a08c3 Use full names for calling instructions
svn path=/trunk/mcs/; revision=11393
2003-02-09 08:29:47 +00:00
Gonzalo Paniagua Javier 3d4938068e 2003-02-09 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: give different default names depending on the place where
	it is assigned. Implemented ResolveURl (no more ~ rendered in
	attributes!).

svn path=/trunk/mcs/; revision=11392
2003-02-09 04:26:02 +00:00
Jackson Harper dfe7259c93 forgot changelog
svn path=/trunk/mcs/; revision=11391
2003-02-09 04:22:33 +00:00
Gonzalo Paniagua Javier 73e208ce0e 2003-02-09 Gonzalo Paniagua Javier <[email protected]>
* ArrayList.cs: fixed setSize (!).

svn path=/trunk/mcs/; revision=11390
2003-02-09 04:22:24 +00:00
Jackson Harper 1e4a818de7 * TypeManager.cs: Fix error parsing type names
* Method.cs: Display the name of types that can't be found

svn path=/trunk/mcs/; revision=11389
2003-02-09 04:21:48 +00:00
Jackson Harper 9199a29155 Create type names properly
svn path=/trunk/mcs/; revision=11388
2003-02-09 04:15:58 +00:00
Tim Coleman 84939c2ed6 2003-02-08 Tim Coleman <[email protected]>
* System.Data.OracleClient/OciGlueLib_BCC_win32.make:
        * System.Data.OracleClient/OciGlueLib_MSVC_win32.make:
        change name of library to ociglue.dll
        * System.Data.OracleClient/ociglue.c:
        Use the "database" parameter as TNSNAME.
        * System.Data.OracleClient/OciGlue.cs:
        Change DllImport from "System.Data.OracleClient.ociglue.dll" to
        "ociglue".
        * System.Data.OracleClient/OciGlueLib_GCC_linux.make:
        added makefile for ociglue shared lib on Linux platform
        and compiler gcc.

svn path=/trunk/mcs/; revision=11387
2003-02-09 03:46:24 +00:00
Jackson Harper f07ac8f82a forgot to commit changelog
svn path=/trunk/mcs/; revision=11386
2003-02-09 03:43:30 +00:00
Jackson Harper 86aa4c7948 oops
svn path=/trunk/mcs/; revision=11385
2003-02-09 03:42:35 +00:00
Jackson Harper f8f8ae2375 Add TypeManager.cs to build
svn path=/trunk/mcs/; revision=11384
2003-02-09 03:41:47 +00:00
Jackson Harper 105cf53662 Handle argument lists better
svn path=/trunk/mcs/; revision=11383
2003-02-09 03:39:19 +00:00
Jackson Harper cfe745701c * TypeManager.cs: Add file
* CodeGen.cs: Add TypeManager attribute
        * InstrBase.cs: Take a CodeGen in Emit method
        * Instructions.cs: Take a CodeGen in Emit method, handle arg lists better
        * Method.cs: Handle local variables better

svn path=/trunk/mcs/; revision=11382
2003-02-09 03:38:20 +00:00
Tim Coleman a98c2a96ae 2003-02-08 Tim Coleman <[email protected]>
* System.Data.OracleClient/OciGlueLib_GCC_linux.make:
        added makefile for ociglue shared lib on Linux platform
        and compiler gcc.

svn path=/trunk/mcs/; revision=11381
2003-02-09 02:44:00 +00:00
Jackson Harper 7d2d49e0bd Change class name
svn path=/trunk/mcs/; revision=11379
2003-02-08 23:50:42 +00:00
Jackson Harper eb94276bcf Change class name
svn path=/trunk/mcs/; revision=11378
2003-02-08 23:49:46 +00:00
Jackson Harper 2c83a37602 * test-2.il: Add new test
* makefile: Use new test

svn path=/trunk/mcs/; revision=11377
2003-02-08 23:46:27 +00:00
Jackson Harper eb4cea017d * Method.cs: Add functionality to define local variables
* Instructions.cs: Add newobj instruction, cleanup call instruction

svn path=/trunk/mcs/; revision=11376
2003-02-08 23:42:42 +00:00
Jackson Harper 8088be6ff0 Handle .local and newobj
svn path=/trunk/mcs/; revision=11375
2003-02-08 23:39:14 +00:00
Pedro Martínez Juliá 69ffe8cefc Fix a few methods in "Math.cs" and add the necesary internal calls to "icall.c", "sysmath.h" and "sysmath.c". There is also a modification of "MathTest.cs".
svn path=/trunk/mono/; revision=11373
2003-02-08 22:47:42 +00:00
Pedro Martínez Juliá fef73a42b0 Fix a few methods in "Math.cs" and add the necesary internal calls to "icall.c", "sysmath.h" and "sysmath.c". There is also a modification of "MathTest.cs".
svn path=/trunk/mcs/; revision=11373
2003-02-08 22:47:42 +00:00
Martin Baulig a948f85ee4 2003-02-08 Martin Baulig <[email protected]>
* MonoSymbolDocumentWriter.cs: Removed.

	* MonoSymbolWriter.cs (SourceFile): Implement ISymbolDocumentWriter.

svn path=/trunk/mcs/; revision=11372
2003-02-08 22:18:38 +00:00
Piers Haken 2224d09834 fix attachment filename
svn path=/trunk/mcs/; revision=11371
2003-02-08 22:13:14 +00:00
Martin Baulig 0acb6d0cdd This comment is incorrect, we aren't generating DWARF here.
svn path=/trunk/mcs/; revision=11370
2003-02-08 22:11:45 +00:00
Zoltan Varga 008af337d4 2003-02-08 Zoltan Varga <[email protected]>
* corlib_test.args: added TypeBuilderTest.cs.

svn path=/trunk/mcs/; revision=11366
2003-02-08 20:33:32 +00:00
Zoltan Varga 4126638853 2003-02-08 Zoltan Varga <[email protected]>
* TypeBuilderTest.cs: New file.

svn path=/trunk/mcs/; revision=11364
2003-02-08 20:32:25 +00:00
Gonzalo Paniagua Javier ffbcd0365b 2003-02-08 Gonzalo Paniagua Javier <[email protected]>
* list.unix: added ImageAttributes.cs.
	* System.Drawing/Graphics.cs: stubbed out all the methods.

svn path=/trunk/mcs/; revision=11363
2003-02-08 20:07:42 +00:00
Gonzalo Paniagua Javier 49f4b61e8b really remove Font.cs
svn path=/trunk/mcs/; revision=11362
2003-02-08 20:05:48 +00:00
Martin Baulig 68fa8de87a 2003-02-08 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (GetMethodSource): New public method.
	(FindMethod): Return the correct index.

svn path=/trunk/mcs/; revision=11360
2003-02-08 19:24:01 +00:00
Paolo Molaro a9b126bce5 Fixed build.
svn path=/trunk/mcs/; revision=11359
2003-02-08 18:30:20 +00:00
Zoltan Varga e41b1cb367 2003-02-08 Zoltan Varga <[email protected]>
* corlib_test.args: added beginnings of Reflection.Emit test suite.

svn path=/trunk/mcs/; revision=11357
2003-02-08 16:57:21 +00:00
Zoltan Varga 322bd32b87 2003-02-08 Zoltan Varga <[email protected]>
* MethodBuilderTest.cs ChangeLog: New files.

svn path=/trunk/mcs/; revision=11356
2003-02-08 16:53:39 +00:00
Zoltan Varga 2d3c3404d4 2003-02-08 Zoltan Varga <[email protected]>
* unix.args: added MACAlgorithm and HMACAlgorithm.

svn path=/trunk/mcs/; revision=11355
2003-02-08 16:49:42 +00:00
Zoltan Varga de14fed65e 2003-02-08 Zoltan Varga <[email protected]>
* MethodBuilder.cs: Added error checking to methods so they conform to
	MSDN docs. Implemented 'GetModule' and 'CallingConvention' members.
	Some other tweaks to improve compatibility with MS .NET.

	* TypeBuilder.cs: Added 'is_created' property which will be used for
	checking 'type is already created' errors.

svn path=/trunk/mcs/; revision=11354
2003-02-08 16:48:09 +00:00
Sebastien Pouliot 66e393eccc 2003-02-08 Sebastien Pouliot <[email protected]>
* Changes to refer Mono.Xml

svn path=/trunk/mcs/; revision=11353
2003-02-08 16:31:12 +00:00
Sebastien Pouliot 77c0bce859 2003-02-08 Sebastien Pouliot <[email protected]>
* RemotingConfiguration.cs: Changed using to Mono.Xml for MiniParser.

svn path=/trunk/mcs/; revision=11352
2003-02-08 16:29:10 +00:00
Sebastien Pouliot c992524d56 2003-02-08 Sebastien Pouliot <[email protected]>
* MiniParser.cs: Renamed namespace to match new location.

svn path=/trunk/mcs/; revision=11351
2003-02-08 16:26:50 +00:00
Gonzalo Paniagua Javier 5c7845e91b 2003-02-08 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: when adding a control, assign default names to th
	children that don't have one.

svn path=/trunk/mcs/; revision=11350
2003-02-08 16:23:07 +00:00
Paolo Molaro 4e6194346f Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <[email protected]>
* statement.cs: don't clear the pinned var when the fixed statement
	returns from the method (fixes bug#37752).

svn path=/trunk/mcs/; revision=11349
2003-02-08 16:08:59 +00:00
Sebastien Pouliot 5cd2a34764 2003-02-08 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Changes to refer Mono.Security (for ASN1)

svn path=/trunk/mcs/; revision=11348
2003-02-08 12:57:36 +00:00
Sebastien Pouliot 5e535232a9 2003-02-08 Sebastien Pouliot <[email protected]>
* Changes to refer Mono.Math and Mono.Security.Cryptography

svn path=/trunk/mcs/; revision=11347
2003-02-08 12:55:27 +00:00
Sebastien Pouliot 695fc75d04 2003-02-08 Sebastien Pouliot <[email protected]>
* CryptoTools.cs: Renamed namespace to match new location.
	* PKCS1.cs: Renamed namespace to match new location.
	* HMACAlgorithm.cs: New. Generic class to implement HMAC
	using any hash algorithm (was in S.S.C.HMACSHA1.cs).
	* MACAlgorithm.cs: New. Generic class to implement MAC
	using any symmetric algorithm (was in S.S.C.MACTripleDES.cs).

svn path=/trunk/mcs/; revision=11346
2003-02-08 12:43:41 +00:00
Sebastien Pouliot e6cdf26e7f 2003-02-08 Sebastien Pouliot <[email protected]>
* ASN1.cs: Renamed namespace to match new location.

svn path=/trunk/mcs/; revision=11345
2003-02-08 12:42:32 +00:00
Sebastien Pouliot 7f0fc6738e 2003-02-08 Sebastien Pouliot <[email protected]>
* BigInteger.cs: Renamed namespace to match new location.

svn path=/trunk/mcs/; revision=11344
2003-02-08 12:41:34 +00:00
Paolo Molaro b2b47a6f96 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <[email protected]>
* typemanager.cs: fix from [email protected] (Marcus Urban)
	to IsValueType ().

svn path=/trunk/mcs/; revision=11343
2003-02-08 12:18:50 +00:00
Piers Haken 0c2bd9442a 2003-02-08 Piers Haken <[email protected]>
* fixed case of pens.cs and font.cs

svn path=/trunk/mcs/; revision=11342
2003-02-08 10:15:05 +00:00
Piers Haken af6ea1ed3b *** empty log message ***
svn path=/trunk/mcs/; revision=11340
2003-02-08 10:00:47 +00:00
Ville Palo 317c988f05 2003-02-08 Ville Palo <[email protected]>
* ExpressionElement.cs: More implementation

svn path=/trunk/mcs/; revision=11339
2003-02-08 09:58:00 +00:00
Piers Haken cbdaa40bed *** empty log message ***
svn path=/trunk/mcs/; revision=11338
2003-02-08 08:15:26 +00:00
Dietmar Maurer 219db36825 use gconstpointer in mono_marshal_get_icall_wrapper()
svn path=/trunk/mono/; revision=11337
2003-02-08 07:53:49 +00:00
Piers Haken 1295049706 *** empty log message ***
svn path=/trunk/mcs/; revision=11336
2003-02-08 03:41:29 +00:00
Dennis Hayes c22ccc6dd3 getting SWF to compile
svn path=/trunk/mcs/; revision=11334
2003-02-08 01:37:18 +00:00
Dennis Hayes 484f8bf14a getting swf to compile
svn path=/trunk/mcs/; revision=11333
2003-02-08 01:36:59 +00:00
Dennis Hayes 14edfc4786 additions to get SWF to compile
svn path=/trunk/mcs/; revision=11332
2003-02-08 01:33:53 +00:00
Dennis Hayes 198b6ed56d *** empty log message ***
svn path=/trunk/mcs/; revision=11331
2003-02-08 01:31:15 +00:00
Martin Baulig 21b28272b2 2003-02-07 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (Methods, Sources): New public properties.

svn path=/trunk/mcs/; revision=11327
2003-02-07 18:05:59 +00:00
Dietmar Maurer 40697f117f fix: use MONO_ARCH_SAVE_REGS for mono_ldstr
svn path=/trunk/mono/; revision=11325
2003-02-07 17:58:37 +00:00
Martin Baulig 95600d6b38 2003-02-07 Martin Baulig <[email protected]>
* debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.

svn path=/trunk/mono/; revision=11324
2003-02-07 17:58:08 +00:00
Martin Baulig 55abeb083e Cosmetic fixes.
svn path=/trunk/mcs/; revision=11322
2003-02-07 17:55:29 +00:00
Patrik Torstensson 9c32c4e70a 2003-02-07 Patrik Torstensson
* Exception.cs: Fixed formating.

svn path=/trunk/mcs/; revision=11315
2003-02-07 16:04:24 +00:00
Martin Baulig ca00eff4e6 Removed this debugging statement.
svn path=/trunk/mcs/; revision=11314
2003-02-07 15:10:32 +00:00
Martin Baulig 761d18aaec 2003-02-07 Martin Baulig <[email protected]>
* MonoSymbolFile.cs (MonoSymbolFile.ReadSymbolFile): New public
	static method, returns null (without throwing an exception) if the
	assembly doesn't have any debugging info.

svn path=/trunk/mcs/; revision=11312
2003-02-07 15:07:48 +00:00
Martin Baulig 98bebaf7c7 Reflect latest API changes.
svn path=/trunk/mono/; revision=11311
2003-02-07 15:06:53 +00:00
Martin Baulig 9552f4e872 2003-02-07 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Reflected latest symwriter changes.
	(mono_debug_create_mono_symbol_file): Removed.
	(mono_debug_open_mono_symbol_file): Take an argument which
	specifies whether to create a dynamic symbol file.

svn path=/trunk/mono/; revision=11310
2003-02-07 15:05:18 +00:00
Patrik Torstensson 701cbd7aa2 2003-02-07 Patrik Torstensson
* CADMessages.cs: Disable smuggeling of objects cross domain, still issues casing remoting
	  to fail. (fixed formating)

svn path=/trunk/mcs/; revision=11309
2003-02-07 14:59:31 +00:00
Patrik Torstensson bd252fb987 Oops, removed debuging writeline:s
svn path=/trunk/mcs/; revision=11308
2003-02-07 14:58:20 +00:00
Patrik Torstensson 3bdd57dd9d 2003-02-07 Patrik Torstensson
* RemotingServices.cs: Always marshal an object in GetObjectData

svn path=/trunk/mcs/; revision=11307
2003-02-07 14:56:31 +00:00
Dietmar Maurer 0da3eff54a 2003-02-07 Dietmar Maurer <[email protected]>
* class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF

svn path=/trunk/mono/; revision=11306
2003-02-07 13:46:08 +00:00
Martin Baulig e7da10fc99 2003-02-07 Martin Baulig <[email protected]>
* MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Removed the
	custom initialization function.

svn path=/trunk/mcs/; revision=11302
2003-02-07 12:12:58 +00:00
Martin Baulig 641e7690af 2003-02-07 Martin Baulig <[email protected]>
* driver.cs: Removed the `--debug-args' command line argument.

	* codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
	automatically by the AsssemblyBuilder.
	(CodeGen.InitializeSymbolWriter): We don't need to call any
	initialization function on the symbol writer anymore.  This method
	doesn't take any arguments.

svn path=/trunk/mcs/; revision=11301
2003-02-07 12:12:39 +00:00
Martin Baulig 8b0ec138b9 Close() must not be called.
svn path=/trunk/mcs/; revision=11300
2003-02-07 12:03:56 +00:00
Martin Baulig 5d2fb1e870 2003-02-07 Martin Baulig <[email protected]>
* ModuleBuilder.cs (.ctor): Added `bool IsMainModule' argument.
	(Save): New internal method; creates the module's symbol file if
	we're compiling with debugging information.

	* AssemblyBuilder.cs (EmbedResource): Added internal overloaded
	version of this method which takes a `byte[] blob' instead of a file.
	(DefineDynamicMethod): If this is the first module, tell the
	ModuleBuilder that this is the main module.
	(Save): Call a new interncall `build_metadata' to create the final
	metadata and save all the symbol files before creating the actual
	output.

	* IMonoSymbolWriter.cs: New public class; it is in the namespace
	Mono.CSharp.Debugger.  The Mono symbol writer implements this interface.

svn path=/trunk/mcs/; revision=11299
2003-02-07 12:02:07 +00:00
Martin Baulig 3097649a23 2003-02-05 Martin Baulig <[email protected]>
* reflection.c (mono_image_build_metadata): Make this public,
	protect it against being called multiple times, don't create
	resources and don't build the compressed metadata here.
	(mono_image_create_pefile): Do this here.

	* icall.c
	("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.

svn path=/trunk/mono/; revision=11298
2003-02-07 12:01:11 +00:00
Patrik Torstensson 2763585afc 2003-02-07 Patrik Torstensson
* Timer.cs: Set the background thread flag for the timer thread.

svn path=/trunk/mcs/; revision=11297
2003-02-07 11:50:06 +00:00
Martin Baulig d573355379 2003-02-07 Martin Baulig <[email protected]>
* MonoSymbolTableWriter.cs: Removed; the code is now in
	MonoSymbolFile.cs and MonoSymbolWriter.cs.

svn path=/trunk/mcs/; revision=11296
2003-02-07 11:42:08 +00:00
Martin Baulig 8776008885 2003-02-07 Martin Baulig <[email protected]>
* MonoSymbolFile.cs: The symbol file is now a resource in the
	assembly instead of a separate file.

	* MonoSymbolTable.cs: Did a few more cleanups, sort the line
	number table and remove duplicate line numbers.

svn path=/trunk/mcs/; revision=11295
2003-02-07 11:39:48 +00:00
Lluis Sanchez ad00cf6570 CADMessages.cs: Some minor changes that allow reuse of ObjRef methods.
svn path=/trunk/mcs/; revision=11294
2003-02-07 11:14:50 +00:00
Lluis Sanchez 36b567c8c9 * ChannelServices.cs: Added new constructor in ChannelInfoStore, that is used by
ObjRef to create a ChannelInfoStore with user provided channel info.

svn path=/trunk/mcs/; revision=11293
2003-02-07 11:14:23 +00:00
Lluis Sanchez 92b40c85a4 * Identity.cs: Added ObjRef attribute, that holds the objref of the object.
Removed implementation of CreateObjRef. Now it is implemented in the derived classes.
	* ServerIdentity.cs: Added implementation of CreateObjRef.
	* RemotingServices.cs: Changed implementation of GetRemoteObject and GetClientIdentity.
	  Now they only have and ObjRef as input parameter. This is the objref received from
	  the server. Unmarshal() also checks if the objref is for a well known object.
	  In this case, a proxy is always created, but if not, it tries to get the real object.
	* ObjRef.cs: Added some flags that have info for marshalling/unmarshalling.
	  Changed behavior of IsPossibleToCAD. Now returns false. Returning true makes serialization
	  of this ObjRef to fail in the target AD. Added method UpdateChannelInfo.

svn path=/trunk/mcs/; revision=11292
2003-02-07 11:12:12 +00:00
Jackson Harper 13999b6e73 * ILParser.jay: Allow assembly names to have lots of dashes.
svn path=/trunk/mcs/; revision=11291
2003-02-07 02:40:17 +00:00
Jackson Harper 82aa8b04de * ILParser.jay: Add dash token, allow assembly refs to have dashes in their names.
svn path=/trunk/mcs/; revision=11290
2003-02-07 02:36:20 +00:00
Jackson Harper 509c971225 * IlToken.cs: Add Dash Token (this is used for assembly names)
* ILTokenizer.cs: Return Dash token

svn path=/trunk/mcs/; revision=11289
2003-02-07 02:32:53 +00:00
Sebastien Pouliot 1fce1de9da 2003-02-06 Sebastien Pouliot <[email protected]>
* unix.args: Move some class from System.Security.Cryptography
	  into Mono.* for easier reuse.

svn path=/trunk/mcs/; revision=11287
2003-02-07 00:56:57 +00:00
Sebastien Pouliot bfae0b67e3 *** empty log message ***
svn path=/trunk/mcs/; revision=11286
2003-02-06 23:43:13 +00:00
Sebastien Pouliot 16151faef0 *** empty log message ***
svn path=/trunk/mcs/; revision=11285
2003-02-06 23:25:30 +00:00
Gonzalo Paniagua Javier 1fd1729bbd 2003-02-06 Gonzalo Paniagua Javier <[email protected]>
* Xml.cs: don't call MapPathSecure when setting DocumentSource.

svn path=/trunk/mcs/; revision=11282
2003-02-06 18:50:13 +00:00
Gonzalo Paniagua Javier a386153efc 2003-02-06 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: fixed bug #36322.

svn path=/trunk/mono/; revision=11280
2003-02-06 15:55:18 +00:00
Dick Porter 40fd4c2e1b Only look for iconv headers in well-defined locations
svn path=/trunk/mono/; revision=11279
2003-02-06 13:46:21 +00:00
Patrik Torstensson 304a621cd5 2002-02-06 Patrik Torstensson
* binwritter.cs : Tests binary writter and checks that correct data has been added to the array

svn path=/trunk/mono/; revision=11278
2003-02-06 13:25:47 +00:00
Patrik Torstensson 98ef547a55 Tests the binary writter functionality
svn path=/trunk/mono/; revision=11277
2003-02-06 12:34:49 +00:00
Jaime Anguiano Olarra 12d8f1b7c1 Little fixes.
svn path=/trunk/mcs/; revision=11276
2003-02-06 11:04:08 +00:00
Piers Haken e19a2f4016 2003-02-06 Piers Haken <[email protected]>
* appdomain.[ch]:
	* class.h:
	* debug-mono-symfile.c:
	* icall.c:
	* loader.c:
	* mono-config.c:
	* monosn.c:
	* reflection.c:
	* socket-io.c: warning cleanups

svn path=/trunk/mono/; revision=11275
2003-02-06 09:53:03 +00:00
Piers Haken afdfb23005 2003-02-06 Piers Haken <[email protected]>
* interp.c: warning cleanups

svn path=/trunk/mono/; revision=11274
2003-02-06 09:46:48 +00:00
Piers Haken fcc320c9f0 Thu Feb 6 02:43:23 PST 2003 Piers Haken <[email protected]>
* dump.c: more warning cleanups

svn path=/trunk/mono/; revision=11273
2003-02-06 09:45:01 +00:00
Piers Haken dbc3cd7b36 Thu Feb 6 02:43:23 PST 2003 Piers Haken <[email protected]>
* monograph.c: more warning cleanups

svn path=/trunk/mono/; revision=11272
2003-02-06 09:44:04 +00:00
Dietmar Maurer 437c186e60 2003-02-06 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_remoting_invoke_with_check): new
	function. works like remoting invoke, but does a check for the Proxy first.

svn path=/trunk/mono/; revision=11271
2003-02-06 08:56:50 +00:00
Miguel de Icaza 78f6ef1cce Commit kludges to get this to compile
svn path=/trunk/mcs/; revision=11270
2003-02-06 07:29:35 +00:00
Sebastien Pouliot bd02468d72 2003-02-05 Sebastien Pouliot <[email protected]>
* crypto: Updated for Mono.Security.Win32

svn path=/trunk/mono/; revision=11267
2003-02-06 03:56:29 +00:00
Sebastien Pouliot 40ab00b063 2003-02-05 Sebastien Pouliot <[email protected]>
* library.build: added Mono.Security.Win32 to build, test and
	clean. There's no makefile.gnu for this assembly as it is
	specific to Win32.

svn path=/trunk/mcs/; revision=11266
2003-02-06 03:46:37 +00:00
Dennis Hayes 13103b826e see last note
svn path=/trunk/mcs/; revision=11265
2003-02-06 03:45:10 +00:00
Dennis Hayes 0261aa4196 checkin for Alexandre Pigolkine, a lot more stuff working, see changelog for sample tests
svn path=/trunk/mcs/; revision=11264
2003-02-06 03:44:35 +00:00
Sebastien Pouliot 8b4eb21ba2 2003-02-05 Sebastien Pouliot <[email protected]>
* MD2CryptoServiceProviderTest.cs: New. Run the MD2Test
	unit tests using MD2CryptoServiceProvider class.
	* MD2Test.cs: New. Implement the test vectors included
	in RFC1319.
	* MD4CryptoServiceProviderTest.cs: New. Run the MD4Test
	unit tests using MD4CryptoServiceProvider class.
	* MD4Test.cs: New. Implement the test vectors included
	in RFC1320.
	* MD5CryptoServiceProviderTest.cs: New. Run the MD5Test
	unit tests using MD5CryptoServiceProvider class.
	* MD5Test.cs: New. Implement the test vectors included
	in RFC1321.
	* RandomNumberGeneratorTest.cs: New. FIPS140 randomness
	tests.
	* SHA1CryptoServiceProviderTest.cs: New. Run the SHA1Test
	unit tests using SHA1CryptoServiceProvider class.
	* SHA1Test.cs: New. Implement the test vectors included
	in FIPS186.

svn path=/trunk/mcs/; revision=11263
2003-02-06 03:42:35 +00:00
Sebastien Pouliot 968326449f 2003-02-05 Sebastien Pouliot <[email protected]>
* Mono.Security.Win32_test.build: New. NAnt build file
	for unit tests.

svn path=/trunk/mcs/; revision=11262
2003-02-06 03:36:45 +00:00
Gonzalo Paniagua Javier a02b43a1e8 2003-02-06 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: display the error instead of hanging when we get
	any error before the last step of the request.

svn path=/trunk/mcs/; revision=11261
2003-02-06 03:32:28 +00:00
Gonzalo Paniagua Javier 47e29c2de0 2003-02-06 Gonzalo Paniagua Javier <[email protected]>
* error.c: added WSA_EHOSTUNREACH mapping.

svn path=/trunk/mono/; revision=11260
2003-02-06 03:28:26 +00:00
Sebastien Pouliot 84b1abff2e 2003-02-05 Sebastien Pouliot <[email protected]>
* CapiContext.cs: New. Class to acquire and release an
	  unmanaged context with CryptoAPI.
	* CapiHash.cs: New. Base class to handle hash algorithms.
	* CapiRandomNumberGenerator.cs: New. Base class to handle
	  random number generation.
	* CryptoAPI.cs: Wrapper class around CryptoAPI.
	* MD2.cs: Abstract class for Message Digest 2 (RFC1319).
	* MD2CryptoServiceProvider.cs: Unmanaged MD2 implementation.
	* MD4.cs: Abstract class for Message Digest 4 (RFC1320).
	* MD4CryptoServiceProvider.cs: Unmanaged MD4 implementation.
	* MD5CryptoServiceProvider.cs: Unmanaged MD5 implementation.
	* RNGCryptoServiceProvider.cs: Unmanaged RNG implementation.
	* MD2CryptoServiceProvider.cs: Unmanaged SHA1 implementation.

svn path=/trunk/mcs/; revision=11259
2003-02-06 03:27:34 +00:00
Sebastien Pouliot 7d71cacbf6 2003-02-05 Sebastien Pouliot <[email protected]>
* Mono.Security.Win32.build: New. NAnt build file. As this
	  assembly works only on Windows there are no makefile.gnu.
	* README: New. Describe how to use (and not to use) this
	  assembly.

svn path=/trunk/mcs/; revision=11258
2003-02-06 03:24:43 +00:00
Gonzalo Paniagua Javier 9019e3ef4c 2003-02-06 Gonzalo Paniagua Javier <[email protected]>
* Win32Exception.cs: added 10065 (WSA_EHOSTUNREACH).

svn path=/trunk/mcs/; revision=11257
2003-02-06 03:23:16 +00:00
Rafael Teixeira 1a9671a17d One more test file
svn path=/trunk/mcs/; revision=11256
2003-02-06 03:13:49 +00:00
Alvaro del Castillo fe14fa4e67 2003-02-05 Alvaro del Castillo <[email protected]>
* System.Runtime.Remoting.Channels.Tcp/TcpClientTransportSink.cs:
        * System.Runtime.Remoting.Channels.Tcp/TcpMessageIO.cs:
        * System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs:
        Change MessageType to MessageStatus so the code is
        more clear

svn path=/trunk/mcs/; revision=11254
2003-02-05 22:00:42 +00:00
Gonzalo Paniagua Javier 8471f1a9c4 Initial check-in
svn path=/trunk/mcs/; revision=11253
2003-02-05 21:14:53 +00:00
Miguel de Icaza 1a7bf72ecc 2003-02-05 Miguel de Icaza <[email protected]>
* appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.

svn path=/trunk/mono/; revision=11251
2003-02-05 19:54:50 +00:00
Miguel de Icaza 543db8aa8b Ilasm removal from the build for now
svn path=/trunk/mcs/; revision=11250
2003-02-05 19:51:25 +00:00
Dietmar Maurer bb511d6f99 new test
svn path=/trunk/mono/; revision=11249
2003-02-05 18:57:03 +00:00
Miguel de Icaza b611714b1a flus
svn path=/trunk/mono/; revision=11247
2003-02-05 17:58:52 +00:00
Ville Palo d3bb75b952 fixed little typo
svn path=/trunk/mcs/; revision=11246
2003-02-05 16:34:00 +00:00
Ville Palo 44a75306a6 2003-02-05 Alan Tam <[email protected]>
* DesignedCategoryAttribute.cs: Implemented DesignerCategoryAttribute

svn path=/trunk/mcs/; revision=11245
2003-02-05 16:07:23 +00:00
Ville Palo 79ed95c592 2003-02-05 Alan Tam <[email protected]>
* DataSet.cs: Added framework for DataSet.Update Implemented missing
	methods GetSchemaSerializable, GetSerializationData,
	ReadXmlSerializable, ShouldSerializeRelations and ShouldSerializeTables
	for DataSet
	* DataTable.cs: Implemented missing methods CreateInstance and
	GetRowType for DataTable

svn path=/trunk/mcs/; revision=11244
2003-02-05 15:48:57 +00:00
Dietmar Maurer f13f62ef20 added some docu
svn path=/trunk/mono/; revision=11243
2003-02-05 14:44:03 +00:00
Dietmar Maurer c60f8a4cd8 2003-02-05 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): only allocate an
	array of pointers.
	(mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
	(mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.

svn path=/trunk/mono/; revision=11242
2003-02-05 14:34:18 +00:00
Dietmar Maurer 9d2fdc34b7 2003-02-05 Dietmar Maurer <[email protected]>
* object.c (mono_store_remote_field_new): used by the new jit
	instead of mono_store_remote_field
	(mono_load_remote_field_new): used by the new jit
	instead of mono_load_remote_field

svn path=/trunk/mono/; revision=11241
2003-02-05 13:12:20 +00:00
Gonzalo Paniagua Javier d68037daf4 InternalUnload is private
svn path=/trunk/mcs/; revision=11240
2003-02-05 10:45:18 +00:00
Patrik Torstensson 14c8194db3 2003-02-05 Patrik Torstensson
* ThreadPool.cs: Reformated and fixed issue that made all thread exit the pool.

svn path=/trunk/mcs/; revision=11239
2003-02-05 10:43:51 +00:00
Patrik Torstensson 3f3317a3fa 2003-02-05 Patrik Torstensson
* AppDomain.cs: Partly fixed the unload method

svn path=/trunk/mcs/; revision=11238
2003-02-05 10:18:03 +00:00
Patrik Torstensson 5d2b8cb11f 2003-02-05 Patrik Torstensson
* appdomain.c: changed unload to take the domain id instead
	of domain

	* icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload

svn path=/trunk/mono/; revision=11237
2003-02-05 10:15:28 +00:00
Patrik Torstensson f367581fc6 2003-02-05 Patrik Torstensson
* appdomain3.cs: Added test for unload of a appdomain

svn path=/trunk/mono/; revision=11236
2003-02-05 10:10:37 +00:00
Gonzalo Paniagua Javier 3a7c87f7ec 2003-02-05 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: don't look for assemblies in ApplicationBase if
	PrivateBinPathProbe is set.

svn path=/trunk/mono/; revision=11232
2003-02-05 04:04:27 +00:00
Sebastien Pouliot fdc039e905 2003-03-04 Sebastien Pouliot <[email protected]>
* crypto: Updated crypto status page. Added some details.

svn path=/trunk/mono/; revision=11231
2003-02-05 03:59:12 +00:00
Gonzalo Paniagua Javier 602b47f906 2003-02-05 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: remove "file://" from the private bin path. Fixes
	bug #37628.

svn path=/trunk/mcs/; revision=11230
2003-02-05 03:49:19 +00:00
Sebastien Pouliot 572fe3eb74 2003-03-04 Sebastien Pouliot <[email protected]>
* CryptoConfigTest.cs: Added new tests for algorithms
	documented in book ".NET Framework Security".

svn path=/trunk/mcs/; revision=11229
2003-02-05 03:40:23 +00:00
Sebastien Pouliot 3f9d0cab18 2003-03-04 Sebastien Pouliot <[email protected]>
* CryptoConfig.cs: Added initital support for "machine.config"
	(limited to algorithms, not OIDs). Modified CreateFromName to use
	the fully qualified class names (and removed xmldsig hack). Added
	algorithm names documented in book ".NET Framework Security".

svn path=/trunk/mcs/; revision=11228
2003-02-05 03:38:17 +00:00
Jackson Harper 7bbf9b93bf Add Header, put in a namespace
svn path=/trunk/mcs/; revision=11227
2003-02-05 02:58:25 +00:00
Jackson Harper 8f4c2fff01 Use .il files not .cs ;-)
svn path=/trunk/mcs/; revision=11226
2003-02-05 02:54:54 +00:00
Jackson Harper 1104e5742c * HelloWorld.il: Remove
* test-1.il: New test
        * makefile: Added file

svn path=/trunk/mcs/; revision=11225
2003-02-05 02:51:23 +00:00
Sebastien Pouliot adc6f48f54 2003-02-04 Sebastien Pouliot <[email protected]>
* Module.cs: Corrected indentation for class.

svn path=/trunk/mcs/; revision=11224
2003-02-05 02:27:03 +00:00
Martin Baulig 7dd3e6254e 2003-02-05 Martin Baulig <[email protected]>
Modified the symbol file format to speed up method looks by name
	and cleaned this up a lot.

	* MonoSymbolFile.cs: New public class.  This is now a public class
	and writes and reads the symbol file.

	* IMonoBinaryReader.cs: Removed.

	* MonoSymbolTable.cs: Set version number to 29.

svn path=/trunk/mcs/; revision=11223
2003-02-05 01:27:18 +00:00
Lluis Sanchez e1a95712c4 MessageFormatter.cs: Corrected some bugs that affected serialization of exceptions
svn path=/trunk/mcs/; revision=11222
2003-02-05 01:21:43 +00:00
Lluis Sanchez 53653fa9f7 CrossAppDomainChannel.cs: Corrected CADSerializer.DeserializeMessage.
Now it uses the method DeserializeMethodResponse to deserialize the message when the msg is provided.

svn path=/trunk/mcs/; revision=11221
2003-02-05 01:20:23 +00:00
Lluis Sanchez fbba486d1b ReturnMessage.cs, MethodResponse.cs: OutArgs initialized to an empty array when the the message returns an exception.
svn path=/trunk/mcs/; revision=11220
2003-02-05 01:19:35 +00:00
Gonzalo Paniagua Javier 751a50cc8f 2003-02-05 Gonzalo Paniagua Javier <[email protected]>
* object.c: make the first argument in main_args contain the absolute
	path to the assembly. Fixes bug #37511.

svn path=/trunk/mono/; revision=11219
2003-02-05 01:12:31 +00:00
Gonzalo Paniagua Javier b7312b9149 2003-02-05 Gonzalo Paniagua Javier <[email protected]>
* RangeValidator.cs: fixed bug #37577. Thanks to Stephane Tombeur
	for reporting the bug and providing the fix.

svn path=/trunk/mcs/; revision=11217
2003-02-05 00:02:45 +00:00
Gonzalo Paniagua Javier 6980211f12 2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* icall.c: get correct UTC offset for countries not using daylight
	time saving. Fixes bug #30030.

svn path=/trunk/mono/; revision=11216
2003-02-04 22:55:28 +00:00
Gonzalo Paniagua Javier f423cb7491 oops.
svn path=/trunk/mcs/; revision=11215
2003-02-04 20:31:56 +00:00
Gonzalo Paniagua Javier f023ea9bdd 2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* Binder.cs:
	(check_type): return true when the target type is object and the source
	is a value type.

svn path=/trunk/mcs/; revision=11214
2003-02-04 20:26:22 +00:00
Gonzalo Paniagua Javier a95e5d1b25 2003-02-04 Tim Haynes <[email protected]>
* System.Web/HttpApplicationFactory.cs: fixed HttpRuntime.Close() to
	decrement instance counter.

	* System.Web.Hosting/SimpleWorkerRequest.cs: changed the initialised
	values of _App{Install,Virtual}Path variables

svn path=/trunk/mcs/; revision=11212
2003-02-04 17:05:45 +00:00
Piers Haken ca26c4d1e9 2003-01-04 Piers Haken <[email protected]>
* Parser.*: Remove extraneous "using" that was stopping the build. Permanently thisi time ;-)

svn path=/trunk/mcs/; revision=11211
2003-02-04 16:06:11 +00:00
Nick Drochak a5a0060d0a 2003-02-05 Nick Drochak <[email protected]>
* StringBuilderTest.cs: Test for specific exception using Nunit verson
	2 style Attribute.

svn path=/trunk/mcs/; revision=11210
2003-02-04 15:27:38 +00:00
Nick Drochak c835b2ebb3 2003-02-05 Nick Drochak <[email protected]>
* FileTest.cs: Have setup remove files before testing as well in case
	tests were interrupted before TearDown could be called in a previous
	run. Also test for specific exception in TestGetCreationTime ().

svn path=/trunk/mcs/; revision=11209
2003-02-04 15:25:50 +00:00
Nick Drochak 5ef5d397e8 2003-02-05 Nick Drochak <[email protected]>
* StringTest.cs: Remove compiler warnings.

svn path=/trunk/mcs/; revision=11208
2003-02-04 15:22:23 +00:00
Gonzalo Paniagua Javier 04a0ff9629 2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* configure.in: added check for sys/un.h.
	* mono/metadata/socket-io.c: support AF_UNIX and use the same layout as
	MS, not the one they documented (bytes 0 and 1 are the family).

svn path=/trunk/mono/; revision=11207
2003-02-04 15:20:14 +00:00
Gonzalo Paniagua Javier 29039ab97c 2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* SocketAddress.cs: byte 1 of the data is the high byte of the family,
	not the size.

svn path=/trunk/mcs/; revision=11206
2003-02-04 15:19:52 +00:00
Lluis Sanchez 28045640e4 ThreadPool.cs: Implemented RegisterWaitForSingleObject methods.
svn path=/trunk/mcs/; revision=11205
2003-02-04 14:57:10 +00:00
Ville Palo b8a42023ba 2003-04-02 Ville Palo <[email protected]>
* DataColumnTest.cs: Added tests for Expression property

svn path=/trunk/mcs/; revision=11204
2003-02-04 14:14:45 +00:00
Patrik Torstensson 94b77d4c86 2002-02-04 Patrik Torstensson
* AppDomain.cs: Miss in last commit, fixed.

svn path=/trunk/mcs/; revision=11203
2003-02-04 13:59:39 +00:00
Patrik Torstensson de2c88c52b 2002-02-04 Patrik Torstensson
* AppDomain.cs : Fixed InitializeLifetimeServices

svn path=/trunk/mcs/; revision=11202
2003-02-04 13:43:34 +00:00
Lluis Sanchez 733b2baac6 unix.args: added ServerIdentity.cs, Lease.cs, LeaseManager.cs
svn path=/trunk/mcs/; revision=11201
2003-02-04 12:55:58 +00:00
Lluis Sanchez 1a0f25be2f MessageFormatter.cs: Implemented serialization of message properties.
svn path=/trunk/mcs/; revision=11200
2003-02-04 12:55:02 +00:00
Lluis Sanchez a07c9658be * ServerContextTerminatorSink.cs: Modified to work with new types of identities.
* ReturnMessage.cs: Removed internal dependence to MonoMethodMessage. It is not needed now.
* MonoMethodMessage.cs: Now only has method call keys in the dictionary.
* MethodReturnDictionary.cs, MethodCallDictionary.cs: Made public the list of
  method keys. This list is used in MessageFormatter.
* MethodDictionary.cs: Corrected some minor bugs.
* MethodCall.cs: minor correction on constructor.

svn path=/trunk/mcs/; revision=11199
2003-02-04 12:54:31 +00:00
Lluis Sanchez afe496c9cd * LifetimeServices.cs: Implemented all methods.
* LeaseSink.cs: implemented renewal of lease.
* Lease.cs: Added. It is an implementation of ILease.
* LeaseManager.cs: Added. Tracks lifetime of remote objects.

svn path=/trunk/mcs/; revision=11198
2003-02-04 12:53:28 +00:00
Lluis Sanchez 1a2726468d ChannelServices.cs: Modified to work with new types of identities.
svn path=/trunk/mcs/; revision=11197
2003-02-04 12:52:48 +00:00
Lluis Sanchez 92f56eacf1 * Identity.cs: created and identity class for each identity type. It is a more clear design.
* ServerIdentity.cs: added. Implements identity funtionality specific to server objects
* RemotingServices.cs: Modified to work with new types of identities.
* RemotingConfiguration.cs: Modified to work with new types of identities.
* ObjRef.cs: Added initialization of channel info in default constructor.
* Identity.cs: Added support for WellKnownService objects.

svn path=/trunk/mcs/; revision=11196
2003-02-04 12:52:16 +00:00
Lluis Sanchez 4ae27e4746 MarshalByRefObject.cs: Implemented GetLifetimeService() and
InitializeLifetimeService().

svn path=/trunk/mcs/; revision=11195
2003-02-04 12:50:59 +00:00
Dietmar Maurer 381cb28ed9 2003-02-04 Dietmar Maurer <[email protected]>
* icall.c (ves_icall_InternalExecute): removed wrong assertion

svn path=/trunk/mono/; revision=11194
2003-02-04 12:05:34 +00:00
Dietmar Maurer 143f8f0b56 2003-02-04 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_remoting_invoke): generate valid IL

svn path=/trunk/mono/; revision=11193
2003-02-04 11:31:22 +00:00
Zoltan Varga 291693e4c2 2003-02-04 Zoltan Varga <[email protected]>
* reflection.c: added support for SignatureHelper tokens, which is
	needed by the Calli opcode.

	* reflection.h: track changes to SignatureHelper class.

	* metadata.c (mono_metadata_parse_signature): handle dynamic tokens.

svn path=/trunk/mono/; revision=11192
2003-02-04 10:39:43 +00:00
Zoltan Varga 28c52a2734 2003-02-04 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: added GetToken (SignatureHelper).

	* ILGenerator.cs: implemented EmitCalli() methods

	* SignatureHelper.cs: implemented GetMethoSigHelper() methods.

svn path=/trunk/mcs/; revision=11191
2003-02-04 10:33:54 +00:00
Jackson Harper 977debae0a Remove some debugging info.
svn path=/trunk/mcs/; revision=11190
2003-02-04 05:50:08 +00:00
Jackson Harper ea5fdf9b78 Added file
svn path=/trunk/mcs/; revision=11189
2003-02-04 04:35:20 +00:00
Sebastien Pouliot f79cea3342 2003-02-03 Sebastien Pouliot <[email protected]>
* PasswordDeriveBytesTest.cs: Added some new tests to complete
	coverage.
	* RSAPKCS1SignatureDeformatterTest.cs: Added test for null and
	invalid	hash algorithm.

svn path=/trunk/mcs/; revision=11188
2003-02-04 03:15:55 +00:00
Sebastien Pouliot a910c16579 2003-02-03 Sebastien Pouliot <[email protected]>
* PasswordDeriveBytes.cs: Finally got the derivation right. The
	class can now derive keys up to 1000 * HashSize (same limit as MS).
	* RSAPKCS1SignatureDeformatter.cs: No need to create the hash object
	in this class - the OID is enough.

svn path=/trunk/mcs/; revision=11187
2003-02-04 03:15:02 +00:00
Gonzalo Paniagua Javier 26b9f436da 2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: fixed loading assemblies from PrivateBinPath.

svn path=/trunk/mono/; revision=11185
2003-02-04 00:40:42 +00:00
Miguel de Icaza 41d6cb2429 New changes from Daniel Campos
svn path=/trunk/mcs/; revision=11184
2003-02-03 23:31:15 +00:00
Ville Palo dc68c49234 2003-02-03 Ville Palo <[email protected]>
* DataSet.cs: Implemented private method MapType for
	mapping datatypes for XmlSchema

svn path=/trunk/mcs/; revision=11180
2003-02-03 19:04:16 +00:00
Rafael Teixeira 7c9544a066 2003/02/03 Rafael Teixeira <[email protected]>
* rootcontext.cs : added RootNamespace member
	* mb-parser.jay : use RootContext.RootNamespace to initialize outermost namespace
	* driver.cs : 
		- implement rootnamespace parameter, and defaults it to the output file name
		- like vbc if no source file name is provided just show help

svn path=/trunk/mcs/; revision=11179
2003-02-03 18:56:53 +00:00
Gonzalo Paniagua Javier 0aa568cbf4 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* RemotingServices.cs:
	(GetMethodBaseFromMethodMessage): fixed to make it also work with
	internal methods without MethodSignature (see ApplicationHost.cs).

svn path=/trunk/mcs/; revision=11178
2003-02-03 18:43:10 +00:00
Ville Palo 83ece2d548 2003-03-02 Ville Palo <[email protected]>
* DataTableTest.cs: More tests for Select

svn path=/trunk/mcs/; revision=11170
2003-02-03 15:02:52 +00:00
Patrik Torstensson ecfe611a06 2003-02-03 Patrik Torstensson
* corlib.build: fixes so corlib_cmp and corlib_res builds, need to
	  check if we need the libs and if they still are correct.

svn path=/trunk/mcs/; revision=11169
2003-02-03 13:42:54 +00:00
Gonzalo Paniagua Javier 3d026cf5f0 oops. this is a bug in mcs
svn path=/trunk/mono/; revision=11168
2003-02-03 12:15:29 +00:00
Gonzalo Paniagua Javier 96fb9d17c7 fixed typo
svn path=/trunk/mono/; revision=11167
2003-02-03 12:07:52 +00:00
Patrik Torstensson 14994a5e46 Ooops, missed one file.
svn path=/trunk/mcs/; revision=11166
2003-02-03 11:41:16 +00:00
Patrik Torstensson ca8a4053d8 2003-02-03 Patrik Torstensson
* unix.args: added CADMessages.cs

svn path=/trunk/mcs/; revision=11165
2003-02-03 11:39:57 +00:00
Patrik Torstensson 732cf985ac 2003-02-03 Patrik Torstensson
* TrackingServices.cs: Implemented

svn path=/trunk/mcs/; revision=11164
2003-02-03 11:39:13 +00:00
Patrik Torstensson c373391049 2003-02-03 Patrik Torstensson
* Context.cs : Changed order of fields to match the runtime implementation.

svn path=/trunk/mcs/; revision=11163
2003-02-03 11:38:36 +00:00
Patrik Torstensson 740b00069e 2003-02-03 Patrik Torstensson
* CrossAppDomainChannel.cs: Implemented cross appdomain marshalling via cross
	app domain messages (smuggling objects between domains)

svn path=/trunk/mcs/; revision=11162
2003-02-03 11:37:44 +00:00
Patrik Torstensson 920df63be7 2003-02-03 Patrik Torstensson
* MethodResponse.cs: Implemented
	* MethodCall.cs: added support for Cross appdomain messages, implemented some
	missing methods.
	* MethodDictionary.cs: made serializible and added methods to get internal properties.
	* MonoMethodMessage.cs: internal dictionary is now serializible
	* ReturnMessage.cs: made serializible
	* ErrorMessage.cs: typo fix

	* CADMessage.cs: new file, implements cross appdomain messages, both call and return.
	Princip of this classes is to move unmutable objects and primitivs between appdomains
	without marshalling. This increase performance a lot of the cross appdomain channel.

svn path=/trunk/mcs/; revision=11161
2003-02-03 11:36:55 +00:00
Patrik Torstensson f69d6386e1 2003-02-03 Patrik Torstensson
* ObjRef.cs: added copy constructor and two helpers for cross
	  appdomain message marshalling.
	* RemotingServices.cs: Added helper to create transparant proxy for appdomain, and
	  register internal cross appdomain channel.

svn path=/trunk/mcs/; revision=11160
2003-02-03 11:34:52 +00:00
Patrik Torstensson a48c6975d2 2003-02-03 Patrik Torstensson
* AppDomain.cs: New internalcalls for handling domain/context switches

	* AppDomain.cs (CreateDomain): Return transparant proxy for appdomain object

svn path=/trunk/mcs/; revision=11159
2003-02-03 11:33:04 +00:00
Patrik Torstensson 7da3e9a1bf 2002-02-03 Patrik Torstensson
* Appdomain1-2.cs: Updated tests to work on MS.Net
        * Remoting4.cs: real cross appdomain test case

svn path=/trunk/mono/; revision=11158
2003-02-03 11:31:22 +00:00
Patrik Torstensson d83b90fc3a 2003-02-03 Patrik Torstensson
* RealProxy.cs: changed excption behavior and added serialization helpers,
	  changed so it don't create a new TP for each gettp call.

	* RemotingProxy.cs: added functions to short cut calls to GetHashCode and GetType,
	same behavior as MS.

svn path=/trunk/mcs/; revision=11157
2003-02-03 11:22:13 +00:00
Patrik Torstensson da7de19756 2003-02-03 Patrik Torstensson
* appdomain.[c|h], domain.c :
	 - Added support for getting a domain via domain id
	 - Support for setting and getting domain from System.AppDomain
	   (used in cross appdomain channel)
	 - Added support for get/set for a MonoAppContext on a thread
	   (Context class in System.Runtime.Remoting.Contexts),
	 - Removed hack in Get/SetData and ExecuteAssembly.

	* icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
	the managed world to get control when a proxy is created.

	* icall.c (ves_icall_InternalExecute) : bug fix, must return empty array

svn path=/trunk/mono/; revision=11156
2003-02-03 10:15:14 +00:00
Patrik Torstensson dc6eea68df 2003-02-03 Patrik Torstensson
* x86.brg, jit.c, jit.h: Add support for transparant proxies in non-virtual method calls.

svn path=/trunk/mono/; revision=11155
2003-02-03 10:01:24 +00:00
Patrik Torstensson 6ba0618bd1 2003-02-03 Patrik Torstensson
* Binder.cs: minimize locking time in DefaultBinder.

svn path=/trunk/mcs/; revision=11154
2003-02-03 09:55:49 +00:00
Miguel de Icaza 8d034a2489 Revert patch until I debug it properly
svn path=/trunk/mcs/; revision=11153
2003-02-03 08:51:09 +00:00
Miguel de Icaza d0f3e118b6 2003-02-03 Miguel de Icaza <[email protected]>
* driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
	from referenced assemblies as well.

svn path=/trunk/mcs/; revision=11152
2003-02-03 08:37:36 +00:00
Miguel de Icaza da2c3a6148 2003-02-03 Miguel de Icaza <[email protected]>
* icall.c
	(ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
	Populate the codebase field as well.

svn path=/trunk/mono/; revision=11151
2003-02-03 08:12:15 +00:00
Piers Haken a1f3ff1b3c 2003-02-02 Piers Haken <[email protected]>
* Parser.jay: add token names
	* Tokenizer.cs: fix NCName tokenization

svn path=/trunk/mcs/; revision=11150
2003-02-03 04:44:09 +00:00
Gonzalo Paniagua Javier 4477135bd8 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* XmlTextWriter.cs: implemented WriteRaw (char[], int, int).

svn path=/trunk/mcs/; revision=11149
2003-02-03 02:43:09 +00:00
Gonzalo Paniagua Javier 96e4a7df36 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* DataView.cs: implemented Dispose.

svn path=/trunk/mcs/; revision=11148
2003-02-03 02:42:11 +00:00
Gonzalo Paniagua Javier 9119c83a15 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* System/AppDomain.cs: implemented AppendPrivatePath, ClearPrivatePath
	and ClearShadowCopyPath and fixed GetType ().

	* System/Attribute.cs: clean up.

	* System/Console.cs: removed UnixConsoleEncoding. Use Default.
	* System.IO/MemoryStream.cs: create the buffer of the specified capacity.
	* System.Text/Encoding.cs: removed UnixConsoleEncoding.

svn path=/trunk/mcs/; revision=11147
2003-02-03 02:38:48 +00:00
Gonzalo Paniagua Javier 3444afed80 2003-02-03 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspParser.cs: the parser fires events when it
	parses an element.

	* System.Web.UI/SimpleWebHandlerParser.cs:
	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs:
	* System.Web.Compilation/AspElements.cs: modified to use the new parser
	interface.

	* System.Web.Compilation/AspGenerator.cs: modified to use the new
	parser. Merge multiple text strings into one single LiteralControl.

	* System.Web.Compilation/AspTokenizer.cs: added Line and Column properties.

svn path=/trunk/mcs/; revision=11146
2003-02-03 02:25:00 +00:00
Martin Baulig 56b1967181 2003-02-02 Martin Baulig <[email protected]>
* debug.c (mono_debug_add_wrapper): Lookup the wrapper method in a
	hash table; we need to provide the correct code_size.

svn path=/trunk/mono/; revision=11137
2003-02-02 22:03:54 +00:00
Martin Baulig 0d9f92981e 2003-02-02 Martin Baulig <[email protected]>
* jit.c (mono_jit_compile_method): Call mono_debug_add_wrapper()
	to add the interncall to the symbol file.

	* debug.c (mono_debug_add_wrapper): New public function.

svn path=/trunk/mono/; revision=11126
2003-02-02 21:16:23 +00:00
Martin Baulig 397438b8a3 2003-02-02 Martin Baulig <[email protected]>
* debug-mono-symfile.c
	(MonoSymbolFileMethodAddress): Added `wrapper_address' field.
	(mono_debug_symfile_add_method): Allow interncalls.

svn path=/trunk/mono/; revision=11125
2003-02-02 21:13:33 +00:00
Jackson Harper b23544072e Resolve parameter types in a more proper manner.
svn path=/trunk/mcs/; revision=11124
2003-02-02 21:00:14 +00:00
Jackson Harper 2edd8bd986 Add ChangeLog, Add HelloWorld.il test
svn path=/trunk/mcs/; revision=11123
2003-02-02 20:56:00 +00:00
Jackson Harper 33ebce22dd Makfile update
svn path=/trunk/mcs/; revision=11122
2003-02-02 20:42:47 +00:00
Jackson Harper fd98e6bc3a Use new Driver.cs instead of Main.cs
svn path=/trunk/mcs/; revision=11121
2003-02-02 20:40:27 +00:00
Jackson Harper 2addf865bd Add ChangeLog
svn path=/trunk/mcs/; revision=11120
2003-02-02 20:37:21 +00:00
Jackson Harper 498b451aaa * ILParser.jay: Add call instruction, other little fixes and additions
svn path=/trunk/mcs/; revision=11119
2003-02-02 20:35:26 +00:00
Jackson Harper 1316af00ea * Class.cs: Don't try to emit methods if we don't have any
* Class.cs: Test for entry point of methods, and set Assembly entrypoint
        * CodeGen.cs: Add method to set an Assemblys entry point
        * Method.cs: Add IsEntryPoint property
        * Method.cs Add MethodInfo property, and set this while Emiting
        * Instructions.cs: Add new InstrCall instruction

svn path=/trunk/mcs/; revision=11118
2003-02-02 20:34:05 +00:00
Jackson Harper 9e0c7f5d4a Addnew Driver, Add new tests directory
svn path=/trunk/mcs/; revision=11117
2003-02-02 20:32:05 +00:00
Jackson Harper 29f2c53ff9 Add ChangeLog
svn path=/trunk/mcs/; revision=11116
2003-02-02 20:30:12 +00:00
Atsushi Eno 09dfd131ee 2003-02-03 Atsushi Enomoto <[email protected]>
* XmlTextReaderTests.cs : added TestQuoteChar.

svn path=/trunk/mcs/; revision=11113
2003-02-02 15:50:48 +00:00
Atsushi Eno b2a88c3d96 2003-02-03 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : implemented QuoteChar.

svn path=/trunk/mcs/; revision=11112
2003-02-02 15:49:49 +00:00
Martin Baulig f41b9f3b0d 2003-02-02 Martin Baulig <[email protected]>
* debug.c (debug_update_il_offsets): Set the prologue end address
	to the address of the first source line.

svn path=/trunk/mono/; revision=11111
2003-02-02 12:21:02 +00:00
Sebastien Pouliot aac3846615 2003-02-01 Sebastien Pouliot <[email protected]>
* AsymmetricSignatureFormatter.cs: Call abstract SetHashAlgorithm
	when CreateSignature(hash) is called.
	* CryptoStream.cs: Fixed some issues in constructor.
	* DSACryptoServiceProvider.cs: Fixed a bug (1 chance in 256) that
	a signature could be less than 40 bytes (which is invalid).

svn path=/trunk/mcs/; revision=11107
2003-02-02 04:26:31 +00:00
Sebastien Pouliot 5d67a8951c 2003-02-01 Sebastien Pouliot <[email protected]>
* Modules.cs: Oups - not implemented. Added MonoTODO to most methods
	so it's real status get reflected correctly on the web site.

svn path=/trunk/mcs/; revision=11106
2003-02-02 01:42:26 +00:00
Gonzalo Paniagua Javier a2adff0968 2003-02-01 Gonzalo Paniagua Javier <[email protected]>
* Attribute.cs: fixed all IsDefined overloads. Gotta fix
	GetCustomAttributes later.

svn path=/trunk/mcs/; revision=11101
2003-02-01 20:26:25 +00:00
Jackson Harper db2ea89c64 Check access levels when resolving types
svn path=/trunk/mcs/; revision=11100
2003-02-01 18:40:51 +00:00
Gonzalo Paniagua Javier dc6a01e022 Added a few methods needed to compile s.w.f in *nix
svn path=/trunk/mcs/; revision=11094
2003-02-01 17:04:11 +00:00
Miguel de Icaza e6d2ec934b remove some warnings from now
svn path=/trunk/mcs/; revision=11093
2003-02-01 17:01:03 +00:00
Miguel de Icaza 5923d0b7e2 Add stub method
svn path=/trunk/mcs/; revision=11092
2003-02-01 17:00:51 +00:00
Marco Ridoni 41a116c1aa AddHandler is now a statement of its own and is no more emulated in the
grammar (even if it still needs a hook in the parser).
Event declaration has been added
Fixed a few bugs in the grammar and in FixuPtypes, a helper function used
to declare fields and local vars.

svn path=/trunk/mcs/; revision=11091
2003-02-01 13:02:49 +00:00
Paolo Molaro 70f5e65794 Sat Feb 1 10:59:31 CET 2003 Paolo Molaro <[email protected]>
* alpha/*: update from Laramie.

svn path=/trunk/mono/; revision=11090
2003-02-01 10:02:52 +00:00
Jackson Harper 439f02a687 Add parameters and locals set in catch blocks that might return to set vector
svn path=/trunk/mcs/; revision=11089
2003-02-01 06:25:42 +00:00
Dennis Hayes 51388d30b5 updates
svn path=/trunk/mcs/; revision=11088
2003-02-01 03:23:48 +00:00
Dennis Hayes a439987511 check in for Alexandre Pigolkine
svn path=/trunk/mcs/; revision=11087
2003-02-01 03:16:04 +00:00
Gonzalo Paniagua Javier c7a7abbd69 2003-01-31 Gonzalo Paniagua Javier <[email protected]>
* icall.c: throw parse exception if strtod fails or the string is empty.

svn path=/trunk/mono/; revision=11086
2003-01-31 18:38:14 +00:00
Dietmar Maurer 6b0ad0d55c 2003-01-31 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): use the wrapper signature if necessary

svn path=/trunk/mono/; revision=11085
2003-01-31 16:25:27 +00:00
Zoltan Varga 1a82e8962d 2003-01-31 Zoltan Varga <[email protected]>
* debug.c (mono_debug_open_image): dynamic assemblies have no debug
	info.

svn path=/trunk/mono/; revision=11084
2003-01-31 16:06:42 +00:00
Paolo Molaro f9f4c98f73 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <[email protected]>
* marshal.c: handle object type separately from defined
	class types.

svn path=/trunk/mono/; revision=11082
2003-01-31 15:14:05 +00:00
Paolo Molaro 85303f3dbe Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <[email protected]>
* marshal.c: handle NATIVE_LPSTR for strings when it's
	explicitly specified.

svn path=/trunk/mono/; revision=11081
2003-01-31 15:05:06 +00:00
Ville Palo 6f586f97a4 2003-31-01 Ville Palo <[email protected]>
* DataTableTest.cs: Added more tests for Select (string) -method

svn path=/trunk/mcs/; revision=11080
2003-01-31 14:58:11 +00:00
Paolo Molaro 4db261914c Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <[email protected]>
* reflection.c, reflection.h, icall.c: setup the reflection
	handle cache for ModuleBuilders and AssemblyBuilders.

svn path=/trunk/mono/; revision=11078
2003-01-31 10:57:38 +00:00
Patrik Torstensson 13a1207724 2003-01-31 Patrik Torstensson
* MemoryStream.cs: use BlockCopyInternal instead of Array.Copy, this is
	the same way as MS does it (performance improvement)

svn path=/trunk/mcs/; revision=11077
2003-01-31 10:37:40 +00:00
Patrik Torstensson f9e42fda70 2003-01-31 Patrik Torstensson
* Buffer.cs: Changed access level of BlockCopyInternal

svn path=/trunk/mcs/; revision=11076
2003-01-31 10:36:05 +00:00
Zoltan Varga 31409415b5 2003-01-31 Zoltan Varga <[email protected]>
* ArrayList.cs (RemoveAt): duplicated the the code from RemoveRange
	here, since RemoveAt raises a different exception than RemoveRange
	when the index is out-of-range. Fixes the ArrayList unit tests.

	* ArrayList.cs (RemoveRange): fixed indentation.

svn path=/trunk/mcs/; revision=11075
2003-01-31 10:20:30 +00:00
John Sohn 873bdef67f * README: updated for latest WineLib and Mono
svn path=/trunk/mcs/; revision=11074
2003-01-31 07:24:27 +00:00
John Sohn 0be5e85d0c * makefile: cleaned and reduced dependencies to hard-coded paths
* monostub.c: updated for compliance with the latest Mono and WineLib

svn path=/trunk/mcs/; revision=11073
2003-01-31 07:22:30 +00:00
Sebastien Pouliot 1c316f3ee4 2003-01-30 Sebastien Pouliot <[email protected]>
* X509CertificateCollection.cs: Replaced the use of the private
	ArrayList by the protected InnerList (from CollectionBase) so
	Count property now works.

svn path=/trunk/mcs/; revision=11072
2003-01-31 03:14:33 +00:00
Sebastien Pouliot ba97f32797 2003-01-30 Sebastien Pouliot <[email protected]>
* TimeZoneTest.cs: Added "Eastern Standard Time" to the test.
	This won't be complete until all time zone are added (added a
	Fail for unsupported TimeZones).

svn path=/trunk/mcs/; revision=11071
2003-01-31 00:27:29 +00:00
Zoltan Varga 9a8769f38a 2003-01-30 Zoltan Varga <[email protected]>
* StringBuilderTest.cs: added test for passing a negative capacity to
	the constructor.

svn path=/trunk/mcs/; revision=11070
2003-01-30 19:47:59 +00:00
Zoltan Varga 4629b55cc5 2003-01-30 Zoltan Varga <[email protected]>
* StringBuilder.cs: fix the constructor: 'value' can be NULL,
	'capacity' must be >=0, use defaultCapacity only if capacity equals 0.
	This fixes the StringBuilder unit tests.

svn path=/trunk/mcs/; revision=11069
2003-01-30 19:37:56 +00:00
Paolo Molaro 4a445db052 Thu Jan 30 19:54:30 CET 2003 Paolo Molaro <[email protected]>
* String.cs, IntegerFormatter.cs: use const where appropriate.

svn path=/trunk/mcs/; revision=11068
2003-01-30 19:08:35 +00:00
Gaurav Vaish 25e5ba719d 2003-01-30 Gaurav Vaish <gvaish_mono AT lycos.com>
* ListDataHelper.cs      : Complete. Probably!

svn path=/trunk/mcs/; revision=11067
2003-01-30 18:57:12 +00:00
Gaurav Vaish bacc6ee527 2003-01-30 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileListItemCollection.cs
	                         : Stubbed Add(...) methods.

svn path=/trunk/mcs/; revision=11066
2003-01-30 18:54:20 +00:00
Gaurav Vaish 68824329d4 2003-01-30 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileListItemCollection.cs
	                         : Stubbed IStateManager methods.

svn path=/trunk/mcs/; revision=11065
2003-01-30 18:41:00 +00:00
Gaurav Vaish a28e80290f 2003-01-30 Gaurav Vaish <gvaish_mono AT lycos.com>
* ListDataHelper.cs      : Initial implementation.
	* DataSourceHelper.cs    : Initial implementation.

svn path=/trunk/mcs/; revision=11064
2003-01-30 17:04:07 +00:00
Gaurav Vaish 7b788c2964 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile.Util                 : Added directory.

svn path=/trunk/mcs/; revision=11063
2003-01-30 16:52:26 +00:00
Gaurav Vaish c2a5683b86 2003-01-30 Gaurav Vaish <gvaish_mono AT lycos.com>
* ListDataHelperInternal.cs
	                         : Moved to Util namespace,
	                           as ListDataHelper.cs

svn path=/trunk/mcs/; revision=11062
2003-01-30 16:51:03 +00:00
Gaurav Vaish d26b7fb705 2003-01-30 Gaurav Vaish <gvaish_mono AT lycos.com>
* ListDataHelperInternal.cs
	                         : Added class.

svn path=/trunk/mcs/; revision=11061
2003-01-30 16:48:17 +00:00
Ville Palo 897df1464f 2003-01-30 Ville Palo <[email protected]>
* ExpressionElement.cs: Added new file. This file is for parsing
	  and DataData.Select () -methods and DataColumn.Expression -property
	* DataTable.cs: Implemented Select(string) -method

svn path=/trunk/mcs/; revision=11060
2003-01-30 16:24:39 +00:00
Ville Palo 06ca8bb8d6 2003-01-30 Ville Palo <[email protected]>
* list: Added new file ExpressionElement.cs

svn path=/trunk/mcs/; revision=11059
2003-01-30 16:20:30 +00:00
Gonzalo Paniagua Javier cfb922eacc 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* MonoCustomAttrs.cs: fixed GetBase () for Type. Thanks to Zoltan for
	reporting.

svn path=/trunk/mcs/; revision=11058
2003-01-30 15:29:42 +00:00
Rafael Teixeira e00ab844ac See changelog
svn path=/trunk/mcs/; revision=11057
2003-01-30 13:09:04 +00:00
Dietmar Maurer a7684f9aaa 2003-01-30 Dietmar Maurer <[email protected]>
* reflection.c (reflection_methodbuilder_to_mono_method): set
	pinvoke flag

svn path=/trunk/mono/; revision=11056
2003-01-30 12:10:56 +00:00
Paolo Molaro bc532b2897 Thu Jan 30 11:07:06 CET 2003 Paolo Molaro <[email protected]>
* helper.c: handle MONO_TYPE_ARRAY as well.

svn path=/trunk/mono/; revision=11053
2003-01-30 10:10:43 +00:00
Nick Drochak 2b30798947 Removed obsolete file.
svn path=/trunk/mcs/; revision=11052
2003-01-30 09:20:39 +00:00
Nick Drochak 6a7d01ec61 2003/01/30 Nick Drochak <[email protected]>
* corlib_test.build: AllTests.cs do not exist anymore. No need to
	excluded them.

svn path=/trunk/mcs/; revision=11051
2003-01-30 09:16:54 +00:00
Gonzalo Paniagua Javier aa92bc6044 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: fixed typo in set_Length.

svn path=/trunk/mcs/; revision=11041
2003-01-30 02:32:51 +00:00
Sebastien Pouliot febc5e8dfc 2003-01-29 Sebastien Pouliot <[email protected]>
* ByteTest.cs: Updated Setup to support my Locale. Better but
	probably still incomplete.
	* DoubleTest.cs: Updated Setup to support my Locale. You can now
	use a comma (or anything else) instead of a dot (.).
	* ConvertTest.cs: Updated TestToDecimal and TestToDouble to
	support my Locale. You can now use a comma (or anything else)
	instead of a dot (.).

svn path=/trunk/mcs/; revision=11037
2003-01-30 01:36:24 +00:00
Gonzalo Paniagua Javier 7aed5ead71 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* BrowsableAttribute.cs: this attribute applies to All. Since the fix
	to bug #37380, mcs complained about this when compiling System.Data.

svn path=/trunk/mcs/; revision=11036
2003-01-30 00:57:31 +00:00
Gonzalo Paniagua Javier 151739af64 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* System/MonoCustomAttrs.cs: fixed shortcut in GetCustomAttributes.
	The argument ICustomAttributeProvider can be of other types different
	from Type. Handle it.

	* System.Reflection/MonoMethod.cs: implemented GetBaseDefinition ().
	* System.Reflection.Emit/MethodBuilder.cs: GetBaseDefinition () returns
	this.

	Fixes bug #37380.

svn path=/trunk/mcs/; revision=11035
2003-01-30 00:55:23 +00:00
Gonzalo Paniagua Javier 1add88c582 2003-01-30 Gonzalo Paniagua Javier <[email protected]>
* icall.c: implemented ves_icall_MonoMethod_get_base_definition.

svn path=/trunk/mono/; revision=11033
2003-01-30 00:48:26 +00:00
Patrik Torstensson dca075e463 Updated
svn path=/trunk/mcs/; revision=11031
2003-01-29 22:16:15 +00:00
Patrik Torstensson 2f52562d4f 2003-01-28 Patrik Torstensson
* MonoMethod.cs: Added support for serialization for MonoMethod and MonoCMethod
	* ReflectionSerializationHolder.cs: Support class for serialization

svn path=/trunk/mcs/; revision=11030
2003-01-29 22:14:58 +00:00
Zoltan Varga 0edc507181 2003-01-29 Zoltan Varga <[email protected]>
* Directory.cs (GetFileSystemEntries): moved error handling to the
	correct instance of GetFileSystemEntries so all callers can enjoy it.

svn path=/trunk/mcs/; revision=11029
2003-01-29 21:50:50 +00:00
Zoltan Varga cb03ca33c0 2003-01-29 Zoltan Varga <[email protected]>
* makefile.gnu: compile and run with debugging enabled.

	* makefile.gnu: added SUBDIR variable to enable building a subset of
	the tests, saving on compilation time during development.

	* run_test.sh: updated to nunit2.

svn path=/trunk/mcs/; revision=11028
2003-01-29 20:52:41 +00:00
Gonzalo Paniagua Javier 50b945fca5 2003-01-29 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpRequest.cs: added BaseVirtualDir property and use it
	in MapPath.

	* System.Web.UI.HtmlControls/HtmlControl.cs: _tagName is now internal.
	* System.Web.UI.HtmlControls/HtmlGenericControl.cs: use the field in
	HtmlControl to keep the tag name.

	* System.Web.Util/UrlUtils.cs: fixed Combine ().

svn path=/trunk/mcs/; revision=11027
2003-01-29 19:16:39 +00:00
Lluis Sanchez 2e8b8c7700 Added RemoteActivator.cs
svn path=/trunk/mcs/; revision=11026
2003-01-29 18:11:33 +00:00
Lluis Sanchez e2eb08af71 * ServerContextTerminatorSink.cs: now it forwards messages to the target identity,
which knows how to manage each type of service.
* StackBuilderSink.cs: added a reference to the target object.

svn path=/trunk/mcs/; revision=11025
2003-01-29 18:06:49 +00:00
Lluis Sanchez 483cc1a41f * LifetimeServices.cs: Implemented some basic properties.
svn path=/trunk/mcs/; revision=11024
2003-01-29 18:06:01 +00:00
Lluis Sanchez adab27e955 * Context.cs: Object sinks must be created for each object
(they can contain object-specific info).

svn path=/trunk/mcs/; revision=11023
2003-01-29 18:05:40 +00:00
Lluis Sanchez 6c3765168b * ChannelServices.cs: corrected generation
of exception in SyncDispatchMessage.

svn path=/trunk/mcs/; revision=11022
2003-01-29 18:04:36 +00:00
Lluis Sanchez e2ed296e94 * RemoteActivator.cs: Added.
svn path=/trunk/mcs/; revision=11021
2003-01-29 18:04:02 +00:00
Lluis Sanchez 43e5ee938a * RemotingServices.cs: Added support for WellKnownService objects.
* RemotingConfiguration.cs: Implemented most of methods (Configure is not working yet).
* ObjRef.cs: Added initialization of channel info in default constructor.
* Identity.cs: Added support for WellKnownService objects.

svn path=/trunk/mcs/; revision=11020
2003-01-29 18:03:33 +00:00
Dietmar Maurer e69e98877a (mono_analyze_stack): RETOBJ always returns native sized objects
svn path=/trunk/mono/; revision=11019
2003-01-29 17:53:09 +00:00
Dietmar Maurer 1cb652450e (*): correctly set sig->pinvoke, we need to memdup the signature
to do that

svn path=/trunk/mono/; revision=11018
2003-01-29 17:33:41 +00:00
Dick Porter b88bea2774 2003-01-29 Dick Porter <[email protected]>
* threads.c: No need for the fake_thread kludge now that Thread
	doesn't run a class constructor

svn path=/trunk/mono/; revision=11017
2003-01-29 16:51:40 +00:00
Dick Porter f814e25cd8 Renamed mono_new_thread_init() to mono_thread_new_init() to conform to
the proper naming scheme

svn path=/trunk/mono/; revision=11016
2003-01-29 16:42:29 +00:00
Dick Porter d68cc2b8cd 2003-01-29 Dick Porter <[email protected]>
* threads.c: Use g_direct_hash instead of the rather bogus
	g_int_hash

svn path=/trunk/mono/; revision=11015
2003-01-29 16:16:09 +00:00
Dick Porter df3a04ff65 Added a book about threading.
svn path=/trunk/mono/; revision=11014
2003-01-29 16:15:37 +00:00
Dietmar Maurer a6a6697c13 (mono_marshal_get_struct_to_ptr): generate valid IL code
(mono_marshal_get_ptr_to_struct): generate valid IL code

svn path=/trunk/mono/; revision=11013
2003-01-29 15:23:56 +00:00
Dietmar Maurer d2f39c830f fix for the previous fix
svn path=/trunk/mono/; revision=11012
2003-01-29 13:44:01 +00:00
Dietmar Maurer 34e032e567 2003-01-29 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): add check for null
	(fix pinvoke12.exe)

svn path=/trunk/mono/; revision=11011
2003-01-29 13:41:44 +00:00
Daniel Morgan af653b483b 2003-01-29 Daniel Morgan <[email protected]>
* doc/postgresql
	* doc/mysql
	* doc/ado-net: updates to web pages

	* man/sqlsharp.1: update to man page

svn path=/trunk/mono/; revision=11010
2003-01-29 13:09:12 +00:00
Dietmar Maurer b621d08f4a 2003-01-29 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): impl. CEE_MONO_LDNATIVEOBJ

svn path=/trunk/mono/; revision=11009
2003-01-29 12:59:13 +00:00
Nick Drochak 91de9c3719 Removed unneeded files. Legacy from nunit v1.
svn path=/trunk/mcs/; revision=11008
2003-01-29 10:51:45 +00:00
Miguel de Icaza 266a33fbe7 Add some missing spaces
svn path=/trunk/mono/; revision=11006
2003-01-29 07:17:34 +00:00
Gonzalo Paniagua Javier c0ea39b2d6 compilation fix
svn path=/trunk/mcs/; revision=11003
2003-01-28 22:20:32 +00:00
Paolo Molaro d7c5179cb2 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <[email protected]>
* marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
	to avoid overflows (bug spotted and fixed by Jerome Laban <[email protected]>).

svn path=/trunk/mono/; revision=11002
2003-01-28 22:04:01 +00:00
Daniel Morgan dbe0577640 2003-01-28 Daniel Morgan <[email protected]>
* Npgsql.build: got it to work for Windows build

	* Npgsql/Npgsql.build
	* Npgsql/Npgsql.cmbx
	* Npgsql/Npgsql.prjx: removed files not needed

svn path=/trunk/mcs/; revision=11001
2003-01-28 19:41:17 +00:00
Daniel Morgan af70c73dcf 2003-01-28 Daniel Morgan <[email protected]>
* added the Npgsql (Npgsql is a .Net Data Provider for PostgreSQL)
	  from http://gborg.postgresql.org/project/npgsql/projdisplay.php
	  by adding the following files and directories to the mcs module
	  in mono-cvs.ximian.com at mcs/class:

      Npgsql (directory)
      ChangeLog
      Makefile
      Npgsql.build
      RELEASENOTES.txt
      TODO.txt
      makefile.gnu
      LICENSE.txt
      README.txt
      STATUS.txt
      list
	  Npgsql/Npgsql (directory)
	  Npgsql/AssemblyInfo.cs
	  Npgsql/NpgsqlAsciiRow.cs
	  Npgsql/NpgsqlBackEndKeyData.cs
	  Npgsql/NpgsqlClosedState.cs
	  Npgsql/NpgsqlCommand.cs
	  Npgsql/NpgsqlConnectedState.cs
	  Npgsql/NpgsqlConnection.cs
	  Npgsql/NpgsqlConnector.cs
	  Npgsql/NpgsqlConnectorPool.cs
	  Npgsql/NpgsqlDataAdapter.cs
	  Npgsql/NpgsqlDataReader.cs
	  Npgsql/NpgsqlEventLog.cs
	  Npgsql/NpgsqlException.cs
	  Npgsql/NpgsqlMediator.cs
	  Npgsql/NpgsqlMessageTypes.cs
	  Npgsql/NpgsqlParameter.cs
	  Npgsql/NpgsqlParameterCollection.cs
	  Npgsql/NpgsqlPasswordPacket.cs
	  Npgsql/NpgsqlQuery.cs
	  Npgsql/NpgsqlReadyState.cs
	  Npgsql/NpgsqlResultSet.cs
	  Npgsql/NpgsqlRowDescription.cs
	  Npgsql/NpgsqlStartupPacket.cs
	  Npgsql/NpgsqlStartupState.cs
	  Npgsql/NpgsqlState.cs
	  Npgsql/NpgsqlTransaction.cs
	  Npgsql/PGUtil.cs

svn path=/trunk/mcs/; revision=11000
2003-01-28 18:42:47 +00:00
Paolo Molaro 5d77c9903f Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <[email protected]>
* profiler.c: provide more callers information.

svn path=/trunk/mono/; revision=10998
2003-01-28 17:58:55 +00:00
Paolo Molaro 59af8f7ea8 Tue Jan 28 18:53:08 CET 2003 Paolo Molaro <[email protected]>
* monograph.c: more stats added.

svn path=/trunk/mono/; revision=10997
2003-01-28 17:57:11 +00:00
Ville Palo be149e5918 2003-01-28 Ville Palo <[email protected]>
* XmlDataDocumentTest.cs: Fixed some tests

svn path=/trunk/mcs/; revision=10996
2003-01-28 17:55:37 +00:00
Ville Palo fedbec797e 2003-01-28 Ville Palo <[email protected]>
* DataSet.cs: One little fix to writing xml

svn path=/trunk/mcs/; revision=10995
2003-01-28 17:53:07 +00:00
Gonzalo Paniagua Javier 9e3a398571 2003-01-28 Gonzalo Paniagua Javier <[email protected]>
* configure.in: added WIN32_THREADS flag when building under windows.
	It seems that the header files of the gc do not always define it when
	GC_WIN32_THREADS is defined.

svn path=/trunk/mono/; revision=10993
2003-01-28 17:25:52 +00:00
Paolo Molaro 170f6075a1 Tue Jan 28 17:55:59 CET 2003 Paolo Molaro <[email protected]>
* Thread.cs: delay-init datastorehash.

svn path=/trunk/mcs/; revision=10992
2003-01-28 16:59:53 +00:00
Paolo Molaro f265becc38 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <[email protected]>
* statement.cs: small memory and time optimization in FlowBranching.

svn path=/trunk/mcs/; revision=10991
2003-01-28 16:41:41 +00:00
Atsushi Eno ccc7255252 2003-01-29 Atsushi Enomoto <[email protected]>
* WebClient.cs : hacked OpenRead, DownloadData and DownloadFile.

svn path=/trunk/mcs/; revision=10990
2003-01-28 16:33:04 +00:00
Zoltan Varga cd8981fa4b 2003-01-28 Zoltan Varga <[email protected]>
* x86.brg (mono_ldintftn): use <= instead of <, since the
	interface_offsets array is max_interface_id + 1 long.

svn path=/trunk/mono/; revision=10988
2003-01-28 15:53:29 +00:00
Zoltan Varga c1cf0c392a 2003-01-28 Zoltan Varga <[email protected]>
* FileTest.cs: Added tests for GetCreationTime.

svn path=/trunk/mcs/; revision=10987
2003-01-28 15:32:17 +00:00
Zoltan Varga a8426777d4 2003-01-28 Zoltan Varga <[email protected]>
* File.cs: add error handling to Get...Time methods.

svn path=/trunk/mcs/; revision=10986
2003-01-28 15:31:02 +00:00
Zoltan Varga 4f3228c1cc 2003-01-28 Zoltan Varga <[email protected]>
* DateTime.cs: fix FromFileTime so the time returned by
	File::GetLastModificationTime etc. is in the correct timezone.

svn path=/trunk/mcs/; revision=10985
2003-01-28 15:28:13 +00:00
Gonzalo Paniagua Javier 2c425e442f 2003-01-28 Gonzalo Paniagua Javier <[email protected]>
* RealProxy.cs: fixed compilation by adding missing GetObjectData ().

svn path=/trunk/mcs/; revision=10984
2003-01-28 15:23:19 +00:00
Patrik Torstensson 2c09768a7c Update
svn path=/trunk/mcs/; revision=10983
2003-01-28 14:53:01 +00:00
Patrik Torstensson 1efc648ec1 2003-01-28 Patrik Torstensson
* Exception.cs: reverted formating/endline changes (sorry guys)

svn path=/trunk/mcs/; revision=10982
2003-01-28 14:48:37 +00:00
Patrik Torstensson 8599efdc84 Flush
svn path=/trunk/mcs/; revision=10981
2003-01-28 14:45:27 +00:00
Patrik Torstensson 8171eef6ce 2002-12-28 Patrik Torstensson
* CrossAppDomainChannel.cs: First version, without support for "going" into the right domain

svn path=/trunk/mcs/; revision=10980
2003-01-28 14:45:06 +00:00
Patrik Torstensson 714d056936 2002-12-28 Patrik Torstensson
* RemotingSurrogateSelector.cs: Added serialization support for MBR's.
	* RemotingSurrogate.cs: Moved ObjRefSurrogate and MBRSurrogate to new file.
	* ErrorMessage.cs: Dummy used when an exception occours.
	* MonoMethodMessage.cs: Added Serializable and support for be created with null methods

svn path=/trunk/mcs/; revision=10979
2003-01-28 14:44:13 +00:00
Dietmar Maurer b415a5dc91 2003-01-28 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code

svn path=/trunk/mono/; revision=10978
2003-01-28 14:17:54 +00:00
Dietmar Maurer f3138e4011 2003-01-28 Dietmar Maurer <[email protected]>
* appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object

svn path=/trunk/mono/; revision=10977
2003-01-28 13:09:24 +00:00
Patrik Torstensson 2962d0c78a 2003-01-28 Patrik Torstensson
* MarshalByRefObject.cs: implemented GetObjectIdentity
	* Exception.cs: added support for remote exceptions

svn path=/trunk/mcs/; revision=10976
2003-01-28 12:15:37 +00:00
Piers Haken 500abbf531 *** empty log message ***
svn path=/trunk/mcs/; revision=10975
2003-01-28 12:13:34 +00:00
Patrik Torstensson 9deca5ed3b Oops
svn path=/trunk/mcs/; revision=10974
2003-01-28 12:10:39 +00:00
Patrik Torstensson 28a0061cbf 2003-01-28 Patrik Torstensson
* ObjRef.cs: Fixed Objref marshalling flags

svn path=/trunk/mcs/; revision=10973
2003-01-28 12:10:08 +00:00
Dietmar Maurer 244f8f450a 2003-01-28 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): generate valid IL code

svn path=/trunk/mono/; revision=10972
2003-01-28 12:00:50 +00:00
Nick Drochak b7c320ab07 2003-01-28 Nick Drochak <[email protected]>
* MutexTest.cs: Ignore tests that hang mono.
        * ThreadTest.cs: Ignore tests that hang mono.

svn path=/trunk/mcs/; revision=10971
2003-01-28 09:52:07 +00:00
Nick Drochak 7d3b0290b8 2003-01-28 Nick Drochak <[email protected]>
* ResourceReaderTest.cs: Ignore part of a test that hangs mono.

svn path=/trunk/mcs/; revision=10970
2003-01-28 09:43:32 +00:00
Nick Drochak 6aca35f5ef 2003-01-28 Nick Drochak <[email protected]>
* ArrayTest.cs: Avoid nulls in arrays. This crashes mono.
        * ConsoleTest.cs: Ignore some tests that hang mono.
        * ConvertTest.cs: Ignore some tests that hang mono.

svn path=/trunk/mcs/; revision=10969
2003-01-28 09:36:28 +00:00
Dietmar Maurer 2d337c0b86 2003-01-28 Dietmar Maurer <[email protected]>
* x86.brg (mono_ldintftn): fix from Zoltan: use max_interface_id

svn path=/trunk/mono/; revision=10968
2003-01-28 08:51:49 +00:00
Miguel de Icaza ad3903d69f Improve with get/set
svn path=/trunk/mcs/; revision=10967
2003-01-28 06:53:54 +00:00
Gonzalo Paniagua Javier 0fd2755b2d 2003-01-28 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: fixed bug #37225.

svn path=/trunk/mcs/; revision=10964
2003-01-28 00:27:11 +00:00
Lluis Sanchez 192e07c742 ObjectManager.cs: Corrected a problem with IObjectReferece objects.
svn path=/trunk/mcs/; revision=10963
2003-01-27 20:33:05 +00:00
Zoltan Varga 6195eddf66 2003-01-27 Zoltan Varga <[email protected]>
* StackTraceTest.cs: Added test for unthrown exceptions.

svn path=/trunk/mcs/; revision=10962
2003-01-27 20:26:33 +00:00
Zoltan Varga 400cc93483 2003-01-27 Zoltan Varga <[email protected]>
* StringTest.cs: Added tests for out-of-bounds indexes in GetChars().

svn path=/trunk/mcs/; revision=10961
2003-01-27 20:14:02 +00:00
Zoltan Varga d3db0f7d01 2003-01-27 Zoltan Varga <[email protected]>
* exception.c (ves_icall_get_trace): avoid crash if the exception is
	not yet thrown.

	* exception.c (ves_icall_get_trace): avoid crash on unmanaged frames.

svn path=/trunk/mono/; revision=10960
2003-01-27 20:11:29 +00:00
Zoltan Varga 6958993879 2003-01-27 Zoltan Varga <[email protected]>
* icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
	exception instead of going into an infinite loop on dates which it
	can't yet handle.

	* string-icalls.c (ves_icall_System_String_get_Chars): raise
	out-of-range exception if needed.

	* class.c (mono_class_setup_vtable): allow a virtual method to provide
	an implementation for an interface method and to override an inherited
	method at the same time.
	Imagine a scenario when a virtual method is used to override a
	virtual abstract method in a parent class, and this same method
	provides an implementation for an method inherited from an interface.
	In this case, the interface resolution code will set im->slot, which
	means that the virtual method override pass will skip this method
	which means a pointer to the abstract method inherited from the parent
	will remain in the vtable of this non-abstract class.

	* class.c: (mono_class_setup_vtable): continue search for a real
	method if only an abstract method is found.

svn path=/trunk/mono/; revision=10959
2003-01-27 20:04:27 +00:00
Ville Palo f907e73a74 2003-01-27 Ville Palo <[email protected]>
* XmlSchemaMapper.cs: Some fixes.
	* DatSet.cs: Some XmlFixes and BeginInit ()/ EndInit () -fix

svn path=/trunk/mcs/; revision=10958
2003-01-27 19:30:28 +00:00
Ville Palo 81918784ee 2003-01-27 Ville Palo <[email protected]>
* ChangeLog: Added this file.
	* XmlDataDocument.cs: Some little fixes.

svn path=/trunk/mcs/; revision=10957
2003-01-27 19:01:47 +00:00
Marco Ridoni 05afe78770 Attributes have been added to the grammar and seem to work, even if to a
limited extent
A few fixes for local variable delcalarations
A few fixes for array syntax
Added CType()

svn path=/trunk/mcs/; revision=10956
2003-01-27 18:16:45 +00:00
Gaurav Vaish 6de48fe73b 2003-01-27 Gaurav Vaish <gvaish_mono AT lycos.com>
* IListControl.cs        : A private class hacked.
	* PagedControl.cs        : Fixed typo error (OnPageChange)
	* List.cs                : Stubbed almost all methods. Will
	                           implement tommorrow. Time to sleep.
	* MobileListItemCollection.cs
	                         : Finally, a collection class will bite
	                           me all. ;-)

svn path=/trunk/mcs/; revision=10955
2003-01-27 18:02:33 +00:00
Gaurav Vaish 10b45d730e 2003-01-27 Gaurav Vaish <gvaish_mono AT lycos.com>
* List.cs, PagedControl.cs
	                         : Was I drunk? or Sleeping when I wrote
	                           the classes? I mixed up the methods.
	                           Reorganizing.
	* PagedControl.cs        : Completed.

svn path=/trunk/mcs/; revision=10954
2003-01-27 17:28:33 +00:00
Paolo Molaro c472ce8fe7 Mon Jan 27 17:16:50 CET 2003 Paolo Molaro <[email protected]>
* get.c: decode also the size info in get_marshal_info()
	for ByValStr and ByValArray.

svn path=/trunk/mono/; revision=10953
2003-01-27 16:20:41 +00:00
Paolo Molaro e44e3d645e Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <[email protected]>
* reflection.c: add size to encoding for ByValStr and ByValArray
	marshal blob (from "Jerome Laban" <[email protected]>).

svn path=/trunk/mono/; revision=10952
2003-01-27 16:18:44 +00:00
Paolo Molaro 203a062db9 Mon Jan 27 17:07:38 CET 2003 Paolo Molaro <[email protected]>
* CustomAttributeBuilder.cs, FieldBuilder.cs: applied
	(reformatted) patch from "Jerome Laban" <[email protected]>
	to fix ByValStr and ByValArray encodings.

svn path=/trunk/mcs/; revision=10951
2003-01-27 16:14:12 +00:00
Gaurav Vaish e9b60cc8ef 2003-01-26 Gaurav Vaish <gvaish_mono AT lycos.com>
* Form.cs                : HasActiveHandler()       - Stubbed.
	* List.cs                : Initial implementation.
	* ItemPager.cs,
	* Image.cs,
	* Link.cs,
	* ListDataBindEventArgs.cs,
	* ListDataBindEventHandler.cs,
	* ListCommandEventArgs.cs,
	* ListCommandEventHandler.cs,
	* LoadItemsEventArgs.cs,
	* LoadItemsEventHandler.cs
	                         : Completed.
	* MobilePage.cs          : ActivePage { get; set; } - Stubbed.
	                         : GetForm(string)          - Stubbed.
	* PagedControl.cs        : Initial implementation.

svn path=/trunk/mcs/; revision=10950
2003-01-27 16:01:03 +00:00
Zoltan Varga 67402210bd 2003-01-27 Zoltan Varga <[email protected]>
* class.c (mono_class_setup_vtable): pass the override info as an
	argument.

	* class.c (mono_class_setup_vtable): set the slot of overriding methods
	correctly.

	* reflection.c (ensure_runtime_vtable); add support for method
	overrides.

svn path=/trunk/mono/; revision=10949
2003-01-27 15:34:33 +00:00
Zoltan Varga 85ca6f7891 2003-01-27 Zoltan Varga <[email protected]>
* reflection.c (resolution_scope_from_image): Hack to work to work with
	dynamic assemblies.

	* reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
	added a 'force_ref' argument to force this function to allways return
	a TypeRef. This is needed by mono_image_get_memberref_token ().

svn path=/trunk/mono/; revision=10948
2003-01-27 14:59:52 +00:00
Ville Palo 7cd4a73e4a 2003-27-01 Ville Palo <[email protected]>
* DataRelationTest.cs: Added more tests

svn path=/trunk/mcs/; revision=10947
2003-01-27 14:24:11 +00:00
Zoltan Varga c79a25d626 2003-01-27 Zoltan Varga <[email protected]>
* reflection.c (mono_image_get_type_info): interfaces really don't have
	a parent.

	* reflection.c (mono_image_basic_init): fill out missing fields of
	image structure.

	* reflection.c (mono_image_basic_init): Invoke assembly load hooks for
	dynamic assemblies. This is required so dynamic assemblies show up in
	AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
	Type::GetType() etc. This is consistent with MS behaviour.

	* image.c image.h reflection.c: add newly created classes to the name
	cache so mono_class_get () will find them.

svn path=/trunk/mono/; revision=10946
2003-01-27 14:17:32 +00:00
Ville Palo 46fa64be6e 2003-27-01 Ville Palo <[email protected]>
* DataTableTest.cs: Added test for DataTable.Select ()

svn path=/trunk/mcs/; revision=10945
2003-01-27 13:56:48 +00:00
Zoltan Varga c9866ad0aa 2003-01-27 Zoltan Varga <[email protected]>
First part of changes to get IKVM.NET running under mono.

	* appdomain.h, appdomain.c: added new function
	mono_domain_try_type_resolve() which will emit TypeResolve events.
	This function will call AppDomain::DoTypeResolve to do the actual work.

	* class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
	moved existing code dealing with dynamic tokens to a new function
	called mono_reflection_lookup_dynamic_token (). This function will
	raise TypeResolve events when appropriate. Since reflection.c is not
	part of libmetadata, a new hook function called
	mono_lookup_dynamic_token() is added to class.c which will call this.

	* assembly.h assembly.c: make the invoke_load_hook function public,
	so it can be called for dynamic assemblies.

	* icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.

	* icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
	type isn't found.

	* reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
	MonoGHashTable, since it contains pointers to objects which the GC
	needs to track.

	* assembly.c (search_loaded): remove unused variable.

svn path=/trunk/mono/; revision=10944
2003-01-27 13:31:59 +00:00
Gonzalo Paniagua Javier bda714c5f4 2003-01-27 Gonzalo Paniagua Javier <[email protected]>
* driver.cs: fixed bug #37187.

svn path=/trunk/mcs/; revision=10943
2003-01-27 13:20:09 +00:00
Paolo Molaro 866abd70e2 Mon Jan 27 12:49:10 CET 2003 Paolo Molaro <[email protected]>
* alpha/*: start of the port to the alpha architecture by
	Laramie Leavitt (<[email protected]>).

svn path=/trunk/mono/; revision=10942
2003-01-27 11:54:14 +00:00
Paolo Molaro 3921d48ab8 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <[email protected]>
* object.c: fixed issue exposed by gcc-generated IL programs
	that use RVA data for pointers.

svn path=/trunk/mono/; revision=10941
2003-01-27 11:24:12 +00:00
Gonzalo Paniagua Javier 5aaa18a3ba 2003-01-27 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: Clone the arrays in GetNames and GetValues. Thanks lupus!

svn path=/trunk/mcs/; revision=10940
2003-01-27 11:01:59 +00:00
Lluis Sanchez 856d3d578e * TcpServerChannel.cs: Changed management of listener threads.
* TcpConnectionPool.cs: Add shutdown method.
* TcpChannel.cs: Corrected shutdown method.

svn path=/trunk/mcs/; revision=10939
2003-01-27 10:49:16 +00:00
Zoltan Varga ed204851f7 2003-01-27 Zoltan Varga <[email protected]>
* AppDomain.cs: Added DoTypeResolve method which will be called by
	the runtime to raise TypeResolve events.

svn path=/trunk/mcs/; revision=10938
2003-01-27 10:37:01 +00:00
Duncan Mak 4b3e1fe6bf (ToType): Implement this using Convert.ToType.
svn path=/trunk/mcs/; revision=10937
2003-01-27 08:22:31 +00:00
Gonzalo Paniagua Javier 60976a8a9d 2003-01-27 Gonzalo Paniagua Javier <[email protected]>
* AssemblyBuilder.cs: fixed compilation with csc.

svn path=/trunk/mcs/; revision=10935
2003-01-27 04:23:43 +00:00
Miguel de Icaza 77165fb514 updated makefile
svn path=/trunk/mcs/; revision=10934
2003-01-27 02:12:27 +00:00
Miguel de Icaza c720502ac9 Rename test
svn path=/trunk/mcs/; revision=10933
2003-01-27 02:12:14 +00:00
Miguel de Icaza 5c6fb36c72 2003-01-27 Pedro Martinez Juli� <[email protected]>
* expression.cs (IndexerAccess.DoResolve): Before trying to resolve
	any indexer, it's needed to build a list with all the indexers in the
	hierarchy (AllGetters), else we have problems. Fixes #35653.

svn path=/trunk/mcs/; revision=10932
2003-01-27 02:07:36 +00:00
Miguel de Icaza c0c6bae9c8 Makefile updates
svn path=/trunk/mcs/; revision=10931
2003-01-27 02:05:46 +00:00
Miguel de Icaza 09ee06aead Add new test to handle overloaded indexers
svn path=/trunk/mcs/; revision=10930
2003-01-27 02:05:18 +00:00
Miguel de Icaza ffb0cad5a6 Mailing lists
svn path=/trunk/mono/; revision=10929
2003-01-26 20:29:50 +00:00
Miguel de Icaza 4cda6b53b4 2003-01-26 Miguel de Icaza <[email protected]>
* AssemblyBuilder.cs (Save): Set the executable bit at the end.
	This uses a non-official enumeration value to call SetFileAttributes.

svn path=/trunk/mcs/; revision=10928
2003-01-26 20:11:30 +00:00
Zoltan Varga 9c9225173b 2003-01-26 Zoltan Varga <[email protected]>
* Directory.cs: fix GetParent so it actually works.

svn path=/trunk/mcs/; revision=10927
2003-01-26 20:09:19 +00:00
Miguel de Icaza e36affda3a 2003-01-26 Miguel de Icaza <[email protected]>
* io.c (SetFileAttributes): This routine is not currently
	implemented for the general case, but I added a special case to
	set the executable bit on Linux.

svn path=/trunk/mono/; revision=10926
2003-01-26 20:01:39 +00:00
Lluis Sanchez 913fe3e70b * TcpServerChannel.cs: Changed default formatter sink to BinaryFormatterSink
* TcpMessageIO.cs: warning corrected.
* TcpConnectionPool.cs: changed default value of MaxOpenConnections.
* TcpClientTransportSink.cs: implemented support for one way calls.
* TcpClientChannel.cs: Changed default formatter sink to BinaryFormatterSink.
* TcpChannel.cs: corrected Parse method. Now can parse channel uris.
* BinaryServerFormatterSink.cs: Implemented.
* BinaryClientFormatterSink.cs: Implemented.

svn path=/trunk/mcs/; revision=10925
2003-01-26 18:11:18 +00:00
Lluis Sanchez 28783cbcd0 * unix.args: added System.Runtime.Remoting.Messaging/ArgInfo.cs,
System.Runtime.Remoting.Messaging/MethodCallDictionary.cs
  System.Runtime.Remoting.Messaging/MethodDictionary.cs
  System.Runtime.Remoting.Messaging/MethodReturnDictionary.cs

svn path=/trunk/mcs/; revision=10924
2003-01-26 17:59:56 +00:00
Lluis Sanchez 44d2993bc3 * ReturnMessage.cs: Implemented property Properties
* RemotingSurrogateSelector.cs: Implemented serialization support for ObjRef.
* MonoMethodMessage.cs: Implemented Properties and MethodSignature properties.
* MethodReturnMessageWrapper.cs: Implemented.
* MethodCallMessageWrapper.cs: Implemented.
* MethodCall.cs: Implemented.
* Header.cs: Small corrections to make it work.
* MethodDictionary.cs: Added.
* MethodCallDictionary.cs: Added.
* MethodReturnDictionary.cs: Added.
* ArgInfo.cs: Added.

svn path=/trunk/mcs/; revision=10923
2003-01-26 17:58:01 +00:00
Lluis Sanchez 6bcf280a36 * ChannelServices.cs: small correction in CreateClientChannelSinkChain.
* ChannelDataStore.cs: added Serializable attribute.

svn path=/trunk/mcs/; revision=10922
2003-01-26 17:30:22 +00:00
Daniel Morgan 726fef391c 2003-01-26 Daniel Morgan <[email protected]>
* doc/index
	* doc/ado-net
	* doc/firebird
	* doc/ibmdb2
	* doc/mysql
	* doc/odbc
	* doc/oledb
	* doc/oracle
	* doc/postgresql
	* doc/sqlclient
	* doc/sqlite
	* doc/sybase
	* doc/tdsclient: corrections

svn path=/trunk/mono/; revision=10921
2003-01-26 17:15:39 +00:00
Daniel Morgan 004900840b 2003-01-26 Daniel Morgan <[email protected]>
* sqlsharpgtk.cs: added support for providers:
	 MySQLNet, Npgsql, DB2Client, and Oracle

svn path=/trunk/mcs/; revision=10919
2003-01-26 14:15:36 +00:00
Daniel Morgan 91ed885051 2003-01-26 Daniel Morgan <[email protected]>
* System.Data/DataColumn.cs: fix to not check for DataType being set

	* System.Data/DataRow.cs: misc fixes

	* Test/SqlTest.cs: accept connection parameters from
	command line instead of being hard coded

	* Test/System.Data_test.build: exclude building SqlTest.cs

	* Test/System.Data/DataRowTest.cs
	* Test/System.Data/DataColumnTest.cs: added new tests and numbered
	all the tests so they can be easily identified

	* Test/System.Data/DataRelationTest.cs: commented code that calls
	DataSet's BeginEdit() and EndEdit() which causes a compile error

svn path=/trunk/mcs/; revision=10916
2003-01-26 13:38:41 +00:00
Daniel Morgan 84b02c1a8f 2003-01-26 Daniel Morgan <[email protected]>
* SqlSharpCli.cs: fixes contributed by
	Francisco Figueiredo Jr. fxjrlists a-t yahoo.com.br

svn path=/trunk/mcs/; revision=10915
2003-01-26 09:26:55 +00:00
Gonzalo Paniagua Javier 72ebbb608f 2003-01-26 Gonzalo Paniagua Javier <[email protected]>
* DbEnumerator.cs: why does the runtime throw an invalid cast here? The
	object is an Int16... Gotta fill a bug report and when fixed undo this
	patch.

svn path=/trunk/mcs/; revision=10914
2003-01-26 08:31:53 +00:00
Atsushi Eno 6594be4e6d 2003-01-26 Atsushi Enomoto <[email protected]>
* XmlNodeTests.cs : added TestReplaceChild.
	* XmlNodeReaderTests.cs : modified TestReadString more complex.
	* XmlNamespaceManagerTests.cs : added TestLookupPrefix.
	* XmlTextTests.cs : added TestSplitText.

svn path=/trunk/mcs/; revision=10913
2003-01-26 08:09:19 +00:00
Atsushi Eno 4e426ccecd 2003-01-26 Atsushi Enomoto <[email protected]>
* XmlSerializer.cs : some fix handling xml node object more correct.

svn path=/trunk/mcs/; revision=10912
2003-01-26 08:07:53 +00:00
Atsushi Eno 2a6da5d6f1 2003-01-26 Atsushi Enomoto <[email protected]>
* XmlNode.cs : implemented ReplaceChild.
	  removed DocElem checking at InsertBefore.
	* XmlNodeReader.cs : fixed ReadString and Read for correct node info.
	* XmlText.cs : implemented CloneNode and SplitText.

svn path=/trunk/mcs/; revision=10911
2003-01-26 08:06:56 +00:00
Gonzalo Paniagua Javier 339e5c416c 2003-01-26 Gonzalo Paniagua Javier <[email protected]>
* DataGrid.cs: AutoGenerateColumns defaults to true. Fixed
	CreateColumnSet. Set the owner of the column when auto generated.
	In PrepareControlHierarchyForItem, fixed for loop bound.

	* LinkButtonInternal.cs: fixed infinite recursion bug.

	Fixes bug #37124.

svn path=/trunk/mcs/; revision=10910
2003-01-26 07:43:03 +00:00
Duncan Mak a93abb929c Update the links. Thanks for Andy Oliver for the report.
svn path=/trunk/mono/; revision=10909
2003-01-26 06:05:21 +00:00
Miguel de Icaza b2ba55ae18 Flush
svn path=/trunk/mono/; revision=10908
2003-01-26 05:55:59 +00:00
Martin Baulig 4adba32a0d 2003-01-26 Martin Baulig <[email protected]>
* debug.c (mono_debug_init): Take a boolean argument which
	specifies whether we're running in the Mono Debugger.

svn path=/trunk/mono/; revision=10890
2003-01-25 23:30:04 +00:00
Sebastien Pouliot bb95b6dced 2003-01-25 Sebastien Pouliot <[email protected]>
* CryptographicException.cs: Default HResult to CORSEC_E_CRYPTO
	(0x80131430) as documented.
	* CryptographicUnexpectedOperationException.cs: Default HResult
	to CORSEC_E_CRYPTO_UNEX_OPER (0x80131431) as documented.

svn path=/trunk/mcs/; revision=10887
2003-01-25 21:19:35 +00:00
Martin Baulig 10b3252091 2003-01-25 Martin Baulig <[email protected]>
* threads.c (start_wrapper): Moved the initialization of
	`start_func' above the mono_new_thread_init() call to which we
	pass it as argument.

svn path=/trunk/mono/; revision=10886
2003-01-25 19:43:45 +00:00
Christopher Bockner 11c71516de Some structural changes to implement Prepared Statements (prepared statements won't be done until I finish the parameter support though).
Added SQLNumParams and SQLDescribeParam to DB2ClientPrototypes.

svn path=/trunk/mcs/; revision=10885
2003-01-25 19:10:13 +00:00
Gaurav Vaish fcccc24e23 2003-01-25 Gaurav Vaish <gvaish_mono AT lycos.com>
* ControlPager.cs        : Completed.
	* ItemPager.cs           : Initial implementation.

svn path=/trunk/mcs/; revision=10884
2003-01-25 16:25:05 +00:00
Gaurav Vaish 876b85a756 2003-01-24 Gaurav Vaish <gvaish_mono AT lycos.com>
* ControlPager.cs        : PageCount { get; set; }   - Stubbed.
	* MobileControl.cs       : EnablePagination { get; set; }
	                                                     - Completed
	                         : SetControlPageRecursive   - Stubbed.
	* Panel.cs               : Completed.

svn path=/trunk/mcs/; revision=10883
2003-01-25 10:53:45 +00:00
Daniel Morgan 8c6910d366 2003-01-24 Daniel Morgan <[email protected]>
* System.Data/DataColumn.cs: fixes to be like .NET -
	when setting AllowDBNull to false, determine if there is
	any data that has DBNull.Value, implement AutoIncrement, do not
	allow changing the DataType of the column if data has already been
	set, check if the DataType is supported,

	* System.Data/DataColumnCollection.cs: handle default ColumnName
	like .NET

	* System.Data/DataRow.cs: fixes to be like .NET - a
	data column gets initialized to all DBNull.Values not null,
	implement AutoIncrement, when setting ItemArray if the item array being
	set has less items than the number of columns in the table set those last
	columns to DBNull.Value, after setting ItemArray values do an EndEdit(),
	both a null and DBNull.Value get set to a DBNull.Value, only use DefaultValue
	and AutoIncrement if the value is set to null while DBNull.Value only gets set
	to DBNull.Value

svn path=/trunk/mcs/; revision=10882
2003-01-24 22:32:49 +00:00
Gonzalo Paniagua Javier 9e41b7ec74 forgot this
svn path=/trunk/mcs/; revision=10881
2003-01-24 20:24:24 +00:00
Gonzalo Paniagua Javier aa7ae681b0 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* Path.cs: fixlet to ChangeExtension for the case when the path is
	empty.

svn path=/trunk/mcs/; revision=10880
2003-01-24 19:09:28 +00:00
Martin Baulig 1dc5cb17b9 2003-01-24 Martin Baulig <[email protected]>
* threads.h (MonoThreadCallbacks): Pass the thread ID instead of
	the MonoThread pointer.

svn path=/trunk/mono/; revision=10878
2003-01-24 16:54:52 +00:00
Martin Baulig fb551ca201 2003-01-24 Martin Baulig <[email protected]>
* debug.c (mono_debug_io_layer): Disable this on Windows.

svn path=/trunk/mono/; revision=10874
2003-01-24 16:39:19 +00:00
Martin Baulig b2cc52a35e 2003-01-24 Martin Baulig <[email protected]>
* ObjectReader.cs (ReadNextObject): Call
	RaiseDeserializationEvent() on the ObjectManager when we're done
	reading the whole graph.

svn path=/trunk/mcs/; revision=10873
2003-01-24 16:36:29 +00:00
Martin Baulig 33792aae6e 2003-01-24 Martin Baulig <[email protected]>
* ObjectManager.cs (RaiseDeserializationEvent): Walk the object
	list in the correct order.

svn path=/trunk/mcs/; revision=10872
2003-01-24 16:34:40 +00:00
Miguel de Icaza e9a71ceeb4 Update this
svn path=/trunk/mcs/; revision=10871
2003-01-24 16:14:06 +00:00
Miguel de Icaza 2eb361050d oops, make this public
svn path=/trunk/mcs/; revision=10870
2003-01-24 16:10:01 +00:00
Miguel de Icaza 98833b0ff9 2003-01-21 Miguel de Icaza <[email protected]>
* Math.cs: Remove Pow's implementation body as it was wrong.  The
	C code does the right thing.  The code was trying to handle a
	number of cases, and that was incorrect.

svn path=/trunk/mcs/; revision=10869
2003-01-24 15:37:35 +00:00
Miguel de Icaza 93537be4a8 2003-01-21 Miguel de Icaza <[email protected]>
* icall.c: Rename `PowImpl' to Pow.

svn path=/trunk/mono/; revision=10868
2003-01-24 15:35:11 +00:00
Ville Palo 1b239ee0eb 2003-01-24 Ville Palo <[email protected]>
* UniqueConstraint.cs: Do not set columns Unique property true
	as a default.
	* ForeignKeyConstraint.cs: Add UniqueConstraint to parent Table

svn path=/trunk/mcs/; revision=10867
2003-01-24 15:27:37 +00:00
Ville Palo cdbd5a9c22 2003-24-01 Ville Palo <[email protected]>
* UniqueConstraint.cs: More tests

svn path=/trunk/mcs/; revision=10866
2003-01-24 13:31:51 +00:00
Lluis Sanchez e8014227ca * unix.args: added System.Runtime.Remoting/TypeInfo.cs and
System.Runtime.Serialization.Formatters.Binary/MessageFormatter.cs

svn path=/trunk/mcs/; revision=10865
2003-01-24 11:22:26 +00:00
Lluis Sanchez 5195d4cfc0 * ObjectWriter.cs, ObjectReader.cs: Added suport for headers.
Corrected encoding of primitive types. Corrected a bug about zero-length arrays.
* MessageFormatter.cs: Added. Implements serialization of messages.
* BinaryFormatter.cs: Added serialization of messages.
* BinaryCommon.cs: Added enum of codes of primitive types.

svn path=/trunk/mcs/; revision=10864
2003-01-24 11:21:30 +00:00
Lluis Sanchez 72e6c4348f RemotingServices.cs: Implemented some missing methods: IsMethodOverloaded,
SetObjectUriForMarshal, IsOneWay, IsObjectOutOfAppDomain,
 IsObjectOutOfContext, GetObjRefForProxy, GetObjectData,
GetMethodBaseFromMethodMessage.

TypeInfo.cs: Added.

ObjRef.cs: Implemented serialization and added support
for IRemotingTypeInfo.

svn path=/trunk/mcs/; revision=10863
2003-01-24 11:19:39 +00:00
Gonzalo Paniagua Javier 5ef88c7ac5 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* XmlCharacterData.cs: added XPathNodeType property.

svn path=/trunk/mcs/; revision=10859
2003-01-24 06:30:54 +00:00
Gonzalo Paniagua Javier 5c538ee58e 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* XslTransform.cs: don't free the xml document used for the style sheet.
	xmlFreeStylesheet already does it. Correctly close the element tag for
	elements that don't have children. Added a couple of checks more.

svn path=/trunk/mcs/; revision=10858
2003-01-24 06:29:49 +00:00
Gonzalo Paniagua Javier 75416f91c2 oops
svn path=/trunk/mcs/; revision=10857
2003-01-24 03:13:49 +00:00
Gonzalo Paniagua Javier a26ebb5aa7 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* CharEnumerator.cs: completed the prior patch.

svn path=/trunk/mcs/; revision=10856
2003-01-24 03:07:36 +00:00
Sebastien Pouliot d04a876547 2003-01-23 Sebastien Pouliot <[email protected]>
* cert2spc.1: man page for cert2spc tool
	* secutil.1: man page for secutil tool

svn path=/trunk/mono/; revision=10855
2003-01-24 02:47:00 +00:00
Gonzalo Paniagua Javier cf13915eb7 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* AspParser.cs: fixed bug #36929.

svn path=/trunk/mcs/; revision=10854
2003-01-24 02:06:35 +00:00
Gonzalo Paniagua Javier 1915761fde 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* CharEnumerator.cs: fix to Current by [email protected]. Closes
	bug #37113.

svn path=/trunk/mcs/; revision=10853
2003-01-24 01:16:48 +00:00
Gonzalo Paniagua Javier 65a2ace011 2003-01-24 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: added caching to GetInfo.

svn path=/trunk/mcs/; revision=10850
2003-01-23 23:59:51 +00:00
Marco Ridoni 3cc7f9d629 Enums are supported and working
Cast functions (CStr(), CBool(), etc) supported
ByRef parameters now work
A few fixes for optional parameters and structure declaration
String concatenation operator supported (to be debugged)

svn path=/trunk/mcs/; revision=10849
2003-01-23 23:07:09 +00:00
Gaurav Vaish 9c1a912c8a 2003-01-23 Gaurav Vaish <gvaish_mono AT lycos.com>
* Command.cs             : Completed.
	* Form.cs                : CurrentPage { get; set; } - Stubbed.

svn path=/trunk/mcs/; revision=10842
2003-01-23 18:17:29 +00:00
Gonzalo Paniagua Javier 981441bd4f 2003-01-23 Gonzalo Paniagua Javier <[email protected]>
* XslTransform.cs: fixed a couple of Transform overloads and changed the
	library name in DllImport to make it work on windows too.

svn path=/trunk/mcs/; revision=10841
2003-01-23 18:14:27 +00:00
Gonzalo Paniagua Javier c842bdee36 2003-01-23 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am:
	* libtest.c:
	* pinvoke12.cs: added new test for string [] marshaling.

svn path=/trunk/mono/; revision=10840
2003-01-23 18:08:18 +00:00
Dick Porter 1018fa070e 2003-01-23 Dick Porter <[email protected]>
* Environment.cs (System): Implemented ExitCode

svn path=/trunk/mcs/; revision=10839
2003-01-23 17:57:47 +00:00
Dick Porter 9b5c149aec Run all managed code in a subthread. Re-enable GC threaded finalisation.
Fixes bugs 34263 and 31333.

(All tests still behave the same way - 4 fails)

2003-01-23  Dick Porter  <[email protected]>

	* threads.c (start_wrapper): Create a Thread object if needed, so
	the Main() thread can do the class initialisation in a subthread
	that has been set up to allow managed code execution.

	Pass the thread ID instead of the MonoThread pointer to the thread
	start and attach callbacks.  This change is required, because the
	jit thread start callback must be called _before_ the Thread
	object can be created.

	(mono_thread_init): Removed much object creation code that is no
	longer needed.  No managed code is called from here now.

	* object.c (mono_runtime_exec_managed_code): Create a subthread
	for Main, and call back to the runtime to use it.
	Set the exit code when Main exits.

	* gc.c: Make sure domain finalisation happens in a subthread.
	Re-enable threaded GC, fixing bug 31333 (again).

	* environment.c: System.Environment internall calls (so far just
	ExitCode is here, the others are still in icall.c)

	* appdomain.c (mono_runtime_cleanup): All threads running managed
	code should have finished before mono_runtime_cleanup() is
	reached, so no need to clean up threads.


2003-01-23  Dick Porter  <[email protected]>

	* mono.c: Use mono_runtime_exec_managed_code() to run all managed
	code in a subthread.

	* jit.c: Changed thread start and attach callbacks to pass the
	thread ID, not the MonoThread pointer.  Arrange that managed code
	execution will fail an assertion in the main thread, just to be
	sure.


2003-01-23  Dick Porter  <[email protected]>

	* interp.c: Use mono_runtime_exec_managed_code() to run all
	managed code in a subthread.

svn path=/trunk/mono/; revision=10838
2003-01-23 17:46:26 +00:00
Zoltan Varga 7f33ba9dd9 2003-01-23 Zoltan Varga <[email protected]>
* Type.cs (IsInstanceOfType): fixed regression caused by the change
	to IsSubclassOf().

svn path=/trunk/mcs/; revision=10836
2003-01-23 15:40:23 +00:00
Ville Palo b2810b60d6 uups
svn path=/trunk/mcs/; revision=10835
2003-01-23 15:30:21 +00:00
Ville Palo 68016bf599 2003-23-01 Ville Palo <[email protected]>
* ForeignKeyConstraint.cs: More tests

svn path=/trunk/mcs/; revision=10834
2003-01-23 14:55:43 +00:00
Rafael Teixeira e8df4f6375 MonoBASIC Compiler 1.0.0.0 - (c)2002 Rafael Teixeira
This is a compiler for the MonoBASIC language,
which is a superset of Visual Basic.NET

Usage: mbas [options] SOURCE-FILES
Options:
  -? --help             Show this help list
     --about            About the MonoBASIC compiler
     --addmodule=PARAM  [NOT IMPLEMENTED YET]Reference metadata from specified module
     --baseaddress=PARAM [NOT IMPLEMENTED YET]The base address for a library or module (hex)
     --bugreport=PARAM  [NOT IMPLEMENTED YET]Create bug report file
     --checked          [Mono] Set default context to checked
  -d --define=PARAM     [NOT IMPLEMENTED YET]Declares global conditional compilation symbol(s). symbol list:name=value,...
     --debug            Emit debugging information
     --debug-args=PARAM [Mono] Debugger arguments
     --debug:full       Emit full debugging information (default)
     --debug:pdbonly    [IGNORED]Emit PDB file only
     --delaysign        [NOT IMPLEMENTED YET]Delay-sign the assembly using only the public portion of the strong name key
     --fatal            [Mono] Makes errors fatal
     --ignorewarn=PARAM [Mono] Ignores warning number PARAM
     --imports=PARAM    [NOT IMPLEMENTED YET]Declare global Imports for namespaces in referenced metadata files. import list:namespace,...
     --keycontainer=PARAM [NOT IMPLEMENTED YET]Specifies a strong name key container
     --keyfile=PARAM    [NOT IMPLEMENTED YET]Specifies a strong name key file
     --libpath=PARAM    [NOT IMPLEMENTED YET]List of directories to search for metada references (semi-colon delimited)
     --linkpaths=PARAM  [Mono] Adds path to the assembly link path
     --linkresource=PARAM [NOT IMPLEMENTED YET]Adds the specified file as an embedded assembly resource
  -m --main=PARAM       Specifies the Class or Module that contains Sub Main.It can also be a Class that inherits from System.Windows.Forms.Form.
     --noconfig         [Mono] Disables implicit references to assemblies
     --nologo           [NOT IMPLEMENTED YET]Do not display compiler copyright banner
     --nostdlib         [Mono] Don't assume the standard library
     --nowarn           Disable warnings
  -o --out=PARAM        Specifies the output file name
     --optimize         [NOT IMPLEMENTED YET]Enable optimizations
     --optioncompare:binary [NOT IMPLEMENTED YET]Specifies binary-style string comparisons. This is the default
     --optioncompare:text [NOT IMPLEMENTED YET]Specifies text-style string comparisons.
     --optionexplicit   [NOT IMPLEMENTED YET]Require explicit declaration of variables
     --optionstrict     [NOT IMPLEMENTED YET]Enforce strict language semantics
     --parse            [Mono] Only parses the source file (for debugging the tokenizer)
     --quiet            [NOT IMPLEMENTED YET]Quiet output mode
     --recurse=PARAM    [NOT IMPLEMENTED YET]Include all files in the current directory and subdirectories according to the wildcard
     --removeintchecks  [NOT IMPLEMENTED YET]Remove integer checks. Default off.
     --resource=PARAM   Adds the specified file as an embedded assembly resource
     --rootnamespace=PARAM [NOT IMPLEMENTED YET]Specifies de root namespace for all type declarations
  -r --reference=PARAM  References metadata from the specified assembly
     --stacktrace       [Mono] Shows stack trace at Error location
     --target=PARAM     Specifies the target type for the output file (exe [default], winexe, library, module)
     --timestamp        [Mono] Displays time stamps of various compiler events
     --tokenize         [Mono] Only tokenizes source files
     --unsafe           [Mono] Allows unsafe code
     --usage            Show usage syntax and exit
     --utf8output       [NOT IMPLEMENTED YET]Emit compiler output in UTF8 character encoding
  -v --verbose          Display verbose messages
     --warnaserror      Treat warnings as errors
     --win32icon=PARAM  [NOT IMPLEMENTED YET]Specifies a Win32 icon file (.ico) for the default Win32 resources
     --win32resource=PARAM [NOT IMPLEMENTED YET]Specifies a Win32 resource file (.res)
     --wlevel=PARAM     [Mono] Sets warning level (the highest is 4, the default)

svn path=/trunk/mcs/; revision=10833
2003-01-23 14:25:50 +00:00
Dick Porter 77581d9878 Build Mono.Data.DB2Client with nant
svn path=/trunk/mcs/; revision=10832
2003-01-23 13:27:25 +00:00
Nick Drochak 39dffe4aa0 install dbg files only if they exist...
svn path=/trunk/mcs/; revision=10831
2003-01-23 09:12:26 +00:00
Nick Drochak 85de469f3d 2003-01-23 Nick Drochak <[email protected]>
* makefile: install the .dbg files too so the debugger can use them.

svn path=/trunk/mcs/; revision=10827
2003-01-23 08:38:36 +00:00
Nick Drochak 78bfcc7744 2003/01/23 Nick Drochak <[email protected]>
* ThreadTest.cs: Test for alternate possibilities

svn path=/trunk/mcs/; revision=10826
2003-01-23 07:22:16 +00:00
Gonzalo Paniagua Javier e796ecc0a2 2003-01-23 Gonzalo Paniagua Javier <[email protected]>
* System/System.Net.Sockets/NetworkStream.cs: the check for disposed
	should not be done in the finally clause.

	* corlib/System.IO/BufferedStream.cs: don't try to write a 0 sized
	array on when flushing the stream.

	Fixes bug #37045.

svn path=/trunk/mcs/; revision=10825
2003-01-23 05:30:47 +00:00
Marco Ridoni 43ab67e8a3 Structure declaration added to grammar. Seems to work fine.
svn path=/trunk/mcs/; revision=10822
2003-01-22 23:02:29 +00:00
Gonzalo Paniagua Javier 352db0d1d5 2003-01-22 Gonzalo Paniagua Javier <[email protected]>
* driver.cs: use assembly.Location instead of Codebase (the latest
	patch made mcs fail when using MS assemblies).

svn path=/trunk/mcs/; revision=10821
2003-01-22 20:59:25 +00:00
Ville Palo 82d15cacb4 2003-22-01 Ville Palo <[email protected]>
* DataRelationTest.cs: More tests and little clean up.

svn path=/trunk/mcs/; revision=10820
2003-01-22 19:08:00 +00:00
Rafael Teixeira eaf6f3104e author list correction
svn path=/trunk/mcs/; revision=10819
2003-01-22 19:03:18 +00:00
Rafael Teixeira cad2588a50 house cleaning
svn path=/trunk/mcs/; revision=10818
2003-01-22 19:01:31 +00:00
Martin Baulig b2794569ee Ooops, this was just for debugging.
svn path=/trunk/mono/; revision=10813
2003-01-22 12:41:13 +00:00
Martin Baulig b71d3cacdc 2003-01-22 Martin Baulig <[email protected]>
* debug.c: Reverted Gonzalo's last change since it is wrong.
	We're also using the debugging code on Windows, for instance the
	stabs stuff when running in gdb.  I hope this code still builds on
	Windows; if not, we need to fix this.
	Moved all the mono debugger support code into the debugger itself;
	when debugging a managed application, the debugger new launches a
	small unmanaged wrapper application which contains this stuff.

	* debug.h (MonoDebuggerIOLayer): New public typedef; this is just
	initialized to an array of function pointers to the io-layer
	function; they don't seem to be public in the `libmono' library.
	(mono_debugger_event): New public function.  Sends the debugger an
	event if we're running in the Mono Debugger and does nothing otherwise.

	* mono.c: Don't initialize the Mono Debugger here.

	* jit.c (mono_debug_insert_breakpoint): Removed, this isn't used anymore.
	(mono_thread_start_cb, mono_thread_attach_cb): Call
	mono_debugger_event() to send the debugger a callback.

svn path=/trunk/mono/; revision=10807
2003-01-22 12:16:53 +00:00
Martin Baulig 3064d4052d 2003-01-22 Martin Baulig <[email protected]>
* appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
	`gpointer func' arguments.
	(MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
	but added `MonoThread *thread' argument.
	(mono_runtime_init): The last argument is now a MonoThreadAttachCB.

	* threads.c (mono_new_thread_init): Added `gpointer func' argument
	and pass it to the mono_thread_start_cb callback.
	(mono_install_thread_callbacks): New public function to install a
	set of callbacks which are set by the debugger.
	(mono_thread_init): The last argument is now a MonoThreadAttachCB.

svn path=/trunk/mono/; revision=10806
2003-01-22 12:11:00 +00:00
Martin Baulig bca39d3b1e 2003-01-22 Martin Baulig <[email protected]>
* Makefile.am: Install debug-mono-symfile.h.

svn path=/trunk/mono/; revision=10805
2003-01-22 12:06:27 +00:00
Martin Baulig 6297dcd141 **** Reverted this ****
2003-01-16  Martin Baulig  <[email protected]>

	Added special support for the Mono Debugger to send it a
	notification each time a thread is created or exited.

	* timed-thread.h (TimedThread): Added `pid' and `start_sem'.

	* timed-thread.c (timed_thread_start_routine): If
	`mono_debugger_threads_debug' is non-zero, set `thread->pid' and
	post the `thread->start_sem'.
	(_wapi_timed_thread_create): If `mono_debugger_threads_debug' is
	non-zero, wait for the `thread->start_sem' before returning.

	* threads.c (mono_debugger_threads_debug): New global variable
	which is set by the Mono Debugger.
	(mono_debugger_thread_info): New global variable.
	(update_debugger_thread_info): When running inside the Mono
	Debugger (`mono_debugger_threads_debug' is non-zero), update the
	`mono_debugger_thread_info' array.  This function is called (while
	owning the `thread_hash_mutex') each time the `thread_hash' is
	modified.

svn path=/trunk/mono/; revision=10804
2003-01-22 12:05:14 +00:00
Martin Baulig 34a6a36d40 2003-01-22 Martin Baulig <[email protected]>
* configure.in: Set version number to 0.19.1.

	Heads up: I'm going to commit some changes to the debugger
	which'll require you to use this new runtime, so if you update the
	debugger from CVS, you also need this new runtime.

svn path=/trunk/mono/; revision=10803
2003-01-22 12:02:54 +00:00
Gonzalo Paniagua Javier 60a8df88d7 fixed CS0642s
svn path=/trunk/mcs/; revision=10801
2003-01-22 11:45:37 +00:00
Gonzalo Paniagua Javier 14367a46dd 2003-01-22 Gonzalo Paniagua Javier <[email protected]>
* XslTransform.cs: implemented all Load and Transform methods. It uses
	libxml2 and libxslt. No more temp files. It's slow and memory consuming,
	but, well, that's XSLT... ;-). Idea from Zdravko Tashev.

	Now the Xsl web control works.

svn path=/trunk/mcs/; revision=10800
2003-01-22 11:35:49 +00:00
Gonzalo Paniagua Javier e396af4615 2003-01-22 Gonzalo Paniagua Javier <[email protected]>
* System.Xml/XmlTextWriter.cs: throw an exception if WriteEndDocument is
	called without a prior call to WriteStartDocument.

svn path=/trunk/mcs/; revision=10799
2003-01-22 11:31:28 +00:00
Gonzalo Paniagua Javier 38910ee49d 2003-01-22 Zdravko Tashev <[email protected]>
* Xml.cs: a few fixes.

svn path=/trunk/mcs/; revision=10798
2003-01-22 11:14:12 +00:00
Nick Drochak e212862a20 2003/01/22 Nick Drochak <[email protected]>
* makefile: assume csc for makefile, and mcs for makfile.gnu.

svn path=/trunk/mcs/; revision=10797
2003-01-22 06:08:51 +00:00
Nick Drochak 5ad2fa6d9c 2003/01/22 Nick Drochak <[email protected]>
* makefile: Use csc compiler in here. makefile.gnu assumes mono/mcs

svn path=/trunk/mcs/; revision=10796
2003-01-22 04:16:09 +00:00
Lluis Sanchez 6d6fe4d6fe binary serialization format.htm: Added to CVS
svn path=/trunk/mcs/; revision=10795
2003-01-22 00:39:04 +00:00
Marco Ridoni df12c40dca Interface should work for methods and properties
svn path=/trunk/mcs/; revision=10794
2003-01-21 23:39:11 +00:00
Marco Ridoni e802a9c910 A few minor fixes
svn path=/trunk/mcs/; revision=10788
2003-01-21 21:20:39 +00:00
Gonzalo Paniagua Javier 5367deb9e7 2003-01-21 Aleksey Demakov <[email protected]>
* marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.

svn path=/trunk/mono/; revision=10787
2003-01-21 21:07:02 +00:00
Marco Ridoni e1309ef9d6 A fix for return values in functions and another step towards
implementation of Interfaces

svn path=/trunk/mcs/; revision=10785
2003-01-21 19:42:23 +00:00
Atsushi Eno c8fafc3e01 2003-01-22 Atsushi Enomoto <[email protected]>
*  added recent tests below to System.XML_linux_test.args

svn path=/trunk/mcs/; revision=10784
2003-01-21 19:34:04 +00:00
Johannes Roith a625dc3965 fix typo
svn path=/trunk/mono/; revision=10782
2003-01-21 19:13:36 +00:00
Gonzalo Paniagua Javier b74156c766 2003-01-21 Tim Haynes <[email protected]>
* driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
	get the path to *corlib.dll.

svn path=/trunk/mcs/; revision=10781
2003-01-21 19:01:48 +00:00
Gonzalo Paniagua Javier d127318010 2003-01-21 Tim Haynes <[email protected]>
* AspGenerator.cs:
	* BaseCompiler.cs:
	* CachingCompiler.cs: changes to work around spaces and
        directory-separators in the local filesystem.

svn path=/trunk/mcs/; revision=10780
2003-01-21 18:44:21 +00:00
Gonzalo Paniagua Javier 45982eab2c removed type-reflector from install
svn path=/trunk/mcs/; revision=10779
2003-01-21 18:21:21 +00:00
Paolo Molaro 2007e3095d Tue Jan 21 17:29:53 CET 2003 Paolo Molaro <[email protected]>
* ppc/ppc-codegen.h: completed ppc native code generation by
	Taylor Christopher P <[email protected]>.

svn path=/trunk/mono/; revision=10778
2003-01-21 16:33:33 +00:00
Miguel de Icaza aa40261df4 Flush from work
svn path=/trunk/mono/; revision=10777
2003-01-21 13:49:17 +00:00
Dietmar Maurer 8b540999cf another test
svn path=/trunk/mono/; revision=10772
2003-01-21 09:30:46 +00:00
Dietmar Maurer 3eb0642aba 2003-01-21 Dietmar Maurer <[email protected]>
* added the following fix from Jackson Harper <[email protected]>
	* class.c (mono_ptr_class_get): correctly set access levels of pointers
	(mono_array_class_get): correctly set access levels of arrays

svn path=/trunk/mono/; revision=10771
2003-01-21 09:27:40 +00:00
Miguel de Icaza c069366220 Update
svn path=/trunk/mcs/; revision=10770
2003-01-21 06:32:50 +00:00
Nick Drochak 70292a398b 2003-01-21 Nick Drochak <[email protected]>
* cs-tokenizer.cs:
	* pending.cs:
	* typemanager.cs: Remove compiler warnings

svn path=/trunk/mcs/; revision=10767
2003-01-21 04:17:14 +00:00
Atsushi Eno 5671e092b3 sorry, forgot to add it.
svn path=/trunk/mcs/; revision=10766
2003-01-21 03:24:41 +00:00
Atsushi Eno 33b1f7ac3a 2003-01-21 Atsushi Enomoto <[email protected]>
*  added XmlNodeReaderTests.cs file and added it to AllTests.cs

svn path=/trunk/mcs/; revision=10765
2003-01-21 03:23:58 +00:00
Atsushi Eno daa30f4735 2003-01-21 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : several fix to get more compatible with MS.NET.

svn path=/trunk/mcs/; revision=10764
2003-01-21 03:22:54 +00:00
Miguel de Icaza 1b431c9b78 Update
svn path=/trunk/mono/; revision=10763
2003-01-21 02:46:06 +00:00
Jaime Anguiano Olarra 33bc8c4d79 Added a readme for the newcomers.
svn path=/trunk/mcs/; revision=10761
2003-01-21 00:51:10 +00:00
Patrik Torstensson 8f1f6f47ba 2003-01-20 Patrik Torstensson
* image.h (MonoAssemblyName): changed major, minor, build, revision
	from signed to unsigned.

svn path=/trunk/mono/; revision=10759
2003-01-20 23:36:26 +00:00
Miguel de Icaza 9a06c42fc4 More screenshots
svn path=/trunk/mono/; revision=10758
2003-01-20 23:33:40 +00:00
Miguel de Icaza 28fdafd85b Add screenshots section.
Move screenshots from main page
Prepare for release.
Update JIT debug information

svn path=/trunk/mono/; revision=10757
2003-01-20 23:25:58 +00:00
Duncan Mak 2c25334dab 2003-01-20 Duncan Mak <[email protected]>
* configure.in: Bump the release number to 0.19.

svn path=/trunk/mono/; revision=10756
2003-01-20 23:17:15 +00:00
Daniel Morgan a387d1d5f6 2003-01-20 Daniel Morgan <[email protected]>
* README: updated notes on connection strings and providers
	* SqlSharpCli.cs: fixes for other providers:
	OracleClient, DB2Client, Npgsql, MySqlNet

svn path=/trunk/mcs/; revision=10755
2003-01-20 23:14:46 +00:00
Duncan Mak 8302a4cdf2 ~head -4 ChangeLog~
svn path=/trunk/mcs/; revision=10754
2003-01-20 23:10:53 +00:00
Miguel de Icaza e2f8e143d5 Final touches
svn path=/trunk/mcs/; revision=10753
2003-01-20 23:01:13 +00:00
Gonzalo Paniagua Javier 0e5ece6919 2003-01-20 Gonzalo Paniagua Javier <[email protected]>
* debug.c: make all public symbols just dummy for windows.

svn path=/trunk/mono/; revision=10752
2003-01-20 23:01:09 +00:00
Miguel de Icaza 57045a4722 target for windows build
svn path=/trunk/mcs/; revision=10751
2003-01-20 22:55:05 +00:00
Miguel de Icaza 0243e76a79 Make mbas compile
svn path=/trunk/mcs/; revision=10750
2003-01-20 22:50:11 +00:00
Miguel de Icaza 2930bfc0c1 Remove dependency
svn path=/trunk/mcs/; revision=10749
2003-01-20 22:49:55 +00:00
Miguel de Icaza ccac5f0c5a Put back mbas
svn path=/trunk/mcs/; revision=10748
2003-01-20 22:45:22 +00:00
Miguel de Icaza 83cd9cde53 Also avoid SIGKILL for Windows
svn path=/trunk/mono/; revision=10747
2003-01-20 22:40:23 +00:00
Miguel de Icaza a02e1fed0c 2003-01-20 Miguel de Icaza <[email protected]>
* debug.c (initialize_debugger_support): ifdef out the call to
	mono_debugger_init_thread_debug for the release.

	Someone should look into why its not defined.  I think the problem
	is what Dick pointed out somewhere: code in io-layer is not
	supposed to ever be used in Windows, so code for the debugger that
	lives there must be moved elsewhere.

svn path=/trunk/mono/; revision=10746
2003-01-20 22:33:55 +00:00
Miguel de Icaza 950c405b0f 2003-01-20 sean kasun <[email protected]>
* reflection.c (load_cattr_value): Now this handles
	MONO_TYPE_SZARRAY.  Fixes bug #35629

svn path=/trunk/mono/; revision=10745
2003-01-20 20:43:04 +00:00
Miguel de Icaza 794b145a19 Flush
svn path=/trunk/mono/; revision=10744
2003-01-20 20:13:17 +00:00
Miguel de Icaza 265528cc6c Remove mbas from the build for now, it has a cyclic dependency
svn path=/trunk/mcs/; revision=10743
2003-01-20 20:04:52 +00:00
Miguel de Icaza cb96c08125 Flush debugger announcement
svn path=/trunk/mono/; revision=10741
2003-01-20 19:06:53 +00:00
Gonzalo Paniagua Javier 210cff6e1f 2003-01-20 Gonzalo Paniagua Javier <[email protected]>
* cs-tokenizer.cs: little fixes to line numbering when #line is used.

svn path=/trunk/mcs/; revision=10739
2003-01-20 18:42:08 +00:00
Miguel de Icaza 1cc6caed3e Update with Dick's comments
svn path=/trunk/mono/; revision=10738
2003-01-20 18:11:10 +00:00
Miguel de Icaza fe75e1b8d3 2003-01-20 Miguel de Icaza <[email protected]>
* marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
	integer value

svn path=/trunk/mono/; revision=10737
2003-01-20 18:06:01 +00:00
Gonzalo Paniagua Javier 81f764072e 2003-01-20 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: make the generated file compile with csc after last
	change.

svn path=/trunk/mcs/; revision=10736
2003-01-20 17:57:55 +00:00
Gonzalo Paniagua Javier 341c7420f0 2003-01-20 Gonzalo Paniagua Javier <[email protected]>
* Tds70.cs:
	(FormatParameter): send input/output parameter names. This way we don't
	depend on the parameter position being different of the index in the
	parameter collection.

svn path=/trunk/mcs/; revision=10735
2003-01-20 17:57:06 +00:00
Gonzalo Paniagua Javier 26bab89059 2003-01-20 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspGenerator.cs: removed unused variable. Added
	support for properties/fields of type string [].

	* System.Web.UI.WebControls/DataList.cs: handle the exception when
	adding new keys to DataKeysArray.

svn path=/trunk/mcs/; revision=10734
2003-01-20 15:03:32 +00:00
Duncan Mak b741b03a5a 2003-01-20 Duncan Mak <[email protected]>
* list.unix: Remove the extra reference to ArgumentProcessorAttribute.cs

svn path=/trunk/mcs/; revision=10732
2003-01-20 14:34:04 +00:00
Rafael Teixeira c79b907d10 house cleaning
svn path=/trunk/mcs/; revision=10731
2003-01-20 13:41:55 +00:00
Rafael Teixeira 65c55cae96 More Draekko patches to make mbas as useable as mcs
svn path=/trunk/mono/; revision=10729
2003-01-20 13:24:10 +00:00
Rafael Teixeira 93512315cf Based on Draekko patches, mbas is entering the global makefiles
svn path=/trunk/mcs/; revision=10728
2003-01-20 13:06:04 +00:00
Nick Drochak a3a8c702a3 2003/01/20 Nick Drochak <[email protected]>
* makefile: take out type-reflector since it's gone.

svn path=/trunk/mcs/; revision=10721
2003-01-20 06:15:16 +00:00
Sebastien Pouliot c1c4fa1ec2 2003-01-20 Sebastien Pouliot <[email protected]>
* CipherMode.cs: Added missing [Serializable] to enum.
	* CspProviderFlags.cs: Added missing [Serializable] to enum.
	* FromBase64Transform.cs: Added missing [Serializable] to enum.
	* PaddingMode.cs: Added missing [Serializable] to enum.

svn path=/trunk/mcs/; revision=10719
2003-01-20 03:38:16 +00:00
Rafael Teixeira 6d58b9ec58 more changes from Daniel Campos: faster StrReverse - fleshed FileSystem.cs
svn path=/trunk/mcs/; revision=10718
2003-01-19 20:03:42 +00:00
Gaurav Vaish 819f5a345f 2003-01-19 Gaurav Vaish <gvaish_mono AT lycos.com>
* Command.cs             : Initial implementation.
	* IObjectListFieldCollection.cs
	                         : F*** the docs. Use only reflection
	                           to get the correct methods / properties.
	* TextControl.cs         : Implemented.
	* ObjectListCommandEventArgs/Handler.cs
	                         : Implemented.
	* MobileListItem.cs      : Initial Implementation.
	* ObjectListItem.cs      : Initial Implementation.
	* ObjectList.cs          : Initial Implementation.
	* TemplateContainer.cs   : Initial Implementation.

svn path=/trunk/mcs/; revision=10714
2003-01-19 18:21:11 +00:00
Daniel Morgan c40860f8f6 2003-01-19 Daniel Morgan <[email protected]>
* doc/ibmdb2: added file which is new web page
	about IBM DB2 data provider at Mono.Data.DB2Client

	* makefile
	* commands: added ibmdb2 web page to go-mono web site

	* doc/ado-net: added a couple more developers email, plus made the
	email spam resistant, added Mono's DB2 data provider to list,
	added more info about the ProviderFactory and retrieving data using
	ADO.NET from ASP.NET, add notes about testing, misc cleanup

	* doc/mysql
	* doc/postgresql
	* doc/sqlclient
	* doc/oracle
	* doc/tdsclient
	* doc/firebird
	* doc/oledb
	* doc/odbc
	* doc/sybase
	* doc/sqlite: added testing notes and C# examples

	* doc/gtk-sharp: added links for GTK# for Windows

svn path=/trunk/mono/; revision=10712
2003-01-19 17:39:25 +00:00
Sebastien Pouliot f8369d1fa5 2003-01-19 Sebastien Pouliot <[email protected]>
* crypto: Updated status page.

svn path=/trunk/mono/; revision=10707
2003-01-19 14:15:04 +00:00
Sebastien Pouliot 91ce9a2e72 2003-01-19 Sebastien Pouliot <[email protected]>
* commands: Moved Crypto after all ADO.NET sub elements.

svn path=/trunk/mono/; revision=10706
2003-01-19 14:14:34 +00:00
Gaurav Vaish e62e81ba8c 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile.build                : Also remove the pdb file.

svn path=/trunk/mcs/; revision=10705
2003-01-19 13:54:38 +00:00
Martin Baulig b8c9c45df8 2003-01-19 Martin Baulig <[email protected]>
* debug.c: Ok, this should now finally be working this time ....

svn path=/trunk/mono/; revision=10704
2003-01-19 13:48:08 +00:00
Sebastien Pouliot 51911d4ec6 2003-01-19 Sebastien Pouliot <[email protected]>
* HMACSHA1Test.cs: Added tests for constructors.
	* MACTripleDESTest.cs: Added tests for constructors.

svn path=/trunk/mcs/; revision=10703
2003-01-19 13:46:26 +00:00
Sebastien Pouliot dadd38c671 2003-01-19 Sebastien Pouliot <[email protected]>
* CryptoTools.cs: Added internal class BlockProcessor to help
	implementation of block-based algorithms (like MAC and HMAC).
	* HMACSHA1.cs: Refactored to remove dependencies on CryptoStream,
	better constructors and Dispose support.
	* MACTripleDES.cs: Refactored to reuse new HMACSHA1 stuff, better
	constructors.

svn path=/trunk/mcs/; revision=10702
2003-01-19 13:44:13 +00:00
Sebastien Pouliot 198a9c8cb5 2003-01-19 Sebastien Pouliot <[email protected]>
* IsolatedStorageFile.cs: Added missing [CLSCompliant(false)]
	to CurrentSize and MaximumSize to fix compilation (at least
	under Windows/csc).

svn path=/trunk/mcs/; revision=10701
2003-01-19 12:44:57 +00:00
Atsushi Eno da054d8c15 2003-01-19 Atsushi Enomoto <[email protected]>
* XmlElementTests.cs : added TestWriteToDefaultNamespace test.
	* XmlNodeTests.cs : added TestGetPrefixOfNamespace test.

svn path=/trunk/mcs/; revision=10700
2003-01-19 11:35:10 +00:00
Atsushi Eno eb38dedfbc 2003-01-19 Atsushi Enomoto <[email protected]>
* XmlNamespaceManager.cs : fundamental change of LookupPrefix to return
		null when no matching uri.
	* XmlElement.cs : removed unnecessary xmlns output.
	* XmlNode.cs : GetPrefixOfNamespace fix along with the change above.
	* XmlTextWriter.cs : LookupPrefix and WriteStartElementInternal fix
		along with the change above, and moved timing of 'xmlns' output
		to CloseStartElement.
	* XmlWriter.cs: modified WriteStartAttribute, same as yesterday.

svn path=/trunk/mcs/; revision=10699
2003-01-19 11:34:25 +00:00
Jonathan Pryor 17afb2ed9b My Afternoon Project. Implement System.IO.IsolatedStorage.
Well, a partial implementation, anyway.  Enough of an implementation to run
example 21-17 from "Programming C#, 2nd Edition" (O'Reilly Press).

There are several issues remaining, such as proper behavior under Win32 (I'm
sure looking up the HOME environment variable won't be correct) and security
issues (docs suggest that isolated storage should have a limited size to
prevent DOS attacks, and that Isolated Storage is intended to be used by
untrusted apps).

This will suffice as a first pass of the code.

System.IO.FileStream changes are because IsolatedStorageFileStream needed to
override a virtual property, which FileStream didn't expose.  (Rather odd,
that.)

svn path=/trunk/mcs/; revision=10694
2003-01-19 05:46:10 +00:00
Sebastien Pouliot c4e80b0dd1 2003-01-18 Sebastien Pouliot <[email protected]>
* HMACSHA1.cs: Now use KeyBuilder to build the default key.

svn path=/trunk/mcs/; revision=10688
2003-01-18 23:52:10 +00:00
Daniel Morgan 3d0215ea34 forgot to add ChangeLog file
svn path=/trunk/mcs/; revision=10687
2003-01-18 22:14:18 +00:00
Daniel Morgan 1487ef693e 2003-01-18 Daniel Morgan <[email protected]>
* TestDB2Conn.cs: use a different connection string
	which uses the format
	"DSN=database;UID=userid;PWD=password"

svn path=/trunk/mcs/; revision=10686
2003-01-18 22:13:31 +00:00
Sebastien Pouliot 0262f45d79 2003-01-18 Sebastien Pouliot <[email protected]>
* makefile, makefile.gnu: Renamed Cert2Spc.exe to cert2spc.exe.

svn path=/trunk/mcs/; revision=10685
2003-01-18 21:48:29 +00:00
Gaurav Vaish 77ed335185 2003-01-18 Gaurav Vaish <gvaish_mono AT lycos.com>
* Constants.cs           : Undocumented class. Reflection revealed.
	                           Implemented.

svn path=/trunk/mcs/; revision=10681
2003-01-18 18:12:10 +00:00
Gaurav Vaish be7cc439dd 2003-01-18 Gaurav Vaish <gvaish_mono AT lycos.com>
* Constants.cs           : Undocumented class. Reflection revealed.
	                           Implemented.

svn path=/trunk/mcs/; revision=10680
2003-01-18 18:05:22 +00:00
Marco Ridoni 28f2d4e814 Fixed a bug which caa�used an Exceptionwhen declaring properties with 0 parameters
Added preliminary support for Interfaces (still not working)

svn path=/trunk/mcs/; revision=10677
2003-01-18 16:34:13 +00:00
Christopher Bockner 9f1f45ea46 DB2ClientCommand.cs: Finished transition to SQLDriverConnect.
:

svn path=/trunk/mcs/; revision=10675
2003-01-18 15:50:47 +00:00
Martin Baulig c2c1f1eb56 2003-01-18 Martin Baulig <[email protected]>
* debug.c (mono_debugger_jit_exec): Send the background thread a
	SIGKILL before returning.

svn path=/trunk/mono/; revision=10674
2003-01-18 15:34:00 +00:00
Ville Palo c116a126b9 2003-01-18 Ville Palo <[email protected]>
* DataTableCollection.cs: Now names new DataTable if it doesn't
	already have a name.

svn path=/trunk/mcs/; revision=10663
2003-01-18 14:52:58 +00:00
Rafael Teixeira 06095010a1 Corrections to *Trim sent by Daniel Campos
svn path=/trunk/mcs/; revision=10656
2003-01-18 14:01:47 +00:00
Atsushi Eno a5d23fa8b3 2003-01-18 Atsushi Enomoto <[email protected]>
* added XmlWriterTests.cs file and added it to AllTests.cs

svn path=/trunk/mcs/; revision=10655
2003-01-18 11:31:24 +00:00
Atsushi Eno 2d7a230c66 2003-01-18 Atsushi Enomoto <[email protected]>
* XmlWriter.cs: modified WriteStartElement (see test for detail).
	Added WriteNode.

svn path=/trunk/mcs/; revision=10654
2003-01-18 11:30:12 +00:00
Miguel de Icaza 346f3b40cf Flush
svn path=/trunk/mono/; revision=10646
2003-01-18 05:48:10 +00:00
Jonathan Pryor 952aca77a6 type-reflector has been moved to its own CVS module. Remove from the mcs
module.

This should eliminate complaints about inappropriate tools being built with
mcs... ;-)

svn path=/trunk/mcs/; revision=10643
2003-01-18 03:43:26 +00:00
Jonathan Pryor fa79dd6751 type-reflector is being moved to its own CVS module. Remove it from the build
process here.

svn path=/trunk/mcs/; revision=10641
2003-01-18 03:41:45 +00:00
Sebastien Pouliot 096e9b19f9 2003-01-17 Sebastien Pouliot <[email protected]>
* library.build: added System.Security to build, test and clean.
	There's no makefile.gnu yet for this assembly.

svn path=/trunk/mcs/; revision=10639
2003-01-18 01:19:17 +00:00
Sebastien Pouliot 381b6f1ebb 2003-01-17 Sebastien Pouliot <[email protected]>
* System.Security.build: Simplified and fixed some issues.

svn path=/trunk/mcs/; revision=10638
2003-01-18 01:04:11 +00:00
Sebastien Pouliot b2a92a5345 2003-01-17 Sebastien Pouliot <[email protected]>
* AllTests.cs: Removed System.Security.Cryptography from using.
	* System.Security_test.build: Simplified and fixed some issues.

svn path=/trunk/mcs/; revision=10637
2003-01-18 01:01:34 +00:00
Sebastien Pouliot 6b3d5687da 2003-01-17 Sebastien Pouliot <[email protected]>
* KeyInfo.cs: Changed some protected declaration to private.
	* KeyInfoName.cs: Changed some protected declaration to private.
	* KeyInfoNode.cs: Changed some protected declaration to private.
	* KeyInfoRetrievalMethod.cs: Changed some protected declaration to private.
	* KeyInfoX509Data.cs: Changed some protected declaration to private.
	* Transform.cs: Changed some protected declaration to private.
	* XmlDsigBase64Transform.cs: Changed some protected declaration to private.
	* XmlDsigC14NTransform.cs: Changed some protected declaration to private.
	* XmlDsigC14NWithCommentsTransform.cs: Changed some protected declaration to private.
	* XmlDsigEnvelopedSignatureTransform.cs: Changed some protected declaration to private.
	* XmlDsigXPathTransform.cs: Changed some protected declaration to private.
	* XmlDsigXsltTransform.cs: Changed some protected declaration to private.

svn path=/trunk/mcs/; revision=10636
2003-01-18 00:56:18 +00:00
Miguel de Icaza 17531924e3 2003-01-17 Miguel de Icaza <[email protected]>
* cs-parser.jay: Small fix: we were not comparing the constructor
	name correctly.   Thanks to Zoltan for the initial pointer.

svn path=/trunk/mcs/; revision=10635
2003-01-17 23:48:11 +00:00
Gonzalo Paniagua Javier 85042b357c 2003-01-18 Gonzalo Paniagua Javier <[email protected]>
* decimal.c: fixed bug #26056.

svn path=/trunk/mono/; revision=10634
2003-01-17 23:06:38 +00:00
Christopher Bockner 6b1339c66f Mono.Data.DB2Client: DB2ClientException.cs We need to check for SQL_NO_DATA and a non-negative return from SQLGetDiagRec, not SQL_SUCCESS_WITH_INFO.
svn path=/trunk/mcs/; revision=10633
2003-01-17 22:07:53 +00:00
Zoltan Varga a408c4a9d1 2003-01-17 Zoltan Varga <[email protected]>
* MonoSymbolWriter.cs (OpenMethod): Make it work on constructors.

svn path=/trunk/mcs/; revision=10632
2003-01-17 21:24:06 +00:00
Zoltan Varga cdc917879e 2003-01-17 Zoltan Varga <[email protected]>
* ParameterInfo.cs: modified constructor so it allows the
	ParameterBuilder to be null and add a 'position' argument which will
	be used when pb is null.

	* MethodBuilder.cs ConstructorBuilder.cs: modify GetParameters() so it
		returns information even when the app did not use DefineParameter() to
			define the parameters.

				* ConstructorBuilder.cs (ctor): allways define SpecialName attribute
					for constructors as done by MS.

svn path=/trunk/mcs/; revision=10631
2003-01-17 21:20:34 +00:00
Paolo Molaro 5177a232f1 Fri Jan 17 21:14:18 CET 2003 Paolo Molaro <[email protected]>
* ppc/tramp.c: adapted to work for MacOSX (from a patch by
	John Duncan).

svn path=/trunk/mono/; revision=10630
2003-01-17 20:17:58 +00:00
Christopher Bockner 268e4491ad Mono.Data.DB2Client/DB2ClientConnect.cs: Replaced SQLConnect with SQLDriverConnect, cleaned handles passed to DB2, cleaned up error handling. SQLDriverConnect requires no parsing for the connection string.
Mono.Data.DB2Client/DB2ClientCommand.cs: ExecuteReader non executes a command against the DB, as it should

Mono.Data.DB2Client/DB2ClientConstants.cs: Added more constants, mostly for SQLDriverConnect.

Mono.Data.DB2Client/DB2ClientException.cs: Now can get all errors from the DB2 error stack.

Mono.Data.DB2Client/DB2ClientPrototypes.cs: Added SQLDriverConnect prototype.


Mono.Data.DB2Client/DB2ClientTransaction.cs: Changed to work with new handle returned from DB2CLientConnect.

svn path=/trunk/mcs/; revision=10629
2003-01-17 19:10:42 +00:00
Gaurav Vaish 0745874cc4 2003-01-18 Gaurav Vaish <gvaish_mono AT lycos.com>
* ArrayListCollectionBase.cs
	                         : Implemented.

svn path=/trunk/mcs/; revision=10628
2003-01-17 19:05:46 +00:00
Gonzalo Paniagua Javier 6c35614385 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpRequest.cs: implemented CurrentExecutionFilePath.

	* System.Web.UI/Control.cs: some more tweaks to naming containers stuff.
	* System.Web.UI/DataBinder.cs: don't throw exception if the container
	is null.

	* System.Web.UI/Page.cs: now we can render client scripts, startup
	scripts and hidden fields. Only render __VIEWSTATE if there is someone
	that will take care of it.
	(RaisePostBackEvents): first try the last one that required raise event,
	then try __EVENTTARGET.

	* System.Web.UI.HtmlControls/HtmlForm.cs: render 'action' attribute.

	* System.Web.UI.WebControls/BaseDataList.cs: what can I say for this
	one? I spent so many time until I finally found this that I'm gonna
	miss this f....g bug... ;-). Farewell. Now we can get events from
	image buttons inside Data*.

	* System.Web.UI.WebControls/DataList.cs: now the value stored in
	ViewState for item count is correct.

svn path=/trunk/mcs/; revision=10627
2003-01-17 17:17:41 +00:00
Gonzalo Paniagua Javier 3a1f655546 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
* ObjectWriter.cs: make the exception message more useful.

svn path=/trunk/mcs/; revision=10626
2003-01-17 16:45:22 +00:00
Daniel Morgan 72e4a89785 2003-01-17 Daniel Morgan <[email protected]>
* System.Data.SqlClient.SqlConnection.cs: add connection
	parameter UID which is the same thing as User ID

svn path=/trunk/mcs/; revision=10625
2003-01-17 16:41:56 +00:00
Ville Palo e3a727ab22 2003-01-17 Ville Palo <[email protected]>
* XmlSchemaMapper.cs: Improvments.
	* XmlConstaints.cs: Added more constants.
	* DataSet.cs: Improvments of reading and writing xml
	* DataColumn.cs: Added default values of properties.

svn path=/trunk/mcs/; revision=10624
2003-01-17 15:48:51 +00:00
Dietmar Maurer 4d9bb76591 2003-01-17 Dietmar Maurer <[email protected]>
* x86.brg: removed duplicated CONV_OVF_I4

svn path=/trunk/mono/; revision=10623
2003-01-17 15:48:08 +00:00
Gonzalo Paniagua Javier 810b4b2318 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
* MonoType.cs: re-added lines that were removed in the previous commit.

svn path=/trunk/mcs/; revision=10622
2003-01-17 15:29:31 +00:00
Lluis Sanchez bd742a07d0 * unix.args: Added System/DelegateSerializationHolder.cs,
System/UnitySerializationHolder.cs,
  System.Runtime.Serialization/ObjectManager.cs,
  System.Runtime.Serialization.Formatters.Binary/BinaryCommon.cs,
  System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs and
  System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs

svn path=/trunk/mcs/; revision=10618
2003-01-17 14:21:00 +00:00
Lluis Sanchez 23cb51f860 * BinaryFormatter.cs: implemented Serialize and Deserialize methods.
* ObjectReader.cs: added.
* ObjectWriter.cs: added.
* BinaryCommon.cs. added.

svn path=/trunk/mcs/; revision=10617
2003-01-17 14:19:51 +00:00
Martin Baulig a0b778a04f 2003-01-17 Martin Baulig <[email protected]>
* gc.c: Raise an ExecutionEngineException instead of using g_error().

svn path=/trunk/mono/; revision=10616
2003-01-17 14:18:48 +00:00
Lluis Sanchez c3b1984cf2 * ObjectManager.cs: Implemented and added file
* SurrogateSelector.cs: completed implementation.
* SerializationInfo.cs: corrected a bug in GetValue method.
* ObjectIDGenerator.cs: corrected a bug. Now it does not give the same
id for two different instances that return true when calling Equal.

svn path=/trunk/mcs/; revision=10615
2003-01-17 14:18:43 +00:00
Lluis Sanchez 66103dd4cf Assembly.cs: added serialization support.
svn path=/trunk/mcs/; revision=10614
2003-01-17 14:17:29 +00:00
Lluis Sanchez 15796a43be * Type.cs: corrected property IsSerializable. It should always return true for enums and delegates
* MonoType.cs: added serialization support.
* Delegate.cs: added serialization support.
* DBNull.cs: added serialization support.
* UnitySerializationHolder.cs: supports serialization of Assembly, MonoType and DBNull.
* DelegateSerializationHolder.cs: added.

svn path=/trunk/mcs/; revision=10613
2003-01-17 14:16:41 +00:00
Martin Baulig b453e49a64 2003-01-17 Martin Baulig <[email protected]>
* debug.c: Don't use mono_once here.  Reworked the API a bit to
	use `mono_debug_' and `debug_' for the general debugging API and
	`mono_debugger_' and `debugger_' for the Mono Debugger stuff.

svn path=/trunk/mono/; revision=10608
2003-01-17 12:37:33 +00:00
Gonzalo Paniagua Javier bdde5eb6c0 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
* collections.cs: fixed bug #30091.

svn path=/trunk/mcs/; revision=10607
2003-01-17 08:19:36 +00:00
Duncan Mak 821b52ec63 2003-01-17 Duncan Mak <[email protected]>
* runtime/Makefile.am: Add the new Mono.Data.DB2Client.dll.

svn path=/trunk/mono/; revision=10606
2003-01-17 07:24:09 +00:00
Gonzalo Paniagua Javier 64444c3470 fixed #line default
svn path=/trunk/mcs/; revision=10605
2003-01-17 06:55:16 +00:00
Jackson Harper 15821ea1f0 Set file name when specified with #line
svn path=/trunk/mcs/; revision=10603
2003-01-17 06:24:52 +00:00
Miguel de Icaza 4da2ade4ab according to the ECMA:
"The buffer of a closed System.IO.MemoryStream is still available, and the
System.IO.MemoryStream.ToArray and System.IO.MemoryStream.GetBuffer methods
can be called successfully."

svn path=/trunk/mcs/; revision=10601
2003-01-17 05:45:22 +00:00
Nick Drochak e58f09a3a2 2003-01-16 Nick Drochak <[email protected]>
* makefile.gnu: Add corlib target to just build that.

svn path=/trunk/mcs/; revision=10598
2003-01-17 03:08:46 +00:00
Daniel Morgan 0c20455042 2003-01-16 Daniel Morgan <[email protected]>
* Mono.Data.Db2Client/DB2ClientConnection.cs: added parsing and setting
	of connection string values.  Prior to this change, the server, username, and
	authentication were hard-coded.

	* Mono.Data.Db2Client/DB2ClientUtils.cs: prevent warning about
	unreachable code

	* Test/TestDB2Conn/TestDB2Conn.cs: modify test to accept
	database, username, and password from command line.  Also, test
	a CREATE TABLE statement with ExecuteNonQuery()

svn path=/trunk/mcs/; revision=10595
2003-01-17 01:40:55 +00:00
Gonzalo Paniagua Javier 128dd6e5b6 2003-01-17 Gonzalo Paniagua Javier <[email protected]>
* exception.[ch]:
	(mono_get_exception_type_initialization): new function.

	* object.c: throw a TypeInitializationException when an exception is
	thrown invoking the class constructor.

svn path=/trunk/mono/; revision=10593
2003-01-17 00:51:17 +00:00
Daniel Morgan 2df0a310e8 2003-01-16 Daniel Morgan <[email protected]>
* Mono.Data.Db2Client.build: added file for Windows build

svn path=/trunk/mcs/; revision=10588
2003-01-16 19:51:38 +00:00
Rodrigo Moya 854a1cf640 removed comment
svn path=/trunk/mcs/; revision=10587
2003-01-16 19:32:14 +00:00
Rodrigo Moya cbd0a13cc2 2003-01-16 Rodrigo Moya <[email protected]>
* makefile.gnu: added Mono.Data.DB2Client directory.

svn path=/trunk/mcs/; revision=10586
2003-01-16 19:30:56 +00:00
Rodrigo Moya 6be6743775 2003-01-16 Rodrigo Moya <[email protected]>
* makefile.gnu: added --unsafe command line option, needed for unsafe
	code. The IBM DB2 provider now compiles on Mono.

svn path=/trunk/mcs/; revision=10585
2003-01-16 19:28:25 +00:00
Rodrigo Moya 440e3d7fe4 2003-01-16 Rodrigo Moya <[email protected]>
* list: added missing file.

svn path=/trunk/mcs/; revision=10584
2003-01-16 19:26:32 +00:00
Miguel de Icaza 718092ace9 Flush
svn path=/trunk/mono/; revision=10582
2003-01-16 17:06:42 +00:00
Martin Baulig b04f04c2d5 2003-01-16 Martin Baulig <[email protected]>
* debug.c (debugger_thread_func): We don't need to `raise
	(SIGSTOP)' anymore; the thread manager already takes care of this.

svn path=/trunk/mono/; revision=10581
2003-01-16 17:06:06 +00:00
Dietmar Maurer f0f16e38a5 2003-01-16 Dietmar Maurer <[email protected]>
* exception.c (arch_handle_exception): exclude runtime invoke
	wrapper from the stack trace

	* jit.c (mono_cfg_new): allocate extra space to store esp (used by exceptions)
	(mono_thread_start_cb): save an additional LMF at thread start

svn path=/trunk/mono/; revision=10577
2003-01-16 15:56:52 +00:00
Martin Baulig 3f4feeb0f7 2003-01-16 Martin Baulig <[email protected]>
* jit.c (mono_runtime_install_handlers): Use SYS_sigaction() for
	the mono_thread_get_abort_signal () - this is SIGUSR1 on FreeBSD
	and the LinuxThreads port doesn't allow you to override the handler.
	[FIXME: This avoids an assertion failure on startup, but there's
	still an issue with thread termination.]

svn path=/trunk/mono/; revision=10576
2003-01-16 15:38:55 +00:00
Martin Baulig 63278cc96d 2003-01-16 Martin Baulig <[email protected]>
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Removed the gthread
	check again, we're now using the mono/io-layer for this.

svn path=/trunk/mono/; revision=10575
2003-01-16 15:28:44 +00:00
Martin Baulig 72bfd2bba1 2003-01-16 Martin Baulig <[email protected]>
* debug.c: Use the mono/io-layer functions here instead of gthread.

svn path=/trunk/mono/; revision=10574
2003-01-16 15:25:25 +00:00
Martin Baulig dfa7dcd7d1 2003-01-16 Martin Baulig <[email protected]>
Added special support for the Mono Debugger to send it a
	notification each time a thread is created or exited.

	* timed-thread.h (TimedThread): Added `pid' and `start_sem'.

	* timed-thread.c (timed_thread_start_routine): If
	`mono_debugger_threads_debug' is non-zero, set `thread->pid' and
	post the `thread->start_sem'.
	(_wapi_timed_thread_create): If `mono_debugger_threads_debug' is
	non-zero, wait for the `thread->start_sem' before returning.

	* threads.c (mono_debugger_threads_debug): New global variable
	which is set by the Mono Debugger.
	(mono_debugger_thread_info): New global variable.
	(update_debugger_thread_info): When running inside the Mono
	Debugger (`mono_debugger_threads_debug' is non-zero), update the
	`mono_debugger_thread_info' array.  This function is called (while
	owning the `thread_hash_mutex') each time the `thread_hash' is
	modified.

svn path=/trunk/mono/; revision=10573
2003-01-16 15:23:39 +00:00
Jonathan Pryor 63fae5d61b Fix the multiple-build problem. Again.
svn path=/trunk/mcs/; revision=10572
2003-01-16 14:55:12 +00:00
Gonzalo Paniagua Javier b28a8ab0d9 removed Console.WriteLines
svn path=/trunk/mcs/; revision=10570
2003-01-16 07:22:39 +00:00
Gonzalo Paniagua Javier f398aabf4f 2003-01-16 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: fixes in UniqueID, FindControl, AddedControl,
	UnloadRecursive, InitRecursive. Reduced the size of __VIEWSTATE. Made
	FindControl work with NamingContainers.

	* ControlCollection.cs: notify the parent when clearing the collection.

	* LosFormatter.cs: Added debugging output and generate a valid
	viewstate even for unknown types.

	* Page.cs: GetPostBackEventReference now uses UniqueID. Reduced
	viewstate.

svn path=/trunk/mcs/; revision=10569
2003-01-16 07:18:07 +00:00
Gonzalo Paniagua Javier f066941cc3 2003-01-16 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: modified loading of the parent type now that
	Type.GetType is fixed.

svn path=/trunk/mcs/; revision=10568
2003-01-16 07:11:58 +00:00
Gonzalo Paniagua Javier 9dcc700e9b 2003-01-16 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: store the errors in an arraylist instead of an array.
	* HttpRequest.cs: bah.
	* HttpRuntime.cs: display last error in the context.

svn path=/trunk/mcs/; revision=10567
2003-01-16 07:10:20 +00:00
Gonzalo Paniagua Javier ea7591ceb7 2003-01-16 Gonzalo Paniagua Javier <[email protected]>
* reflection.c: fixed attribute reading.

svn path=/trunk/mono/; revision=10564
2003-01-16 04:09:51 +00:00
Gonzalo Paniagua Javier 1da581452c Added assembly to some type names
svn path=/trunk/mono/; revision=10563
2003-01-16 03:48:46 +00:00
Ajay kumar Dwivedi b8d82a392c 2003-01-16 Ajay kumar Dwivedi <[email protected]>
* XmlSerializer.cs: Array serialization for 1D arrays works
	* TypeTranslator: Added for translations`

svn path=/trunk/mcs/; revision=10562
2003-01-16 03:19:14 +00:00
Rodrigo Moya b34b315b1e 2003-01-15 Rodrigo Moya <[email protected]>
Added IBM DB2 provider from cleared <[email protected]>.

svn path=/trunk/mcs/; revision=10560
2003-01-16 02:51:11 +00:00
Marco Ridoni 1b8d03bcec Update by Francesco Delfino
svn path=/trunk/mcs/; revision=10557
2003-01-15 22:56:14 +00:00
Gonzalo Paniagua Javier 30df230ca0 2003-01-15 Gonzalo Paniagua Javier <[email protected]>
* icall.c:
	(ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
	provided, look for the type in the calling assembly and then in
	mscorlib; if the assembly name is provided, only try that one.

svn path=/trunk/mono/; revision=10556
2003-01-15 22:51:57 +00:00
Miguel de Icaza 2bdac9ff23 2003-01-15 Miguel de Icaza <[email protected]>
* cs-parser.jay: Only perform the constructor checks here if we
	are named like the class;  This will help provider a better
	error.  The constructor path is taken when a type definition is
	not found, but most likely the user forgot to add the type, so
	report that rather than the constructor error.

svn path=/trunk/mcs/; revision=10548
2003-01-15 21:54:17 +00:00
Paolo Molaro c2a8895543 Wed Jan 15 16:20:54 CET 2003 Paolo Molaro <[email protected]>
* configure.in: allow MacOSX (from various people).

svn path=/trunk/mono/; revision=10546
2003-01-15 15:44:13 +00:00
Paolo Molaro 1aa25005bd Update to the API change of a while ago.
svn path=/trunk/mono/; revision=10545
2003-01-15 15:21:26 +00:00
Paolo Molaro 9d4528e27a Include config.h.
svn path=/trunk/mono/; revision=10544
2003-01-15 15:20:35 +00:00
Paolo Molaro f18ce1d48f Compilation fix.
svn path=/trunk/mono/; revision=10543
2003-01-15 15:19:40 +00:00
Atsushi Eno 2f30892999 2003-01-16 Atsushi Enomoto <[email protected]>
* updated Mono.System.Xml.csproj. (patch by David B. Bitton)

svn path=/trunk/mcs/; revision=10542
2003-01-15 15:07:46 +00:00
Paolo Molaro e8db8da7ba Wed Jan 15 16:02:34 CET 2003 Paolo Molaro <[email protected]>
Define the correct runtime depending on the availability of the jit
(from Benjamin Reed).

svn path=/trunk/mono/; revision=10541
2003-01-15 15:05:13 +00:00
Paolo Molaro a06259edc8 Wed Jan 15 15:55:40 CET 2003 Paolo Molaro <[email protected]>
* sockets.h, daemon.c, io.c: compilation fixes on MacOSX.

svn path=/trunk/mono/; revision=10540
2003-01-15 14:58:43 +00:00
Nick Drochak 781b70e8f6 2003-01-12 Nick Drochak <[email protected]>
* makefile(s): Only build if source changes. Naive implementation.

svn path=/trunk/mcs/; revision=10539
2003-01-15 08:21:43 +00:00
Duncan Mak 72a70777eb 2003-01-15 Duncan Mak <[email protected]>
* Make it not spam all those warnings. Blocking errors 0108 and also
       0114.

svn path=/trunk/mcs/; revision=10537
2003-01-15 05:53:03 +00:00
Duncan Mak a69df82208 2003-01-14 Duncan Mak <[email protected]>
* ilasm/parser/ScannerAdapter.cs: Remove the cleanup method now that
       it's no longer in the interface.

svn path=/trunk/mcs/; revision=10533
2003-01-15 04:09:13 +00:00
Jonathan Pryor aa99c2edcc Re-organized the file structure.
Displayers (Console, Gtk#, System.Windows.FOrms) are under the `displayers'
directory.

Finders (How nodes are found) are under the `finders' directory.

Formatters (how nodes are displayed) are under the `formatters' directory.

Miguel did the actual movement of CVS files so that file history wouldn't be
lost.  Hence no corresponding "cvs add" for this "cvs remove".

svn path=/trunk/mcs/; revision=10531
2003-01-15 01:40:46 +00:00
Gaurav Vaish 5cad9df360 2003-01-14 Gaurav Vaish <gvaish_mono AT lycos.com>
* *.cs                   : Update the year in copyright notice.

svn path=/trunk/mcs/; revision=10515
2003-01-14 18:43:13 +00:00
Ville Palo 6d2d918871 2003-01-14 Ville Palo <[email protected]>
* XmlSchemaMapper.cs: Some improvments

svn path=/trunk/mcs/; revision=10505
2003-01-14 16:23:38 +00:00
Ville Palo efbe2a31c0 2003-14-01 Ville Palo <[email protected]>
* DataRelationTest.cs: Added more tests

svn path=/trunk/mcs/; revision=10504
2003-01-14 15:05:56 +00:00
Paolo Molaro c087cba6d5 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <[email protected]>
* object.c: register the vtable before there is a chance it's
	queried again recursively.

svn path=/trunk/mono/; revision=10503
2003-01-14 13:56:06 +00:00
Dietmar Maurer 547d561ec0 2003-01-14 Dietmar Maurer <[email protected]>
* jit.c (mono_jit_compile_method):  make sure runtime_init is called
	(mono_analyze_stack): make sure runtime_init is called

svn path=/trunk/mono/; revision=10502
2003-01-14 10:57:47 +00:00
Paolo Molaro 04909358f2 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <[email protected]>
* class.cs, rootcontext.cs: small changes to avoid unnecessary memory
	allocations.

svn path=/trunk/mcs/; revision=10501
2003-01-14 09:40:06 +00:00
Jackson Harper 5f0dc4802f Add cleanup call.
svn path=/trunk/mcs/; revision=10499
2003-01-14 06:36:36 +00:00
Jackson Harper 3349f59a56 Remove cleanup stuff, it has been moved to a better spot.
svn path=/trunk/mcs/; revision=10498
2003-01-14 06:35:26 +00:00
Martin Baulig bc2f767e74 2003-01-14 Martin Baulig <[email protected]>
* debug.c (debugger_update_symbol_file_table): Moved all the
	functionality into debugger_update_symbol_file_table_internal();
	the latter one will be called from the background thread while
	already owning the lock.  This'll allow us to step into
	debugger_update_symbol_file_table() in the debugger and debug it.

svn path=/trunk/mono/; revision=10494
2003-01-14 04:24:38 +00:00
Martin Baulig 012d8753ea 2003-01-14 Martin Baulig <[email protected]>
* Makefile.am: Link against gthread.

	* jit.c: After realizing that mono-mutex doesn't work either
	because it doesn't support recursive mutexes on FreeBSD, rewrote
	the whole thread stuff to use gthread.  This seems to fix this
	weird deadlock in the debugger as well.

svn path=/trunk/mono/; revision=10492
2003-01-14 03:49:04 +00:00
Martin Baulig acb1ad4b9e 2003-01-14 Martin Baulig <[email protected]>
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Added check for gthread.

svn path=/trunk/mono/; revision=10491
2003-01-14 03:45:33 +00:00
Gonzalo Paniagua Javier d813976707 Fixed the build
svn path=/trunk/mcs/; revision=10490
2003-01-14 02:47:21 +00:00
Ville Palo 4fe82568f8 2003-01-13 Ville Palo <[email protected]>
* XmlDocument.cs: Added CheckName () method to check names validity.

svn path=/trunk/mcs/; revision=10480
2003-01-13 20:27:45 +00:00
Rafael Teixeira 4e0359d11f head -n 2 ChangeLog
svn path=/trunk/mcs/; revision=10479
2003-01-13 20:21:38 +00:00
Miguel de Icaza 52b60d37b1 update
svn path=/trunk/mono/; revision=10477
2003-01-13 19:37:38 +00:00
Miguel de Icaza cc5a32b8f2 Flush
svn path=/trunk/mono/; revision=10476
2003-01-13 19:12:35 +00:00
Marco Ridoni 2dd4763647 Optional parameters support
svn path=/trunk/mcs/; revision=10475
2003-01-13 19:04:40 +00:00
Ville Palo eb83e65c9e 2003-01-13 Ville Palo <[email protected]>
* XmlDataDocumentTest.cs: Added more tests

svn path=/trunk/mcs/; revision=10472
2003-01-13 18:39:48 +00:00
Duncan Mak f998415be5 2003-01-13 Duncan Mak <[email protected]>
* ilasm/parser/ScannerAdapter.cs: Implement the new cleanup method
in the tokenizer. This fixes the build.

* skeleton.cs (cleanpup): Rename to cleanup to make it look more consistent.

* cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
consistent with other methods.

svn path=/trunk/mcs/; revision=10471
2003-01-13 18:19:02 +00:00
Ville Palo 5bf8673afe 2003-01-13 Ville Palo <[email protected]>
* DataRowCollection.cs: Added IndexOutOfRangeException
	* DataTableCollection.cs: Added OnCollectionChanging and
	OnCollectionChanged events.
	* DataSet.cs: Many fixes. Implemented Clone () and Copy () -methods
	* DataTable.cs: Implemented Copy () and Clone () methods.
	* XmlDataLoader.cs: some fixes.
	* XmlSchemaMapper.cs: comments.

svn path=/trunk/mcs/; revision=10470
2003-01-13 18:02:06 +00:00
Ville Palo 4838dd1e7d 2003-01-13 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: lots of bugfixes and more implemented
	methods.

svn path=/trunk/mcs/; revision=10469
2003-01-13 17:59:08 +00:00
Gaurav Vaish f7708e260d 2003-01-13 Gaurav Vaish <gvaish_mono AT lycos.com>
* Label.cs               : The smallest class on this earth.

svn path=/trunk/mcs/; revision=10464
2003-01-13 16:52:22 +00:00
Ville Palo 8a2f7c2b73 Added new test suite
svn path=/trunk/mcs/; revision=10463
2003-01-13 16:18:54 +00:00
Jackson Harper 51646007b4 Call lexer.Cleanup when the lexer reaches the EOF.
svn path=/trunk/mcs/; revision=10462
2003-01-13 15:52:01 +00:00
Jackson Harper cf7a3205de Add Cleanup method, also fix #region error messages.
svn path=/trunk/mcs/; revision=10461
2003-01-13 15:51:09 +00:00
Gonzalo Paniagua Javier bb854a1d37 updated version
svn path=/trunk/mcs/; revision=10460
2003-01-13 15:44:19 +00:00
Ville Palo b975015b12 2003-13-01 Ville Palo <[email protected]>
* DataRelationTest.cs: Test class for DataRelation

svn path=/trunk/mcs/; revision=10459
2003-01-13 15:16:46 +00:00
Ville Palo a4e1c42dcd 2003-01-13 Ville Palo <[email protected]>
* data_linux_test.args: Added some classes

svn path=/trunk/mcs/; revision=10458
2003-01-13 15:14:41 +00:00
Nick Drochak 8c2eea0b3d 2003-01-13 Nick Drochak <[email protected]>
* DateTimeTest.cs: Use 2003, since that' the year now.  Need to work
	on this test so we don't have it fail each new year.

svn path=/trunk/mcs/; revision=10451
2003-01-13 13:26:10 +00:00
Nick Drochak f7f37fe584 2003-01-13 Nick Drochak <[email protected]>
* XmlNodeTests.cs: MS.NET doesn't throw an exception here.

svn path=/trunk/mcs/; revision=10450
2003-01-13 12:13:47 +00:00
Nick Drochak 44577e9e47 2003-01-13 Nick Drochak <[email protected]>
* MutexTest.cs: Disable some tests that case unhandled exceptions
	on MS.NET.

svn path=/trunk/mcs/; revision=10449
2003-01-13 12:10:47 +00:00
Paolo Molaro c34180e2df Mon Jan 13 11:37:14 CET 2003 Paolo Molaro <[email protected]>
* TypeBuilder.cs, ModuleBuilder.cs: better type name cache.

svn path=/trunk/mcs/; revision=10448
2003-01-13 10:40:04 +00:00
Miguel de Icaza a42443d9ff Oops. Fix, thanks to Sebastien and Dan for noticing
svn path=/trunk/mono/; revision=10447
2003-01-13 04:02:28 +00:00
Miguel de Icaza 5250b2df7d More updates
svn path=/trunk/mono/; revision=10446
2003-01-13 04:00:04 +00:00
Miguel de Icaza 0b1b0d1e17 Flush
svn path=/trunk/mono/; revision=10445
2003-01-13 03:42:21 +00:00
Duncan Mak fa79519688 Comment out the SuSE part for now until we build packages for it.
svn path=/trunk/mono/; revision=10444
2003-01-13 02:56:41 +00:00
Duncan Mak 8c51f5404f Update the webpage
svn path=/trunk/mono/; revision=10443
2003-01-13 02:32:49 +00:00
Rafael Teixeira d58225f757 hope it does not hang
svn path=/trunk/mcs/; revision=10442
2003-01-12 23:37:35 +00:00
Duncan Mak 413b04d360 Bump the version number to 0.18.
svn path=/trunk/mono/; revision=10441
2003-01-12 22:34:59 +00:00
Paolo Molaro db1f8f193e Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <[email protected]>
* attribute.cs: only set GuidAttr to true when we have a
	GuidAttribute.

svn path=/trunk/mcs/; revision=10435
2003-01-12 19:15:31 +00:00
Miguel de Icaza 2a1ea43f4f Flush
svn path=/trunk/mcs/; revision=10434
2003-01-12 19:08:20 +00:00
Miguel de Icaza a4455e3f30 Flush
svn path=/trunk/mono/; revision=10429
2003-01-12 18:27:25 +00:00
Duncan Mak b5ffea4ee2 2003-01-12 Varga Zoltan <[email protected]>
* ArrayList.cs (RemoveRange): Patch for allowing zero-size
	removal at the end of a list. It also cleans up the argument
	checking code so the raised exceptions have the same message as
	under MS.NET.

svn path=/trunk/mcs/; revision=10426
2003-01-12 17:25:00 +00:00
Alp Toker f12bca6432 2003-01-12 Alp Toker <[email protected]>
* exception.c: Typo fix: insinde -> inside

svn path=/trunk/mono/; revision=10425
2003-01-12 17:11:09 +00:00
Gaurav Vaish 8594aa5558 2003-01-12 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileControl.cs       : Stub-ing completed. ;-)
	* ControlPager.cs        : Dummy implementation.

svn path=/trunk/mcs/; revision=10420
2003-01-12 16:25:05 +00:00
Rafael Teixeira f0afb017f7 make test
svn path=/trunk/mcs/; revision=10419
2003-01-12 16:06:14 +00:00
Sebastien Pouliot 314581e888 *** empty log message ***
svn path=/trunk/mono/; revision=10418
2003-01-12 15:58:55 +00:00
Sebastien Pouliot ea6e288bca 2003-01-12 Sebastien Pouliot <[email protected]>
* corlib_linux_test.args: added MACTripleDES test file.

svn path=/trunk/mcs/; revision=10417
2003-01-12 15:57:45 +00:00
Sebastien Pouliot 1f21c2668b 2003-01-12 Sebastien Pouliot <[email protected]>
* HashAlgorithmTest.cs: Added new test for null streams.
	* MACTripleDESTest.cs: New. Test suite par MAC using 3DES.

svn path=/trunk/mcs/; revision=10416
2003-01-12 15:54:36 +00:00
Sebastien Pouliot 7ec2e18907 2003-01-12 Sebastien Pouliot <[email protected]>
* MACTripleDES.cs: Now working (the problem was with my stream usage
	which was removed for performance reason).
	* TripleDES.cs: Fixed key generation (wasn't called and returned
	null).

svn path=/trunk/mcs/; revision=10415
2003-01-12 15:53:37 +00:00
Gaurav Vaish 1e44ddf80c 2003-01-12 Gaurav Vaish <gvaish_mono AT lycos.com>
* FontInfo.cs            : Implemented.
	* Form.cs                : Initial implementation.
	* Panel.cs               : Initial implementation.
	* MobileControl.cs       : Stubbed all properties.

svn path=/trunk/mcs/; revision=10414
2003-01-12 14:02:20 +00:00
Gonzalo Paniagua Javier db545706f5 2003-01-12 Gonzalo Paniagua Javier <[email protected]>
* StringCollection.cs: fixed range checks in CopyTo.

svn path=/trunk/mcs/; revision=10407
2003-01-12 08:37:20 +00:00
Gonzalo Paniagua Javier 89c6198dab 2003-01-12 Gonzalo Paniagua Javier <[email protected]>
* Exception.cs: changed default message to match MS one.

svn path=/trunk/mcs/; revision=10406
2003-01-12 08:09:12 +00:00
Duncan Mak 59aa23f847 2003-01-13 Duncan Mak <[email protected]>
* Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
	gc-internal.h.

svn path=/trunk/mono/; revision=10402
2003-01-12 05:38:22 +00:00
Jonathan Pryor c095b052d9 Fix makefile so type-reflector doesn't build when it doesn't need to.
svn path=/trunk/mcs/; revision=10401
2003-01-12 05:31:24 +00:00
Patrik Torstensson fad04e5265 2002-01-12 Patrik Torstensson <[email protected]>
* string-icall.[c|h], icall.c: Added support for CompareOrdinal mode

svn path=/trunk/mono/; revision=10398
2003-01-12 01:35:35 +00:00
Patrik Torstensson 13320bfb6b 2003-01-12 Patrik Torstensson <[email protected]>
* String.cs: Fixed bug with CompareOrdinal

svn path=/trunk/mcs/; revision=10397
2003-01-12 01:30:01 +00:00
Nick Drochak 16ec731a80 2003-01-12 Nick Drochak <[email protected]>
* TestResult.xml: Generated result file. Shouldn't be in CVS.

svn path=/trunk/mcs/; revision=10396
2003-01-12 00:20:56 +00:00
Johannes Roith f157a946e8 fix typo.
svn path=/trunk/mcs/; revision=10395
2003-01-11 23:18:54 +00:00
Martin Baulig 5a9fcf1c4f 2003-01-11 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
	this to 20 for the release.

svn path=/trunk/mono/; revision=10373
2003-01-11 13:45:48 +00:00
Jonathan Pryor ead0797e43 Allow greater control of property generation by derived classes (through
PropertyFormat properties).

Fix a bug where the ReflectionNodeFinder wouldn't display the value of static
properties (it was using an invalid instance reference).

svn path=/trunk/mcs/; revision=10372
2003-01-11 04:42:20 +00:00
Patrik Torstensson 4ec4a564e6 2003-01-10 Patrik Torstensson <[email protected]>
* ThreadPool.cs: Temporary removed the usage of monitor thread,
			implemented a model more equal to the MS one.

svn path=/trunk/mcs/; revision=10368
2003-01-11 00:30:58 +00:00
Gonzalo Paniagua Javier b4ff470fda 2003-01-11 Gonzalo Paniagua Javier <[email protected]>
* XmlTextReader.cs:
	(ReadOuterXml): use Depth property which return elementDepth, not depth.

svn path=/trunk/mcs/; revision=10367
2003-01-11 00:02:34 +00:00
Gonzalo Paniagua Javier 0305ecc846 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: implements IFormattable.

svn path=/trunk/mcs/; revision=10366
2003-01-10 22:46:54 +00:00
Duncan Mak eb8965458e 2003-01-10 Duncan Mak <[email protected]>
* ArrayList.cs (Insert): Patch from Zoltan
	([email protected]).

svn path=/trunk/mcs/; revision=10363
2003-01-10 21:54:44 +00:00
Duncan Mak 544d9defeb 2003-01-10 Duncan Mak <[email protected]>
* list.unix (CSharpCodeCompiler): Add
	Microsoft.Charp.CSharpCodeCompiler for Sean Kasun.

	* CSharpCodeCompiler.cs:
	* CSharpCodeProvider.cs: Patch from Sean Kasun
	<[email protected]> to implement CSharpCodeCompiler.

	* CompilerErrorCollection.cs:
	* CompilerParameters.cs: Patch from Sean Kasun
	<[email protected]> implementing most of the MonoTODOs in
	CompilerErrorCollection and the CompilerParameters overloads in CompilerParameters.cs.

svn path=/trunk/mcs/; revision=10362
2003-01-10 21:38:30 +00:00
Zoltan Varga 7769949627 2003-01-10 Zoltan Varga <[email protected]>
* ILGenerator.cs: Implemented EmitWriteLine(string).

svn path=/trunk/mcs/; revision=10359
2003-01-10 19:33:12 +00:00
Zoltan Varga 79aae4e91e 2003-01-10 Zoltan Varga <[email protected]>
* TypeBuilder.cs (DefineInitializedData): Call DefineNestedType()
	instead of DefineType() so the auxiliary types do not pollute the
	global namespace. This is consistent with the behaviour of MS .NET.

svn path=/trunk/mcs/; revision=10358
2003-01-10 19:29:03 +00:00
Gaurav Vaish 875085a576 2003-01-10 Gaurav Vaish <gvaish_mono AT lycos.com>
* DeviceSpecific.cs      : Dummy implementation.
	* MobilePage.cs          : GetControlAdapter(MobileControl) - Stubbed.
	* MobileControl.cs       : Adapter        { get; }      - Implemented
	                         : BreakAfter     { get; set; } - Stubbed.
	                         : DeviceSpecific { get; set; } - Stubbed.
	                         : MobilePage     { get; }      - Stubbed.

svn path=/trunk/mcs/; revision=10353
2003-01-10 19:08:56 +00:00
Atsushi Eno 464d99efee 2003-01-11 Atsushi Enomoto <[email protected]>
* XmlElementTests.cs : added TestInnerTextAndEvent test.
	  (and many coding style fix.)
	* XmlTextReaderTests.cs : tiny argument order fix for TestAttributeWithEntityReference test.

svn path=/trunk/mcs/; revision=10350
2003-01-10 18:51:31 +00:00
Atsushi Eno ef0e31f171 2003-01-11 Atsushi Enomoto <[email protected]>
* XmlElement.cs : (by ville) XmlElement.set_InnerText event bugfix.
	* XmlTextReader.cs : some fix for ReadOuterXml().

svn path=/trunk/mcs/; revision=10349
2003-01-10 18:50:39 +00:00
Gaurav Vaish e67543ba67 2003-01-10 Gaurav Vaish <gvaish_mono AT lycos.com>
* IObjectListFieldCollection.cs,
	* IPageAdapter.cs,
	* ITemplateable.cs                    : Added interface.
	* ObjectListField.cs                  : Dummy implementation.

svn path=/trunk/mcs/; revision=10344
2003-01-10 17:58:51 +00:00
Gaurav Vaish b76e1498d1 2003-01-10 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileListItemType.cs,
	* ObjectListViewMode.cs,
	* WmlListFieldType.cs,    // Failed to locate enumeration!
	* Wrapping.cs
	                         : Added enumerations.

svn path=/trunk/mcs/; revision=10343
2003-01-10 17:30:32 +00:00
Dietmar Maurer 3918d71392 2003-01-10 Dietmar Maurer <[email protected]>
* marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT

svn path=/trunk/mono/; revision=10341
2003-01-10 17:23:22 +00:00
Dietmar Maurer 0cb993900a more explicit layout related fixes
svn path=/trunk/mono/; revision=10340
2003-01-10 16:40:46 +00:00
Dietmar Maurer fe1f469a15 2003-01-10 Dietmar Maurer <[email protected]>
* marshal.c (emit_struct_conv): added an assertion for EXPLICIT_LAYOUT

svn path=/trunk/mono/; revision=10339
2003-01-10 16:31:27 +00:00
Dietmar Maurer c148129bd9 *** empty log message ***
svn path=/trunk/mono/; revision=10338
2003-01-10 16:19:43 +00:00
Dietmar Maurer 114dcd4c27 2003-01-10 Dietmar Maurer <[email protected]>
* loader.c (mono_method_get_marshal_info): bug fix

	* marshal.c (mono_marshal_get_ptr_to_struct): don't convert
	structures with explicit layout

svn path=/trunk/mono/; revision=10337
2003-01-10 16:18:13 +00:00
Jonathan Pryor b12c11330b Allow GUI front-ends to be used by default.
This allows ``type-reflector.exe'' (no arguments) to open a Gtk# window which
can be later used to open an Assembly.

svn path=/trunk/mcs/; revision=10336
2003-01-10 15:47:21 +00:00
Jonathan Pryor 99f0d27705 Don't require that types be specified on the command line if the displayer
doesn't require them.

For example, it's sensible for a GUI program to load without having any
assembly loaded, so there's no reason for assemblies/types to be specified.

This allows us to do:

    type-reflector --displayer=gtk

And get an empty Gtk# window (which can be later filled by using
File->Open...).

svn path=/trunk/mcs/; revision=10335
2003-01-10 15:08:10 +00:00
Paolo Molaro b2b4e687a2 Fri Jan 10 16:03:30 CET 2003 Paolo Molaro <[email protected]>
* ILGenerator.cs, MethodBuilder.cs, TypeBuilder.cs,
	ConstructorBuilder.cs: some tweaks to reduce memory usage.

svn path=/trunk/mcs/; revision=10334
2003-01-10 15:06:28 +00:00
Paolo Molaro 6ac813aeec Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <[email protected]>
* profiler.c: made the output more readable (and sorted).
	Added caller information for the allocation profiler.

svn path=/trunk/mono/; revision=10333
2003-01-10 15:02:00 +00:00
Dietmar Maurer ce0aeca153 also test isinst
svn path=/trunk/mono/; revision=10332
2003-01-10 14:57:05 +00:00
Dietmar Maurer 79bc748bc3 new test
svn path=/trunk/mono/; revision=10331
2003-01-10 14:32:01 +00:00
Jonathan Pryor b533e9d4d6 Better namespace partitioning. Instead of having all files in the same
namespace, partition into namespaces according to purpose.  For example, all
formatters (CSharp, VB, Default, etc.) are moved to the
Mono.TypeReflector.Formatters namespace.

Similar things were done for finders and displayers.

svn path=/trunk/mcs/; revision=10330
2003-01-10 14:16:07 +00:00
Gonzalo Paniagua Javier 8df50f0a41 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* README.building: New file.
	* makefile.gnu: install README.building file.

svn path=/trunk/mcs/; revision=10329
2003-01-10 09:44:59 +00:00
Gonzalo Paniagua Javier 3ba86a68ad 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: cast to Control if the container does not implement
	INamingContainer.

svn path=/trunk/mcs/; revision=10327
2003-01-10 08:41:11 +00:00
Gonzalo Paniagua Javier 825f31d939 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: keep _lasterror if no context. Attach
	application events *after* modules initialization (if not, User is not
	set when the user handler is called).

	* HttpApplicationFactory.cs: made all methods related to
	AttachEvents static. I will fix OnStart/OnEnd for application and
	session later.

	* HttpRequest.cs: don't initialize cookies twice.

svn path=/trunk/mcs/; revision=10326
2003-01-10 07:57:39 +00:00
Sebastien Pouliot 3dc7aa9132 2003-01-09 Sebastien Pouliot <[email protected]>
* AUTHORS: add myself to class library list

svn path=/trunk/mcs/; revision=10325
2003-01-10 03:04:20 +00:00
Sebastien Pouliot f91bb446ef 2003-01-09 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProvider.cs: Changed methods interacting with
	the runtime as Internal<MethodName>. This will allow to make the
	class Windows-compatible by doing a switch at runtime.

svn path=/trunk/mcs/; revision=10324
2003-01-10 02:33:04 +00:00
Sebastien Pouliot c5b1bb53c4 2003-01-09 Sebastien Pouliot <[email protected]>
* icall.c, rand.c, rand.h: Prepended RNG functions with Internal.

svn path=/trunk/mono/; revision=10323
2003-01-10 02:26:36 +00:00
Gonzalo Paniagua Javier 2bbefc17f4 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* makefile.gnu: added resource file.

svn path=/trunk/mcs/; revision=10322
2003-01-10 02:12:25 +00:00
Gonzalo Paniagua Javier 57f64df400 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* AppDomain.cs: implemented DoCallBack method.
	* MonoType.cs:
	(GetConstructorImpl): when the flag is BindingFlags.Default, set it to
	Public, Instance.

	NUnit2 tests start moving.

svn path=/trunk/mcs/; revision=10321
2003-01-10 02:11:16 +00:00
Jonathan Pryor 6d1edcc097 Provide a passable, if ugly, solution to the question posted to mono-list and
mono-hackers: how to provide support for what the build platform provides.

For example, if you're on Windows and have System.Windows.Forms but not Gtk#,
the default compile should give you System.Windows.Forms support and console
output.

If you're on Linux with Gtk# and no System.Windows.Forms, you should get Gtk#
support from the default compile.

Next trick: default to the GUI displayer, not the console displayer, if
--displayer isn't specified.  I have no idea how to pull that off...

svn path=/trunk/mcs/; revision=10320
2003-01-10 02:01:30 +00:00
Gonzalo Paniagua Javier 5a26321c22 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: fixed a couple of thinkos related to IsSubclassOf.

svn path=/trunk/mcs/; revision=10319
2003-01-10 01:16:10 +00:00
Gonzalo Paniagua Javier c499ff3b51 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: make it fire the LoadData related events also for controls
	such as ImageButton, whose variable(s) in the query string are of the
	form ctrl_name.x and only fire them once per control.

svn path=/trunk/mcs/; revision=10318
2003-01-10 01:13:49 +00:00
Gonzalo Paniagua Javier 69bb122b82 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs:
	(ApplyAppPathModifiers): return the root directory for "".

svn path=/trunk/mcs/; revision=10317
2003-01-10 01:11:53 +00:00
Marco Ridoni 0936098eb5 Big New Year patch:
- Exit partly implemented (behaves like 'break' in C#)
- Arrays working (still very buggy and work only if declared
  statically - e.g. Dim MyArray(2,3) - but the plumbing is in place)
- Field and Local declarations have been re-coded in the grammar

svn path=/trunk/mcs/; revision=10316
2003-01-10 00:19:51 +00:00
Jonathan Pryor 55c9ab6a39 Remove dependence upon compiler symbols for GUI support (e.g. HAVE_GUI_GTK,
HAVE_GUI_SWF) by placing this information within type-reflector.exe.config.

This also provides for user-provided formatters/finders/displayers.  They
merely need to write a class and add it to the appropriate section.

svn path=/trunk/mcs/; revision=10315
2003-01-09 23:21:32 +00:00
Gonzalo Paniagua Javier 636ed33ad5 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* Activator.cs: fixed bug #36052. Also added checks to avoid trying to
	instantiate an abstract class.

svn path=/trunk/mcs/; revision=10313
2003-01-09 22:34:35 +00:00
Gonzalo Paniagua Javier f726ea6038 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
	to get value types.

svn path=/trunk/mono/; revision=10312
2003-01-09 22:32:02 +00:00
Miguel de Icaza d506c0911d Some fixes for jstrike to look at
svn path=/trunk/mcs/; revision=10311
2003-01-09 22:25:56 +00:00
Gonzalo Paniagua Javier 383931b0ac 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* ecore.cs:
	* expression.cs:
	* typemanager.cs: fixes to allow mcs compile corlib with the new
	Type.IsSubclassOf fix.

svn path=/trunk/mcs/; revision=10310
2003-01-09 22:24:40 +00:00
Gonzalo Paniagua Javier 7e2eecd0d0 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* Type.cs:
	(IsSubclassOf): return false when null. Use != instead of Equals.

svn path=/trunk/mcs/; revision=10309
2003-01-09 22:21:52 +00:00
Gaurav Vaish 3b996b920f 2003-01-09 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileControl.cs       : Added some more properties (dummies).
	* Alignment.cs,
	* BooleanOption.cs,
	* CommandFormat.cs,
	* FontSize.cs,
	* FormMethod.cs,
	* ListDecoration.cs,
	* ListSelectType.cs,
	                         : Added enumerations.

svn path=/trunk/mcs/; revision=10307
2003-01-09 18:51:19 +00:00
Paolo Molaro e1072fa87e Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <[email protected]>
* object.c, profiler.h, profiler.c, profiler-private.h:
	Added object allocation profiler.

svn path=/trunk/mono/; revision=10306
2003-01-09 18:46:35 +00:00
Gaurav Vaish 3350778a00 2003-01-09 Gaurav Vaish <gvaish_mono AT lycos.com>
* assemblies.xml     : Needed for Mobile controls enumerations.

svn path=/trunk/mcs/; revision=10305
2003-01-09 18:12:19 +00:00
Paolo Molaro 5feab0a69a Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <[email protected]>
* reflection.h, reflection.c: handle global methods.
	Compress blob entries.

svn path=/trunk/mono/; revision=10304
2003-01-09 15:23:01 +00:00
Paolo Molaro f48ee288b9 Cut&pasted code got the cut before the off-by-one fix.
svn path=/trunk/mono/; revision=10303
2003-01-09 15:18:14 +00:00
Paolo Molaro d845777e9d Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <[email protected]>
* marshal.c: fix compilation.

svn path=/trunk/mono/; revision=10302
2003-01-09 14:57:32 +00:00
Jaime Anguiano Olarra 4eea199abb Fix.
svn path=/trunk/mono/; revision=10301
2003-01-09 14:56:40 +00:00
Dietmar Maurer 621c256867 2003-01-09 Dietmar Maurer <[email protected]>
* loader.c (mono_method_get_marshal_info): impl.

	* metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info

svn path=/trunk/mono/; revision=10300
2003-01-09 13:00:53 +00:00
Gonzalo Paniagua Javier 23e5b795c3 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
	for reference types.

svn path=/trunk/mono/; revision=10299
2003-01-09 08:18:56 +00:00
Gonzalo Paniagua Javier 764e2b9db0 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* Type.cs: fixed IsSubclassOf. Patch from Zoltan Varga.

svn path=/trunk/mcs/; revision=10298
2003-01-09 08:12:04 +00:00
Jonathan Pryor 5bb9f62508 Lots of changes all over the map. See ChangeLog for details.
The biggest change is a System.Windows.Forms front-end.  It doesn't look as
nice (visually) as the Gtk# front-end, but it's better because it works.
Mwa-ha-ha-ha.  Err, sorry.

To be more specific, the Gtk# front-end works, but (at present) it must build
the entire tree at once, during initialization.

The swf front-end doesn't.  When you attempt to expand a node, it's at *that*
point that it looks for sub-nodes, allowing you to use (for example) the
reflection finder (--finder=reflection) and start clicking lots of `+' signs
to get properties of properties of properties...  (Make sure verbose output is
enabled to see what I mean.)

This is the approach I want Gtk# to ultimately follow, as soon as I figure out
how to do that (read: Gtk# allows me to do it cleanly).

svn path=/trunk/mcs/; revision=10297
2003-01-09 02:44:32 +00:00
Miguel de Icaza 784686c87e 2003-01-08 Miguel de Icaza <[email protected]>
* cs-parser.jay (fixed_statement): take a type instead of a
	pointer_type, so we can produce a better error message later.

	* statement.cs (Fixed.Resolve): Flag types that are not pointers
	as an error.

svn path=/trunk/mcs/; revision=10294
2003-01-08 22:38:38 +00:00
Miguel de Icaza e6a5308498 Add new error
svn path=/trunk/mcs/; revision=10293
2003-01-08 22:32:01 +00:00
Miguel de Icaza b3d6aded2a 2003-01-08 Miguel de Icaza <[email protected]>
* statement.cs: First populate the pinned variables, then emit the
	statement, then clear the variables.  Before I was emitting the
	code once for each fixed piece.

svn path=/trunk/mcs/; revision=10291
2003-01-08 21:46:34 +00:00
Miguel de Icaza 7c508a6f59 Improve test
svn path=/trunk/mcs/; revision=10290
2003-01-08 21:40:55 +00:00
Jaime Anguiano Olarra a70b90adb0 Fixed typo.
svn path=/trunk/mono/; revision=10289
2003-01-08 21:08:56 +00:00
Paolo Molaro cec5ae1ae9 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <[email protected]>
* loader.c: fixed off by one error in loaded parameter names.

svn path=/trunk/mono/; revision=10288
2003-01-08 19:14:35 +00:00
Gaurav Vaish a02ac6a4ad 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* IControlAdapter.cs     : Completed interface.
	* MobileControl.cs       : Initial implementation.
	* MobilePage.cs          : Dummy implementation.

svn path=/trunk/mcs/; revision=10287
2003-01-08 18:58:38 +00:00
Gaurav Vaish 7496998985 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* TODOAttribute.cs         : Added MonoTODO Attribute
	* ChangeLog                : Added file

svn path=/trunk/mcs/; revision=10286
2003-01-08 18:55:19 +00:00
Gaurav Vaish 1bc4619881 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* .cvsignore                             : Ignores local files
	* System.Web.Mobile.build                : The build file

svn path=/trunk/mcs/; revision=10285
2003-01-08 18:23:43 +00:00
Gaurav Vaish a3fc216cd1 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile,
	* System.Web.UI.MobileControls,
	* System.Web.UI.MobileControls.Adapters  : Added directories

svn path=/trunk/mcs/; revision=10284
2003-01-08 18:10:03 +00:00
Miguel de Icaza c223ac0456 Patch from Piers
svn path=/trunk/mcs/; revision=10283
2003-01-08 18:00:00 +00:00
Dietmar Maurer a29ff00f6e 2003-01-08 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_icall_wrapper): like
	mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
	instead of a MonoMethod.

svn path=/trunk/mono/; revision=10282
2003-01-08 17:38:59 +00:00
Dick Porter 58d5f4b1e1 2003-01-08 Dick Porter <[email protected]>
* Win32Exception.cs (ComponentModel): Added EWOULDBLOCK

svn path=/trunk/mcs/; revision=10281
2003-01-08 15:59:42 +00:00
Dick Porter 605ce25a5d 2003-01-08 Dick Porter <[email protected]>
* sockets.c: Fixed setting blocking mode to true (fixes bug 36388)

svn path=/trunk/mono/; revision=10280
2003-01-08 15:57:30 +00:00
Dietmar Maurer 5effc7c4c8 (x86_unwind_native_frame): disable unnecessary assertion
svn path=/trunk/mono/; revision=10279
2003-01-08 15:39:10 +00:00
Dietmar Maurer 00008d5186 2003-01-08 Dietmar Maurer <[email protected]>
* exception.c (ves_icall_get_frame_info): skip one more frame and also
	MONO_WRAPPER_RUNTIME_INVOKE wrappers

svn path=/trunk/mono/; revision=10278
2003-01-08 12:40:08 +00:00
Martin Baulig 0fbb4f9b23 2003-01-08 Martin Baulig <[email protected]>
* statement.cs (FlowBranching.MergeChild): A break in a
	SWITCH_SECTION does not leave a loop.  Fixes #36155.

svn path=/trunk/mcs/; revision=10277
2003-01-08 11:42:49 +00:00
Martin Baulig f4ba006995 2003-01-08 Martin Baulig <[email protected]>
* statement.cs (FlowBranching.CheckOutParameters): `struct_params'
	lives in the same number space than `param_map'.  Fixes #36154.

svn path=/trunk/mcs/; revision=10276
2003-01-08 11:16:10 +00:00
Gaurav Vaish f779a4dc96 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile  : Added new directory

svn path=/trunk/mcs/; revision=10275
2003-01-08 10:27:15 +00:00
Gonzalo Paniagua Javier f72695f958 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataGrid.cs: default value for ShowHeaders is true. Fixed style for
	Header and Footer.
	* DataGridColumn.cs: added SetOwner method.
	* DataGridColumnCollection.cs: set the owner of the column when added.

svn path=/trunk/mcs/; revision=10272
2003-01-08 05:57:24 +00:00
Gonzalo Paniagua Javier bdb14f3711 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataBinder.cs:
	(GetPropertyValue): don't try to get the property as indexed

svn path=/trunk/mcs/; revision=10271
2003-01-08 05:55:06 +00:00
Gonzalo Paniagua Javier d16f2f3722 forgot this one
svn path=/trunk/mcs/; revision=10270
2003-01-08 05:53:06 +00:00
Gonzalo Paniagua Javier 5b52c01d8f 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DbDataRecord.cs: return DbNull.Value in GetValue () if value is null.

svn path=/trunk/mcs/; revision=10269
2003-01-08 05:52:24 +00:00
Gonzalo Paniagua Javier 9297c6d626 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataColumnPropertyDescriptor.cs: store columnIndex in the .ctor.

svn path=/trunk/mcs/; revision=10268
2003-01-08 05:51:16 +00:00
Gonzalo Paniagua Javier 60789fe78f 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* AspElements.cs: attributes without value lacked a space afterwards.

svn path=/trunk/mcs/; revision=10267
2003-01-08 00:25:42 +00:00
Gonzalo Paniagua Javier 79f64cde76 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: fixed HtmlDecode to avoid ArgumentOutOfRangeException.

svn path=/trunk/mcs/; revision=10266
2003-01-07 23:42:27 +00:00
Gonzalo Paniagua Javier f71e7daac7 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* BoundColumn.cs: typo.
	* DataGrid.cs: use 'as' instead of casting. Typo.
	* HyperLinkColumn.cs: call OnColumnChanged when any property change.
	Mono-stylized.

svn path=/trunk/mcs/; revision=10264
2003-01-07 23:21:44 +00:00
Gonzalo Paniagua Javier 3240745d32 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataBinder.cs: use TypeDescriptor to get the properties and their
	values.

svn path=/trunk/mcs/; revision=10263
2003-01-07 23:18:02 +00:00
Gonzalo Paniagua Javier a825320f7c 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* TypeDescriptor.cs: use ICustomTypeDescriptor if the component
	implements it. It's done for GetProperties and should be done for the
	rest of methods present in ICustomTypeDescriptor.

svn path=/trunk/mcs/; revision=10262
2003-01-07 23:16:13 +00:00
Gonzalo Paniagua Javier 833088d020 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* list: added System.Data/DataTablePropertyDescriptor.cs
	* System.Data/DataColumnPropertyDescriptor.cs: fixed typo.
	* System.Data/DataViewManagerListItemTypeDescriptor.cs: added new
	internal property to get the DataViewManager and removed TablePD class.
	* System.Data/DataTablePropertyDescriptor.cs: TablePD class is now this
	one as suggested by danmorg.

svn path=/trunk/mcs/; revision=10261
2003-01-07 23:14:02 +00:00
Miguel de Icaza 6caf7d27e4 2003-01-07 Miguel de Icaza <[email protected]>
* cs-parser.jay (constructor_declaration): Set the
	Constructor.ModFlags before probing for it.  This makes the
	compiler report 514, 515 and 132 (the code was there, but got
	broken).

svn path=/trunk/mcs/; revision=10260
2003-01-07 21:10:23 +00:00
Miguel de Icaza ddee62a7a3 Fix test
svn path=/trunk/mcs/; revision=10259
2003-01-07 21:02:30 +00:00
Miguel de Icaza ba145fa703 Add new error
svn path=/trunk/mcs/; revision=10258
2003-01-07 20:40:17 +00:00
Miguel de Icaza 08296f179d 2003-01-07 Miguel de Icaza <[email protected]>
* statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
	(GotoDefault.Resolve): Set `Returns' to ALWAYS.
	(GotoCase.Resolve): Set `Returns' to ALWAYS. Fixes the test-49 problem on windows

svn path=/trunk/mcs/; revision=10257
2003-01-07 20:23:07 +00:00
Gonzalo Paniagua Javier 90d9c9150b 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* TypeDescriptor.cs: moved code from GetProperties (object) to (Type).

svn path=/trunk/mcs/; revision=10256
2003-01-07 19:09:21 +00:00
Gonzalo Paniagua Javier 5564a7150f 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: functions for columns don't return anything. Fixed
	typo.

svn path=/trunk/mcs/; revision=10255
2003-01-07 19:07:45 +00:00
Atsushi Eno 847f6606b2 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : bugfix for attributes related to creation of
	  XmlAttribute *node*.

svn path=/trunk/mcs/; revision=10254
2003-01-07 17:39:01 +00:00
Atsushi Eno 739c956f27 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : test for attribute value bugfix.

svn path=/trunk/mcs/; revision=10253
2003-01-07 17:38:23 +00:00
Paolo Molaro f0d95fe8cf Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <[email protected]>
* enum.cs: create the enum static fields using the enum type.

svn path=/trunk/mcs/; revision=10252
2003-01-07 17:35:23 +00:00
Atsushi Eno 62b6fc8944 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlTextReaderTests.cs : test for attribute value bugfix.

svn path=/trunk/mcs/; revision=10251
2003-01-07 16:39:53 +00:00
Atsushi Eno dbbe86f0a0 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : bugfix for attribute values which have entity
	  references.

svn path=/trunk/mcs/; revision=10250
2003-01-07 16:38:52 +00:00
Dietmar Maurer cc2e1d4b5b 2003-01-07 Dietmar Maurer <[email protected]>
* exception.c (ves_icall_get_frame_info): fix bug 36382

svn path=/trunk/mono/; revision=10249
2003-01-07 16:18:55 +00:00
Gonzalo Paniagua Javier 1c77488486 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* decimal.c: fixed bug #36537.

svn path=/trunk/mono/; revision=10248
2003-01-07 15:51:49 +00:00
Paolo Molaro 9c62305b01 Tue Jan 7 15:15:41 CET 2003 Paolo Molaro <[email protected]>
* jit.c: handle wrapper_data in NEWOBJ/CALL.

svn path=/trunk/mono/; revision=10247
2003-01-07 14:18:48 +00:00
Paolo Molaro d63fd1df4c Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <[email protected]>
* marshal.c: throw a missing method exception if a
	P/Invoke method is not found.

svn path=/trunk/mono/; revision=10246
2003-01-07 14:17:16 +00:00
Dietmar Maurer 448aa3dc72 2003-01-07 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): add check for NULL target in STFLD

svn path=/trunk/mono/; revision=10245
2003-01-07 11:28:25 +00:00
Gaurav Vaish b8e96d3f03 2003-01-07 Gaurav Vaish <gvaish_mono AT lycos.com>
* DataBindingHandler.cs         : Implemented.

svn path=/trunk/mcs/; revision=10244
2003-01-07 08:34:38 +00:00
Gonzalo Paniagua Javier dcbbeb8b65 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* HyperLink.cs: fixes bug #36336.

svn path=/trunk/mcs/; revision=10232
2003-01-07 04:44:22 +00:00
Gonzalo Paniagua Javier 3514aead26 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* DataList.cs: fixed IRepeatInfoUser.GetItemStyle.

svn path=/trunk/mcs/; revision=10230
2003-01-07 03:44:47 +00:00
Gonzalo Paniagua Javier ec4ed8f7f2 added XmlDiffLoader.cs
svn path=/trunk/mcs/; revision=10229
2003-01-07 02:25:09 +00:00
Gonzalo Paniagua Javier a64ba556e1 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: add data bound controls to code render function.

svn path=/trunk/mcs/; revision=10228
2003-01-07 01:35:11 +00:00
Gonzalo Paniagua Javier 1ccb7b53e5 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* AspComponentFoundry.cs: reworked to allow same prefix for multiple
	controls. You can register 1 assembly plus any number of user controls
	under the same prefix.

	* AspGenerator.cs: don't add duplicate 'using' for the same namespace.
	Hack to allow @Register access to assemblies in other places than bin
	directory.

svn path=/trunk/mcs/; revision=10225
2003-01-07 00:14:04 +00:00
Piers Haken 7f9719631b *** empty log message ***
svn path=/trunk/mcs/; revision=10224
2003-01-07 00:04:53 +00:00
Miguel de Icaza e843f2d74c Flush
svn path=/trunk/mono/; revision=10222
2003-01-06 22:25:17 +00:00
Ville Palo a451bdcd42 2003-01-06 Ville Palo <[email protected]>
* XmlDataLoader.cs: Moved diffgram stuff to new internal class
	XmlDiffLoader.
	* XmlDiffLoader.cs: new class for diffgrams. Added handling of
	diffgr:Errors and some fixes and changed XmlReader to XPathNavigator.

svn path=/trunk/mcs/; revision=10220
2003-01-06 19:08:31 +00:00
Gonzalo Paniagua Javier 1900d8f0a5 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs: fixed bug #36319.

svn path=/trunk/mcs/; revision=10219
2003-01-06 17:57:49 +00:00
Gonzalo Paniagua Javier cae5963b24 Fixed typo
svn path=/trunk/mcs/; revision=10218
2003-01-06 17:11:07 +00:00
Gonzalo Paniagua Javier f724b1997e 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* AspElements.cs: added 'codebehind' attribute for page, control and
	application. It's ignored by MS, but allowed. Fixed typo.

svn path=/trunk/mcs/; revision=10217
2003-01-06 17:00:07 +00:00
Gonzalo Paniagua Javier 5338b6acef 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: fixed EnableSesssionState handling.

svn path=/trunk/mcs/; revision=10216
2003-01-06 16:29:36 +00:00
Jackson Harper bc65df29a9 Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
svn path=/trunk/mcs/; revision=10215
2003-01-06 16:21:49 +00:00
Gonzalo Paniagua Javier f48010a829 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* DataView.cs: made dataViewManager internal.
	* DataViewManager.cs: use ICustomTypeDescriptor. We don't want the
	properties of the object, but the values of the columns present in a
	row.

	* DataViewManagerListItemTypeDescriptor.cs: implemented GetProperties,
	which returns a PropertyDescriptorCollection. Created a new class
	derived from PropertyDescriptor that treats Table as an object whose
	properties are DataRowView.

svn path=/trunk/mcs/; revision=10212
2003-01-06 15:35:19 +00:00
Martin Baulig b28320f23e 2003-01-06 Martin Baulig <[email protected]>
* debug.c (debugger_finished_mutex): Use a recursive mutex here.

svn path=/trunk/mono/; revision=10202
2003-01-06 14:03:43 +00:00
Martin Baulig 95c1a2c5e6 2003-01-06 Martin Baulig <[email protected]>
* debug.c: Correctly handle the `debugger_finished_mutex'; it is
	only unlocked by the pthread_cond_wait() in mono_debugger_wait().

svn path=/trunk/mono/; revision=10199
2003-01-06 13:37:17 +00:00
Piers Haken 614ac1d780 2003-01-06 Piers Haken <[email protected]>
* Tokenizer.cs : various unicode fixes/tidyups.

svn path=/trunk/mcs/; revision=10198
2003-01-06 10:57:32 +00:00
Sebastien Pouliot a3a13dc7cb 2003-01-05 Sebastien Pouliot <[email protected]>
* CryptoAPITransform.cs: Removed all TODO. This class will not be
	used by Mono. MS uses it with <algo>CryptoServiceProvider classes
	to provide a common ICryptoTransform access to CryptoAPI.

svn path=/trunk/mcs/; revision=10197
2003-01-06 03:08:30 +00:00
Sebastien Pouliot 39578cca29 2003-01-05 Sebastien Pouliot <[email protected]>
* unix.args: added COMException.cs in System.Runtime.InteropServices

svn path=/trunk/mcs/; revision=10191
2003-01-06 00:20:41 +00:00
Sebastien Pouliot 6212395019 2003-01-05 Sebastien Pouliot <[email protected]>
* COMException.cs: New. Minimal (incomplete - i'm not using COM)
	implementation because this is thrown when dealing with Software
	Publisher Certificates (SPC) in X509Certificate.

svn path=/trunk/mcs/; revision=10190
2003-01-06 00:19:55 +00:00
Sebastien Pouliot 620189bcbf 2003-01-05 Sebastien Pouliot <[email protected]>
* Hash.cs: Added [Serializable] and ISerializable to class declaration.
	Changed how the hash algorithm are created (now use system default
	implementation). Added some exception handling.

svn path=/trunk/mcs/; revision=10189
2003-01-06 00:18:38 +00:00
Sebastien Pouliot 629d4b8e9c *** empty log message ***
svn path=/trunk/mono/; revision=10184
2003-01-05 21:19:36 +00:00
Gonzalo Paniagua Javier 2c157e3a86 2003-01-05 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: don't generate instance fields for pages/controls
	when the base class specified in the Inherits attribute already has
	them. Closes bug #36262.

svn path=/trunk/mcs/; revision=10167
2003-01-05 17:50:27 +00:00
Miguel de Icaza 873e6ce0a2 Faq updates
svn path=/trunk/mono/; revision=10165
2003-01-05 16:19:43 +00:00
Paolo Molaro 5131a50222 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <[email protected]>
* icall.c: allow a null this for constructors.

svn path=/trunk/mono/; revision=10164
2003-01-05 10:59:47 +00:00
Jackson Harper ad6cc0a389 Move must_send_finished var declaration out of #if win32 block (this fixes the build on win32)
svn path=/trunk/mono/; revision=10163
2003-01-05 03:16:32 +00:00
Dennis Hayes 7e0c8b4274 rollback
svn path=/trunk/mcs/; revision=10162
2003-01-05 02:40:25 +00:00
Martin Baulig 3cc3d7fd6e 2003-01-05 Martin Baulig <[email protected]>
* debug.c (mono_debugger_jit_exec): Custom version of mono_jit_exec();
	this is used when we're running inside the Mono Debugger
	(mono_debugger_wait): Put the waiting code into a function of its own.

	* mono.c (main): Call mono_debugger_jit_exec() instead of
	mono_jit_exec() if we're running inside the Mono Debugger.

svn path=/trunk/mono/; revision=10160
2003-01-05 00:59:40 +00:00
Martin Baulig de0ca53667 2003-01-05 Martin Baulig <[email protected]>
* debug.h (MonoDebugFormat): Added
	`MONO_DEBUG_FORMAT_MONO_DEBUGGER'; this allows us to check whether
	we're running inside the Mono Debugger prior to the args parsing.

svn path=/trunk/mono/; revision=10159
2003-01-04 23:55:55 +00:00
Ville Palo aad8256f80 2003-01-04 Ville Palo <[email protected]>
* XmlSchemaMapper.cs: Added handling for Constraints, Attributes.

svn path=/trunk/mcs/; revision=10154
2003-01-04 19:45:12 +00:00
Ville Palo 7a2d4a0992 2003-01-04 Ville Palo <[email protected]>
* DataColumn.cs: ExtendedProperties is by default !null-

svn path=/trunk/mcs/; revision=10151
2003-01-04 19:35:20 +00:00
Paolo Molaro 201e873e5d Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <[email protected]>
* icall.c: raise the proper exceptions if the arguments to the
	internal Invoke are incorrect.

svn path=/trunk/mono/; revision=10144
2003-01-04 17:31:37 +00:00
Paolo Molaro 31fd17e8a2 Sat Jan 4 18:26:41 CET 2003 Paolo Molaro <[email protected]>
* MonoMethod.cs: propagate exceptions from the internal invoke
	code that need to be propagated.

svn path=/trunk/mcs/; revision=10143
2003-01-04 17:29:40 +00:00
Paolo Molaro efc8e8c584 Sat Jan 4 18:04:07 CET 2003 Paolo Molaro <[email protected]>
* Binder.cs: throw an exception if the number of arguments
	when invoking a method is incorrect.

svn path=/trunk/mcs/; revision=10141
2003-01-04 17:07:05 +00:00
Gonzalo Paniagua Javier 838b6c5e41 2003-01-04 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: fixed bug #36226.

svn path=/trunk/mcs/; revision=10135
2003-01-04 16:51:17 +00:00
Ville Palo e65af8b086 2003-01-04 Ville Palo <[email protected]>
* DataColumnCollection.cs: Add (DataColumn Column) -method didn't
	set column's ordinal.

svn path=/trunk/mcs/; revision=10120
2003-01-04 12:35:29 +00:00
Miguel de Icaza 5b8934a193 Flush
svn path=/trunk/mono/; revision=10115
2003-01-04 05:47:49 +00:00
Gonzalo Paniagua Javier 777e0e5d46 2003-01-04 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplication.cs: added new state to handle default
	authentication.

	* System.Web.Configuration/HttpModulesConfigurationHandler.cs: add
	a default authentication module at the end of the list.

	* System.Web.Configuration/ModuleItem.cs: new constructor.
	* System.Web.Security/DefaultAuthenticationModule.cs: implemented. It
	just create a default unauthenticated user when no one else provided one.
	* System.Web.Security/FormsAuthenticationModule.cs: removed debug output.
	* System.Web.UI/Control.cs:
	(AddedControl): take the children to the same state of the parent.
	(InitRecursive): set the page of the children.
	* System.Web.UI/Page.cs: removed one line (it's done a few lines above).
	* System.Web.UI/UserControl.cs:
	(OnInit): always call InitializeAsUserControl
	(InitializeAsUserControl): sets the page for the control.

svn path=/trunk/mcs/; revision=10114
2003-01-04 04:39:32 +00:00
Martin Baulig 02fbd6d229 2003-01-04 Martin Baulig <[email protected]>
* debug.c (release_symbol_file_table): Only call this if we're
	actually modifying the symbol tables.
	(mono_debug_open): Always set the `mono_debugger_class_init_func'
	for MONO_DEBUG_FORMAT_MONO; this stuff should also go into core dumps.

svn path=/trunk/mono/; revision=10113
2003-01-04 04:21:05 +00:00
Paolo Molaro d3773c8a5d Fri Jan 3 20:18:51 CET 2003 Paolo Molaro <[email protected]>
* MonoType.cs: fixed Namespace property for nested types.

svn path=/trunk/mcs/; revision=10107
2003-01-03 19:22:52 +00:00
Marco Ridoni 9b030eaa82 A few changes to support correct scoping for default constructors
svn path=/trunk/mcs/; revision=10105
2003-01-03 16:55:33 +00:00
Marco Ridoni 1f5f382ffd A few changes to resolve scoping for default constructors
svn path=/trunk/mcs/; revision=10104
2003-01-03 16:53:37 +00:00
Marco Ridoni 914cb0a99d Field declaration modified to better conform to MS'VB.NET grammar
Class declaration modified to better conform to MS'VB.NET grammar
Preliminary support for Array declarations (not working yet)

svn path=/trunk/mcs/; revision=10103
2003-01-03 16:52:22 +00:00
Martin Baulig fca5a4e021 2003-01-03 Martin Baulig <[email protected]>
* debug.c: Disable the mono debugger stuff on Windows.

svn path=/trunk/mono/; revision=10099
2003-01-03 15:47:24 +00:00
Dietmar Maurer e8129d33d0 2003-01-03 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_ptr_to_struct): code cleanups

svn path=/trunk/mono/; revision=10098
2003-01-03 15:46:45 +00:00
Paolo Molaro 0e17974c40 Fri Jan 3 16:18:27 CET 2003 Paolo Molaro <[email protected]>
* MonoCustomAttrs.cs: create properly typed arrays when returning
	arrays of attributes of a given type.

svn path=/trunk/mcs/; revision=10097
2003-01-03 15:21:29 +00:00
Gonzalo Paniagua Javier d10b5a6587 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* machine.config: added forms authentication module and close forms tag.

svn path=/trunk/mono/; revision=10096
2003-01-03 12:27:25 +00:00
Gonzalo Paniagua Javier 48a31481b3 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: removed hack to get the User.

svn path=/trunk/mcs/; revision=10095
2003-01-03 12:25:20 +00:00
Paolo Molaro b0c6742743 Fri Jan 3 11:10:14 CET 2003 Paolo Molaro <[email protected]>
* MonoType.cs: fixed MemberType property for nested types.

svn path=/trunk/mcs/; revision=10092
2003-01-03 10:12:57 +00:00
Sebastien Pouliot 42f3785d41 2003-01-03 Sebastien Pouliot <[email protected]>
* RC2CryptoServiceProvider.cs: Now about 2 time faster by inlining
	methods and changing to UInt16 (instead of UInt32).

svn path=/trunk/mcs/; revision=10091
2003-01-03 03:27:10 +00:00
Gonzalo Paniagua Javier 2355191fda 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* String.cs: fixed bug #36209.

svn path=/trunk/mcs/; revision=10090
2003-01-03 03:15:40 +00:00
Gonzalo Paniagua Javier 83e5a79086 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputButton.cs: fixed bug #35677.

svn path=/trunk/mcs/; revision=10088
2003-01-03 02:30:54 +00:00
Martin Baulig cdb31069de 2003-01-03 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.

svn path=/trunk/mono/; revision=10084
2003-01-03 02:20:43 +00:00
Martin Baulig b886279b63 2003-01-03 Martin Baulig <[email protected]>
* debug.c (mono_debugger_trampoline_breakpoint_callback): New
	function.  This is called from the breakpoint trampoline to signal
	the debugger and wait until it has reload the symbol tables.

	* trampoline.c (get_breakpoint_trampoline): Call the new
	mono_debugger_trampoline_breakpoint_callback() in the breakpoint
	trampoline just before the breakpoint.

svn path=/trunk/mono/; revision=10083
2003-01-03 02:19:49 +00:00
Gonzalo Paniagua Javier 076eac9fdd Forgot this.
svn path=/trunk/mcs/; revision=10082
2003-01-03 02:06:22 +00:00
Gonzalo Paniagua Javier a6deecb38d 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: fixed bug #36038. Thanks to [email protected] for
	reporting the bug and how to fix it.

svn path=/trunk/mcs/; revision=10081
2003-01-03 02:03:45 +00:00
Gonzalo Paniagua Javier a8405b7892 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: fixed bug #36037.

svn path=/trunk/mcs/; revision=10080
2003-01-03 01:53:08 +00:00
Gonzalo Paniagua Javier 967ca29ff0 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputControl.cs: fixed bug #35673.

svn path=/trunk/mcs/; revision=10079
2003-01-03 00:56:12 +00:00
Gonzalo Paniagua Javier 428eb1b337 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputText.cs: fixed bug #35670.

svn path=/trunk/mcs/; revision=10078
2003-01-03 00:38:48 +00:00
Gonzalo Paniagua Javier 73226678cc fixed the build on windows
svn path=/trunk/mcs/; revision=10077
2003-01-03 00:15:39 +00:00
Marco Ridoni 654c0d002a Fixed a problem with CVS
svn path=/trunk/mcs/; revision=10063
2003-01-02 18:34:12 +00:00
Marco Ridoni fe734b4b38 Some minor changes
svn path=/trunk/mcs/; revision=10062
2003-01-02 18:29:18 +00:00
Paolo Molaro 9df0d00487 Thu Jan 2 19:04:58 CET 2003 Paolo Molaro <[email protected]>
* Binder.cs: In SelectMethod() look for an exact match first.

svn path=/trunk/mcs/; revision=10061
2003-01-02 18:07:42 +00:00
Paolo Molaro 8599b48ed8 Thu Jan 2 18:46:09 CET 2003 Paolo Molaro <[email protected]>
* ModuleBuilder.cs, TypeBuilder.cs: support global fields and methods.

svn path=/trunk/mcs/; revision=10060
2003-01-02 18:06:24 +00:00
Jonathan Pryor a3e3a655fe NodeFormatter.cs: Change error message to use parens instead of braces and
close the parens.  Allows better use of vi's paren-matching functionality in
output, avoids issues with "}}" format specifier in string.Format.

NodeInfo.cs: handle MemberTypes.NestedType, which is returned under .NET for
nested types.  Without this, .NET generates error messages for nested types.

svn path=/trunk/mcs/; revision=10059
2003-01-02 17:58:43 +00:00
Ville Palo 1d5a5d348b 2003-01-02 Ville Palo <[email protected]>
* DataSet.cs:
	* XmlDataLoader.cs: XmlReader closing fixes.
	* XmlSchemaReader.cs: Added support for ref=

svn path=/trunk/mcs/; revision=10058
2003-01-02 17:38:37 +00:00
Sebastien Pouliot 94622644f1 2003-01-02 Sebastien Pouliot <[email protected]>
* RijndaelManaged.cs: Now 7 (encrypt) to 10 (decrypt) times faster
	by removing allocation inside intensively called methods, using pre-
	calculated tables instead of Mult_GF methods and inlining most methods.

svn path=/trunk/mcs/; revision=10052
2003-01-02 05:08:57 +00:00
Jaime Anguiano Olarra a432fe0de1 Process is no longer visible.
svn path=/trunk/mcs/; revision=10047
2003-01-01 21:27:33 +00:00
Rachel Hestilow 8e2be15c61 2003-01-01 Rachel Hestilow <[email protected]>
* MonoField.cs (SetValue): Fix logic typo. Check that obj is
	non-null only for the non-static case.

svn path=/trunk/mcs/; revision=10046
2003-01-01 21:26:39 +00:00
Gonzalo Paniagua Javier c19ac071d6 removed Process.cs
svn path=/trunk/mcs/; revision=10045
2003-01-01 21:09:11 +00:00
Gonzalo Paniagua Javier 2ef8be005e This class is already in System.dll
svn path=/trunk/mcs/; revision=10044
2003-01-01 21:06:51 +00:00
Jaime Anguiano Olarra 980ee60024 Reimplemented the ProcessID property using the Process class.
svn path=/trunk/mcs/; revision=10041
2003-01-01 18:32:22 +00:00
Jaime Anguiano Olarra 15d2979366 Added System.Diagnostics.Process.cs
svn path=/trunk/mcs/; revision=10040
2003-01-01 18:30:45 +00:00
Jaime Anguiano Olarra 25690e339c Added the Process skeleton for Remoting use.
svn path=/trunk/mcs/; revision=10039
2003-01-01 18:30:06 +00:00
Atsushi Eno ae20fcc018 2002-01-02 Atsushi Enomoto <[email protected]>
* SelectNodesTests.cs : added TestAlphabetDigitMixedName.

svn path=/trunk/mcs/; revision=10036
2003-01-01 17:37:42 +00:00
Atsushi Eno 6b073ef5d7 2003-01-02 Atsushi Enomoto <[email protected]>
* Tokenizer.cs : Fixed ParseIdentifier to allow digits.
		(It should be a temporary fix.)

svn path=/trunk/mcs/; revision=10035
2003-01-01 17:34:17 +00:00
Martin Baulig 2e98ca93d0 Removed debugging instruction.
svn path=/trunk/mono/; revision=10034
2003-01-01 17:11:49 +00:00
Ville Palo e60f5b9896 Added XmlSchemaMapper.cs
svn path=/trunk/mcs/; revision=10029
2003-01-01 13:47:54 +00:00
Ville Palo bce9fe8164 2003-01-01 Ville Palo <[email protected]>
* DataSet.cs:
	  - Added XmlReader and XmlWriter Closing.
	  - Moved ReadXmlSchema stuff to new internal class XmlSchemaMapper.
	* XmlSchemaMapper.cs
	  - Much better way IMHO  to map xmlschema than the old one in
	    DataSet.cs. Its, more flexible, cleaner, ...

svn path=/trunk/mcs/; revision=10028
2003-01-01 12:54:37 +00:00
Jonathan Pryor 1ae95f3ec7 Remove some trace messages.
svn path=/trunk/mcs/; revision=10021
2002-12-31 18:49:26 +00:00
Jonathan Pryor 2e3e2d1740 I had a week of no internet access, so I had far too much time on my hands.
When I wasn't recovering from stomach flu, anyway...

All in all, a good Christmas.

Summary:
  - Made tools/makefile.gnu recursive, much like the top-level makefile.gnu.
    This was principally done so that the type-reflector install target could
    install additional files (currently it installs type-reflector.exe and
    type-reflector.exe.config; this may expand in the future).
  - Massive cleanup/improvements to type-reflector

The biggest news is that a Gtk# front-end exists for type-reflector now.  It
is incomplete (due to my learning Gtk# with this program) and needs
improvement, but it works...  Sort of.

It's not enabled by default, as I don't want to require that the
Gtk#/Gnome#/Glade# assemblies be available to build mcs from CVS.

To enable the type-reflector Gtk# front-end, do two things:
  - Rebuild type-reflector: cd tools/type-reflector && make -f makefile.gnu gui
  - When running, specify the --displayer=gtk parameter, e.g.
      type-reflector.exe --displayer=gtk -S .

svn path=/trunk/mcs/; revision=10020
2002-12-31 18:45:12 +00:00
Sebastien Pouliot 8f7ce12d41 2002-12-31 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Removed ValidKeySize (method only present
	in SymmetricAlgorithm).
	* DSA.cs: Change ZeroizePrivateKey from protected to internal.
	* DSACryptoServiceProvider.cs: Added some case where we need to check
	for keypairGenerated.
	* RSA.cs: Change ZeroizePrivateKey from protected to internal.
	* RSACryptoServiceProvider.cs: Key were never generated with the default
	(no parameter) constructor. Now checks for keypairGenerated in methods.
	* SignatureDescription.cs: Added CreateDeformatter in RSAPKCS1SHA1-
	SignatureDescription to please corcompare (it just call it's ancestor).

svn path=/trunk/mcs/; revision=10019
2002-12-31 17:33:06 +00:00
Martin Baulig 93aaeca08a 2002-12-31 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerSymbolFileTable): Added `global_symfile'
	field to point to the MonoGlobalSymbolTable.

svn path=/trunk/mono/; revision=10013
2002-12-31 10:23:16 +00:00
Martin Baulig d0d6490732 2002-12-31 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Completely rewrote the type section.
	Instead of using individual malloc()ed fields, we use one big
	continuous memory area and offsets into this area.
	See the comments in the source code for details.

svn path=/trunk/mono/; revision=10011
2002-12-31 10:22:43 +00:00
Marco Ridoni 7af9728f5f A small fix to allow compilation under mcs while preserving the Author
attribute

svn path=/trunk/mcs/; revision=10008
2002-12-30 22:37:55 +00:00
Marco Ridoni b431f22584 Fixed a problem occurred when committing last time
svn path=/trunk/mcs/; revision=10007
2002-12-30 22:31:19 +00:00
Sebastien Pouliot d3dadbbd8d 2002-12-30 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Implemented core. Not sure about many details -
	but it run the samples now (#30256).
	* CryptoStreamMode.cs: Added [Serializable] to enum declaration.
	* SymmetricAlgorithm.cs: Made some changes required for CryptoStream
	and to match more closely MS implementation. Also added little
	optimizations in TransformBlock.

svn path=/trunk/mcs/; revision=10006
2002-12-30 21:45:26 +00:00
Marco Ridoni 40d171c197 Select Case is working
svn path=/trunk/mcs/; revision=10005
2002-12-30 20:21:22 +00:00
Marco Ridoni e7609febb3 Minor changes
svn path=/trunk/mcs/; revision=10004
2002-12-30 20:20:22 +00:00
Martin Baulig 78ec56451c 2002-12-30 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.

svn path=/trunk/mono/; revision=10002
2002-12-30 19:58:55 +00:00
Martin Baulig 0c7c6652a7 2002-12-30 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerInfo): Put back `symbol_file_modified'.
	This variable now specifies that the symbol tables have been
	modified after the last notification has been send.  The debugger
	uses this flag to check whether it needs to reload the symbol
	tables or not.
	(debugger_compile_method): Just send a notification to the
	debugger, but don't set the modified flag.  It may or may not be
	set when the debugger gets the notification - depending on whether
	the JIT compilation added a new method to the symbol tables.

svn path=/trunk/mono/; revision=9999
2002-12-30 18:42:35 +00:00
Martin Baulig bc89db47d6 2002-12-30 Martin Baulig <[email protected]>
* debug.c (debugger_compile_method): This is a wrapper around
	mono_compile_method() which always sends a notification to the
	debugger.

svn path=/trunk/mono/; revision=9997
2002-12-30 18:31:32 +00:00
Martin Baulig 60f2732c4b 2002-12-30 Martin Baulig <[email protected]>
* debug.c: Reload the symbol file table before sending the
	notification event to the debugger.
	(MonoDebuggerInfo): Removed `update_symbol_file_table'.

svn path=/trunk/mono/; revision=9995
2002-12-30 18:22:36 +00:00
Martin Baulig 4aa80ca2af 2002-12-31 Martin Baulig <[email protected]>
* debug.c: Propertly lock everything and avoid race conditions.
	(MonoDebuggerInfo): Removed the `symbol_file_modified' again.

svn path=/trunk/mono/; revision=9987
2002-12-30 17:45:56 +00:00
Duncan Mak 58aeae86da 2002-12-31 Duncan Mak <[email protected]>
* debug.c (initialize_debugger_support): Fix build error by
	declaring ret at the top of the function.

svn path=/trunk/mono/; revision=9986
2002-12-30 17:08:02 +00:00
Gonzalo Paniagua Javier 4b10f5831b Changes by Daniel Cazullino.
2002-12-27  Daniel Cazzulino <[email protected]>

	* CacheEntry.cs: several changes. New constants, use of constants
	defined in Cache.cs, modified locks to optimize perf. Fixed property
	sets which weren't using the keyword value to set the new values
	(don't know how this worked before!).

	* Cache.cs: changed singleton implementation to only create the object
	when actually used. Changed Insert overloads to use constants
	defined instead of hard values.

	* ExpiresBuchets: major changes. All locking now uses ReaderWriterLock
	class. Bucket now efectively reuses free indexes from removed items
	to avoid unnecessary expansions. Expansion now uses Array.CopyTo to
	add elements to the new list. Added private Int32Collection to
	handle int indexes efficiently (thanks Shawn Van Ness). See comments
	there.

svn path=/trunk/mcs/; revision=9985
2002-12-30 16:22:37 +00:00
Sebastien Pouliot db0d827424 2002-12-30 Sebastien Pouliot <[email protected]>
* AssemblyNameTest.cs: Added test for FullName (null cultureinfo).

svn path=/trunk/mcs/; revision=9981
2002-12-30 15:27:25 +00:00
Martin Baulig df021b96c7 2002-12-30 Martin Baulig <[email protected]>
* debug.c: When running under the mono debugger, create a special
	debugger thread; always protect the symbol tables with a mutex.

svn path=/trunk/mono/; revision=9980
2002-12-30 15:07:13 +00:00
Martin Baulig d7044e8a8a 2002-12-30 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
	line number table in this data blob instead of using an external
	pointer.

svn path=/trunk/mono/; revision=9979
2002-12-30 15:04:53 +00:00
Daniel Morgan 9ded121123 remove bit-rotted tests
svn path=/trunk/mcs/; revision=9975
2002-12-30 14:48:38 +00:00
Sebastien Pouliot 8482be0aef 2002-12-30 Sebastien Pouliot <[email protected]>
* AssemblyName.cs: Fixed null cultureinfo in FullName (as reported by
	Zoltan).

svn path=/trunk/mcs/; revision=9972
2002-12-30 14:45:18 +00:00
Marco Ridoni 4eea63fd16 Select..Case..Case Else added to grammar definition
Modified Do..Loop and While/Until definitions in grammar

svn path=/trunk/mcs/; revision=9970
2002-12-30 12:21:25 +00:00
Daniel Morgan c30103c5ec 2002-12-30 Daniel Morgan <[email protected]>
* LoginDialog.cs
	* DbProviderCollection.cs
	* DbProvider.cs
	* DataGrid.cs: save as Unix (LF) and format based on
	Mono style

	* SqlEditorSharp.cs: SQL editor will be used in a
	notebook, keep track of that tab.  Also, when text changed,
	update the notebook tab to indicate text changed.  Save as
	Unix (LF) and monostyle format

	* sqlsharpgtk.cs: add a notebook where each tab represents a SQL editor where
	the selected tab could be opend or saved to a file or execute against the
	database.  The full filename of the selected editor tab is displayed in the title
	bar.  The tab gets an asterisk if the user changes the text in that text buffer.
	Add a second notebook for the results to be a DataGrid or a TextView
	to log messages.  Add new menu items for execute and saving to
	a HTML, XML, and CSV (Comma Separated Values) files.  Menu item New brings up a new
	editor tab.  Add menu item New SQL# Window to open a new SQL# window.

svn path=/trunk/mcs/; revision=9969
2002-12-30 08:30:20 +00:00
Miguel de Icaza b51535e43f No-op for install target
svn path=/trunk/mcs/; revision=9968
2002-12-29 19:53:17 +00:00
Miguel de Icaza c4e8361bdf Add missing files to the build
svn path=/trunk/mcs/; revision=9967
2002-12-29 19:52:17 +00:00
Ville Palo 9b5e527bf5 ups, little fix
svn path=/trunk/mcs/; revision=9966
2002-12-29 17:54:48 +00:00
Ville Palo beaeaad347 2002-12-29 Ville Palo <[email protected]>
* XmlDataLoader.cs: Reading diffgrams.

svn path=/trunk/mcs/; revision=9965
2002-12-29 16:16:24 +00:00
Ville Palo 20bf43868e 2002-12-29 Ville Palo <[email protected]>
* DataRow.cs: Little fix to indexer and DataColumnCang* trigger fixes.
	* DataTable.cs: Added ChanginDataColumn () for triggering
	DataColumnChanging event

svn path=/trunk/mcs/; revision=9964
2002-12-29 14:50:14 +00:00
Lluis Sanchez 0792fc1a6d no message
svn path=/trunk/mcs/; revision=9963
2002-12-29 12:36:37 +00:00
Lluis Sanchez b936987419 no message
svn path=/trunk/mcs/; revision=9962
2002-12-29 12:24:45 +00:00
Miguel de Icaza 27ac138a66 2002-12-29 Miguel de Icaza <[email protected]>
* cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
	the command.   This showed up while compiling the JANET source
	code, which used \r as its only newline separator.

svn path=/trunk/mcs/; revision=9961
2002-12-29 08:18:36 +00:00
Miguel de Icaza 41e8d17219 2002-12-28 Marcus Urban <[email protected]>
* Activator.cs: Since the documentation indicates the method
	either succeeds or throws one of the listed exceptions, we weren't
	expecting that CreateInstance might be returning null.

	For more information on the bug, see http://bugs.ximian.com/show_bug.cgi?id=36109

svn path=/trunk/mcs/; revision=9960
2002-12-29 02:15:09 +00:00
Marco Ridoni bc53601431 Properties are working and support typed parameters. An error is
flagged if parameters haven't corresponding types.

svn path=/trunk/mcs/; revision=9959
2002-12-28 23:06:11 +00:00
Sebastien Pouliot f55334e816 2002-12-28 Sebastien Pouliot <[email protected]>
* X509CertificateTest.cs: Changed how the dates are compared. This
	should stop the nunit errors in X509Certificate.

svn path=/trunk/mcs/; revision=9956
2002-12-28 18:30:12 +00:00
Ville Palo a3f73ce252 2002-12-28 Ville Palo <[email protected]>
* DataSet.cs: Indentations to WriteXmlSchema () and one little fix

svn path=/trunk/mcs/; revision=9953
2002-12-28 16:10:35 +00:00
Martin Baulig 1203967cdf 2002-12-28 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.

svn path=/trunk/mono/; revision=9947
2002-12-28 14:25:29 +00:00
Martin Baulig 568d8fcd01 2002-12-28 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerInfo): Added `symbol_file_modified'; it's
	incremented each time one of the symbol tables is modified.

svn path=/trunk/mono/; revision=9946
2002-12-28 14:25:10 +00:00
Ville Palo d720f20fd0 2002-12-28 Ville Palo <[email protected]>
* DataSet.cs: Indentations to WriteXml ()

svn path=/trunk/mcs/; revision=9945
2002-12-28 13:03:27 +00:00
Ville Palo ae78b31e9e 2002-12-28 Ville Palo <[email protected]>
* XmlDocument.cs: XmlTextWriter.Formatting == Indented when
	calling Save () -methods.

svn path=/trunk/mcs/; revision=9944
2002-12-28 12:34:37 +00:00
Lluis Sanchez 41785d5763 no message
svn path=/trunk/mcs/; revision=9943
2002-12-28 11:52:19 +00:00
Lluis Sanchez 5dc1d5b45f Implemented some functions
svn path=/trunk/mcs/; revision=9942
2002-12-28 11:46:36 +00:00
Duncan Mak 58dd6011a8 2002-12-28 Duncan Mak <[email protected]>
* unix.args (ASN1.cs): Sebastien forgot to include this file.

svn path=/trunk/mcs/; revision=9940
2002-12-28 09:21:30 +00:00
Atsushi Eno 797b28bbf8 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : primitive reading implementation.

svn path=/trunk/mcs/; revision=9939
2002-12-28 05:35:13 +00:00
Sebastien Pouliot da30b9cce8 2002-12-27 Sebastien Pouliot <[email protected]>
* unix.args: added CryptoTools.cs file.

svn path=/trunk/mcs/; revision=9934
2002-12-27 18:36:15 +00:00
Sebastien Pouliot 1d085448a2 2002-12-27 Sebastien Pouliot <[email protected]>
* CryptoTools.cs: New. Shared classes for cryptography. Now
	includes a KeyBuilder to generate symmetric keys and IV.
	* DES.cs: Modified Key validation.
	* DESCryptoServiceProvider.cs: Implemented Key and IV using
	KeyBuilder.
	* RC2CryptoServiceProvider.cs: Implemented Key and IV using
	KeyBuilder (and removed TODO).
	* RijndaelManaged.cs: Implemented Key and IV using KeyBuilder
	(and removed TODO).
	* SHA384Managed.cs: Changed code to remove compiler warning.
	* SHA512Managed.cs: Changed code to remove compiler warning.
	* SymmetricAlgorithm.cs: Removed TODO on IV.
	* TripleDESCryptoServiceProvider.cs: Implemented Key and IV
	using KeyBuilder (and removed TODO).

svn path=/trunk/mcs/; revision=9933
2002-12-27 18:32:44 +00:00
Atsushi Eno 8e23e5f682 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : Test for bugzilla #34743 (whitespace handling)

svn path=/trunk/mcs/; revision=9932
2002-12-27 16:26:25 +00:00
Atsushi Eno 337d2be637 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlElement.cs : quick fix for the incomplete patch of #35308 below.

svn path=/trunk/mcs/; revision=9931
2002-12-27 16:15:10 +00:00
Atsushi Eno 9762d5bab0 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : Test for bugzilla #35308 (default ns output)
	* XmlElementTests.cs : Test for output of attributes with different NS.

svn path=/trunk/mcs/; revision=9930
2002-12-27 15:54:39 +00:00
Atsushi Eno ea63c7d9e2 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : removed inconsistent line-feed output.
	* XmlElement.cs, XmlTextWriter.cs :
		fixed for bugzilla 35308 (default ns output)
	* XmlWhitespace.cs : limited output only when preserving whitespace.

svn path=/trunk/mcs/; revision=9929
2002-12-27 15:53:53 +00:00
Sebastien Pouliot d5fb889e15 2002-12-27 Sebastien Pouliot <[email protected]>
* ASN1.cs: New. Classes to manipulate Abstract Syntax Notation 1
	structures.
	* cert2spc.cs: New tool to generate Software Publisher Certificate
	(SPC) from a list of X509 certificate and CRL.
	* secutils.cs: Changed copyright notice.
	* makefile: Added cert2spc.exe to Windows build.
	* makefile.gnu: Added cert2spc.exe to Linux build.

svn path=/trunk/mcs/; revision=9928
2002-12-27 15:37:38 +00:00
Sebastien Pouliot 71bac88f6c 2002-12-27 Sebastien Pouliot <[email protected]>
* ASN1.cs: New. Updated ASN1 classes for X509Certificate that can
	now be reused for other tools (like Cert2Spc). Classes are marked
	internal so they cannot be reused from outside corlib (for
	compatibility with MS implementation).
	* X509Certificate.cs: Removed all ASN1 classes from file.

svn path=/trunk/mcs/; revision=9927
2002-12-27 15:26:45 +00:00
Ville Palo e86ff448b8 2002-12-27 Ville Palo <[email protected]>
* list: Added System.Data/XmlDataLoader.cs

svn path=/trunk/mcs/; revision=9924
2002-12-27 14:20:49 +00:00
Ville Palo 89fd33f0a3 2002-12-27 Ville Palo <[email protected]>
* DataSet.cs:
	* XmlDataLoader.cs: Moved ReadXml -stuff from DataSet.cs to new
	class XmlDataLoader.cs

svn path=/trunk/mcs/; revision=9923
2002-12-27 14:18:27 +00:00
Jeroen Janssen 34b57b5ef2 2002-12-27 Jeroen Janssen <[email protected]>
* fixed url for System.Windows.Forms in the class status

svn path=/trunk/mono/; revision=9916
2002-12-27 10:54:39 +00:00
Sebastien Pouliot dc0e35c21b 2002-12-26 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Fixed the date issue (again). Time was
	converted to local time then ajusted to Pacific time. Now time
	is kept (internally) as UTC and correct (-8) to Pacific when shown.
	Changed Authenticode signature detection and removed debugging code.

svn path=/trunk/mcs/; revision=9914
2002-12-27 00:57:42 +00:00
Ville Palo b7625dd45d 2002-12-26 Ville Palo <[email protected]>
* own_schema.xsd: XmlSchema for testing ReadXmlSchema() -method
	* DataSetTest.cs: Added more Xml-tests.

svn path=/trunk/mcs/; revision=9913
2002-12-26 19:09:56 +00:00
Miguel de Icaza 10f375d325 Add SDL.NET bindings, reorganize
svn path=/trunk/mono/; revision=9866
2002-12-24 18:46:41 +00:00
Alejandro Sánchez Acosta 433d12e01a Added cs0208.cs test error.
svn path=/trunk/mcs/; revision=9861
2002-12-24 14:33:51 +00:00
Alejandro Sánchez Acosta ada835f12f Added cs0202.cs test error.
svn path=/trunk/mcs/; revision=9860
2002-12-24 14:23:39 +00:00
Alejandro Sánchez Acosta 451e834b2b Added cs0197 test error.
svn path=/trunk/mcs/; revision=9859
2002-12-24 14:10:16 +00:00
Sebastien Pouliot f91d740dc1 2002-12-23 Sebastien Pouliot <[email protected]>
* AssemblyNameTest.cs: Added test for non-signed assembly (which
	returns an empty array - i.e. not null like an empty assembly).

svn path=/trunk/mcs/; revision=9857
2002-12-24 03:48:49 +00:00
Sebastien Pouliot 926b1a1224 2002-12-23 Sebastien Pouliot <[email protected]>
* AssemblyName.cs: GetPublicKey now return an empty array (not null)
	when an assembly isn't signed with a StrongName (to match MS
	implementation) and null when no assembly is referenced. Also removed
	commented code (no bug reported so it was probably not used).

svn path=/trunk/mcs/; revision=9856
2002-12-24 03:47:27 +00:00
Miguel de Icaza 5d772df810 Also distribute sqlsharp
svn path=/trunk/mono/; revision=9855
2002-12-24 01:43:09 +00:00
Miguel de Icaza 841e1cc7b2 Add secutil to the distribution
svn path=/trunk/mono/; revision=9851
2002-12-23 22:32:58 +00:00
Atsushi Eno 879d8fbdcd 2002-12-24 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlDocument.cs, XmlTextReader.cs:
		Implemented XmlTextReader.ReadAttributeValue().
		Added internal ReadAttributeNodeValue().
		Fixed XmlAttribute.InnerXml to use these methods.

	* XmlDocument.cs, XmlDocumentFragment.cs, XmlElement.cs, XmlNode.cs:
		Implemented XmlDocument.ReadNode() and removed ConstructDOM().
		Other changes are replacing them.

svn path=/trunk/mcs/; revision=9848
2002-12-23 17:35:55 +00:00
Atsushi Eno a275fb4618 2002-12-24 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs, XmlWhitespaceTests.cs:
		fixed whitespace handling (in relation to Ville's patch).

svn path=/trunk/mcs/; revision=9846
2002-12-23 16:24:38 +00:00
Atsushi Eno 981fe2cef9 2002-12-24 Atsushi Enomoto <[email protected]>
* XmlDocument.cs: patch by Ville (fixed default PreserveWhitespace)

svn path=/trunk/mcs/; revision=9845
2002-12-23 16:23:36 +00:00
Alejandro Sánchez Acosta 82828beee5 Added cs0192.cs test file.
svn path=/trunk/mcs/; revision=9842
2002-12-23 13:56:18 +00:00
Alejandro Sánchez Acosta c2b988119c Added cs0170 test error.
svn path=/trunk/mcs/; revision=9841
2002-12-23 12:54:57 +00:00
Alejandro Sánchez Acosta 6aaf27ebc5 Added cs0156 test error.
svn path=/trunk/mcs/; revision=9840
2002-12-23 12:40:24 +00:00
Nick Drochak eb692e0eda 2002-12-23 Nick Drochak <[email protected]>
* System_test.build: Fix build.  Need to link with System.Xml.dll

svn path=/trunk/mcs/; revision=9837
2002-12-23 01:14:01 +00:00
Sebastien Pouliot 7ae7b6a09f 2002-12-22 Sebastien Pouliot <[email protected]>
* secutils.cs: New tool to extract strongname and X509 certificate
	from assembly (or other signed files).
	* makefile: Added secutil.exe to Windows build.
	* makefile.gnu: Added secutil.exe to Linux build.

svn path=/trunk/mcs/; revision=9836
2002-12-22 16:09:46 +00:00
Sebastien Pouliot 46145d061c 2002-12-22 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Completed CreateFromSignedFile. Added a new
	internal constructor so Publisher (and the related classes) can
	create a X509Certificate object which return null dates (for both
	GetEffectiveDateString and GetExpirationDateString methods).

svn path=/trunk/mcs/; revision=9835
2002-12-22 16:08:11 +00:00
Miguel de Icaza fdd9676283 2002-12-22 Miguel de Icaza <[email protected]>
* ecore.cs (FieldExpr.DoResolve): Instead of throwing an
	exception, report error 120 `object reference required'.

	* driver.cs: Add --pause option, used during to measure the size
	of the process as it goes with --timestamp.

svn path=/trunk/mcs/; revision=9833
2002-12-22 06:44:47 +00:00
Miguel de Icaza 686fdaac38 Add another one
svn path=/trunk/mcs/; revision=9832
2002-12-22 06:39:28 +00:00
Tim Coleman 5c0779502a 2002-12-22 Tim Coleman <[email protected]>
* Mono.Data.Tds.Protocol/TdsComm.cs:
                Change GetString to NOT explicitly add a NUL
                to the end of the string since Encoder.GetString ()
                will do that.

svn path=/trunk/mcs/; revision=9831
2002-12-22 06:26:20 +00:00
Rachel Hestilow a226b353f8 2002-12-22 Rachel Hestilow <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
	as a boxed return type.

svn path=/trunk/mono/; revision=9830
2002-12-22 06:14:11 +00:00
Miguel de Icaza 46d978a6af Move configuration information that is used when compiling code that links
to Mono into a define that we can ship in mono.pc

Remove the dependency on config.h from mono/metadata/exception.h

svn path=/trunk/mono/; revision=9829
2002-12-22 05:37:37 +00:00
Miguel de Icaza 390086fddc Add this change as well
svn path=/trunk/mcs/; revision=9827
2002-12-22 04:34:21 +00:00
Jonathan Pryor 182b17c5a6 Initial patch to use Switches to limit the trace messages that are generated.
svn path=/trunk/mcs/; revision=9826
2002-12-22 03:47:57 +00:00
Miguel de Icaza d499df96e0 2002-12-21 Miguel de Icaza <[email protected]>
* appdomain.c
	(ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
	g_build_filename to properly get separators on the filename created.

svn path=/trunk/mono/; revision=9825
2002-12-22 01:59:57 +00:00
Miguel de Icaza e1645a45a6 Add new test, I forgot to add this a few weeks ago test-178.cs
svn path=/trunk/mcs/; revision=9824
2002-12-21 23:10:15 +00:00
Miguel de Icaza 7a2ae61405 Re-enable code
svn path=/trunk/mcs/; revision=9823
2002-12-21 23:04:23 +00:00
Miguel de Icaza 5e017a3f3f 2002-12-20 Lluis Sanchez Gual <[email protected]>
* RealProxy.cs: Added ObjectIdentity property.
	  Implemented CrateObjRef.
	* RemotingProxy.cs: Added Identity parameter to constructor

2002-12-20  Lluis Sanchez Gual <[email protected]>

	* ServerContextTerminatorSink.cs: Added
	* ServerObjectTerminatorSink.cs: Added
	* StackBuilderSink.cs: Added

2002-12-20  Lluis Sanchez Gual <[email protected]>

	* LeaseSink.cs: Added
2002-12-20 Lluis Sanchez Gual <[email protected]>

	* ObjRef.cs: Implementation now based on methods of RemotingServices.
	* RemotingServices.cs: Remoting information now kept in Identity objects.
	  All methods adapted to work with identities.
	  Renamed ExecuteMessage to InternalExecuteMessage. ExecuteMessage should
	  not make a direct call to the object.
	* Identity.cs: added.

svn path=/trunk/mcs/; revision=9822
2002-12-21 23:00:04 +00:00
Miguel de Icaza df53b8e04d Add new field that reflects changes to corlib for remoting
svn path=/trunk/mono/; revision=9821
2002-12-21 22:53:35 +00:00
Ravi Pratap M 39587eadc8 2002-12-21 Ravi Pratap <[email protected]>
* test-171.cs : Fix up since it wasn't working because of some
	array code bug. That is a separate problem ;-)

svn path=/trunk/mcs/; revision=9820
2002-12-21 19:48:56 +00:00
Alejandro Sánchez Acosta 706b7b3304 Added cs0163.cs test error.
svn path=/trunk/mcs/; revision=9819
2002-12-21 19:07:54 +00:00
Alejandro Sánchez Acosta e587984615 Added cs0161.cs test file.
svn path=/trunk/mcs/; revision=9818
2002-12-21 18:59:18 +00:00
Nick Drochak 99a25b98bd 2002-12-21 Nick Drochak <[email protected]>
* all: make tests build and run under nunit2

svn path=/trunk/mcs/; revision=9817
2002-12-21 14:15:43 +00:00
Nick Drochak 166d18cf51 Needed to build test dll
svn path=/trunk/mcs/; revision=9816
2002-12-21 14:13:26 +00:00
Nick Drochak 07b1a51bc6 2002-12-21 Nick Drochak <[email protected]>
* AllTests2.cs: Helper file for unit tests

svn path=/trunk/mcs/; revision=9815
2002-12-21 13:29:25 +00:00
Paolo Molaro 377280f5b5 Fix build breakers.
svn path=/trunk/mcs/; revision=9814
2002-12-21 13:25:30 +00:00
Miguel de Icaza cda63d0706 2002-12-21 Miguel de Icaza <[email protected]>
* cs-tokenizer.cs: Small fix to the parser: compute the ascii
	number before adding it.

svn path=/trunk/mcs/; revision=9813
2002-12-21 08:17:00 +00:00
Miguel de Icaza 590d1b39e5 Revert
svn path=/trunk/mcs/; revision=9812
2002-12-21 08:06:25 +00:00
Miguel de Icaza 5d13212687 Added files for Lluis.
svn path=/trunk/mcs/; revision=9811
2002-12-21 08:03:06 +00:00
Miguel de Icaza 5821325879 2002-12-21 Miguel de Icaza <[email protected]>
* object.h: Small change, introduce MonoMarshalByRefObject to
	track the layout of that structure in the C# universe as we make
	changes there.

svn path=/trunk/mono/; revision=9810
2002-12-21 07:58:55 +00:00
Ravi Pratap M 29bdfb20ab 2002-12-21 Ravi Pratap <[email protected]>
* ecore.cs (StandardImplicitConversion): When in an unsafe
	context, we allow conversion between void * to any other pointer
	type. This fixes bug #35973.

svn path=/trunk/mcs/; revision=9809
2002-12-21 07:27:52 +00:00
Ravi Pratap M 5d592bb366 2002-12-21 Ravi Pratap <[email protected]>
* test-171.cs : This was mysteriously absent. Add new test in its
	place.

svn path=/trunk/mcs/; revision=9808
2002-12-21 07:25:18 +00:00
Jonathan Pryor 2571837c88 New/Updated test cases. Fixed TraceTest so that it isn't causing test
failures anymore.  Added SwitchesTest (to test switches) and
DiagnosticsConfigurationHandler to test .config file handling.

Issues: while the DiagnosticsConfigurationHandlerTest is reasonably
self-contained, SwitchesTest is not.  To properly test switches, we need a
.exe and a .exe.config file.  The needed .exe.config file that SwitchesTest
depends on is present in `test-config-file', but I'm unsure where to place it
(much less what to name it).

Additionally, SwitchesTest generates test failures at this time, principally
because of the lack of .config file support in the test system.

Finally, makefile.gnu & system_linux_test.args was changed to use the newly
added tests and to reference System.Xml.dll, which is used by
DiagnosticsConfigurationHandlerTest.

svn path=/trunk/mcs/; revision=9807
2002-12-21 03:50:07 +00:00
Jonathan Pryor f69bd81f97 DiagnosticsConfigurationHandler.cs:
Don't assume that optional attributes are always present
  <assert/> can't have any child nodes
  Change in semantics: if the attribute isn't present, GetAttribute()
    returns null, not "".  This allows us to differentiate between an attribute
    not being present and an attribute with an empty value.
  Translate exceptions if a TraceListener type is invalid

ChangeLog: Update for the previous changes I forgot to record

svn path=/trunk/mcs/; revision=9806
2002-12-21 03:38:12 +00:00
Miguel de Icaza 594edb6fd8 Fix from Matt Kunze to add the other Process.Start overloads
svn path=/trunk/mcs/; revision=9800
2002-12-21 00:14:16 +00:00
Atsushi Eno cfd9e478ee 2002-12-21 Atsushi Enomoto <[email protected]>
* XmlTextWriterTests.cs (TestAttributeNamespacesXmlnsXmlns):
		fixed bug in the testcase (in relation to JD Conley's patch).

svn path=/trunk/mcs/; revision=9799
2002-12-20 18:13:32 +00:00
Atsushi Eno f00c428bbe 2002-12-21 Atsushi Enomoto <[email protected]>
* XmlElement.cs, XmlTextWriter.cs, XmlWriter.cs:
		patch by JD Conley <[email protected]>.
		(Fix for xmlns attribute output.)

svn path=/trunk/mcs/; revision=9798
2002-12-20 18:12:54 +00:00
Gonzalo Paniagua Javier 8e35e3a7b9 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpCookie.cs: send 'expires' in the header.
	* System.Web.Security/FormsAuthenticationModule.cs: remove debug lines.
	* System.Web.UI/BaseParser.cs: a couple of path fixes to make it work
	when the page is not in the root directory.
	* System.Web.Util/UrlUtils.cs: fixed IsRelativeUrl and IsRootUrl.

svn path=/trunk/mcs/; revision=9797
2002-12-20 13:49:48 +00:00
Jackson Harper 5ac344ac00 Use Path.GetFileNameWithoutExtension so an exception is not thrown when extensionless outputs are used
svn path=/trunk/mcs/; revision=9795
2002-12-20 09:12:11 +00:00
Jackson Harper 918a74cce2 Copy constructor does not attempt to merge if it recieves a null ref
svn path=/trunk/mcs/; revision=9794
2002-12-20 08:58:03 +00:00
Gonzalo Paniagua Javier fd59368b78 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* regex.cs: fixed little mistake (closes #35860).

svn path=/trunk/mcs/; revision=9793
2002-12-20 08:22:50 +00:00
Gonzalo Paniagua Javier 61402fe1a2 check the _controls is not null
svn path=/trunk/mcs/; revision=9792
2002-12-20 06:50:35 +00:00
Gonzalo Paniagua Javier 9258732319 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* rootcontext.cs: fixed compilation of corlib.

svn path=/trunk/mcs/; revision=9790
2002-12-20 04:07:50 +00:00
Gonzalo Paniagua Javier 64e6cf7460 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* LinkLabel.cs:
	* ListView.cs: fixed the build with csc.

svn path=/trunk/mcs/; revision=9789
2002-12-20 01:38:56 +00:00
Gonzalo Paniagua Javier 51f8013b8a 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: fixed PreRenderRecursiveInternal. Thanks to kojoadams for
	reporting the bug.

svn path=/trunk/mcs/; revision=9788
2002-12-20 01:16:28 +00:00
Jonathan Pryor 1f73687f90 IndentLevel and IndentSize shouldn't be hardcoded; they should be set to
whatever TraceImpl is using (which in turn may have been set by the .config
file, so we should get the user-specified values in added listeners).

svn path=/trunk/mcs/; revision=9787
2002-12-20 00:04:00 +00:00
Jonathan Pryor 1eb5d4634b * TraceListener.cs: Make sure that indents are initially written. This allows
code that uses Trace.Indent() before a Trace.WriteLine() to be indented
  properly.
* TraceImpl.cs: provide a static constructor to explicitly specify the
  ordering of initialization, in particular the ordering of
  TraceImpl.Listeners and the reading of the .config file (by accessing
  DiagnosticsConfiguration.Settings).  This (hopefully) ensures that the
  Listeners collection is initialized before the .config file is read in, as
  the DiagnosticsConfigurationHandler will directly modify the listeners
  collection.
  The DiagnosticsConfigurationHandler assumes this so that it can <add/> and
  <remove/> trace listeners and set the logfile for the DefaultTraceListener.

svn path=/trunk/mcs/; revision=9786
2002-12-19 23:36:00 +00:00
Miguel de Icaza 63c75e1f0e 2002-12-19 Miguel de Icaza <[email protected]>
* attribute.cs (Attributes.Contains): Add new method.

	* class.cs (MethodCore.LabelParameters): if the parameter is an
	`out' parameter, check that no attribute `[In]' has been passed.

svn path=/trunk/mcs/; revision=9785
2002-12-19 22:31:34 +00:00
Miguel de Icaza 763d5b92a2 update
svn path=/trunk/mono/; revision=9784
2002-12-19 22:08:46 +00:00
Miguel de Icaza 1473503ae7 Fix the test
svn path=/trunk/mcs/; revision=9783
2002-12-19 22:04:24 +00:00
César Natarén df5afd9d37 Added file cs0230.cs
svn path=/trunk/mcs/; revision=9782
2002-12-19 21:56:08 +00:00
Miguel de Icaza 630c4a5800 2002-12-14 Jaroslaw Kowalski <[email protected]>
* decl.cs: Added special case to allow overrides on "protected
	internal" methods

svn path=/trunk/mcs/; revision=9781
2002-12-19 21:21:58 +00:00
César Natarén fbe4a7a52f Added file cs0225.cs
svn path=/trunk/mcs/; revision=9780
2002-12-19 21:09:35 +00:00
Marco Ridoni c545c4f6cc Minor changes
svn path=/trunk/mcs/; revision=9779
2002-12-19 20:57:05 +00:00
Dennis Hayes 6348ceadfe monir tweaks
svn path=/trunk/mcs/; revision=9777
2002-12-19 20:46:21 +00:00
Marco Ridoni 930d8df78d A few fixes to make properties work properly (not totally fixed yet)
svn path=/trunk/mcs/; revision=9776
2002-12-19 20:41:20 +00:00
Ville Palo fd9537549a 2002-12-19 Ville Palo <[email protected]>
* DataSet.cs Implemented ReadXml with XmlReadMode.ReadSchema

svn path=/trunk/mcs/; revision=9775
2002-12-19 20:14:13 +00:00
Jaime Anguiano Olarra 694f875483 ApplicationName and AplicationID implemented.
svn path=/trunk/mcs/; revision=9774
2002-12-19 18:37:24 +00:00
Jaime Anguiano Olarra 8fbc5fca48 Added the Gtk# intro page.
svn path=/trunk/mono/; revision=9773
2002-12-19 18:07:57 +00:00
Jaime Anguiano Olarra c6d8f736e3 Added a custom Gtk# introduction.
svn path=/trunk/mono/; revision=9772
2002-12-19 18:02:15 +00:00
Paolo Molaro 2000882245 Thu Dec 19 18:31:54 CET 2002 Paolo Molaro <[email protected]>
* jit.c: fix LDELEMA implementation here as well.

svn path=/trunk/mono/; revision=9771
2002-12-19 17:34:29 +00:00
Gonzalo Paniagua Javier 52218604b0 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* HttpValueCollection.cs: patch from Botjan Vizin
	<[email protected]> that implements ToString (bool).

svn path=/trunk/mcs/; revision=9770
2002-12-19 17:29:27 +00:00
Paolo Molaro fe58460445 Thu Dec 19 16:43:19 CET 2002 Paolo Molaro <[email protected]>
* MonoMethod.cs, ParameterInfo.cs: return a custom attribute
	provider for the return type of a method.

svn path=/trunk/mcs/; revision=9769
2002-12-19 15:46:00 +00:00
Paolo Molaro 0b7186d44d Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <[email protected]>
* object.c: removed assert to allow static fields on interfaces.
	* loader.c: a TypeSpec may be used for any type, not just arrays.

svn path=/trunk/mono/; revision=9768
2002-12-19 15:26:08 +00:00
Paolo Molaro 0ff9d1d988 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <[email protected]>
* class.c, class.h: added mono_class_array_element_size ().
	Ignore static methods in interfaces.

svn path=/trunk/mono/; revision=9767
2002-12-19 13:22:53 +00:00
Marco Ridoni cda9448ef0 Some minor changes
svn path=/trunk/mcs/; revision=9766
2002-12-19 12:28:03 +00:00
Marco Ridoni 4387ccd8db Invocation.DoResolve was modified to accomodate Properties with
parameters (which still need a bit of work)

svn path=/trunk/mcs/; revision=9765
2002-12-19 12:03:04 +00:00
Gonzalo Paniagua Javier 845496d205 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Configuration/AuthConfig.cs: LoginUrl defaults to login.aspx.
	* System.Web.Security/FormsAuthentication.cs: return a null ticket when
	an exception is thrown creating it. Implemented RenewTicketIfOld.

	* System.Web.Security/FormsAuthenticationModule.cs: implemented event
	handlers for AuthenticateRequest and EndRequest.
	* System.Web.Security/FormsAuthenticationTicket.cs: implemented
	SetDates and Clone methods.

svn path=/trunk/mcs/; revision=9764
2002-12-19 05:26:58 +00:00
Gonzalo Paniagua Javier 4c82ee69ae 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: fixed bug #30076.
	* TimeZone.cs: provide the parameter name in a exception.

svn path=/trunk/mcs/; revision=9763
2002-12-19 05:16:32 +00:00
Gonzalo Paniagua Javier 6af1fe9bdf 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: generate code like 'control.XXX = value' also for
	public fields (properties were being handled in that way too).

svn path=/trunk/mcs/; revision=9762
2002-12-19 04:20:28 +00:00
Gonzalo Paniagua Javier c5f048f1c7 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* threads.c: fixed the build under cygwin.

svn path=/trunk/mono/; revision=9761
2002-12-19 02:26:39 +00:00
Gonzalo Paniagua Javier 8543293ad2 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* ConfigXmlDocument.cs: don't jump over the first element.
	* ConfigurationSettings.cs: pass doc.DocumentElement instead of doc.

	This used to work until i tried to access one attribute of the first
	element and realized that the element was not the expected!
	This change does not affect the configuration handlers that only use
	ChildNodes property on the XmlNode they get as argument.

svn path=/trunk/mcs/; revision=9760
2002-12-19 01:50:06 +00:00
César Natarén c7fa63baee Added file cs0201.cs
svn path=/trunk/mcs/; revision=9759
2002-12-19 01:46:52 +00:00
César Natarén 763b5774f2 Added test for error CS0201.
svn path=/trunk/mcs/; revision=9758
2002-12-19 01:35:45 +00:00
Ravi Pratap M 0cf7fde104 2002-12-18 Ravi Pratap <[email protected]>
* attribute.cs (Attributes.AddAttributeSection): Rename to this
	since it makes much more sense.

	(Attributes.ctor): Don't require a Location parameter.

	* rootcontext.cs (AddGlobalAttributeSection): Rename again.

	* attribute.cs (ApplyAttributes): Remove extra Location parameters
	since we already have that information per attribute.

	* everywhere : make appropriate changes.

	* class.cs (LabelParameters): Write the code which actually
	applies attributes to the return type. We can't do this on the MS
	.NET runtime so we flag a warning in the case an exception is
	thrown.

svn path=/trunk/mcs/; revision=9757
2002-12-19 00:44:23 +00:00
Ravi Pratap M e9e9fb22e2 Add test 176 to the usual suite. Wonder why it wasnt there.
svn path=/trunk/mcs/; revision=9756
2002-12-19 00:39:05 +00:00
Ravi Pratap M 488ca42f3e test-177 goes into NO_PASS for now
svn path=/trunk/mcs/; revision=9755
2002-12-19 00:36:07 +00:00
Ravi Pratap M e324c6452d 2002-12-18 Ravi Pratap <[email protected]>
* test-177.cs : Add. This doesn't pass yet because we don't have
	ReturnTypeCustomAttributes working.

svn path=/trunk/mcs/; revision=9754
2002-12-19 00:35:31 +00:00
Ravi Pratap M 01714dfb49 2002-12-18 Ravi Pratap <[email protected]>
* errors.txt : Update for error # -24.

svn path=/trunk/mcs/; revision=9753
2002-12-19 00:23:25 +00:00
Paolo Molaro a9a7df0439 Thu Dec 19 00:06:57 CET 2002 Paolo Molaro <[email protected]>
* AssemblyBuilder.cs: remove duplicated user string entries.

svn path=/trunk/mcs/; revision=9752
2002-12-18 23:09:09 +00:00
Ville Palo d5634eb360 2002-12-18 Ville Palo <[email protected]>
* DataSet.cs: Started to implement ReadXml-methods.

svn path=/trunk/mcs/; revision=9751
2002-12-18 19:48:44 +00:00
Miguel de Icaza c724358425 2002-12-18 Miguel de Icaza <[email protected]>
* const.cs: Handle implicit null conversions here too.

svn path=/trunk/mcs/; revision=9750
2002-12-18 19:32:36 +00:00
Gonzalo Paniagua Javier ce46a3e791 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* configure.in: moved struct tm field tm_gmtoff check before the check
	for timezone global variable. This makes Timezone work for me (debian
	sid, linux, x86, which has both the field and the global variables).

svn path=/trunk/mono/; revision=9749
2002-12-18 19:01:27 +00:00
Paolo Molaro 1c256c7686 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <[email protected]>
* reflection.c: handle nullref constants. Allocate keys for
	reflection handles with the GC.

svn path=/trunk/mono/; revision=9748
2002-12-18 17:46:17 +00:00
Jonathan Pryor 60d72a0f50 Switches (Boolean & Trace) should be working now. Behavior of user-provided
Switch derived classes should match that of .NET.

Go forth and use Swiches! ;-)

ChangeLog:
  * BooleanSwitch.cs: Complete re-write.  It works now.
  * DefaultTraceListener.cs:
    - Use `const' strings, so I don't worry about copy/paste errors
    - Give `AssertUiEnabled' an actual backing member
  * DiagnosticsConfigurationHandler.cs: To avoid race conditions, let the
    configuration handler set .config-specified properties on
    DefaultTraceListener (AssertUiEnabled, LogFileName) and TraceImpl
    (AutoFlush, IndentSize).
  * Switch.cs: Near complete re-write.  Actually works, and is (should be)
    comformant with .NET behavior.  Changed member names because they were
    confusing me.  (Yes, that doesn't say much about my memory.)
  * TextWriterTraceListener.cs: Append text to already existing files, don't
    overwrite them.
  * TraceImpl.cs:
    - Added private destructor, to ensure no instances are created.
    - Move members declarations to be closer to each other.
  * TraceSwitch.cs: Complete re-write.  It works now.

svn path=/trunk/mcs/; revision=9747
2002-12-18 16:01:09 +00:00
Paolo Molaro 920f482d9c Wed Dec 18 11:42:58 CET 2002 Paolo Molaro <[email protected]>
* jit.c: handle CEE_CONV_OVF_U8_UN like CEE_CONV_OVF_I8_UN.

svn path=/trunk/mono/; revision=9746
2002-12-18 10:45:15 +00:00
Paolo Molaro b6d7af01cf Wed Dec 18 11:36:04 CET 2002 Paolo Molaro <[email protected]>
jit.c: query the thread abort signal from the runtime.

svn path=/trunk/mono/; revision=9745
2002-12-18 10:38:17 +00:00
Paolo Molaro f4c02305c8 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <[email protected]>
* threads.c, threads.h: added mono_thread_get_abort_signal()
	to get a suitable signal for thread abort.

svn path=/trunk/mono/; revision=9744
2002-12-18 10:37:26 +00:00
Paolo Molaro a7888c627c Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <[email protected]>
* metadata.c: fix handling of ExportedType table.

svn path=/trunk/mono/; revision=9743
2002-12-18 10:28:25 +00:00
Gonzalo Paniagua Javier 3d1ea510c1 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: implemented GetAuthCookie, SetAuthCookie,
	SignOut, FormsCookieName and FormsCookiePath.

svn path=/trunk/mcs/; revision=9742
2002-12-18 03:28:02 +00:00
Dennis Hayes 868857b075 removed some 'extras'
svn path=/trunk/mcs/; revision=9741
2002-12-18 02:52:17 +00:00
Dennis Hayes fedcadcafd more menu implmentation
svn path=/trunk/mcs/; revision=9740
2002-12-18 02:30:02 +00:00
Dennis Hayes d9d9bb6675 updated menutest
svn path=/trunk/mcs/; revision=9739
2002-12-18 02:25:16 +00:00
Dennis Hayes 18ce6facb7 added new api function
svn path=/trunk/mcs/; revision=9738
2002-12-18 02:19:56 +00:00
Gonzalo Paniagua Javier 8e91ed0203 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: add the context as parameter
	when building the application Type.

	* System.Web/HttpCookie.cs: new internal constructor.
	* System.Web/HttpCookieCollection.cs: new internal method to make a
	cookie expire.

	* System.Web/HttpRequest.cs: MapPath fixes.
	* System.Web/HttpResponse.cs: implemented ApplyAppPathModifier.
	* System.Web/HttpRuntime.cs: fixed typo in AppDomainAppVirtualPath.
	* System.Web.Compilation/AspGenerator.cs: now it uses the current
	HttpContext when creating user controls. TemplateSourceDirectory is no
	longer a dummy value.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: set the context which
	will be used to locate the files.

	* System.Web.UI/BaseParser.cs: use MapPath and context to locate files.
	* System.Web.UI/Control.cs: implemented MapPathSecure.
	* System.Web.UI/TemplateControl.cs: use UrlUtils to generate the path.
	* System.Web.UI/TemplateControlParser.cs: use the context and MapPath.
	* System.Web.UI/UserControl.cs: implemented MapPath.
	* System.Web.UI/UserControlParser.cs: added context parameter to
	constructor.
	* System.Web.Util/PathUtil.cs: removed.
	* System.Web.Util/UrlUtils.cs: fixed Combine to handle '~'.

svn path=/trunk/mcs/; revision=9737
2002-12-18 02:17:17 +00:00
Ravi Pratap M 1c4362e658 2002-12-17 Ravi Pratap <[email protected]>
* class.cs (MethodCore.LabelParameters): Remove the extra
	Type [] parameter since it is completely unnecessary. Instead
	pass in the method's attributes so that we can extract
	the "return" attribute.

svn path=/trunk/mcs/; revision=9736
2002-12-17 23:36:20 +00:00
Jonathan Pryor 7187b5f041 Reformat to comply with Mono coding standards.
svn path=/trunk/mcs/; revision=9735
2002-12-17 22:10:50 +00:00
Jonathan Pryor e11681b16e Add <system.diagnostics/> to the available .config file sections.
svn path=/trunk/mono/; revision=9734
2002-12-17 21:50:54 +00:00
Jonathan Pryor b843881827 Implement DiagnosticsConfigurationHandler, so that .config files can contain
<system.diagnostics/> configuration sections.

svn path=/trunk/mcs/; revision=9733
2002-12-17 21:42:08 +00:00
Alejandro Sánchez Acosta a481294ce7 Added new mcs test error cs0154.cs
svn path=/trunk/mcs/; revision=9732
2002-12-17 17:51:26 +00:00
Alejandro Sánchez Acosta ed99b91dda new test sample
svn path=/trunk/mcs/; revision=9731
2002-12-17 17:40:08 +00:00
Alejandro Sánchez Acosta d7bda5dd8f new sample test error cs0138.cs
svn path=/trunk/mcs/; revision=9730
2002-12-17 17:38:41 +00:00
Ville Palo 6e4193fc42 2002-12-17 Ville Palo <[email protected]>
* region.xml:
	* store.xsd: new xmldoment and xmlschema for testing DataSet
	* DataSetTest.cs: Added some Xml-tests.
	* AllTests.cs: Added DataSetTest

svn path=/trunk/mcs/; revision=9729
2002-12-17 16:05:38 +00:00
Marco Ridoni c3572782b7 Properties implemented. Property paramters still don't work.
svn path=/trunk/mcs/; revision=9728
2002-12-17 13:24:41 +00:00
Marco Ridoni 5918028c17 Implemented an overloaded method for EmitTopBlock which is called by
MethodData.Emit and specifies the function name (needed to get the return
value)

svn path=/trunk/mcs/; revision=9727
2002-12-17 13:23:38 +00:00
Miguel de Icaza 8fb465e560 2002-12-17 Miguel de Icaza <[email protected]>
* cs-parser.jay (parse): Use Report.Error to flag errors instead
	of ignoring it and letting the compile continue.

	* typemanager.cs (ChangeType): use an extra argument to return an
	error condition instead of throwing an exception.

svn path=/trunk/mcs/; revision=9726
2002-12-17 09:12:07 +00:00
Gonzalo Paniagua Javier 9096fdf8c0 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* BaseValidator.cs: return an empty string in GetControlValidationValue
	when GetValue returned null.

	* CompareValidator.cs: fixed EvaluateIsValid.

	* RegularExpressionValidator.cs: fixed EvaluateIsValid.

svn path=/trunk/mcs/; revision=9725
2002-12-17 07:31:20 +00:00
Gonzalo Paniagua Javier 1cffa9bea3 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* Xml.cs: use MapPathSecure to get the path of the document.

svn path=/trunk/mcs/; revision=9724
2002-12-17 04:50:26 +00:00
Gonzalo Paniagua Javier b272797408 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: implemented MapPathSecure.
	* Page.cs: fixed Server property.

svn path=/trunk/mcs/; revision=9723
2002-12-17 04:47:08 +00:00
Gonzalo Paniagua Javier dcfad7ede7 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: implemented Authenticate, unencrypted Encrypt
	and Decrypt, HashPasswordForStoringInConfigFile and Initialize.

	* FormsAuthenticationTicket.cs: set cookiePath to the default when no
	other provided.

svn path=/trunk/mcs/; revision=9722
2002-12-17 04:44:49 +00:00
Gonzalo Paniagua Javier 48c0213c19 updated list file
svn path=/trunk/mcs/; revision=9721
2002-12-17 04:41:15 +00:00
Gonzalo Paniagua Javier 045bda5f2e 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* AuthConfig.cs:
	* AuthenticationConfigHandler.cs: handler and helper class for
	system.web/authentication configuration section.

	* HttpHandlersSectionHandler.cs: check for null in attributes.

	* MachineKeyConfig.cs:
	* MachineKeyConfigHandler.cs: handler and helper class for
	system.web/machineKey tag.

svn path=/trunk/mcs/; revision=9720
2002-12-17 04:40:13 +00:00
Nick Drochak 5aa72841ea forgot to add this from a while back
svn path=/trunk/mcs/; revision=9719
2002-12-17 04:34:38 +00:00
Gonzalo Paniagua Javier 98dad4b1be 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: hack to create a default user when there's no one.
	Implemented GetConfig (string).

	* HttpRequest.cs: fixes to MapPath (string).

svn path=/trunk/mcs/; revision=9718
2002-12-17 04:28:10 +00:00
Gonzalo Paniagua Javier 49c0d13a3f updated list file
svn path=/trunk/mcs/; revision=9717
2002-12-17 04:23:16 +00:00
Gonzalo Paniagua Javier 9c8a33be2e oops. Typo
svn path=/trunk/mono/; revision=9716
2002-12-17 04:20:48 +00:00
Gonzalo Paniagua Javier eddf7d74d8 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* DataSet.cs: implemented DefaultViewManager and GetList.

	* DataViewManager.cs: a bit of work on IList and ITypedList needed by
	DataList in System.Web.

	* DataViewManagerListItemTypeDescriptor.cs: custom type descriptor for
	DataViewManager.

svn path=/trunk/mcs/; revision=9715
2002-12-17 04:19:27 +00:00
Gonzalo Paniagua Javier a880449fbc 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* GenericIdentity.cs: check arguments and fixed IsAuthenticated.

svn path=/trunk/mcs/; revision=9714
2002-12-17 04:15:26 +00:00
Gonzalo Paniagua Javier d81e88dbbc new sections
svn path=/trunk/mono/; revision=9713
2002-12-17 04:13:43 +00:00
Sebastien Pouliot f73e4954e9 2002-12-16 Sebastien Pouliot <[email protected]>
* unix.args: added StrongName.cs, StrongNamePublicKeyBlob.cs
	and StrongNameIdentityPermission.cs files.

svn path=/trunk/mcs/; revision=9712
2002-12-17 04:03:36 +00:00
Sebastien Pouliot 92954a18d3 2002-12-16 Sebastien Pouliot <[email protected]>
* corlib_linux_test.args: added StrongNamePublicKeyBlob and
	StrongName test files.

svn path=/trunk/mcs/; revision=9711
2002-12-17 04:02:51 +00:00
Sebastien Pouliot 376a1a0908 2002-12-16 Sebastien Pouliot <[email protected]>
* AllTests.cs: Added test suites for StrongName.
	* StrongNameTest.cs: New. Test suite for StrongName (complete).

svn path=/trunk/mcs/; revision=9710
2002-12-17 04:02:11 +00:00
Sebastien Pouliot 3f705b0c1e 2002-12-16 Sebastien Pouliot <[email protected]>
* StrongName.cs: New. Implemented.

svn path=/trunk/mcs/; revision=9709
2002-12-17 04:01:11 +00:00
Sebastien Pouliot 6d4d947a18 2002-12-16 Sebastien Pouliot <[email protected]>
AllTests.cs: Added StrongNamePublicKeyBlobTest suite.
	StrongNamePublicKeyBlobTest.cs: New. Test suite for
	StrongNamePublicKeyBlob.

svn path=/trunk/mcs/; revision=9708
2002-12-17 03:59:26 +00:00
Sebastien Pouliot f9a5f1f8bb 2002-12-16 Sebastien Pouliot <[email protected]>
* StrongNamePublicKeyBlob.cs: New. Implemented.
	* StrongNameIdentityPermission.cs. New. Stubbed (required
	for StrongName class).

svn path=/trunk/mcs/; revision=9707
2002-12-17 03:58:11 +00:00
Ville Palo c815067fde 2002-12-16 Ville Palo <[email protected]>
* DataRow.cs
	* DataTable.cs: Fixed NullException (rollback -event)
	* DataSet.cs: WriteXml -method does not anymore write <?xml... row.

svn path=/trunk/mcs/; revision=9706
2002-12-16 18:50:22 +00:00
Ville Palo 53ea503c26 2002-12-16 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: some fixes.

svn path=/trunk/mcs/; revision=9705
2002-12-16 18:43:28 +00:00
Ville Palo 2366f340fd 2002-12-16 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Now rollback works. It means all
	types of transactions works, i guess ;)

svn path=/trunk/mcs/; revision=9704
2002-12-16 18:40:07 +00:00
Miguel de Icaza 5505a96205 Remove file
svn path=/trunk/mono/; revision=9703
2002-12-16 04:51:17 +00:00
Miguel de Icaza c1a1833e3b Add file in this directory
svn path=/trunk/mono/; revision=9702
2002-12-16 04:51:07 +00:00
Miguel de Icaza 9c32fb39a8 Flush
svn path=/trunk/mono/; revision=9701
2002-12-16 04:50:58 +00:00
Sebastien Pouliot a80cb630dd 2002-12-15 Sebastien Pouliot <[email protected]>
* unix.args: added PublisherIdentityPermission.cs,
	Publisher.cs and PublisherMembershipCondition.cs

svn path=/trunk/mcs/; revision=9699
2002-12-16 02:02:44 +00:00
Sebastien Pouliot ece54edd18 2002-12-15 Sebastien Pouliot <[email protected]>
* corlib_linux_test.args: added Publisher and
	PublisherMembershipCondition test files.

svn path=/trunk/mcs/; revision=9698
2002-12-16 02:01:49 +00:00
Sebastien Pouliot 35c33c2804 2002-12-15 Sebastien Pouliot <[email protected]>
* AllTests.cs: Added test suites for Publisher and
	PublisherMembershipCondition.
	* PublisherTest.cs: New. Test suite for Publisher (complete).
	* PublisherMembershipConditionTest.cs: New. Test suite for Publisher
	PublisherMembershipCondition (incomplete).

svn path=/trunk/mcs/; revision=9697
2002-12-16 02:00:52 +00:00
Sebastien Pouliot 389cd4bee6 2002-12-15 Sebastien Pouliot <[email protected]>
* Publisher.cs: New. Implemented.
	* PublisherMembershipCondition.cs: New. X509 related stuff implemented.

svn path=/trunk/mcs/; revision=9696
2002-12-16 01:59:35 +00:00
Sebastien Pouliot a80dd5cb26 2002-12-15 Sebastien Pouliot <[email protected]>
* PublisherIdentityPermission.cs. New. Stubbed (required
	for Publisher class).

svn path=/trunk/mcs/; revision=9695
2002-12-16 01:58:22 +00:00
Eduardo Garcia Cebollero 886f18c732 2002-12-16 Eduardo Garcia Cebollero <[email protected]>
* Directory.cs: Some fixes to SMB shares handling, and not compiling
	with csc, mcs compiles it correctly (mcs bug 35652)

svn path=/trunk/mcs/; revision=9694
2002-12-16 00:31:11 +00:00
Eduardo Garcia Cebollero ef43ef882a 2002-12-14 Eduardo Garcia Cebollero <[email protected]>
* Directory.cs: Some fixes related to correct some exceptions thrown

2002-12-11  Eduardo Garcia Cebollero <[email protected]>

	* Directory.cs: Some Exceptions added, fixed GetParent(),
	CreateDirectory() should work with unix, native windows and
	windows samba shares. Converted end-lines from dos-mode to unix-mode

2002-12-08  Eduardo Garcia Cebollero <[email protected]>

	* Directory.cs: CreateDirectory  works now with Absolute paths
	too, not only with relative ones.

svn path=/trunk/mcs/; revision=9693
2002-12-15 23:14:30 +00:00
Johannes Roith 63ef7bccd2 add mono basic compiler page
svn path=/trunk/mono/; revision=9692
2002-12-15 23:03:03 +00:00
Miguel de Icaza 4863ad2d71 Flush
svn path=/trunk/mono/; revision=9691
2002-12-15 22:13:00 +00:00
Miguel de Icaza 219c7642e5 Update
svn path=/trunk/mcs/; revision=9690
2002-12-15 22:03:47 +00:00
Miguel de Icaza b839d66b10 Flush
svn path=/trunk/mono/; revision=9689
2002-12-15 20:18:10 +00:00
Sebastien Pouliot 362af3afae 2002-12-15 Sebastien Pouliot <[email protected]>
* X509CertificateTest.cs: Uncommented the GetEffectiveDateString and
	GetExpirationDateString tests. Added a test for ToString(true).

svn path=/trunk/mcs/; revision=9688
2002-12-15 20:18:04 +00:00
Sebastien Pouliot caba817083 2002-12-15 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Fixed the date issue. MS implementation always
	return the local time for Pacific (GMT-8). Added ToString() and changed
	some protected to private to please corcompare.

svn path=/trunk/mcs/; revision=9687
2002-12-15 20:16:44 +00:00
Gonzalo Paniagua Javier 6ff6f22bc2 added ErrorLevel.cs
svn path=/trunk/mcs/; revision=9686
2002-12-15 19:09:49 +00:00
Jackson Harper 33ac496fc8 Moved ErrorLevel enum into its own file
svn path=/trunk/mcs/; revision=9685
2002-12-15 18:02:23 +00:00
Alp Toker ebebc496df 2002-12-15 Alp Toker <[email protected]>
* makefile.gnu: make sure mcs is in PATH, otherwise tell user to read
	INSTALL.txt

svn path=/trunk/mcs/; revision=9679
2002-12-15 16:38:48 +00:00
Nick Drochak a1f1e7e966 2002-12-15 Nick Drochak <[email protected]>
* nunit.build: Don't delete Transform.resources now, we don't generate
	it anymore.

svn path=/trunk/mcs/; revision=9674
2002-12-15 14:37:52 +00:00
Nick Drochak 3f6d1d848c 2002-12-15 Nick Drochak <[email protected]>
* Transform.resources: Add file.  This is technically a generated file,
	but it will never change for us since we get the sources from the nunit
	project anyway.

svn path=/trunk/mcs/; revision=9672
2002-12-15 14:18:48 +00:00
Gonzalo Paniagua Javier acb4421b8b 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationSettings.cs: removed type loading hack no longer needed.

svn path=/trunk/mcs/; revision=9668
2002-12-15 12:41:50 +00:00
Ville Palo 8050bf79b1 2002-12-15 Ville Palo <[email protected]>
* DataRow.cs:
	* DataRowCollection.cs: Moved event triggering from DataRow to
	DataRowCollection.

svn path=/trunk/mcs/; revision=9666
2002-12-15 10:32:32 +00:00
Miguel de Icaza e27296d935 Add new test
svn path=/trunk/mcs/; revision=9665
2002-12-15 08:49:32 +00:00
Jonathan Pryor 2891b0badc Allow configuration settings to be removed. Previously, if you tried to
remove a configuration setting, you'd get an exception saying that there was
no factory for it (i.e. it had already been removed).

svn path=/trunk/mcs/; revision=9664
2002-12-15 04:43:37 +00:00
Gonzalo Paniagua Javier 3b9e702ba9 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* DataBinder.cs: try the indexer if the property is not found in
	GetPropertyValue ().

svn path=/trunk/mcs/; revision=9663
2002-12-15 03:54:51 +00:00
Daniel Morgan 58d5c73846 2002-12-14 Daniel Morgan <[email protected]>
* Mono.Data.Tds.Protocol/Tds70.cs: single quotes in SQL string
	need to be escaped as two single quotes

svn path=/trunk/mcs/; revision=9662
2002-12-15 02:27:29 +00:00
Gonzalo Paniagua Javier 2a0582c8bf 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* DefaultTraceListener.cs: now OutputDebugStringW is called from an
	internal call (update your runtime!). No more warnings in linux.

svn path=/trunk/mcs/; revision=9661
2002-12-15 02:19:34 +00:00
Gonzalo Paniagua Javier 0a5f3a447e 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added WriteWindowsDebugString internal call.

svn path=/trunk/mono/; revision=9660
2002-12-15 02:17:59 +00:00
Gonzalo Paniagua Javier d63f33d197 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* reflection.h: added fields to match C# implementation.

svn path=/trunk/mono/; revision=9659
2002-12-15 02:11:45 +00:00
Daniel Morgan 093db10b18 2002-12-12 Daniel Morgan <[email protected]>
* makefile.gnu
	* win32.make: removed non-existent file from build

svn path=/trunk/mcs/; revision=9658
2002-12-15 01:01:25 +00:00
Daniel Morgan 0199cca9da 2002-12-12 Daniel Morgan <[email protected]>
* makefile.gnu: added file for linux build

	* win32.make: update file for windows build

	* DataGrid.cs: since SetColumnTypes has been fixed in GTK#,
	update its use here

	* sqlsharpgtk.cs: change Console.WriteLine()s to Error()s or
	get rid of the Console.WriteLine()s.  Created new menus Session
	and Command and move some menu items.  Implement new menu items
	File - New, Open, Save, and Save As

	* FileSelectionDialog.cs: added file
	to make it easier to use the FileSelection dialog

	* SqlEditorSharp.cs: added public methods
	LoadFromFile, SaveToFile, and Clear

svn path=/trunk/mcs/; revision=9657
2002-12-15 00:52:59 +00:00
Miguel de Icaza 452cfa4ca5 Flush
svn path=/trunk/mono/; revision=9649
2002-12-14 22:27:19 +00:00
Miguel de Icaza 68a9e6f96d Revert Directory.cs patch until its fixed
svn path=/trunk/mcs/; revision=9645
2002-12-14 19:40:15 +00:00
Ville Palo 78ef9ef5dc Fixed ms warning issue
svn path=/trunk/mcs/; revision=9643
2002-12-14 17:51:29 +00:00
Ville Palo 4ee28e267c 2002-12-14 Ville Palo [email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added three new tests

svn path=/trunk/mcs/; revision=9639
2002-12-14 17:14:37 +00:00
Ville Palo 2a37c57394 2002-12-14 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Adding row via XmlDataDocument to
	DataSet's datatable is now possible.

svn path=/trunk/mcs/; revision=9638
2002-12-14 17:11:20 +00:00
Gonzalo Paniagua Javier 97064f82ad 2002-12-14 Gonzalo Paniagua Javier <[email protected]>
* typemanager.cs: fixed cut & paste error in GetRemoveMethod.

svn path=/trunk/mcs/; revision=9637
2002-12-14 16:33:18 +00:00
Gonzalo Paniagua Javier 8d75eddbf5 2002-12-14 Gonzalo Paniagua Javier <[email protected]>
* icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.

svn path=/trunk/mono/; revision=9636
2002-12-14 15:58:28 +00:00
Jaime Anguiano Olarra 07ef78ce07 Fixing versions. Now all it's fine.
svn path=/trunk/mono/; revision=9626
2002-12-13 18:42:41 +00:00
Jaime Anguiano Olarra 9889b5435f Added a pair Q/A. Not much general things the past days.
svn path=/trunk/mono/; revision=9625
2002-12-13 18:21:36 +00:00
Marco Ridoni b26d6e1e11 Implemented For..Next..Step
Implemented Finally clause in Try..Catch

svn path=/trunk/mcs/; revision=9624
2002-12-13 16:30:44 +00:00
Gonzalo Paniagua Javier 31c202887f 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspGenerator.cs: added support for
	AutoEventWireup attribute in @Page and @Control.

	* System.Web.Compilation/CompilationResult.cs:
	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: store the options.

	* System.Web.UI/Control.cs: added AutoEventWireup internal property.

	* System.Web.UI/Page.cs: removed page events wire up from here.

	* System.Web.UI/TemplateControl.cs: new method WireupAutomaticEvents to
	hook up page and user controls events.

	* System.Web.UI/TemplateControlParser.cs: process the options that are
	applicable once we have the instance of the control.

	* System.Web.UI/TemplateParser.cs: also stores the options.

	* System.Web.UI/UserControl.cs: hook up events before initializing the
	control.

svn path=/trunk/mcs/; revision=9623
2002-12-13 15:57:07 +00:00
Gonzalo Paniagua Javier 4b38835edf 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* DecimalFormatter.cs: fixed bug #35560.

svn path=/trunk/mcs/; revision=9619
2002-12-13 10:05:51 +00:00
Gonzalo Paniagua Javier d7948ad01a 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* namespace.cs: fixed bug #35489.

svn path=/trunk/mcs/; revision=9618
2002-12-13 09:46:54 +00:00
Gonzalo Paniagua Javier 72df0c550b 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* DataList.cs: fixed header & footer.

svn path=/trunk/mcs/; revision=9617
2002-12-13 09:28:55 +00:00
Miguel de Icaza 85ed858a24 Sorry about this
svn path=/trunk/mcs/; revision=9616
2002-12-13 06:05:38 +00:00
Juli Mallett f05c761b71 2002-12-12 Juli Mallett <[email protected]>
* jit.c: If SIGRTMIN is not defined, fall back to SIGUSR1.

svn path=/trunk/mono/; revision=9613
2002-12-13 03:31:36 +00:00
Juli Mallett 78d1184ee5 2002-12-12 Juli Mallett <[email protected]>
* gc.h, gc-internal.h: Rename header for GC internal calls to
	gc-internal.h from gc.h as to not clash with Boehm GC having its
	header installed as <gc.h> in outside include paths.
	* appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
	* threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.

svn path=/trunk/mono/; revision=9612
2002-12-13 03:31:33 +00:00
Miguel de Icaza 38ade84160 2002-12-12 Miguel de Icaza <[email protected]>
* class.cs: Remove some dead code.

	* cs-parser.jay: Estimate the number of methods needed
	(RootContext.MethodCount);

	* cs-tokenizer.cs: Use char arrays for parsing identifiers and
	numbers instead of StringBuilders.

	* support.cs (PtrHashtable): Add constructor with initial size;
	We can now reduce reallocations of the method table.

svn path=/trunk/mcs/; revision=9611
2002-12-13 03:10:37 +00:00
Marco Ridoni 2f34bc1499 Statically declared events (i.e Sub MySub() Handles b1.Click) work (even
if they're probably buggy)
Try..Catch also works. Finally is in the grammat but still soes not work.

svn path=/trunk/mcs/; revision=9599
2002-12-12 23:29:46 +00:00
Gonzalo Paniagua Javier 06bb07d6d0 forgotten in last commit
svn path=/trunk/mcs/; revision=9595
2002-12-12 20:54:30 +00:00
Gonzalo Paniagua Javier 1fd7a5bbd1 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/Control.cs: new method to set bindingContainer value.
	* System.Web.UI/TemplateControl.cs: added controls are not binding
	containers.
	* System.Web.UI.WebControls/DataList.cs: for header and footer don't
	use data source. Instantiate in the DataListItem, not in the DataList.
	databind-template.aspx works now.

svn path=/trunk/mcs/; revision=9594
2002-12-12 20:45:43 +00:00
Ville Palo 31c994a6de Added -r System.Xml.dll
svn path=/trunk/mcs/; revision=9593
2002-12-12 20:42:18 +00:00
Gonzalo Paniagua Javier 76bf457206 forgot this one
svn path=/trunk/mcs/; revision=9592
2002-12-12 20:37:36 +00:00
Juli Mallett 8e85dddebb 2002-12-11 Juli Mallett <[email protected]>
* daemon.c, handles-private.h, handles.c, wapi-private.h:
	Check for an implementation which says it supports
	_POSIX_THREAD_PROCESS_SHARED, rather than just one that
	defines the symbol.  Defined but with a value of -1 still
	means that it is unsupported.

svn path=/trunk/mono/; revision=9591
2002-12-12 10:58:37 +00:00
Marco Ridoni bf76aa56e1 References to Microsoft.VisualBasic.* have been temporarily disabled
System.Drawing in driver.cs is referenced by default (just for now)
Added an extra define (EXTRA_DEFAULT_REFS) in driver.cs to allow default
  referencing of a bigger set of system assemblies. Off by default.

svn path=/trunk/mcs/; revision=9590
2002-12-12 10:53:01 +00:00
Marco Ridoni 4e9468ab1a Modified a check in AddConstructor (a VB.NET constructor is always named
'New')

svn path=/trunk/mcs/; revision=9589
2002-12-12 10:50:46 +00:00
Jackson Harper a4f95a85b1 Comment out UTF8... test (it does not exist)
svn path=/trunk/mcs/; revision=9588
2002-12-12 08:43:17 +00:00
Jackson Harper fc27d088b0 Partially implemented bugreport option, also only allow valid options now
svn path=/trunk/mcs/; revision=9587
2002-12-12 08:33:43 +00:00
Gonzalo Paniagua Javier 40f19f2cdf 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* Encoding.cs: g_get_encoding () returns "ASCII". In Default, when the
	encoding is not found, default to UTF8Unmarked. Removed comment in
	UnixConsoleEncoding, because it's now Default, which gets the
	encoding internally using g_get_encoding ().

svn path=/trunk/mcs/; revision=9584
2002-12-12 04:26:24 +00:00
Gonzalo Paniagua Javier 43d7f24f1c 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* list: Modified file.
	* System.Web/HttpRuntime.cs: avoid nulls and exception when getting
	resource format strings.

	* System.Web/StaticFileHandler.cs: added file name to error message.
	* System.Web.Compilation/AspElements.cs: new method Tag.GetElements
	used to parse the inner contents of a tag looking for data binding or
	code render tags.

	New property HtmlControlTag.ParseChildren allows
	differentiation of a couple of HtmlControls that has children as
	properties (namely HtmlTable and HtmlTableRow).

	* System.Web.Compilation/AspGenerator.cs: fixed container semantics to
	match BindingContainer one. Implemented Inherits attribute for page and
	control.

	Support HtmlControls that has ChildrenAsProperties.

	Generate code for data binding functions that matches the semantic of
	Container.

	Handle data bound and code render attribute values.

	Set proper value return for TemplateSourceDirectory. Should be relative
	to appPath.

	* System.Web.Compilation/BaseCompiler.cs: moved CompilerOptions and
	References handling here.

	* System.Web.Compilation/CachingCompiler.cs: copy result of compilation.

	* System.Web.Compilation/CompilationException.cs: simple ToString ()
	implementation.

	* System.Web.Compilation/CompilationResult.cs: implemented CopyFrom and
	ToString.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: removed
	CompilerOptions as it's now handled in the base class. Get all the
	types in the generated assembly and look for one that derives from
	the correct Type.

	* System.Web.UI/Control.cs: implemented TemplateSourceDirectory.
	* System.Web.UI/TemplateControl.cs: implemented LoadControl and
	LoadTemplate.

	* System.Web.Util/PathUtil.cs: some path handling methods that are not
	available in Path.

svn path=/trunk/mcs/; revision=9583
2002-12-12 03:20:19 +00:00
Gonzalo Paniagua Javier e09de1116e 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* icall.c: assign minor, build and revision in FillName.

svn path=/trunk/mono/; revision=9580
2002-12-12 01:03:06 +00:00
Miguel de Icaza 8e87f4f56f Add notes
svn path=/trunk/mcs/; revision=9579
2002-12-12 00:22:16 +00:00
Jaime Anguiano Olarra fc38d2816d System.Runtime.Remoting/RemotingConfiguration.cs added to the build.
svn path=/trunk/mcs/; revision=9577
2002-12-11 20:37:58 +00:00
Jaime Anguiano Olarra 71d6ccb2b7 System.Runtime.Remoting.RemotingConfiguration.cs added to the CVS.
svn path=/trunk/mcs/; revision=9576
2002-12-11 20:37:14 +00:00
Jeroen Janssen 93d3ee72e7 2002-12-11 Jeroen Janssen <[email protected]>
* enabled building Mono.Directory.LDAP and
	  System.Design in .build file

svn path=/trunk/mcs/; revision=9574
2002-12-11 18:46:42 +00:00
Jeroen Janssen 23d85fcce6 2002-12-11 Jeroen Janssen <[email protected]>
* removed set for RootDesignerSerializerAttribute.TypeId
	* fixed .build file to include reference to System.dll

svn path=/trunk/mcs/; revision=9573
2002-12-11 18:44:00 +00:00
Jaime Anguiano Olarra 411a88af6b Little fix
svn path=/trunk/mcs/; revision=9572
2002-12-11 18:33:01 +00:00
Jeroen Janssen ae076ef087 2002-12-11 Jeroen Janssen <[email protected]>
* add reference to corlib.dll in order to eliminate [MonoTODO] build error

svn path=/trunk/mcs/; revision=9571
2002-12-11 18:32:10 +00:00
Miguel de Icaza aff2d37425 Update
svn path=/trunk/mono/; revision=9569
2002-12-11 18:00:29 +00:00
Zoltan Varga 384690ac59 * FieldBuilder.cs: added 'handle' field which is needed by some new
code in reflection.c.

svn path=/trunk/mcs/; revision=9566
2002-12-11 17:29:23 +00:00
Zoltan Varga f345a60ef8 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
Added support for running code generated by Reflection.Emit.

svn path=/trunk/mono/; revision=9565
2002-12-11 17:27:56 +00:00
Marco Ridoni eee4f0aa5e A few cosmetic changes: error codes are now reported as BCxxxx instead of
CSxxxx

svn path=/trunk/mcs/; revision=9564
2002-12-11 15:34:47 +00:00
Ville Palo bd8a904eca 2002-12-11 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Implemented GetRowFromElement() and
	GetElementFromRowElement () -methods. Somefixed and little clean up.

svn path=/trunk/mcs/; revision=9563
2002-12-11 15:25:21 +00:00
Marco Ridoni 963b4479a8 A lot of changes: support for modules, classes, properties, delegates,
parameters passing, namespace import. Preliminary event support.

svn path=/trunk/mcs/; revision=9562
2002-12-11 15:09:05 +00:00
Marco Ridoni 08234aa2b8 Commented out a few lines to solve a problem in member access
svn path=/trunk/mcs/; revision=9561
2002-12-11 15:07:45 +00:00
Marco Ridoni b3d003c0b5 Slight changes to allow compiling under Mono/mcs
svn path=/trunk/mcs/; revision=9560
2002-12-11 15:06:50 +00:00
Marco Ridoni e3ec9e0570 A few test files for classes, modules, delegates, properties, etc. Some of
them require System.Window.Forms

svn path=/trunk/mcs/; revision=9559
2002-12-11 14:53:58 +00:00
Dick Porter afd1f8e068 Fixed some debug messages
svn path=/trunk/mono/; revision=9558
2002-12-11 12:48:05 +00:00
Ravi Pratap M d113def524 2002-12-10 Ravi Pratap <[email protected]>
* attribute.cs (ApplyAttributes): Keep track of the emitted
	attributes on a per-target basis. This fixes bug #35413.

svn path=/trunk/mcs/; revision=9557
2002-12-11 03:25:45 +00:00
Ravi Pratap M 424ef47428 2002-12-10 Ravi Pratap <[email protected]>
* test-102.cs : Improve to catch the case when an attribute
	can be emitted twice for the same program element but with
	different targets.

svn path=/trunk/mcs/; revision=9556
2002-12-11 03:19:24 +00:00
Gonzalo Paniagua Javier e4eba3b888 2002-12-11 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: check for NULL argument in LoadFrom.

svn path=/trunk/mono/; revision=9555
2002-12-11 02:02:32 +00:00
Miguel de Icaza 18377cc045 Add
svn path=/trunk/mcs/; revision=9554
2002-12-11 00:09:18 +00:00
Miguel de Icaza 2cfc9fd1a6 2002-12-10 Miguel de Icaza <[email protected]>
* driver.cs (MainDriver): On rotor encoding 28591 does not exist,
	default to the Windows 1252 encoding.

	(UnixParseOption): Support version, thanks to Alp for the missing
	pointer.

	* AssemblyInfo.cs: Add nice assembly information.

	* cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
	(bug 35169).

	* cs-parser.jay: Allow a trailing comma before the close bracked
	in the attribute_section production.

svn path=/trunk/mcs/; revision=9553
2002-12-10 23:54:06 +00:00
Miguel de Icaza 056d6258c8 Improve test
svn path=/trunk/mcs/; revision=9552
2002-12-10 23:47:42 +00:00
Miguel de Icaza b057401f91 2002-12-10 Miguel de Icaza <[email protected]>
* cs-parser.jay: Allow a trailing comma before the close bracked
	in the attribute_section production.

svn path=/trunk/mcs/; revision=9551
2002-12-10 23:16:47 +00:00
Daniel Morgan c80e9ca5df 2002-12-10 Daniel Morgan <[email protected]>
* doc/oracle: added file which is
	a new web page oracle.html

	* doc/ado-net: clean up and add link
	to oracle.html

	* doc/web/commands
	* doc/web/makefile: added oracle.html

svn path=/trunk/mono/; revision=9549
2002-12-10 23:10:19 +00:00
Miguel de Icaza 8fa2cc52ba Reverted changes, they break the build with our setup.
svn path=/trunk/mcs/; revision=9548
2002-12-10 23:02:59 +00:00
Miguel de Icaza dc2bd0825c Small fixes
svn path=/trunk/mcs/; revision=9547
2002-12-10 22:40:15 +00:00
Miguel de Icaza ebe5f0fecd Simple fix
svn path=/trunk/mcs/; revision=9546
2002-12-10 22:37:29 +00:00
Miguel de Icaza 685f14f961 Improve test
svn path=/trunk/mcs/; revision=9545
2002-12-10 22:34:40 +00:00
Miguel de Icaza 7d6c1a502b 2002-12-10 Miguel de Icaza <[email protected]>
* ecore.cs (FieldExpr.AddressOf): Until I figure out why the
	address of the instance was being taken, I will take this out,

svn path=/trunk/mcs/; revision=9544
2002-12-10 22:31:56 +00:00
Jeroen Janssen deafc750cf 2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file(s) to correctly contain required buildfile
	  attribute for nant

svn path=/trunk/mcs/; revision=9543
2002-12-10 22:08:36 +00:00
Jeroen Janssen a91a4d1e89 2002-12-10 Jeroen Janssen <[email protected]>
* added System.ServiceProcess.build file
	* added ChangeLog file

svn path=/trunk/mcs/; revision=9542
2002-12-10 21:59:33 +00:00
Jeroen Janssen 7f7df1e6e5 2002-12-10 Jeroen Janssen <[email protected]>
* added Mono.Directory.LDAP.build file

svn path=/trunk/mcs/; revision=9541
2002-12-10 21:54:53 +00:00
Jeroen Janssen 46564e3d34 2002-12-10 Jeroen Janssen <[email protected]>
* added ChangeLog
	* fixed MonoTodo compile errors with csc

svn path=/trunk/mcs/; revision=9540
2002-12-10 21:38:35 +00:00
Miguel de Icaza 8fb70a7097 Fix
svn path=/trunk/mcs/; revision=9539
2002-12-10 19:57:08 +00:00
Jaime Anguiano Olarra 5803915c37 The CallContext skeleton.
svn path=/trunk/mcs/; revision=9538
2002-12-10 18:58:33 +00:00
Jaime Anguiano Olarra 45714addb2 *** empty log message ***
svn path=/trunk/mcs/; revision=9537
2002-12-10 18:34:49 +00:00
Jonathan Pryor b42293fb4e Changelog: Update
TestTypes.cs: work around lack of [return:] attribute support in MCS.

svn path=/trunk/mcs/; revision=9536
2002-12-10 18:18:34 +00:00
Daniel Morgan e2f1bdeecf 2002-12-10 Daniel Morgan <[email protected]>
* man/Makefile.am: changed sqlsharpcli.1 to sqlsharp.1

	* man/sqlsharpcli.1: renamed to sqlsharp.1

svn path=/trunk/mono/; revision=9535
2002-12-10 18:15:26 +00:00
Gonzalo Paniagua Javier 8d29a839ff 2002-12-10 Gonzalo Paniagua Javier <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs:
	(Disconnect): close the stream and set connected to false.
	(NextResult): check if after DoneProc we have a ColumnMetadata + Row,
	which holds the values for the output parameters and read them.
	(LoadRow): add the values to outputParameters if DoneProc.
	When executing a stored procedure, we execute the procedure and then
	select the parameter values.

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs:
	(BuildParameters): check Parameters.

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs: added Close () to
	close the stream.

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionParameters.cs:
	initialize all the string to be empty.

	* System.Data/System.Data.SqlClient/SqlCommand.cs:
	(CloseReader): don't get the output parameters here.
	(GetOutputParameters): don't skip the stream. The parameters will be
	there.

	* System.Data/System.Data.SqlClient/SqlConnection.cs: don't try to
	execute 'sp_reset_connection'.

	* System.Data/System.Data.SqlClient/SqlDataReader.cs: get the output
	parameters after the end of the results.

svn path=/trunk/mcs/; revision=9534
2002-12-10 18:08:08 +00:00
Dick Porter 21374e28f0 2002-12-10 Dick Porter <[email protected]>
* Monitor.cs:
	* Thread.cs:
	* ThreadPool.cs:
	* Timer.cs:
	* WaitHandle.cs: Use TotalMilliseconds to convert a TimeSpan to
	ms, not Milliseconds.

svn path=/trunk/mcs/; revision=9533
2002-12-10 18:02:55 +00:00
Daniel Morgan 212f3d1ec3 2002-12-10 Daniel Morgan <[email protected]>
* makefile
	* tools/makefile
	* tools/makefile.gnu: change target
	from SqlSharpCli.exe
	to sqlsharp.exe

svn path=/trunk/mcs/; revision=9532
2002-12-10 17:26:24 +00:00
Ville Palo 60d500f43f 2002-12-10 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added new tests
	* System.Xml/region.xml: Changed XmlDocument.

svn path=/trunk/mcs/; revision=9531
2002-12-10 17:19:48 +00:00
Daniel Morgan 24a8b73609 2002-12-10 Daniel Morgan <[email protected]>
* Makefile
	* SqlSharpCli.build: change target
	from SqlSharpCli.exe
	to sqlsharp.exe

	* README: mention how to run SQL#

svn path=/trunk/mcs/; revision=9530
2002-12-10 17:05:42 +00:00
Alp Toker 5e047389dc 2002-12-10 Alp Toker <[email protected]>
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644
        * ilasm/makefile: ditto

svn path=/trunk/mcs/; revision=9529
2002-12-10 16:33:02 +00:00
Alp Toker ac80cad773 2002-12-10 Alp Toker <[email protected]>
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644

svn path=/trunk/mcs/; revision=9528
2002-12-10 16:20:56 +00:00
Dick Porter 385339b14e 2002-12-10 Dick Porter <[email protected]>
* threads.c: WaitHandle fixes from Tum <[email protected]>

svn path=/trunk/mono/; revision=9527
2002-12-10 12:33:46 +00:00
Dick Porter 17948dace8 Don't abort the build if any of the prebuilt assemblies can't be found
svn path=/trunk/mono/; revision=9526
2002-12-10 12:21:41 +00:00
Gaurav Vaish 127cb9906a 2002-09-16 Gaurav Vaish <[email protected]>
* System.Web.UI.Design             : Added directory.

svn path=/trunk/mcs/; revision=9525
2002-12-10 10:04:37 +00:00
Tim Haynes 1064dbd97c Implemented MONO_CFG_DIR environment variable to enable use of different machine.config files
svn path=/trunk/mono/; revision=9524
2002-12-10 09:48:29 +00:00
Gaurav Vaish ea80e51e0e 2002-12-10 Gaurav Vaish <[email protected]>
* AUTHORS: Corrected my email-ID.

svn path=/trunk/mcs/; revision=9516
2002-12-10 04:57:48 +00:00
Ravi Pratap M a949f0ec65 2002-12-09 Ravi Pratap <[email protected]>
* typemanager.cs (AreMultipleAllowed): Take care of the most
	obvious case where attribute type is not in the current assembly -
	stupid me ;-)

svn path=/trunk/mcs/; revision=9515
2002-12-10 04:51:09 +00:00
Dennis Hayes d825bb749c se last entry
svn path=/trunk/mcs/; revision=9514
2002-12-10 03:02:48 +00:00
Dennis Hayes e0fa4d24c4 see last entry
svn path=/trunk/mcs/; revision=9513
2002-12-10 03:02:24 +00:00
Dennis Hayes cb58b2b711 2002-12-9 DennisHayes <[email protected]>
* Form.cs
	* KeysConverter.cs
	* Label.cs
	* LinkArea.cs
	* LinkLabel.cs
	* ListBindingConverter.cs
	* ListBox.cs
	* ListControl.cs
	* ListView.cs
	* ListViewItem.cs
	* ListViewItemConverter.cs
	* MainMenu.cs
	* Menu.cs
	* MenuItem.cs
	* NativeWindow.cs
	* NumericUpDown.cs
	* OpacityConverter.cs
	* OSFeature.cs
	* PictureBox.cs
	* PrintControllerWithStatusDialog.cs
	* PrintDialog.cs
	* PrintPreviewControl.cs
	* PropertyManager.cs
	* RadioButton.cs
	* Screen.cs
	* ScrollableControl.cs
	* ScrollBar.cs
	* SendKeys.cs
	* SplitterEventArgs.cs
	* StatusBar.cs
	* SystemInformation.cs
	* TextBoxBase.cs
	* ToolBar.cs
	* TrackBar.cs
	* TreeNode.cs
	* TreeNodeCollection.cs
	* TreeNodeConverter.cs
	* TreeView.cs

	* cleanup, fixes, some implmentation

svn path=/trunk/mcs/; revision=9512
2002-12-10 03:01:29 +00:00
Miguel de Icaza 72c08f9073 Flushage
svn path=/trunk/mono/; revision=9511
2002-12-10 01:28:51 +00:00
Miguel de Icaza 11cfcaa8ed Flush
svn path=/trunk/mono/; revision=9510
2002-12-10 01:23:01 +00:00
Miguel de Icaza c41929b248 Flush
svn path=/trunk/mono/; revision=9509
2002-12-10 01:08:00 +00:00
Miguel de Icaza ae86534696 Update web site
svn path=/trunk/mono/; revision=9508
2002-12-09 23:40:34 +00:00
Jaime Anguiano Olarra 230d91760e Updates.
svn path=/trunk/mono/; revision=9503
2002-12-09 22:43:18 +00:00
Miguel de Icaza 8817b5ade4 Flush
svn path=/trunk/mono/; revision=9501
2002-12-09 22:06:54 +00:00
Miguel de Icaza 22eb65b8be update
svn path=/trunk/mono/; revision=9500
2002-12-09 21:49:46 +00:00
Daniel Morgan 1a5e1ba0a5 2002-12-09 Daniel Morgan <[email protected]>
* library.build: add Mono.GetOptions to windows build

	* Mono.GetOptions/Mono.GetOptions.build: add file
	for windows build

svn path=/trunk/mcs/; revision=9499
2002-12-09 21:08:15 +00:00
Jaime Anguiano Olarra f7739f9bf1 For the URL bar.
svn path=/trunk/mono/; revision=9498
2002-12-09 20:39:16 +00:00
Miguel de Icaza 961d3a1514 Update NEWS
svn path=/trunk/mono/; revision=9497
2002-12-09 20:27:13 +00:00
Miguel de Icaza 842499ec02 Update NEWS
svn path=/trunk/mono/; revision=9496
2002-12-09 20:21:30 +00:00
Miguel de Icaza fb4afb54ed Update NEWS
svn path=/trunk/mono/; revision=9495
2002-12-09 20:19:24 +00:00
Miguel de Icaza 7004cfd5d7 update
svn path=/trunk/mono/; revision=9494
2002-12-09 20:08:31 +00:00
Miguel de Icaza 1d8902f810 De-c-sharpicize
svn path=/trunk/mono/; revision=9492
2002-12-09 18:46:51 +00:00
Miguel de Icaza 917887781d Update mono.pc.in
svn path=/trunk/mono/; revision=9491
2002-12-09 18:45:59 +00:00
Gonzalo Paniagua Javier a99224334e 2002-12-09 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: fix buglet when building exe file name.  Handle full
	assembly name (needed after latest changes to AssemblyName).
	* image.c:
	(mono_image_close): free some hashtables.

svn path=/trunk/mono/; revision=9490
2002-12-09 18:36:09 +00:00
Miguel de Icaza c38c598032 Flush
svn path=/trunk/mono/; revision=9489
2002-12-09 18:32:06 +00:00
Miguel de Icaza 981ab84fe7 New release
svn path=/trunk/mono/; revision=9488
2002-12-09 18:22:48 +00:00
Miguel de Icaza edefecba3b Add code for bounds check elimination
svn path=/trunk/mono/; revision=9487
2002-12-09 18:02:02 +00:00
1812 changed files with 168550 additions and 64088 deletions

No files matched your search

+180
View File
@@ -1,3 +1,183 @@
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added default sessionState section and handler.
2003-02-17 Daniel Morgan <[email protected]>
* doc/provider-factory: add new web page
about Mono.Data's ProviderFactory
* doc/web/commands
* doc/web/makefile: add provider-factory web page to build
* doc/ado-net
* doc/ibmdb2
* doc/postgresql
* doc/sqlclient
* doc/tdsclient
* doc/sybase
* doc/mysql
* doc/firebird
* doc/oracle
* doc/oledb
* doc/odbc
* doc/sqlite: updated web pages
2003-02-16 Martin Baulig <[email protected]>
* doc/jit-debug-sample
* doc/jit-debug-sample2: Removed.
* doc/jit-debug: Updated.
2003-02-13 Daniel Morgan <[email protected]>
* doc/screenshots
* doc/ado-net
* doc/oracle
* doc/gtk-sharp: update web pages
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added sample globalization section.
2003-02-12 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added UrlAuthorizationModule and
AuthenticationConfigHandler.
2003-02-11 Tim Coleman <[email protected]>
* data/config.in: Add mapping for Oracle call interface
(OCI) native libraries.
2003-02-04 Gonzalo Paniagua Javier <[email protected]>
* configure.in: added check for sys/un.h.
2003-01-29 Daniel Morgan <[email protected]>
* doc/postgresql
* doc/mysql
* doc/ado-net: updates to web pages
* man/sqlsharp.1: update to man page
2003-01-28 Gonzalo Paniagua Javier <[email protected]>
* configure.in: added WIN32_THREADS flag when building under windows.
It seems that the header files of the gc do not always define it when
GC_WIN32_THREADS is defined.
2003-01-26 Daniel Morgan <[email protected]>
* doc/index
* doc/ado-net
* doc/firebird
* doc/ibmdb2
* doc/mysql
* doc/odbc
* doc/oledb
* doc/oracle
* doc/postgresql
* doc/sqlclient
* doc/sqlite
* doc/sybase
* doc/tdsclient: corrections
2003-01-26 Duncan Mak <[email protected]>
* doc/jit-debug: Update the links. Thanks for Andy Oliver for the report.
2003-01-22 Martin Baulig <[email protected]>
* configure.in: Set version number to 0.19.1.
Heads up: I'm going to commit some changes to the debugger
which'll require you to use this new runtime, so if you update the
debugger from CVS, you also need this new runtime.
2003-01-20 Duncan Mak <[email protected]>
* configure.in: Bump the release number to 0.19.
2003-01-19 Daniel Morgan <[email protected]>
* doc/ibmdb2: added file which is new web page
about IBM DB2 data provider at Mono.Data.DB2Client
* makefile
* commands: added ibmdb2 web page to go-mono web site
* doc/ado-net: added a couple more developers email, plus made the
email spam resistant, added Mono's DB2 data provider to list,
added more info about the ProviderFactory and retrieving data using
ADO.NET from ASP.NET, add notes about testing, misc cleanup
* doc/mysql
* doc/postgresql
* doc/sqlclient
* doc/oracle
* doc/tdsclient
* doc/firebird
* doc/oledb
* doc/odbc
* doc/sybase
* doc/sqlite: added testing notes and C# examples
* doc/gtk-sharp: added links for GTK# for Windows
* man/sqlsharp.1: added providers Npgsql and MySQLNet
2003-01-17 Duncan Mak <[email protected]>
* runtime/Makefile.am: Add the new Mono.Data.DB2Client.dll.
2003-01-16 Martin Baulig <[email protected]>
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Removed the gthread
check again, we're now using the mono/io-layer for this.
Wed Jan 15 16:20:54 CET 2003 Paolo Molaro <[email protected]>
* configure.in: allow MacOSX (from various people).
2003-01-14 Martin Baulig <[email protected]>
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Added check for gthread.
2002-12-27 Jeroen Janssen <[email protected]>
* fixed url for System.Windows.Forms in the class status
2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* configure.in: moved struct tm field tm_gmtoff check before the check
for timezone global variable. This makes Timezone work for me (debian
sid, linux, x86, which has both the field and the global variables).
2002-12-10 Daniel Morgan <[email protected]>
* doc/oracle: added file which is
a new web page oracle.html
* doc/ado-net: clean up and add link
to oracle.html
* doc/web/commands
* doc/web/makefile: added oracle.html
2002-12-10 Daniel Morgan <[email protected]>
* man/Makefile.am: changed sqlsharpcli.1 to sqlsharp.1
* man/sqlsharpcli.1: renamed to sqlsharp.1
2002-12-09 Tim Haynes <[email protected]>
* mono/jit/jit.c
* mono/metadata/icall.c: added mono_install_get_config_dir() to
utilize the MONO_CFG_DIR environment variable for specifying
different machine.configs.
2002-12-06 Duncan Mak <[email protected]>
* data/Makefile.am (EXTRA_DIST): Add machine.config
+774
View File
@@ -1,3 +1,777 @@
Hello everyone!
We are releasing a new version of Mono, Mono 0.22. A new release
is made today because of the few recent bug-fixes that were committed
to CVS.
Source code and binaries for this release can be found on the
web page,
http://www.go-mono.com/download.html
The URLs for the sources are:
* MCS package (the Class Libraries, C# and VB.NET compiler
and other assorted tools written in Managed code):
http://www.go-mono.com/archive/mcs-0.22.tar.gz
* Mono package (the Runtime engine and JIT compiler):
http://www.go-mono.com/archive/mono-0.22.tar.gz
RPM packages for this release can be downloaded from the web-page
as well as from the 'Mono' channel on Red Carpet. Debian packages will
appear on the download page later, as well as an installer for our
Windows users.
Since last Thursday, 320 commits have been made to our CVS
repository. These following hackers contributed to Mono since version
0.21:
Aleksey Demakov, Alexandre Pigolkine, Atsushi Enomoto, Elan
Feingeld, Dick Porter, Dietmar Maurer, Duncan Mak, Gonzalo
Paniagua, Ian MacLean, Jackson Harper, Jean-Marc Andre, Jerome
Laban, Lluis Sanchez, Martin Baulig, Miguel de Icaza, Nick
Drochak, Paolo Molaro, Pedro Martinez, Per Ameng, Peter Williams,
Rafael Teixeira, Reggie Burnett, Sebastien Pouliot, Tim Coleman
and Zoltan Varga.
Highlights:
* The "MemoryStream" bug.
This bug affected a lot of classes, and made them crashy,
database code, XML parsing and a few others were
crashing. Thanks to Gonzalo for fixing this bug.
* System.Data:
More bug fixes from Aleksey and Tim.
* Reflection:
Zoltan continues to provide fixes to our Reflection.Emit code
to host IKVM.
* Remoting:
Lluis added support for activation using activation
attributes.
* PEToolkit:
Jackson imported the PEAPI package from the Queensland
University of Technology in Australia. This will replace the
existing Mono.PEToolkit for our ILasm back-end.
* Windows Forms:
More fixes from Reggie and Alexandre.
* System.Web.Mail:
Per has been working on this namespace. He announces recently
that all major parts of System.Web.Mail has now been implemented.
* System.Web.Mobile:
Gaurav continues to make progress here.
* Misc:
Ian MacLean contributed a /compile flag to monoresgen and
assorted bug-fixes and improvements from the rest of the team.
My name is Duncan Mak, and I just made my first Mono release.
-----------------------------------------------------------------------------
Hello everyone!
The Mono Team introduces the best Mono release so far we have
done. Thanks to everyone who contributed fixes, code, ideas, and bug
reports.
Mono 0.20 has been released, it is available at the usual location:
http://www.go-mono.com/download.html
This is a truly heroic release of Mono. Major architectural
chunks that were missing, or were miss-implemented have been fixed in
this release, and we are very proud of it. Please see the list of
features, because there is no short way of introducing just how good
this release is. A big thanks goes to Piers for setting up a
Tinderbox that monitors problems with the Mono CVS repository.
We released packages for SuSE 8.0, Mandrake 8.2, and various
Red Hat releases. It is also available from Red Carpet on the Mono
channel.
Source code for Mono, MCS, the Mono Debugger, XSP is available as
well from that web page. The sources are:
MCS package (Class Libraries, C# and VB.NET compiler and managed tools):
http://www.go-mono.com/archive/mcs-0.20.tar.gz
Mono package (Runtime engine, JIT compiler):
http://www.go-mono.com/archive/mono-0.20.tar.gz
XSP package (XSP test web server for ASP.NET webforms):
http://www.go-mono.com/archive/xsp-0.3.tar.gz
This release is brought to you by: Alvaro del Castillo, Alan Tam,
Alp Toker, Alejandro Sánchez, Alexandre Pigolkin, Atsushi Enomoto,
Brian Ritchie, Christopher Bockner, Daniel Lopez, Daniel Morgan,
Dennis Hayes, Dick Porter, Dietmar Maurer, Duncan Mak, Gaurav Vaish,
Gonzalo Paniagua, Jackson Harper, Jaime Anguiano, Jeff Stedfast,
Johannes Roith, John Sohn, Jonathan Pryor, "Lee Mallabone, "Lluis
Sanchez, "Marco Ridoni, Mark Crichton, Martin Baulig, Martin Willemoes
Hansen, Miguel de Icaza, Mike Kestner, Nick Drochak, Paolo Molaro,
Patrik Torstensson, Pedro Martinez, Per Arneng, Peter Williams, Petr
Danecek, Piers Haken, Radek Doulik, Rafael Teixeira, Rodrigo Moya,
Sebastien Pouliot, Tim Coleman, Ville Palo, and Zoltan Varga.
They commited 1810 changes to CVS patches in the past 33 days.
* New in this release
* Zoltan and IKVM
Zoltan's patches to run Jeroen's IKVM (the Java VM that
translates JVM bytecodes into .NET bytecodes) are in.
* Remoting.
The remoting team's patches that were held off on the previous
release are here. Lluis and Patrik have done a fantastic job
in getting remoting to work. Many low-level runtime engine
changes, and plenty of work on the class-library stuff.
Lluis has posted a couple of sample applications to the
mailing list, you can try those out.
The new release includes a working BinaryFormatter and
BinaryFormatterSink. It means that together with TcpChannel
it is possible to make remote calls with any type of
parameters and return values, including value types,
MarshalByRefObject types (that are properly
marshalled/unmarshalled), delegates, enums, etc.
RemotingConfiguration is partially implemented. It cannot read
from config files, but manual configuration using the api is
fully working.
Implemented full support for client activated types and for
well known objects (both singleton and single call).
Lease manager fully working (it manages the lifetime of server
objects).
Implemented interception of the new operator, so it is
possible to create a remote object using "new", if the type is
properly registered in RemotingConfiguration.
In Lluis' words: `Basically, 0.20 will have almost all needed
for a distributed application with Remoting'
* New threading semantics, IO-layer
Dick Porter in a couple of weeks has heroically redone much of
the threading support to match the .NET behavior (details are
on the .NET threading book as posted on the Mono site).
He also did a lot of bug fixes in the IO/threading space. The
threading implementation now contains a new and faster Monitor
implementation, as well as a correct Pulse()/Wait()
implementation.
GC thread finalization has been re-enabled. This means that
finalizers will be ran on a separate thread, as done in the
Microsoft.NET Framework. This might expose some bugs on
existing finalizer code.
* Moved to NUnit2
Nick and Gonzalo helped us move to the new NUnit2 platform for
all of our tests. A big applause goes to them.
* Cross Appdomain invocations work now.
ASP.NET and NUnit2 both used cross appdomain invocations, we
have fixed a number of problems, and they are now functional.
The AppDomain fixes and the Remoting fixes have allowed us to
remove a number of hacks in the ASP.NET implementation that
were previously there.
Implemented CrossAppDomainChannel, for calls between domains.
* C# Compiler and Debugging.
When generating debugging information in the compiler (with
-debug, -g or -debug+) the compiler will embed the debugging
information into the resulting executable instead of
generating a separate file. Very nice.
Generating debugging information has also improved vastly
performance-wise, and now it is possible to always use
debugging builds for software development.
A number of bugs were fixed on the compiler as well and
by using the Mono profiler we have reduced the memory
consumption and accelerated the compiler.
Thanks to Jackson, Martin, Paolo and for helping here.
* VB.NET Compiler.
Plenty of new features are included in the compiler in our
path to conformance. See <FIXME:get-url-for-posting> for
details on the status of the compiler, and the pieces missing.
* ILasm and Mono.PEToolkit.
Work on the IL assembler has resumed, but it is not yet ready
for production use. The Mono IL Assembler uses the
Mono.PEToolkit library done by Sergey and Jackson to
manipulate CIL image files.
* Cryptographic work.
Sebastien has provided a cert2spc and secutil tools for
certificate management. This is the first release that ships
an assembly for System.Security
Also a new internal assembly used only on Windows allows Mono
users to use the unmanaged crypto providers.
* System.XML
Atsushi has continued to improve the work on our XML
implementation: fixing bugs and more closely matching the
Microsoft implementation.
* More PowerPC/Alpha support.
Taylor Christopher has contributed more code generation macros
for PPC and Laramie Leavitt for Alpha.
* System.XML.Xsl
Gonzalo continued the implementation of our XSLT transformation
API (custom .NET functions are still missing though). It no
longer uses temporary files to apply transformations. Thanks
to an idea from Zdravko Tashev. Xslt Web controls work as
part of this fix.
* ASP.NET
Gonzalo has cleaned up a lot the code base, and now our test
server supports a --root and --virtual command line options
for better control.
Also, now we generate a much nicer error page on errors. We
are looking for volunteers to improve the default look of this
page.
Authentication is now supported
* Mobile Controls.
Gaurav Vaish continues on his quest to complete the
implementation of the Mobile controls. These controls are
required to run a stock IBuySpy application.
* Class Libraries:
New Mono.Posix class library that contains classes for working
on a Posix systems. Things like Unix domain sockets are here.
* System.Windows.Forms
Alexandre Pigolkine continues to contribute more code to our
Windows.Forms implementation. Currently it only runs on
Windows (or in Linux without GC enabled, due to the
pthread/Wine threading library mismatch. This is being
actively addressed as part of the Wine work due to the
movement to the new thread implementation available in RH 8.1).
* Database providers
Christopher Bockner has updated his DB2 database provider (now
with prepared statement functionality) and Tim Coleman has
continued work on the Oracle database provider (welcome back
Tim!)
* Database code.
Dan Morgan continues to develop core components in System.Data
(and now we welcome Alan Tam to the System.Data core hackers)
The SQL# tool now supports MySQLNet, Npgsql, DB2Client, and
Oracle clients.
* Runtime
mono --profile now performs memory allocation profiling too.
* Runtime fixes.
We now support multi-module with external file reference
assemblies.
The above in English means that we can now run Eiffel.NET code
in Mono.
* Monograph:
More statistics supported now.
* System.Web.Mail
Per has contributed the code for this namespace.
* Bugs
Plenty of bugs were closed.
-------------------------------------------------------------------------
Hello everyone!
We have made a new release of Mono available. Despite the fact
that we just did Mono 0.18, this release is packed with new features.
* Availability.
Mono 0.19 is available in package format from:
http://www.go-mono.com/download.html
We released packages for SuSE 8.0, Mandrake 8.2, Debian and various
Red Hat releases. It is also available from Red Carpet on the Mono
channel.
Source code for Mono, MCS, the Mono Debugger, XSP is available as
well from that web page.
* New in this release
* Remoting news:
Lluis has implemented and documented the Binary formatter
Woohoo! He has done a lot of work as well to support
remoting.
Patrik has also been working heavily on fixing a
number of remoting related bugs and missing features.
Ajay also implemented 1-d array serialization in System.Xml
* New database provider: IBM DB2
Christopher Bockner has contributed a DB2 data
provider for System.Data. We have a very complete
range of data providers.
* System.Web.Mobile
Gaurav has started work on this assembly, this will
allow us to run the unmodified reference ASP.NET
applications that were designed to support Mobile
browsing.
* System.Data and System.XML:
More implementation work on XmlDataDocument from Ville
and plenty of fixes from Atsushi.
* MacOS patches:
Paolo integrated John Duncan's and Benjamin Reed
patches to make Mono run on MacOS X out of the box.
* IsolatedStorage
The initial implementation of it was done by Jonathan
Pryor and included in this release.
* Compilers:
More work on the Mono Visual Basic compiler (it is now
included in the packages).
Plenty of bug fixes from Jackson, Miguel to the C#
compiler.
Patches from Francesco and Daniel to the VB.NET
support runtime.
* Debugger support
Plenty of updates to run the new Mono Debugger from Martin.
* Main missing bits:
Some of everyone's favorite patches or code chunks have not yet
been integrated, hopefully Mono 0.20 will have them:
* Zoltan's patch to run IKVM is not yet on this release
* Some parts of Patrik's remoting code did not make it to the
release either.
* Reggie's MySQL native provider is also missing.
Enjoy!
Miguel.
-------------------------------------------------------------------------
Hello everyone!
We have made a new release of Mono available. Despite the fact
that we just did Mono 0.18, this release is packed with new features.
* Availability.
Mono 0.19 is available in package format from:
http://www.go-mono.com/download.html
We released packages for SuSE 8.0, Mandrake 8.2, Debian and various
Red Hat releases. It is also available from Red Carpet on the Mono
channel.
Source code for Mono, MCS, the Mono Debugger, XSP is available as
well from that web page.
* New in this release
* Remoting news:
Lluis has implemented and documented the Binary formatter
Woohoo! He has done a lot of work as well to support
remoting.
Patrik has also been working heavily on fixing a
number of remoting related bugs and missing features.
Ajay also implemented 1-d array serialization in System.Xml
* New database provider: IBM DB2
Christopher Bockner has contributed a DB2 data
provider for System.Data. We have a very complete
range of data providers.
* System.Web.Mobile
Gaurav has started work on this assembly, this will
allow us to run the unmodified reference ASP.NET
applications that were designed to support Mobile
browsing.
* System.Data and System.XML:
More implementation work on XmlDataDocument from Ville
and plenty of fixes from Atsushi.
* MacOS patches:
Paolo integrated John Duncan's and Benjamin Reed
patches to make Mono run on MacOS X out of the box.
* IsolatedStorage
The initial implementation of it was done by Jonathan
Pryor and included in this release.
* Compilers:
More work on the Mono Visual Basic compiler (it is now
included in the packages).
Plenty of bug fixes from Jackson, Miguel to the C#
compiler.
Patches from Francesco and Daniel to the VB.NET
support runtime.
* Debugger support
Plenty of updates to run the new Mono Debugger from Martin.
* Main missing bits:
Some of everyone's favorite patches or code chunks have not yet
been integrated, hopefully Mono 0.20 will have them:
* Zoltan's patch to run IKVM is not yet on this release
* Some parts of Patrik's remoting code did not make it to the
release either.
* Reggie's MySQL native provider is also missing.
Enjoy!
Miguel.
------------------------------------------------------------------------------
Happy new year!
The Mono team is proud to release Mono 0.18, with plenty of bug
fixes and improvements. If you are a happy 0.17 user, this
release is a happiness extension release. Many bugs in the
runtime, class libraries and C# compiler have been fixed.
Also, our special envoy in Japan has reported that there is
some naming confussion about the naming of Mono, as can be
seen in the following documentary material:
Atsushi Enomoto shows the source of confussion:
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0702
Nick and Duncan echo it:
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0703
* Availability
Mono 0.18 packages and source code is available for download from:
http://www.go-mono.com/download.html
Those using Red Carpet on Linux can install Mono 0.18 from
the Mono channel. The packages have already been pushed for
you.
At release time we have packages for Red Hat 8.0, 7.3,
7.2 and 7.1 and Mandrake 8.2.
* Contributors to this release
This release is brought to you by:
Alejandro Sanchez, Alp Toker, Atsushi Enomoto, Cesar Octavio
Lopez Netaren, Daniel Lopez (mod_mono), Daniel Morgan, Dennis
Hayes, Dick Porter, Dietmar Maurer, Duncan Mak, Eduardo
Garcia, Gaurav Vaish, Gonzalo Paniagua, Jackson Harper, Jaime
Anguiano, Jeroen Janssen, Johannes Roith, Jonathan Pryor, Juli
Mallett, Lluis Sanchez, Marco Ridoni, Martin Baulig, Miguel de
Icaza, Nick Drochak, Paolo Molaro, Patrik Torstensson, Piers
Haken, Rachel Hestilow, Rafael Teixeira, Ravi Pratap,
Sebastian Pouliot, Tim Coleman, Tim Hayes, Ville Palo, Zoltan
Varga.
* New in this release
VB.NET compiler:
Many improvements to the Mono VB.NET compiler.
ASP.NET:
Plenty of bug fixes in ASP.NET. Larger applications
can now be run with it. The authentication system has
been deployed, most changes are from Gonzalo.
We have a modified IBuySpy running (without Xslt)
If you want to run ASP.NET you can run it with either
our XSP proof-of-concept server, or with Daniel's
Apache module that can be fetched from CVS (module
name: mod_apache)
Type Reflector:
A Console, Gtk# and Windows.Forms tool to browse
compiled assemblies and examine the types on it, from
Jonathan Pryor.
Moving to NUnit 2.0
Nick continues the work on moving our test suite to NUnit 2.0
Mobile.Controls:
Gaurav has started work on the Mobile controls, which
are required to run some of the reference applications
in full-mode like IBuySpy.
Remoting:
The remoting infrastructure has got a big boost from
Lluis in this release.
System.Data/XML
Ville has been working on improving our System.Data
classes in the XML assembly.
Crypto:
Plenty of new crypto from Sebastien as well. A new
web page in our site can be used to track this.
http://www.go-mono.com/crypto.html
----------------------------------------------------------------------
Hello!
Version 0.17 of Mono has been released.
There are plenty of new features, bug fixes, new classes,
performance improvements, optimizations and much more
available in this release.
* Stats
2605 cvs commits to the Mono repository since October 1st, an
average of 37 commits per day including weekends.
212 commits to the Mono module.
1438 commits to the MCS module.
* Mono Improvements:
Work has begun to make the runtime run a finalizer thread and
invoke all the finalizers from this thread. This is the same
behavior as Java and the Microsoft runtime, but it is disabled
on this build.
Integrated the s390 work from Neale Ferguson.
Beginning of the work for pre-compiling code (Ahead of time
compilation) for Mono (based on the early work of Zoltan).
New option `--noboundscheck' for benchmark purposes, it
disables array bound checks.
Uses mmap instead of SysV shared memory for the Windows API
emulation layer.
Plenty of bug fixes, improvements and integration with the
upper layer class libraries.
New exception handling code uses the GCC native support for
stack-walking if available and gives big performance boost
(15% on mcs bootstrap).
A lot of the work in the new release of Mono is required for
the Mono Debugger (which will be released separately). The
Mono debugger is interesting, because it can debug both
managed and unmanaged applications, but it only supports the
JITer for debugging.
Dick, Dietmar, Gonzalo, Martin and Paolo were in charge of
most of these changes.
* Compiler improvements:
Many bug fixes as usual, better C# compliancy.
Performance improvements. The new release of the Mono C#
compiler is 37% faster than the previous version (self-compile
is down to 8 seconds). On my P4 1.8Ghz machine, the Mono C#
compiler compiles (342,000 lines per minute).
Thanks to go Ravi and Martin for helping out with the bug
fixing hunt.
* Cryptography and Security classes
Sebastien Pouliot and Andrew Birkett were extremely busy
during the past two months working on the cryptography
classes, many of the crypto providers are now working
Jackson on the other hand helped us with the security
classes, he said about those:
`Writing security classes is the most exciting thing I have
ever done, I can not wait to write more of them'.
* ASP.NET:
We have now moved the code from the XSP server (which was our
test bed for ASP.NET) into the right classes inside
System.Web, and now any web server that was built by using the
System.Web hosting interfaces can be used with Mono.
The sample XSP server still exists, but it is now just a
simple implementation of the WorkerRequest and ApplicationHost
classes and can be used to test drive ASP.NET. A big thanks
goes to Gonzalo who worked on this night and day (mostly
night).
Gaurav keeps helping us with the Web.Design classes, and
improving the existing web controls.
* ADO.NET:
New providers are available in this release. The relentless
System.Data team (Brian, Dan, Rodrigo, Tim and Ville) are
hacking non-stop on the databse code. Improving existing
providers, and new providers.
The new providers on this release:
* Oracle
* MS SQL
* ODBC
* Sybase
* Sqlite (for embedded use).
Many regression tests have been added as well (Ville has been
doing a great job here).
Brian also created a DB provider multiplexor (The ProviderFactory)
Stuart Caborn contributed Writing XML from a DataSet.
Luis Fernandez contributed constraint handling code.
Also there is new a Gtk# GUI tool from Dan that can be used to
try out various providers.
* System.XML:
Atsushi has taken the lead in fixing and plugging the missing
parts of the System.XML namespace, many fixes, many
improvements.
* CodeDom and the C# provider.
Jackson Harper has been helping us with the various interface
classes from the CodeDOM to the C# compiler, in this release
a new assembly joins us: Cscompmgd. It is a simple assembly,
and hence Microsoft decided not to waste an entire "System"
"dot" on it.
* Testing
Nick Drochak has integrated the new NUnit 2.0 system.
* Monograph:
Monograph now has a --stats option to get statistics on
assembly code.
CVS Contributors to this release:
Alejandro Sanchez, Alp Toker, Andrew Birkett, Atsushi Enomoto,
Brian Ritchie, Cesar Octavio Lopez Nataren, Chris Toshok,
Daniel Morgan, Daniel Stodden, Dennis Hayes, Dick Porter,
Diego Sevilla, Dietmar Maurer, Duncan Mak, Eduardo Garcia,
Ettore Perazzoli, Gaurav Vaish, Gonzalo Paniagua, Jackson
Harper, Jaime Anguiano, Johannes Roith, John Sohn, Jonathan
Pryor, Kristian Rietveld, Mads Pultz, Mark Crichton, Martin
Baulig, Martin Willemoes Hansen, Miguel de Icaza, Mike
Kestner, Nick Drochak, Nick Zigarovich, Paolo Molaro, Patrik
Torstensson, Phillip Pearson, Piers Haken, Rachel Hestilow,
Radek Doulik, Rafael Teixeira, Ravi Pratap, Rodrigo Moya,
Sebastien Pouliot, Tim Coleman, Tim Haynes, Ville Palo,
Vladimir Vukicevic, and Zoltan Varga.
(Am sorry, I could not track everyone from the ChangeLog
messages, I apologize in advance for the missing
contributors).
------------------------------------------------------------------------
Hello!
Version 0.16 of Mono has been released! This is mostly a bug
-1
View File
@@ -19,4 +19,3 @@
#undef MONO_SIZEOF_SUNPATH
#undef NEED_LINK_UNLINK
#undef PTHREAD_POINTER_ID
#undef MONO_USE_EXC_TABLES
-51
View File
@@ -1,51 +0,0 @@
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
#undef HAVE_INET_PTON
#undef HAVE_INET_ATON
#undef HAVE_SOL_IP
#undef HAVE_SOL_TCP
#undef HAVE_IP_PKTINFO
#undef HAVE_STRUCT_IP_MREQN
#undef HAVE_PTHREAD
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
#undef PLATFORM_WIN32
#undef HAVE_NEW_ICONV
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
#undef HAVE_BOEHM_GC
/* The number of bytes in a void *. */
#undef SIZEOF_VOID_P
/* Define if you have the inet_aton function. */
#undef HAVE_INET_ATON
/* Define if you have the inet_pton function. */
#undef HAVE_INET_PTON
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
+44 -19
View File
@@ -1,9 +1,18 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.16)
AM_INIT_AUTOMAKE(mono, 0.23)
AM_MAINTAINER_MODE
#
# These are the flags that need to be stored in the mono.pc file for
# compiling code that will embed Mono
#
libmono_cflags=""
libmono_ldflags=""
AC_SUBST(libmono_cflags)
AC_SUBST(libmono_ldflags)
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
@@ -12,27 +21,41 @@ case "$host" in
AC_DEFINE(PLATFORM_WIN32)
CC="gcc -mno-cygwin"
HOST_CC="gcc"
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS"
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
libdl=
;;
*-*-*bsd*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
libmono_cflags="-D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
libmono_ldflags="-pthread"
AC_DEFINE(NEED_LINK_UNLINK)
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
;;
*-*-linux*)
platform_win32=no
AC_DEFINE(MONO_USE_EXC_TABLES)
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -fexceptions"
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
libmono_ldflags="-lpthread"
libdl="-ldl"
;;
*-*-solaris*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
AC_DEFINE(NEED_LINK_UNLINK)
libmono_cflags="-D_REENTRANT"
;;
*-*-darwin*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE"
libmono_cflags="-D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
libmono_ldflags="-pthread"
AC_DEFINE(NEED_LINK_UNLINK)
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
@@ -72,7 +95,7 @@ AC_HEADER_STDC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h)
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
# for mono/metadata/debug-symfile.c
AC_CHECK_HEADERS(elf.h)
@@ -369,24 +392,24 @@ if test x$platform_win32 = xno; then
dnl ********************************
dnl *** Checks for timezone stuff **
dnl ********************************
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
AC_TRY_COMPILE([
#include <time.h>
], [
timezone = 1;
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
AC_DEFINE(HAVE_TIMEZONE)
], [
struct tm tm;
tm.tm_gmtoff = 1;
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
if test $ac_cv_struct_tm_gmtoff = yes; then
AC_DEFINE(HAVE_TM_GMTOFF)
else
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
AC_TRY_COMPILE([
#include <time.h>
], [
struct tm tm;
tm.tm_gmtoff = 1;
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
if test $ac_cv_struct_tm_gmtoff = yes; then
AC_DEFINE(HAVE_TM_GMTOFF)
], [
timezone = 1;
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
AC_DEFINE(HAVE_TIMEZONE)
else
AC_ERROR(unable to find a way to determine timezone)
fi
@@ -478,7 +501,7 @@ i*86-*-*) TARGET=X86; arch_target=x86;;
sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
#m68k-*-linux*) TARGET=M68K;;
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv* | powerpc-*-darwin*) TARGET=POWERPC; arch_target=ppc;;
arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
s390-*-linux*) TARGET=S390; arch_target=s390; ACCESS_UNALIGNED="no";;
esac
@@ -508,6 +531,7 @@ AC_SUBST(LIBC)
AC_SUBST(arch_target)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_OUTPUT([
Makefile
@@ -526,6 +550,7 @@ mono/arch/ppc/Makefile
mono/arch/sparc/Makefile
mono/arch/s390/Makefile
mono/arch/arm/Makefile
mono/arch/alpha/Makefile
mono/interpreter/Makefile
mono/tests/Makefile
mono/benchmark/Makefile
+3 -1
View File
@@ -9,6 +9,8 @@
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0.so" />
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so" />
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so" />
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk-pixbuf-2.0.so" />
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so" />
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
<dllmap dll="oci" target="clntsh" />
</configuration>
+42 -8
View File
@@ -5,22 +5,53 @@
<configSections>
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System" />
<sectionGroup name="system.web">
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
<section name="httpHandlers"
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
<section name="httpModules"
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
<section name="machineKey"
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web" />
<section name="authentication"
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web" />
<section name="authorization"
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web" />
<section name="globalization"
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web" />
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionHandler, System.Web" />
</sectionGroup>
</configSections>
<system.web>
<httpHandlers>
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<!-- Sample globalization settings
<globalization requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1"
fileEncoding="iso-8859-1"
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
</system.web>
<appSettings>
@@ -28,5 +59,8 @@
<!--<remove key="a key defined higher in the hierarchy" /> -->
<!--<clear/> Removes all defined settings -->
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4" />
</system.diagnostics>
</configuration>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

+30
View File
@@ -15,3 +15,33 @@ To publish changes:
cd web
make push
############## Samples
If you want to add a new item in the left menu
you have to edit mono/doc/web/commands and add
the entry there.
For new files you can add something as:
level,entry,path_to_the_file,file.src
ex: 1,COBOL#,cobol.html,cobol.src
If you just want to add a link to the menu:
1,MyEntry,URL
ex: 1,About Linux,http://www.linux.org
To test the results under Linux:
1. Edit mono/doc/web/makefile
Delete all the references to class status
and the deploy/index.rss as well as the
mono.exe commands.
2. make
3. Open your browser and point to the
file:///(YOUR PATH HERE)mono/doc/web/deploy/index.html
+366 -198
View File
@@ -1,106 +1,323 @@
* ADO.NET
The coordinator for the ADO.NET implementation is
<a href="mailto:[email protected]">Rodrigo Moya</a>,
with the collaboration of:
<a href="mailto:[email protected]">Daniel Morgan</a>,
<a href="mailto:[email protected]">Tim Coleman</a>,
<a href="mailto:[email protected]">Brian Ritchie</a>, and
<a href="mailto:[email protected]">Vladimir Vukicevic</a>.
<p>Mono's ADO.NET Developers:
<table border=1>
<tr>
<td><b>Developer</b></td>
<td><b>Email</b></td>
<td><b>Contribution</b></td>
</tr>
<tr>
<td>Rodrigo Moya</td>
<td>rodrigo -AT-<br> ximian.comNOSPAM</td>
<td>ADO.NET coordinator,<br> OLE DB provider,<br> and tests</td>
</tr>
<tr>
<td>Daniel Morgan</td>
<td>danmorg -AT-<br> sc.rr.comNOSPAM</td>
<td>MySQL, PostgreSQL, <br>Oracle providers,<br> and tests</td>
</tr>
<tr>
<td>Tim Coleman</td>
<td>tim -AT- <br>timcoleman.comNOSPAM</td>
<td>Microsoft SQL Server, <br>Sybase, <br>TDS providers,<br> Oracle,
<br>and tests.<br>
He has
contributed <br>to other parts <br>of Mono too, <br>such as,
<br>EnterpriseServices,
XML, <br>and WebServices.</td>
</tr>
<tr>
<td>Brian Ritchie</td>
<td>brianlritchie -AT-<br> hotmail.comNOSPAM</td>
<td>ODBC provider <br>and the ProviderFactory <br>in Mono.Data</td>
</tr>
<tr>
<td>Vladimir Vukicevic</td>
<td>vladimir -AT-<br> pobox.comNOSPAM</td>
<td>SQL Lite provider. <br> He has contributed to GTK# <br>and mPhoto too.</td>
</tr>
<tr>
<td>Christopher Bockner</td>
<td>cleared -AT-<br> rogers.comNOSPAM</td>
<td>IBM DB2 Universal <br>Database provider</td>
</tr>
<tr>
<td>Ville Palo</td>
<td>vi64pa -AT-<br> koti.soon.fiNOSPAM</td>
<td>XML stuff <br>in System.Data <br>including DataSet <br>
and XmlDataDocument, <br>and tests</td>
</tr>
<tr>
<td>Gonzalo Paniagua Javier</td>
<td>gonzalo -AT-<br> ximian.comNOSPAM</td>
<td>Integration between <br>System.Web and <br>System.Data</td>
</tr>
<tr>
<td>Gaurav Vaish</td>
<td>gvaish -AT-<br> iitk.ac.inNOSPAM</td>
<td>Web controls</td>
</tr>
<tr>
<td>Phillip Jerkins</td>
<td>Phillip.Jerkins -AT-<br> morgankeegan.comNOSPAM</td>
<td>Named Instance support <br>in System.Data.SqlClient</td>
</tr>
</table>
** Bugs and Feature Requests
<ul>
<li>Bugs with Mono or any data provider in Mono should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have a Bugzilla user account, it is free
and easy to create
one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
<li>Any RFE (Request For Enhancement) for features missing or new functionality
should be entered as a bug in Bugzilla too</li>
* Action plan
</ul>
** ADO.NET Data Providers
<p>List of ADO.NET Data Providers working in Mono:
<ul>
<li><a href="http://www.go-mono.com/ibmdb2.html">IBM DB2 Universal Database</a></li>
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a></li>
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a></li>
<li><a href="http://www.go-mono.com/oracle.html">Oracle</a></li>
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a></li>
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a></li>
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a></li>
<li><a href="http://www.go-mono.com/sqlite.html">SQL Lite</a></li>
<li><a href="http://www.go-mono.com/sybase.html">Sybase</a></li>
<li><a href="http://www.go-mono.com/tdsclient.html">TDS Generic</a></li>
</ul>
<p>The current plan to implement ADO.NET is as follows:
<p>Providers which we do not have, but we would like to have. Currently,
some of these databases are supported via the ODBC or OLE DB providers.
<ul>
<li>Either create ADO.NET providers or modify pre-exiting ADO.NET providers to
work with Mono
<ul>
<li>Create ADO.NET Providers
<ul>
<li><a href="http://msdn.microsoft.com/library/en-us/dnsql2k/html/sqlxml_intromanagedclasses.asp?frame=true">Managed Classes for SqlXml</a> which is
a .NET data provider for retrieving XML data from a Microsoft SQL Server 2000 database. The System.Data.SqlClient provider
in Mono can be used as a starting point at mcs/class/System.Data/System.Data.SqlClient.</li>
<li><a href="http://www.hughes.com.au/">miniSQL</a></li>
<li><a href="http://www.sleepycat.com/">BerkeleyDB (Sleepycat)</a></li>
<li><a href="http://www.sapdb.org/">SapDB</a></li>
<li><a href="http://www-3.ibm.com/software/data/informix/">Informix</a></li>
<li><a href="http://msdn.microsoft.com/vfoxpro/">Foxpro</a></li>
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a></li>
<li>dbase or xbase type database files</li>
<li>Others are welcome</li>
</ul>
<p>External Projects that have created ADO.NET Providers that work on Mono:
<ul>
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a></li> is a
Firebird SQL Managed data provider. It can be used with Interbase databases too. It
is written in 100%C# and does not require a client library. Works on .NET and Mono.</a>
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> is a
PostgreSQL Managed data provider written
in 100% C#, does not require a client library, and works on .NET and Mono</li>
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a
MySQL Managed data provider written in 100% C#, does not
require a client library, and works on .NET and Mono</li>
</ul>
** Tools
<p>Some tools that can be used for ADO.NET and other technologies (ASP.NET, XML, etc).
<ul>
<li><b>SQL# CLI</b> - a SQL query tool with a command-line interface.
It can be used to enter and execute SQL statements or
execute a batch of SQL commands from a file. It can
be used to test connection strings, connect to various ADO.NET
providers, save output to text, html, or xml. It is a work-in-progress.
The SQL# CLI is distributed with the
Mono runtime and class libraries as an executable assembly sqlsharp.exe.
The source to SQL# CLI can be found in the mcs source at
mcs/tools/SqlSharp/SqlSharpCli.cs
</li>
<li><p><b>SQL# GUI - a graphical SQL query tool</b> allows a user
to enter SQL commands in a top panel which is a text editor. It
has a toolbar and menu for various tasks, such as, executing
SQL commands one-at-a-time or in a batch. The results would appear
in a bottom panel in a grid or could be saved to a file (xml, html, csv).
Also, the bottom panel would allow logging of SQL command executed.
Currently, there is a <a href="http://go-mono.com/images/sqlsharp.png">SQL# For GTK#</a> which
provides a GUI interface using the <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> toolkit. SQL# For GTK#
is a work-in-progress and can be found in the mcs source at
mcs/tools/SqlSharp/gui/gtk-sharp</li>
</ul>
<p>Tools we would like to have, but they have not been created yet:
<ul>
<li><b>XML Schema Definition tool</b> <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpconxmlschemadefinitiontoolxsdexe.asp">xsd.exe</a> needs
to be created. Maybe this TODO item should be at the System.XML web page instead.
<ul>
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a>
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a>
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a>
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a>
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a>
<li><a href="http://www.go-mono.com/sqlite.html">SQL Lite</a>
<li><a href="http://www.go-mono.com/sybase.html">Sybase</a>
<li><a href="http://www.go-mono.com/tdsclient.html">TDS Generic</a>
<li>Providers which we do not have, but we would like to have. Currently,
some of these databases are supported via the ODBC or OLEDB providers.
<ul>
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
<li>miniSQL
<li><a href="http://www.oracle.com/">Oracle</a> - could be done by creating C# bindings to OCI (Oracle C Call Level Interface)
<li>BerkeleyDB (Sleepycat)
<li><a href="http://www.sapdb.org/">SapDB</a>
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a>
<li>dbase or xbase type database files
<li>Others, of course, are welcomed...
</ul>
</ul>
<br>
<li>Modify Pre-existing ADO.NET Providers to work with Mono. This may
require fixing or implementing areas of Mono too.
<ul>
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a>
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> a PostgreSQL provider
written in 100% C#
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL provider written in C#
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager provider written in C#
</ul>
</ul>
<br>
<li>Create Tools for Configuration, Testing, and Entering SQL Queries
<ul>
<li><b>SQL# CLI - a command-line tool</b> to execute SQL commands,
test connection strings, and connect to various ADO.NET
providers in Mono. The SQL# CLI can be found in
mcs/tools/SqlSharp/SqlSharpCli.cs
It is written in C# and runs on Mono and .NET
<li><p><b>SQL# GUI - a GUI tool</b> to execute SQL commands.
Currently, there is SQL# For GTK# which
can be found at
mcs/tools/SqlSharp/gui/gtk-sharp. It has a SQL editor with
syntax hi lighting of SQL keywords
<li>This tool
would work like the xsd.exe tool included with
the .NET Framework. The Xsd.exe tools has the
following uses:
<ul>
<li><b>XDR to XSD</b> - used to generate an XML schema from an XDR (XML Data Reduced schema) file.
XDR was used by Microsoft prior to XSD becoming a W3C recommendation. So, this needs
to be supported for legacy reasons</li>
<li><b>XML to XSD</b> - used to generate an XML schema from an XML file</li>
<li><b>XSD to DataSet</b> - used to generate DataSet classes from an XSD schema file. The
DataSet classes created can then be used with XML data</li>
<li><b>XSD to Classes</b> - used to generate classes from an XSD schema file. The
classes created can be used with System.XML.Serialization.XMLSerializer
to read and write XML code that follows the schema</li>
<li><b>Classes to XSD</b> - used to generate an XML schema
from type(s) in a assembly file. The
XML schema created by the tool defines the XML format used
by System.XML.Serialization.XMLSerializer</li>
</ul>
<li>Xsd.exe is used to manipulate XML schemas that
follow the http://www.w3.org/XML/Schema">XML Schema Definition (XSD)</a> language
recommended by the <a href="http://w3.org/">World Wide Web Consortium (W3C)</a></li>
<li>How this tool could be created:
<ul>
<li>Write xsd.exe in C# and run on Mono</li>
<li>Make sure we have XML Schema support in System.Xml.Schema. Currently,
it is wrapped around libxlst</li>
<li>XML serialization support in System.Data classes</li>
<li>Create the TypedDataSetGenerator class in System.Data</li>
<li>Using CodeDOM or Reflection.Emit to create code</li>
<li>Make sure DataSet, XmlDataDocument, and related classes
are implemented fully</li>
</ul>
</li>
</li>
</ul>
</li>
<li><b>Application XML Configuration File Editor</b> - a tool
to create and edit an application configuration file, such as,
we have a .net application named Accouting.exe, the tool could edit
the application configuration file Accounting.exe.config so a user could
connect to the database used by the program. This tool has not
been created.</li>
<li><b>Configuration Command-Line and GUI Tools for ADO.NET</b>.
These tools have not been started. The tools would be written in
C# and run on Mono. The
configuration tool can be used to do the following:
<ul>
<li>bebased on the Application XML Configuration File Editor</li>
<li>setup DSNs for the ODBC and OLE-DB
providers and configurations for
their underlying libraries (unixODBC and libgda)
their underlying libraries (unixODBC and libgda)</li>
<li>setup configurations for the Mono.Data.ProviderFactory
that Brian Ritchie created
that Brian Ritchie created</li>
<li>setup native database client library configurations too, such as,
freetds.conf for Microsoft SQL Server and Sybase
freetds.conf for Microsoft SQL Server and Sybase</li>
</ul>
</ul>
</ul>
* Current Status
</li>
<p>Variouls ADO.NET Providers have been created: PostgreSQL, MySQL, Sybase, SQL Lite,
Microsoft SQL Server, OLE DB, ODBC, and TDS Generic. See their respective web page for
more information.
</ul>
** Extra Classes in Mono ADO.NET
<p>An ADO.NET <a href="http://www.go-mono.com/provider-factory.html">Provider Factory</a>
was created by Brian Ritchie. The
Provider Factory is a way to dynamically create
connections, commands, parameters, and data adapters based on configuration
information.
** Current Status
<p>Various ADO.NET Providers have been created at various stages of
development including:
Firebird/Interbase, IBM DB2 Universal Database, MySQL, ODBC, OLE DB, Oracle,
PostgreSQL, SQL Lite, Sybase, Microsoft SQL Server, and TDS Generic.
See their respective web page for more information.
<p><b>Data Relations</b> via DataRelation, DataRelationCollection, and
other classes have not been implemented
<p><b>Constraints</b> need lots of work
<p><b>XML Schema Definition tool</b> xsd.exe that is included
in the .NET Framework has not been created for Mono
<p><b>TypeDataSetGenerator</b> needs to be stubbed and implemented.
<p><b>DataSet, DataAdaptor, DataTable, DataRelation, DataRow, DataColumn,
DataColumnCollection, DataRowCollection, and others</b> need more work. There are
many classes that are just stubs and need to be implemented.
many classes that are just stubs and need to be implemented. Ville Palo has been
doing much testing here.
<p><b>XML support in System.Data</b> needs work. This involves working on
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
exists in a provider's class that implements IDbCommand, and others.
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
XML support in the ExecuteXmlReader() in a SqlCommand. Ville Palo has been
heavily modifying DataSet, XmlDataDocument, and other classes for reading
and writing XML. XML Serialization support in DataSet needs to be implemented.
<p><b>Integration with ASP.NET</b> has not been started, such as, data binding
to a System.Web.UI.WebControls.DataGrid. This may involve implementing many classes
in System.Web and System.Data. Gonzalo, Gaurav, Leen, Patrik, Duncan, and others are
working very hard on the ASP.NET support. If you want to help,
contact <a href="mailto:[email protected]">Gonzalo Paniagua Javier</a>
<p><b>Integration with ASP.NET</b> has been created. Data binding of
a DataTable in a DataSet to a System.Web.UI.WebControls.DataGrid works. Data binding
of other types works too.
<p><b>Database Access from ASP.NET</b>:
<ul>
<li>Take a look at xsp in cvs and look at the examples in test: dbpage1.aspx
and dbpage2.aspx:
<ul>
<li>Notice that the namespace System.Data is imported via <b>import</b></li>
<li>A NameValueCollection is gotten using ConfigurationSettings.AppSetings. These
settings are gotten from the file server.exe.config which is a XML file. The XML
file has a section appSettings. In the appSettings section, you have keys
for DBProviderAssembly, DBConnectionType, and DBConnectionString.
<ul>
<li><b>DBProviderAssembly</b> is the assembly of the ADO.NET provider.
For example:
"Mono.Data.PostgreSqlClient"</li>
<li><b>DBConnectionType</b> is the System.Type of the class that
implements System.Data.IDbConnection that is found
in the DBProviderAssembly.
For example:
"Mono.Data.PostgreSqlClient.PgConnection"</li>
<li><b>DBConnectionString</b> is the ConnectionString to set to the
IDbConnection object to use in opening a connection to a data source.
For Example:
"hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"</li>
</ul>
<li>The function GetConnectionData() gets the database provider assembly, connection type,
and connection string parameters if they exist; otherwise, it uses default values. This is
done during the loading of the web page.</li>
<li>With the connection parameters, the assembly is loaded, the connection type is verified that
it implements IDbConnection and an instance of the class can be created, creates a instance
of the class, sets the connection string, and opens the connection.</li>
</ul>
</li>
</ul>
<p><b>Integration with Windows.Forms</b> has not been started, such as, data binding
to a System.Windows.Forms.DataGrid. This may involve implementing many classes
@@ -110,129 +327,12 @@
has not been started, such as, data binding
to a GtkTreeView. This may involve creating new classes
to go between the glist data model and the ADO.NET data model.
Mike Kestner would be the best person to ask for help on GTK#.
Mike Kestner or Rachel Hestilov would be the best people to ask for help on GTK#.
<p><b>Integration with QT#</b> has not been started. Any information on
how this can be done is appreciated. Adam Treat would be the best
person to ask about QT#.
<p><b>Integration with GDA#</b> has not been started. It is
included in the GTK# project, GDA#
does not require GTK+ nor GNOME. GDA# is C# bindings
to <a href="http://www.gnome-db.org/">GDA</a> which
is an ADO/OLE-DB like layer for Linux provided as a C library. Classes
that would bind data between the ADO.NET data model and the GDA data model will
need to be created. Rodrigo Moya is the best person to contact about this.
<p><b>Integration with GnomeDb#</b> has not been started. It is
included in the GTK# project and uses GDA# for its data access model.
Creating classes to bind data between the data model in ADO.NET
and the data model that exists in GDA# and GnomeDb# will
need to be started. GnomeDb# is C# bindings to
<a href="http://www.gnome-db.org/">GnomeDb</a> which uses
<a href="http://www.gnome-db.org/">GDA</a> as its data access layer. GnomeDb
is a C API in a library that contains
gtk+ widgets (GUI controls) for data access. There are some nifty widgets
(GUI controls) that can be used, such as, GnomeDbGrid, GnomeDbBrowswer,
GnomeDbSqlEditor, GnomeDbList, GnomeDbLogin, GnomeDbReportEditor, GnomeDbTableEditor,
GnomeDbCombo, and GnomeDbForm. Rodrigo Moya is the best person to contact.
<p><b>XML support in System.Data</b> needs work. This involves working on
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
exists in a provider's class that implements IDbCommand, and others.
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
XML support in the ExecuteXmlReader() in a SqlCommand.
<p><b>ADO.NET Provider Factory</b> has been started by Brian Ritchie. The
Provider Factory is used to dynamically create data provider
connections and data adapters based on configuration information. This
provider factory can also provide utility functions needed by a lot of
providers but are not exposed via the provider.
<p><b>ADO.NET Multiplexor Provider</b> needs to be created. It can use the
ADO.NET Provider Factory to create its connections and adapters, but the
Multiplexor Provider is a Generic Provider that internally uses an existing
provider based on configuration options. This is not
part of Microsoft .NET, but it needs to be able to run on Microsoft .NET
and Mono. This provider can be a generic provider, much like the ODBC.NET and
OLEDB.NET providers are, but be written in 100% C# and be configurable via
a configuration file. This provider will multiplex to other providers
that exist. If one does not exist for a given DBMS,
default to the ODBC or OLEDB .NET provider.
<p>According to Gonzalo, this is how the configuration could be implemented for
the Provider Factory and Multiplexor Provider.
<p>After some work done in System.Configuration, you can now do something
like:
<p>
<pre>
// Get an instance of the multiplexor from machine.config file
// Can be overriden in the application config file
object o = ConnectionSettings.GetConfig
("mono.data/multiplexor");
if (o == null)
--- error
Multiplexor mp = (Multiplexor) o;
// may be a string [] argument can help passing arguments
IDbConnection cnc = mp.CreateConnection (providerName);
</pre>
<p>and in the machine.config file:
<pre>
&lt;configuration&gt;
&lt;configSections&gt;
&lt;section name="mono.data"
type="Mono.Data.MultiplexorSectionHandler,Mono.Data"/&gt;
....
&lt;/configSections>
...
&lt;sectionGroup name="mono.data"&gt;
&lt;multiplexor&gt;
&lt;add provider="PostgreSQL"
type="Mono.Data.PostgreSQLClient,Mono.Data"
validate="false"
parameters="USER=xxx;HOST=127.0.0.1;DBNAME=xxx"/&gt;
&lt;/multiplexor&gt;
&lt;/sectionGroup&gt;
&lt;/configuration&gt;
</pre>
<p>validate="false" tells MultiplexorSectionHandler not to load the Type
until an instance is required. You can add more attributes or whatever
inside <multiplexor> as long as MultiplexorSectionHandler parses it.
<pre>
public class MultiplexorSectionHandler :
IConfigurationSectionHandler
{
public object Create (object parent,
object configContext,
XmlNode section)
{
Multiplexor mp;
// Here you get the ChildNodes and
// set up a Multiplexor
// instance that will hold the information
// needed to create
// instances of each provider. Only one
// instance will be
// created by the config system.
return mp;
}
}
</pre>
<p>This way, if our providers works with MS, the user can test them in both
MS and mono by just adding a few lines to machine.config (i still have
to upload a default machine.config file for mono). And this is the .NET
way of doing it (of course, if you prefer, you can use the other config
file. I just wanted to make people aware of this feature that now works
on mono).
<p><b>Building System.Data</b>
<p>The System.Data.dll gets built with the rest of the class library.
@@ -276,3 +376,71 @@ IConfigurationSectionHandler
</pre>
</ul>
** Testing
<ul>
<li>Testing connection-oriented classes are done
via the provider specific tests
found in the mcs source at mcs/class</br>
<table border=1>
<tr>
<td><b>Name</b></td>
<td><b>Assembly /</br> Namespace</b></td>
<td><b>Test</b></td>
</tr>
<tr>
<td>Microsoft</br> SQL</br> Server</br></td>
<td>System.Data /</br> System.Data.SqlClient</td>
<td>SqlTest.cs at</br> System.Data/Test</td>
</tr>
<tr>
<td>PostgreSQL</br> (Mono)</td>
<td>Mono.Data.PostgreSqlClient /</br> Mono.Data.PostgreSqlClient</td>
<td>PostgresTest.cs at</br> System.Data/Test</td>
</tr>
<tr>
<td>MySQL</br> (Mono)</td>
<td>Mono.Data.MySql /</br> Mono.Data.MySql</td>
<td>MySqlTest.cs at</br> Mono.Data.MySql/Test</td>
</tr>
<tr>
<td>Oracle</br> (Mono)</td>
<td>System.Data.OracleClient /</br> System.Data.OracleClient</td>
<td>TestOracleClient.cs at</br> System.Data.OracleClient</td>
</tr>
<tr>
<td>ODBC</br> (Mono)</td>
<td>System.Data.OracleClient /</br> System.Data.OracleClient</td>
<td>TestOracleClient.cs at</br> System.Data.OracleClient</td>
</tr>
</table>
<li><a href="http://www.go-mono.com/testing.html">Testing non-connection classes</a> are
done via mono's modified version of NUnit.
<ul>
<li>To run all the NUnit tests for Mono, you need the mcs source. cd to the root
of the mcs source. To run it:
<ul>
<li>On Linux: make -f makefile test</li>
<li>On Windows: make test</li>
</ul>
</li>
<li>If you just want to run the NUnit tests for System.Data, you would cd into
the mcs source at class/System.Data/Test and run it:
<ul>
<li>On Linux: make -f makefile test</li>
<li>On Windows: make test</li>
</ul>
</li>
</ul>
</li>
</ul>
+33 -56
View File
@@ -9,8 +9,8 @@
There is work underway for both systems. The Web Forms
support is more advanced at this point, and various ".aspx"
programs can be run using the Mono runtime and the XSP page
parser.
programs can be run using the Mono runtime (embedded into
either the XSP server or the mod_mono Apache module).
We are now working bug fixing and adding missing features
after making the whole pipeline compatible with MS.
@@ -21,41 +21,6 @@
Web Services support. Work for the supporting class libraries
just started recently.
* Web Forms: The pieces
There are a couple of components to the puzzle:
<ul>
* .aspx page parser (converts .aspx to C# code).
* System.Web.HttpRuntime support.
* Web controls (System.Web.UI.HtmlControls and
System.Web.UI.WebControls).
* Underlying infrastructure for the controls (System.Web.UI).
* HttpRuntime.ProcessRequest is the core of the ASP.NET
implementation.
</ul>
Gonzalo has been working on an ASP.NET parser that takes .aspx
files and generated the code required to run them (the code lives in
module `xsp' along with a little web server for testing).
Most of the runtime support was written by Patrik Torstensson
(now at Intel). This was interesting, because in order to implement
some of its features, Patrik had to go into the runtime/JIT engine and
he spent a few weeks doing work there.
The classes for running ASP.NET are being actively written.
Gaurav, Leen and Patrik worked in the core of the classes
required to run ASP.NET web application as well as a small
embeddable web server.
Duncan got our System.Web assembly to compile.
** HttpRuntime
Patrik has authored most of the HttpRuntime support (both on
@@ -104,29 +69,41 @@
over the web probably do not want to use direct ASP.NET but a
wrapper around it.
** Roadmap
* Web Forms: The pieces (historical)
1. The Parser.
There are a couple of components to the puzzle:
2. Get the parser to generate output compatible with ASP.NET.
3. Run the sample output with the real Microsoft runtime
but using our generated page.
4. Run the sample with our classes with the .NET runtime.
5. Run the samples with our classes with the our runtime (without
using HttpRuntime).
6. Finish HttpRuntime.
<ul>
* .aspx page parser (converts .aspx to C# code).
7. Running our sample code with our classes with our runtime.
8. Debug and add missing features.
We are in step 8. Among the missing features: server side includes,
better caching, some configuration stuff, more validators...
* System.Web.HttpRuntime support.
* Web controls (System.Web.UI.HtmlControls and
System.Web.UI.WebControls).
* Underlying infrastructure for the controls (System.Web.UI).
* HttpRuntime.ProcessRequest is the core of the ASP.NET
implementation.
</ul>
Gonzalo has been working on an ASP.NET parser that takes .aspx
files and generated the code required to run them (the code lives in
module `xsp' along with a little web server for testing).
Most of the runtime support was written by Patrik Torstensson
(now at Intel). This was interesting, because in order to implement
some of its features, Patrik had to go into the runtime/JIT engine and
he spent a few weeks doing work there.
The classes for running ASP.NET are being actively written.
Gaurav, Leen and Patrik worked in the core of the classes
required to run ASP.NET web application as well as a small
embeddable web server.
Duncan got our System.Web assembly to compile.
** How to Help
Testing and fixing HtmlControls, WebControls and validators is an
+5 -1
View File
@@ -19,6 +19,10 @@
A Retargetable C Compiler - Design and Implementation: C. Fraser, David
Hanson
* Threading
.NET Multithreading: Alan L. Dennis (ISBN 1-930110-54-5)
* Reference Manuals
<a
@@ -34,4 +38,4 @@
MIPS Processor supplement</a>
<a href="http://www.sparc.org/standards/V8.pdf">The SPARC Architecture
Manual Version 8</a>
Manual Version 8</a>
+4 -1
View File
@@ -25,7 +25,7 @@
Support runtime for Visual Basic applications
<li><a
href="http://www.go-mono.com/class-status-Windows.Forms.html">Windows.Forms</a>:
href="http://www.go-mono.com/class-status-System.Windows.Forms.html">Windows.Forms</a>:
there is also a <a
href="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">mailing
list available</a>
@@ -35,6 +35,9 @@
<li><a
href="http://www.go-mono.com/class-status-System.Runtime.Serialization.Formatters.Soap.html">System.Runtime.Serialization.Formatters.Soap</a>.
<li><a
href="http://www.go-mono.com/class-status-System.Security.html">System.Security</a>:
Xml Signature Security classes, also check the <a href="crypto.html">Cryptography status pages</a>
</ul>
+11 -33
View File
@@ -8,53 +8,31 @@
multilingual documentation makes for significant additional text.
With these considerations in mind, Mono will use external XML files
for type documentation, rather than documenting the source inline.
for type documentation, rather than documenting the source
inline. The XML file format used is inspired by the XML format used
to document the ECMA APIs.
Several tools will be created for managing, verifying, generating,
and updating class library documentation, including:
<ul>
<li><a href="#monodoc">MonoDoc - A graphical documentation editor and viewer.</a></li>
<li><a href="#mkmaster">MkMaster - A command line tool to feed stub information to MonoDoc.</a></li>
<li><a href="#aspnet">An ASP.NET documentation editor.</a></li>
<li><a href="#xsltool">An xsl tool to convert monodoc xml to html documentation.</a></li>
<li><a href="#monodoc">monodoc - A graphical documentation viewer.</a></li>
<li>xmllint: a tool used to validate a proper XML document.
</ul>
** XML Documentation Files and Formats
You can download the tools to document Mono from the CVS
repository from module `monodoc'.
*** Monodoc XML
This XML is Mono's documentation format. Documentation and a DTD/Schema
for Monodoc XML is located in cvs and can be found <a href="http://go-mono.org/monodoc.dtd">here</a>.
This XML could be generated by MonoDoc or the ASP.NET client.
More about the XML format <a href="http://go-mono.org/monodoc-xml.html">here</a>.
** Documentation Tools
*** <a name="monodoc">MonoDoc</a>
A graphical documentation editor and viewer. Currently, MonoDoc
consists of a Qt# application and is in heavy development.
*** <a name="mkmaster">MkMaster</a>
This tool creates the Master.xml file that MonoDoc uses as a reference
for documentation generation. This is a reflection engine that is used
to gather metadata from assemblies and create an xml representation.
*** <a name="aspnet">ASP.NET</a>
This tool is planned.
*** <a name="xsltool">An XSL converter</a>
This tool is planned. If someone wants to step forward and adopt this
project, it would be very helpful ;)
A graphical documentation viewer written in Gtk#. In the
future we will have an ASP.NET front-end to present the
documentation on the web as well.
** Status and Roadmap
*** 16, September 2002
A preliminary version of MonoDoc is in Mono's cvs. It is under heavy development.
Once this is complete we will start documenting the API!
** Get Involved
Help us develop Mono's documentation tools! Subscribe to
+314
View File
@@ -0,0 +1,314 @@
* Cryptography
In the .NET framework cryptography can be found under a number of
namespaces in several assemblies.
** Assembly: corlib
*** Namespace: <b>System.Security.Cryptography</b>
Thanks to the work of many people this namespace is almost complete.
**** Status
<ul>
* Every classes are present.
* Most classes have their unit tests. Some tests like <code>
SymmetricAlgorithmTest</code> are generated by an external
tool.
</ul>
**** TODO
<ul>
* Support for adding/modifying OID using the
<code>machine.config</code> configuration file (algorithms
are done).
* RNGCryptoServiceProvider is currently only working on Linux.
The current implementation reside in Mono's runtime and use
the <code>/dev/[u]random</code> device (which do not exists
under Windows). A Windows specific alternative is available
using the Mono.Security.Win32 assembly.
* Keypair persistance for RSA and DSA. This persistance must
somehow be linked with X509 certificate stores (in planning).
* <code>PasswordDeriveBytes.CryptDeriveKey</code> is included
in MS BCL to provide compatibility with existing Windows
applications. The main problem is that the key derivation
algorithm can be different for every CSP (Crypto Service
Provider). However for compatibility we should provide an
implementation compatible with the MS CSP (most likely used).
* Analyse the current coverage of the unit tests on the
cryptographic classes and complete the unit tests.
* Optimizations (performance) on most class are possible. Some
have been done using the Community Edition of BoundChecker
(a free VisualStudio addon) - recommanded!
</ul>
**** Notes
<ul>
* All cryptographic algorithms are entirely managed, including
classes named <code>*CryptoServiceProvider</code>, with the
exception of <code>RNGCryptoServiceProvider</code> (which
resides in the runtime).
* Look at assembly Mono.Security.Win32 if you require more
compatiblity with the Microsoft implementation (like accessing
a particuliar keypair container in a CSP).
</ul>
*** Namespace: <b>System.Security.Cryptography.X509Certificates</b>
**** Status
<ul>
* X.509 certificates are parsed using 100% managed code
(using the Mono.Security.ASN1 class).
* Software Publisher Certificates (SPC) used by Authenticode
(tm) to sign assemblies are supported (extraction from PE
files) but <b>not</b> validated.
* Unit tests are generated from a set of existing certificates
(about a dozen) each having different properties. Another
set of certificates (more than 300) are used for a more
complete test (but isn't part of the standard test suite for
size and time consideration).
</ul>
**** TODO
<ul>
* Authenticode(tm) support is incomplete. We can extract the
certificates from PE files but cannot validate the signature
nor the certificate chain (and we're still missing some trust
anchors). See Tools section for more information.
* Integration with CryptoAPI (on Windows) isn't possible as
long as the <code>X509Certificate(IntPtr)</code> constructor
isn't completed.
</ul>
**** Notes
<ul>
* Except for their structure <b>there are no validation of the
certificates</b> done by this class (this is by design and
isn't a restriction of Mono!). This means that certificate
signatures and validity dates are <b>never</b> checked
(except when used for Authenticode, i.e.
<code>CreateFromSignedFile</code>).
* The newer X509Certificate class included in Microsoft's Web
Service Enhancement (WSE) is a little better (as it includes
CryptoAPI's validation) when <code>IsCurrent</code> is called.
See assembly <b>Microsoft.Web.Services</b> for more details.
* Microsoft implementation of <code>X509Certificate</code> is
done by using CryptoAPI (unmanaged code). From the exceptions
thrown Authenticode(tm) support is done via COM.
</ul>
<hr>
** Assembly: System.Security
*** Namespace: <b>System.Security.Cryptography.Xml</b>
This namespace implements the <a href="http://www.w3.org/TR/xmldsig-core/">
XML Digital Signature</a> specification from
<a href="http://www.w3.org/">W3C</a>.
**** Status
<ul>
* All classes are present but some (most Transforms) are only
stubbed.
* Most classes have their unit tests.
</ul>
**** TODO
<ul>
* All the transforms needs to be done. But this requires far
more XML knowledge than crypto. Note: Most tests runs because
the feeded XML is pre-c14n (by hand in the code) before
signing (not because the transforms works). In the short
term <code>libxml2</code> could be used to provide C14N, but
in the long term a fully managed class would be much better.
</ul>
<hr>
** Assembly: Mono.Security
This assembly provides the missing pieces to .NET security. On Windows
CryptoAPI is often used to provide much needed functionalities (like
some cryptographic algorithms, code signing, X.509 certificates).
*** Namespace: Mono.Security
*** Namespace: Mono.Security.Authenticode
*** Namespace: Mono.Security.Cryptography
*** Namespace: Mono.Security.X509
*** Namespace: Mono.Security.X509.Extensions
**** Status
<ul>
* Work has been under way for quite some time - and should
start hitting CVS soon.
* A big part of this assembly is also included inside Mono's
corlib. The class are duplicated in this assembly so the
functionalities can be used with a dependency on Mono's
corlib (which depends on Mono's runtime).
</ul>
<hr>
** Assembly: Mono.Security.Win32
This assembly goal is to provide maximum compatibility with CryptoAPI
to application running with Mono's runtime on the Windows operating
system.
<b>This assembly should NEVER be used directly by any application</b>.
The classes should only be used by modifying the <code>machine.config
</code> configuration file (and then only if this increased
compatibility is required by an application).
*** Namespace: Mono.Security.Cryptography
**** Status
<ul>
* A RNGCryptoServiceProvider built on top of CryptoAPI. This
allows Windows users to get around the limitation of the
runtime RNG (which requires <code>/dev/[u]random/</code>).
* Wrapper classes for unmanaged versions of hash algorithms:
MD2, MD4, MD5 and SHA1 are supported. <b>note</b>: some
algorithms shouldn't be used in new design (MD4 is broken and
MD2 isn't considered safe). They are included to preserve
interoperability with older applications (e.g. some old, but
still valid, X.509 certificates use MD2).
</ul>
**** TODO
<ul>
* Wrapper classes for unmanaged versions of symmetric
encryption algorithms (like DES, TripleDES, RC2 and others
present in default CSP).
* Wrapper classes for unmanaged versions of asymmetric
algorithms (like DSA and RSA) which persist their keypair
into the specified CSP.
</ul>
<hr>
** Assembly: Microsoft.Web.Services
Microsoft Web Service Enhancement (WSE), known as Web Service
Development Kit (WSDK) in it's beta days, is an add-on the .NET
framework that implements WS-Security (and other WS-* specifications).
It also includes improved support for XML Signature (replacing and/or
extending <code>System.Security.Cryptography.Xml</code>) and X.509
certificates classes.
Note: WSE is distributed as an add-on because some specifications,
like WS-Security, aren't yet completed by
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a> or
other committees.
<b>[*] There are some licensing issues to consider before stating to
implement WS-Security. All contributors must sign an agreement with
Microsoft before commiting anything related to WS-Security into CVS.
</b>
*** Namespace: Microsoft.Web.Services.Security
*** Namespace: Microsoft.Web.Services.Timestamp
**** Status
<ul>
* Nothing (yet) commited in CVS <b>[*]</b>.
</ul>
*** Namespace: Microsoft.Web.Services.Security.X509
**** Status
<ul>
* Nothing (yet) commited in CVS. However the classes in this
namespace are outside WS-Security scope. So development
could be done without signing any agreements.
</ul>
**** TODO
<ul>
* We need to define certificate stores (for both users and
machines). These sames stores must be linked with asymmetric
keypairs. This could also be used to store the SPC roots.
</ul>
<hr>
** Tools
There are many tools in the .NET framework that indirectly interacts
with some cryptographic classes. Mono will eventually need these tools.
Unless noted the tools should work on any CLR (tested with both Mono
and Microsoft).
**** Status
The following tools are complete:
<ul>
* <code>secutil</code> is a tool to extract certificates and
strongnames from assemblies in a format that can be easily
re-used in source code (C# or VB.NET syntax).
* <code>cert2spc</code> is a tool to transform multiple X.509
certificates and CRLs into a Software Publisher Certificate
(SPC) file - which is a long name for a simple PKCS#7 file.
</ul>
**** TODO
The following tools are still missing or incomplete:
<ul>
* <code>monosn</code> is a clone of the <code>sn</code> to manage
strongnames. This tools is part of the runtime (not the class
library) and as such is written in C and won't run without Mono.
* <code>signcode</code> and <code>chktrust</code> (in progress)
for signing and validating Authenticode(tm) signatures on
assemblies (or any PE file).
* <code>makecert</code> to create X.509 test certificates that
can be used (once transformed in SPC) to sign assemblies.
* Other tools like a, GUI-based, certificate manager...
</ul>
Note that many of the tools requires the class library and/or the
runtime to be ready for them.
<hr>
** Other stuff
<ul>
* SSL/TLS for secure communication (a prototype is under way).
</ul>
<hr>
** How to Help
Complete any of the TODO (and feel good about it ;-).
Add missing unit tests to classes or methods.
Write some documentation on the cryptographic classes for the
<a href="http://go-mono.com/tutorial/html/en/index.html">Mono
Handbook</a> as I'm not a good writer (at least in English).
Optimization can also be done on algorithms as crypto is never fast
enough. Just be sure to test every optimization (using the unit test)
carefully - it's so fast to break an algorithm ;-).
Contact Sebastien Pouliot (<a href="mailto:[email protected]">home</a>
, <a href="mailto:[email protected]">work</a>) if you need additional
informations about the status of the cryptographic classes.
<hr>
Last reviewed: March 4, 2003 (post mono 0.21)
+192 -3
View File
@@ -14,13 +14,16 @@
<ul>
* The development tools (compilers, assembler tools,
language reference, design time features).
language reference, design time features): these
live in the `monodoc' CVS module.
* Frequently Asked Question compilations.
* HOWTO documents.
* The Class Libraries
* The Class Libraries (Both the original .NET class
libraries as well as the class libraries produced by
the project).
* Tutorials on Mono and the specifics of running it.
@@ -29,11 +32,197 @@
</ul>
** Class Library documentation
* Class Library documentation
We are moving to a new setup for documenting the class libraries,
and you can read about it <a href="classlib-doc.html">here</a>.
There are two classes of documentation: free documentation for
existing .NET classes and documentation for the classes that
we have developed on top of .NET.
There is a large body of documentation that came from the ECMA
standarization effort that has been checked into CVS. It does
not contain everything Mono and .NET have, so they need to be
updated and augmented.
** Gtk# documentation
We also have a large body of class libraries that are specific
to Mono, for example the documentation for Gtk#.
We have checked in stub documentation for Gtk# into the CVS
repository (on gtk-sharp/doc) and we need volunteers to help
populate the documentation for it. Since Gtk# is a wrapper
for Gtk, plenty of documentation exists in the <a
href="http://developer.gnome.org/doc/API">Gnome developer
site</a>.
To get started:
You need to download Gtk# from the CVS repository. The module
name is `gtk-sharp'. You can obtain a copy from both the CVS
repository or the anonymous CVS repository.
To pull your copy type:
<pre>
cvs co gtk-sharp
</pre>
Documentation lives in gtk-sharp/doc/en. The "en" indicates the
English language, the first one we are targeting. We can later
do translations, but for now we are focusing on a single
language.
In that directory you will find the documentation organized by
namespaces. One directory per namespace. In the directories
you will find one XML file per class that needs to be
documented. The mission is to fill in the data with useful
information. Feel free to grab liberally information from the
Gtk documentation from:
<a href="http://developer.gnome.org/doc/API/">http://developer.gnome.org/doc/API/</a>
Of course, the API does not apply directly. It only applies at
a foundational level, so you can not really just copy and
paste. Summaries, and remarks sections can probably be lifted
with little or no effort.
Gtk# uses properties to represent get/set operations in the C
API, so you can also use some bits from there.
Most of the documentation contains already place holders for
text, we use the internationally approved phrase for this
purpose, `To be added'. So the quest is to remove all of the
"To be added" strings with information with resembles as closely
as possible the toolkit reality.
*** The pieces to be filled.
Summaries are one or two line descriptions of the element
(class, struct, interface, method, field, event, delegate), and
its used to render summary pages. So it has to be short.
The "remarks" section is used to describe in detail the element.
**** Tags.
As you document Gtk# you will have a number of tags that you can
use inside the summary and remarks sections, these are:
<pre>
&lt;para&gt; &lt;/para&gt;
</pre>
Used to separate paragraphs.
<pre>
&lt;paramref name="param_name"/&gt;
</pre>
Used to reference a formal parameter to a function.
<pre>
&lt;see cref="T:SomeTypeName"/&gt;
</pre>
Use this to reference a type, this will include an hyper
link to the page for type SomeTypeName.
For example, to reference "System.Enum", do:
<pre>
&lt;see cref="T:System.Enum"/&gt;
</pre>
<pre>
&lt;see cref="P:SomeTypeName.Property"/&gt;
</pre>
Use this to reference a property, this will include an hyper
link to the page for the property `Property' of type `SomeTypeName'.
For example, to reference the BaseType property in System.Type, do:
<pre>
&lt;see cref="P:System.Type.BaseType"/&gt;
</pre>
<pre>
&lt;see cref="M:SomeTypeName.Method(type,type)"/&gt;
</pre>
Use this to reference a method, this will include an hyper
link to the page for the method `Method' of type `SomeTypeName'.
For example, to reference the ToString method in System.Object, do:
<pre>
&lt;see cref="M:System.Object.ToString()"/&gt;
</pre>
<pre>
&lt;see langword="keyword"/&gt;
</pre>
Use this to link to a keyword in the C# language, for
example to link to `true', do:
<pre>
&lt;see langword="true"/&gt;
</pre>
<pre>
&lt;example&gt; ... &lt;/example&gt;
</pre>
Use example to insert an example. The example can
contain explanatory text and code.
<pre>
&lt;code lang="C#"&gt;.. &lt;/code&gt;
</pre>
Use this to provide a sample C# program, typically used
within the &lt;example&gt; tags.
When providing examples, try to provide a full example,
we would like to be able to have a button to compile and
run samples embedded into the documentation, or pop up
an editor to let the user play with the sample.
You can link to an example like this:
<pre>
&lt;code lang="C#" source="file.cs"&gt; &lt;/code&gt;
</pre>
<pre>
&lt;item&gt;
</pre>
<pre>
&lt;list type="bullet"&gt; &lt;/list&gt;
</pre>
Use this to create lists. Lists contains &lt;item&gt;
elements
<pre>
&lt;list type="table"&gt; &lt;/lits&gt;
&lt;listheader&gt;
&lt;term&gt;YOUR FIRST COLUMN&lt;/term&gt;
&lt;description&gt;YOUR DESCRIPTION&lt;/description&gt;
&lt;/listheader&gt;
</pre>
For two-column tables. Inside use:
<pre>
&lt;item&gt;
&lt;term&gt;First&lt;/term&gt;
&lt;description&gt;First descritpion&lt;/description&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;term&gt;Second&lt;/term&gt;
&lt;description&gt;Second descirption&lt;/description&gt;
&lt;/item&gt;
</pre>
** Words of warning.
A few words of warning and advice for class documentors:
A well-documented API can ease hours of frustration; as Mono
+502 -109
View File
@@ -6,16 +6,435 @@
href="runtime.html">Runtime</a> description for more details
on this part of the project.
The software is also available on the `Mono' channel in <a href="http://www.ximian.com/products/redcarpet/">Red Carpet</a>.
Some useful links: <a
href="http://www.go-mono.org/mono-beginning.html">Resources/Beginning
section</a>, the <a
href="http://www.go-mono.org/faq.html">FAQ</a> and the <a
href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">
Mono Common Problems</a>.
href="http://www.go-mono.org/faq.html">FAQ</a>.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.22</b><br>
<a href="archive/mono-0.22">Release notes</a><br>
March 5, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.22.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.22.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<!-- <li><a href="archive/xsp-0.3.tar.gz">XSP web server (0.3)</a> -->
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.22-1.src.rpm">mono-0.22-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.3/x86</b>
<ul>
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-0.22-1.i386.rpm">mono-0.22-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.22-1.i386.rpm">mono-devel-0.22-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 7.2/x86</b>
<ul>
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-0.22-1.i386.rpm">mono-0.22-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-devel-0.22-1.i386.rpm">mono-devel-0.22-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.1/x86</b>
<ul>
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-0.22-1.i386.rpm">mono-0.22-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.22-1.i386.rpm">mono-devel-0.22-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Mandrake 8.2/x86</b>
<ul>
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-0.22-1.i586.rpm">mono-0.22-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.22-1.i586.rpm">mono-devel-0.22-1.i586.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>SuSE 8.0/x86</b>
<ul>
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-0.22-1.i386.rpm">mono-0.22-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.22-1.i386.rpm">mono-devel-0.22-1.i386.rpm</a>
</ul>
</td>
</tr>
<!-- <tr> -->
<!-- <td bgcolor="#999999"> -->
<!-- <b>Debian packages</b> -->
<!-- <ul> -->
<!-- <li><a href="http://www.atoker.com/mono/">Alp's web site</a> -->
<!-- </ul> -->
<!-- </td> -->
<!-- </tr> -->
<tr> -->
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.22-win32-1.exe">Mono-Setup</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<tr bgcolor="#CCCCC">
<td>
<b>Regression Tests</b><br>
</td>
<td>
You can get binaries for the Mono Regression Test
Suite <a href="archive/mono-tests.tar.gz">here</a>
</td>
</tr>
</tr>
</tbody>
</table>
der Releases:
We provide binaries for older releases until we have packages for the new release.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.21</b><br>
<a href="archive/mono-0.21">Release notes</a><br>
Feb 27th, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.21.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.21.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<li><a href="archive/xsp-0.3.tar.gz">XSP web server (0.3)</a>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.21-1.src.rpm">mono-0.21-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Debian packages</b>
<ul>
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.21-win32-1.exe">Mono-Setup</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<tr bgcolor="#CCCCC">
<td>
<b>Regression Tests</b><br>
</td>
<td>
You can get binaries for the Mono Regression Test
Suite <a href="archive/mono-tests.tar.gz">here</a>
</td>
</tr>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.20</b><br>
<a href="archive/mono-0.20">Release notes</a><br>
Feb 20th, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.20.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.20.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<li><a href="archive/xsp-0.3.tar.gz">XSP web server (0.3)</a>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.20-1.src.rpm">mono-0.20-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 8.0/x86</b>
<ul>
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-0.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Debian packages</b>
<ul>
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.20-stable-win32-2.exe">Mono-Setup</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<tr bgcolor="#CCCCC">
<td>
<b>Regression Tests</b><br>
</td>
<td>
You can get binaries for the Mono Regression Test
Suite <a href="archive/mono-tests.tar.gz">here</a>
</td>
</tr>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.19</b><br>
<a href="archive/mono-0.19">Release notes</a><br>
Jan 20th, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.19.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.19.tar.gz">Mono Runtime</a>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.19-1.src.rpm">mono-0.19-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.18</b><br>
<a href="archive/mono-0.18">Release notes</a><br>
Jan 12th, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.18.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.18.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.18-1.src.rpm">mono-0.18-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.17</b><br>
<a href="archive/mono-0.17">Release notes</a><br>
Dec 9th, 2002.
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.17.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.17.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.17-2.src.rpm">mono-0.17-2.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.17-stable.exe">Mono-Setup</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Debian packages</b>
<ul>
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.16</b><br>
<a href="archive/mono-0.16">Release notes</a><br>
@@ -49,70 +468,10 @@
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.3/x86</b>
<ul>
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 7.2/x86</b>
<ul>
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.1/x86</b>
<ul>
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Mandrake 8.2/x86</b>
<ul>
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-0.16-1.i586.rpm">mono-0.16-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.16-1.i586.rpm">mono-devel-0.16-1.i586.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>SuSE 8.0/x86</b>
<ul>
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 8.0/x86</b>
<ul>
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Linux s390</b>
<ul>
<ul>
<li><a href="archive/s390/glib2-2.0.6-13.s390.rpm">glib2-2.0.6-13.s390.rpm</a>
<li><a href="archive/s390/glib2-devel-2.0.6-13.s390.rpm">glib2-devel-2.0.6-13.s390.rpm</a>
<li><a href="archive/s390/libgc-6.1alpha5-1.s390.rpm">libgc-6.1alpha5-1.s390.rpm</a>
@@ -121,38 +480,19 @@
<li><a href="archive/s390/mono-devel-0.16-1.s390.rpm">mono-devel-0.16-1.s390.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.16-stable.exe">Mono-Setup</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<tr bgcolor="#CCCCC">
<td>
<b>Regression Tests</b><br>
</td>
<td>
You can get binaries for the Mono Regression Test
Suite <a href="archive/mono-tests.tar.gz">here</a>
</td>
</tr>
</tr>
</tbody>
</table>
<br>
* Older Releases:
We provide binaries for older releases until we have packages for the new release.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.15</b><br>
<a href="archive/mono-0.15">Release notes</a><br>
@@ -196,7 +536,7 @@
</td>
<td bgcolor="#999999">
<b>Red Hat null-8.0/x86</b>
<ul>
<ul>
<li><a href="archive/redhat-null-i386/libgc-6.1alpha5-1.i386.rpm">libgc-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-null-i386/libgc-devel-6.1alpha5-1.i386.rpm">libgc-devel-6.1alpha5-1.i386.rpm</a>
<li><a href="archive/redhat-null-i386/mono-0.15-1.i386.rpm">mono-0.15-1.i386.rpm</a>
@@ -210,7 +550,7 @@
</tbody>
</table>
** Binaries for other platforms.
inaries for other platforms.
Already daily volunteer's made binaries:
@@ -219,9 +559,9 @@
* <a href="http://www.superin.formativ.net/mono/mono.htm">Windows</a> (works without cygwin!)
</ul>
* Snapshots
apshots
<a name="snapshots">
ame="snapshots">
<a href="http://www.go-mono.com/snapshots">Nightly snapshots</a> of
the CVS repository are made every day at 10pm EST (Boston
@@ -231,7 +571,22 @@
The <a href="anoncvs.html">anoncvs</a> mirrors provided by
Hispalinux are updated every six hours.
* Compiling with scripts
mpiling the code
There are a number of ways of compiling Mono
<ul>
<li>From the <a href="#scripts">scripts</A>
<LI><a href="#install">Manually</a> for the first time.
<li>Manually, <a href="#upgrade">while upgrading</a> to CVS
</ul>
(which is an easy way to get the latest CVS information)
ame="scripts">
mpiling with scripts
There are scripts to help build mono for both Unix and Windows. Get
<a href="mono-build.sh">mono-build.sh</a> for Unix, or <a
@@ -262,14 +617,14 @@
set your CVSROOT environment variable before running the script to
select a particular cvs server.
<a name="install">
** Building the software manually
ame="install">
uilding the software manually
You will need to obtain the Mono dependencies first: <a
href="http://www.gtk.org">glib 2.x</a> and
<a href="http://www.freedesktop.org/software/pkgconfig">pkg-config</a>.
*** Building on Linux
Building on Linux
<ul>
Unpack the Mono runtime distribution:
@@ -309,10 +664,11 @@
You can change /usr/local to something else if you want.
</ul>
*** On Windows, to install and work on the compiler and the class libraries:
**** Install Cygwin and the GNU build tools, Microsoft's .NET Framework SDK and the precompiled GLIB 2.0 and pkg-config libraries.
On Windows, to install and work on the compiler and the class libraries:
Install Cygwin and the GNU build tools, Microsoft's .NET Framework SDK and the precompiled GLIB 2.0 and pkg-config libraries.
<ul>
@@ -339,9 +695,9 @@
<pre>
make
</pre>
</ul>
</ul>
*** On Windows, to compile the mono runtime:
On Windows, to compile the mono runtime:
<ul>
@@ -360,7 +716,7 @@
</ul>
* Software resources and notes
ftware resources and notes
The required and additional software can be downloaded here:
@@ -395,7 +751,7 @@
</ul>
*** Notes on compiling GLIB 2.0 and pkg-config from source:
Notes on compiling GLIB 2.0 and pkg-config from source:
<ul>
@@ -405,18 +761,18 @@
`make maintainer-clean' after the update).
* Download, compile and install <a href="http://www.freedesktop.org/software/pkgconfig">pkg-config</a> from source.
(I had to change line 674 of
<nobr><tt>pkg-config-0.8.0/glib-1.2.8/gstrfuncs.c</tt></nobr> from
(I had to change line 674 of
<nobr><tt>pkg-config-0.8.0/glib-1.2.8/gstrfuncs.c</tt></nobr> from
<nobr><tt>extern char *strsignal (int sig);</tt></nobr> to
<nobr><tt>extern const char *strsignal (int sig);</tt></nobr>.
<pre>
tar xzvf pkg-config-0.8.0.tar.gz
cd pkg-config-0.8.0
./configure --prefix=/usr
make
make install
</pre>
>
xzvf pkg-config-0.8.0.tar.gz
kg-config-0.8.0
nfigure --prefix=/usr
install
e>
* Download, compile and install <a href="ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.7.tar.gz">libiconv</a> from source.<br>
If you dont have MS Visual C/C++ 4.0 or 5.0 or 6.0 you can also try
@@ -424,10 +780,47 @@ make install
href="http://www.gimp.org/win32/libiconv-dev-20001007.zip">
http://www.gimp.org/win32/libiconv-dev-20001007.zip</a>.
* Download, compile and install the
<a href="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.6.tar.gz">
glib 2.0</a> from source.
</ul>
ame="upgrading">
pgrading
To upgrade your Mono installation from CVS, it is very
important that you update your Mono and MCS modules from CVS
at the same time. Failure to do so might result in a
problematic installation as the runtime and the class
libraries will be out of sync.
Run the following commands to update your CVS tree (more
details in <a href="ccvs.html">Cvs and Mono</a> and the <A
href="anoncvs.html">AnonCVS and Mono</a> pages).
<pre>
(cd mono; cvs update -dP .)
(cd mcs; cvs update -dP .)
</pre>
Once you have updated your sources, remove any cached
assemblies or old binaries from the Mono "runtime" directory,
and then compile each component:
<pre>
(cd mono/runtime; rm *exe *dll)
(cd mono; make)
(cd mcs; make)
</pre>
Now you can install the result:
<pre>
(cd mono; make install)
</pre>
Notice that following the above procedure does not require you
to manually install the software in the `mcs' directory, as
the relevant files will be copied by the `mono' makefiles.
+125 -25
View File
@@ -3,6 +3,7 @@
<a href="#gnome">Mono and GNOME</a><br>
<a href="#gui">Building GUI applications with Mono</a><br>
<a href="#msft">Mono and Microsoft</a><br>
<a href="#platforms">Mono platforms</a><br>
<a href="#pnpproject">Mono and the Portable.NET Project</a><br>
<a href="#webservices">Web Services</a><br>
<a href="#asp">Mono and ASP.NET</a><br>
@@ -314,14 +315,16 @@ A: We do not know, volunteers are working on this, but there is no set
Q: Is Microsoft helping Ximian with this project?
A: No. Ximian CTO Miguel de Icaza had a friendly conversation with
Microsoft software architect David Stutz, but that's about the
extent of the contact. Microsoft is interested in other
implementations of .NET and are willing to help make the ECMA spec
more accurate for this purpose.
A: There is no high level communication between Ximian and Microsoft
at this point, but engineers who work on .NET or the ECMA groups
have been very friendly, and very nice to answer our questions, or
clarify part of the specification for us.
Ximian representatives have also spoken with Sam Ruby at the ECMA
TG3 committee to discuss the same issues.
Microsoft is interested in other implementations of .NET and are
willing to help make the ECMA spec more accurate for this purpose.
Ximian was also invited to participate in the ECMA committee
meetings for C# and the CLI.
Q: Is Microsoft or Corel paying Ximian to do this?
@@ -425,6 +428,44 @@ A: Not yet, but the client side API for authentication is not the problem.
Alliance APIs. The problem is people on the web provider end that might use
this for authentication.
<a name="platforms"></a>
** Mono Platforms
Q: What operating systems does Mono run on?
A: Mono is known to run on Linux, Unix and Windows systems.
Q: What architectures does Mono support?
A: Mono today ships with a Just-in-Time compiler for x86-based
systems. It is tested regularly on Linux, FreeBSD and Windows
(with the XP/NT core).
There is also an interpreter, which is slower that runs on the
s390, SPARC and PowerPC architectures.
Q: Can Mono run on Windows 9x, or ME editions?
A: Mono requires Unicode versions of Win32 APIs to run,
and only a handful of *W functions is supported under Win9x.
There is Microsoft Layer for Unicode that provides implementation
of these APIs on 9x systems.
Unfortunately it uses linker trick for delayed load that is not
supported by ld, so some sort of adapter is necessary.
You will need MSLU and one of the following libs to link Mono to
unicows.dll <a
href="http://mono.eurosoft.od.ua/files/unimono.zip">http://mono.eurosoft.od.ua/files/unimono.zip</a>
or alternatively search the net for "libunicows".
No changes to Mono source code required, the only thing is to make
sure that linker will resolve imports to adapter library instead of
Win32 libs. This is achieved by inserting -lunimono before
-lkerner32/user32 in the linker's specs file.
<a name="pnpproject"></a>
** Mono and Portable.NET
@@ -436,13 +477,20 @@ A: Most of Mono is being written using C#, with only
It is easier to describe what is unique about Mono:
<ul>
<li> A Just-in-Time compiler engine. This is important for
making your applications fast.
<li> A self-hosting C# compiler written in C#, which is clean, easy
to maintain.
<li> Focus on the .NET Framework: we are tracking down the .NET
Framework API definition, as we believe it is the API people
will be most familiar with.
<li> A multi-platform runtime engine: both a JIT engine and an
interpreter exist. The JIT engine runs currently on x86
systems, while the interpreter works on SPARC, StrongARM and
PowerPC systems.
systems, while the interpreter works on SPARC, StrongARM,
s390 and PowerPC systems.
<li> Supports Linux, Windows and Solaris at this point.
@@ -471,8 +519,9 @@ A: Most of Mono is being written using C#, with only
<li> We have a great community of developers, without which Mono
would not be possible.
<li> We will provide an ahead of time compilation mode in the
future.
<li> We are working on an ahead of time compilation mode to
pre-compile code for the target architecture (this is part
of our new code generation effort).
</ul>
<a name="webservices"></a>
@@ -659,29 +708,57 @@ Q: I'm wondering if there are any plans to start using nant to build the
A: Maybe well be doing some sort of automated build process + testing when
the summer finish.
Q: My C code uses the __stdcall which is not availble on Linux, how can I
make the code portable Windows/Unix across platforms?
A: Replace the __stdcall attribute with the STDCALL macro, and include this
in your C code for newer gcc versions:
#ifndef STDCALL
#define STDCALL __attribute__((stdcall))
#endif
<a name="asp">
** Mono and ASP.NET
Q: Is Mono supporting ASP.NET?
Q: Does Mono support ASP.NET?
A: Yes. The development of the support for ASP.NET comes in various stages,
here is what Gonzalo has been working on: 1. The Parser. 2. Getting the
parser to generate output compatible with ASP.NET. 3. Running the sample
output with the real Microsoft runtime but using our generated page. 4.
Running the sample with our classes with the .NET runtime. 5. Running
our sample code with our classes with our runtime. This is the process
we are following. Currently Gonzalo has reached point 5.
A: Yes.
Mono supports ASP.NET, we have shown an unmodified IBuySpy
installation running on Mono as well as various other programs. You can
try it yourself downloading the XSP server.
Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since
it is self host right now.
A: Linux is enough.
Q: How can I run ASP.NET-based applications with Mono?
A: You need the Mono runtime and a hosting web server. Currently we distribute a
small web server called `xsp' which is used to debug applications, or you can choose
to use Daniel's Apache 2 module.
Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
A: Yes, we have plans to do so, but we need to wait for Patrik's patches to
HttpRuntime. Once that is there, writing a mod_mono should be trivial
(look at mono/samples/embed for a sample embedded application).
A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime
and is available here: <a
href="http://apacheworld.org/modmono/">http://apacheworld.org/modmono/</a>
Q: Will you support Apache 1?
A: Modules developed for Apache 2 are not compatible with Apache 1.3
Daniel plans to support Apache 1.3 in the future but the current focus is on
Apache 2, because of the better support for threading and Windows.
Q: Can I run Apache 1 and Apache 2 on the same machine?
You can always keep a copy of Apache 2 running in paralell with your Apache
1.3 (either different port or using a reverse proxy).
You can also bind the two servers to different IP addresses on the
same physical machine.
<a name="ado">
** Mono and ADO.NET
@@ -704,6 +781,12 @@ A: We are implementing all the classes in Microsoft .NET's System.Data, so
you can be sure that things will work the same in Mono as with the Microsoft
implementation.
Q: Does Mono can to connect to Sybase by using Mono.Data.*?
A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
SybaseConnection, and then, from it, use it as any other
IDbConnection-based class.
<a name="java">
** Mono and Java
@@ -773,6 +856,17 @@ A: Yes. Eto Demerzal has started a Rhino port to C#.
After this is completed, we will begin developing
the JavaScript compiler.
Q: Can Mono or .NET share system classes (loaded from mscore.dll and other
libs) or will it behave like Sun's Java VM?
A: What you can do with mono is to load different applications in their own
application domain: this is a feature of the CLR that allows sandboxing
applications inside a single process space. This is usualy exploited to
compartmentalize different parts of the same app, but it can also be
effectively used to reduce the startup and memory overhead.
Using different appdomains the runtime representation of types and
methods is shared across applications.
<a name="extending"></a>
** Extending Mono
@@ -1030,9 +1124,6 @@ A: We will have to evaluate the licenses for compatibility first,
but as a general rule, we will accept the code under the same
terms of the "container" module.
Q: Is the Mono
<a name="patents"></a>
** Patents
@@ -1140,6 +1231,15 @@ A: GtkHTML is just a lightweight HTML rendering engine that does not
Linux when disconnected from the Web (and that has better
interactions than a web page).
Q: Is there a command-line tool that allows me to access .NET interactively?
A: There are several but one that is free software and uses MCS is the one
Dennis Lu from Rice University is working on; a REPL C# interpreter.
Q: Is it possible to use Visual C++ with Mono?.
A: Well, It's possible to run VC++ generated apps under Mono though.
<a name="problems"></a>
** Mono Common Problems
+103 -7
View File
@@ -1,22 +1,30 @@
* Firebird and Interbase Data Provider
<ul>
<li>ADO.NET Data Provider for Firebird and Interbase databases</li>
<li>Does not exist in Mono, but is a separate project</li>
<li><a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
an independent project which uses source code based on the Interbase source code released
<li>The <a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
is an independent project which uses source code based on the Interbase source code released
by Borland under the Interbase Public License</li>
<li>Both the Firebird Relational Database and the Firebird .NET Data Provider can be
downloaded from <a href="http://sourceforge.net/projects/firebird/firebird">here</a></li>
downloaded from <a href="http://sourceforge.net/projects/firebird/">here</a></li>
<li>The Firebird .NET Data provider has been made
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
number of contributions to the OdbcJdbc code</li>
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
number of contributions to the OdbcJdbc code</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
* Current Status
** Current Status
<ul>
<li>Currently, it is able to connect to Firebird and Interbase databases
@@ -56,7 +64,7 @@
</ul>
* Action Plan
** Action Plan
<ul>
<li>Bug fixing</li>
@@ -98,3 +106,91 @@
</li>
</ul>
** Testing
<ul>
<li>Need a working mono and mcs</li>
<li>Need access to a Firebird Relational Database or you can download
it from <a href="http://firebird.sourceforge.net">here</a></li>
<li>Get the Firebird .NET data provider from here as
<a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>. Make
sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
installed in the same place as the mono class libraries.</li>
<li>Has a ConnectionString format:
<pre>
"Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
</pre>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using FirebirdSql.Data.Firebird;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
"User=SYSDBA;" +
"Password=masterkey;" +
"Dialect=3;" +
"Server=localhost";
IDbConnection dbcon = new FbConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql = "SELECT * FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
object dataValue = myReader.GetValue(0);
string sValue = dataValue.ToString();
Console.WriteLine("Value: " + sValue);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r FirebirdSql.Data.Firebird.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r FirebirdSql.Data.Firebird.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+4 -6
View File
@@ -1,9 +1,7 @@
* The GCC front-end
The GCC front-end will accept input in a binary file with
codes in the Common Intermediate Language (CIL), and generate
native code.
This will allow pre-compilation and full optimization to take
place before a program is executed.
Jeremy Singer has developed a .NET backend for GCC, his
research work is available <a
href="http://www.cl.cam.ac.uk/~jds31/research/gccnet/">here</a>.
+154
View File
@@ -0,0 +1,154 @@
* Gtk#
<a href="http://gtk-sharp.sourceforge.net">Gtk#</a> (Gtk
sharp) is a set of C# language bindings for the
<a href="http://www.gtk.org">Gtk+</a> toolkit and other
libraries that are part of the
<a href="http://www.gnome.org">GNOME</a> platform .
** API of Gtk#
The API is browsable
<a href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">here</a>
** Where to learn more.
Visit the official site for the <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
The <a href="http://www.go-mono.org/faq">Mono FAQ</a> has some useful
information too.
** GTK# On Linux
<p>Where to get distributions of GTK# for Linux:
<ul>
<li><a href="http://gtk-sharp.sourceforge.net">RPMs</a></li>
<li><a href="http://www.debianplanet.org/mono/">Debs</a></li>
</ul>
<p>Buidling on Linux:
<ul>
<li>Get GTK# source from <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.</li>
<li>run ./autogen.sh --prefix=my_mono_installation_prefix</li>
<li>make</li>
<li>make install</li>
</ul>
** GTK# On Windows
<p>There is a Windows Installer for GTK# <a href="http://www.sport-huettn.de/mono/gtk-sharp-0.6-stable-2.exe">here</a>.
<p>If you want to build GTK# yourself on Windows:
<p>To build gtk# under windows, you will need the following:
<ul>
<li>cygwin from <a href="http://www.cygwin.com/">here</a> When installing Cygwin via setup.exe,
by default binutils and other tools do not get installed; you have to make
sure to select these items. Just make
sure Base and Development are set to Install.</li>
<li>Mono 0.17 or later from <a href="http://www.go-mono.com/download.html">here</a>
You can use Windows Setup Wizard (NT/2000/XP).</li>
<li>GTK+ 2.0 (and dependencies). You can obtain gtk+ 2.0 by either of the
following:
<ul>
<li>You can get a Windows Installer at:
<a href="http://www.dropline.net/jade/download.html">here</a> </li>
<li>or get the separate binary and dev/lib packages at
at <a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a> </li>
<li>or binary package from Dev-C++ site <a href="http://www.bloodshed.net/dev/packages/gtk.html">here</a> </li>
<li>or get Gtk4Win <a href="http://wingtk.sourceforge.net/index.html">here</a> </li>
<li>or the source at <a href="http://www.gtk.org/">here</a> </li>
</ul>
</li>
<li>binary distriubtion of a current web browser
like Internet Explorer 4.0, Mozilla 1.0, or Netscape 7.0 which
includes things like msvcrt.dll.</li>
<li>Microsoft .NET Framework at
<a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a> </li>
<p>If you are running Windows 95/98/ME, then you will need Unicode support.
Look in
mono-list archives for information about how to get
Mono to work on Windows 9x.
<a href="http://lists.ximian.com/archives/public/mono-list/2002-December/004158.html">here</a>
<p>Environment Variables to set:
<ul>
<li>PATH - set to your mono installation bin and lib path.
For example, my mono installation prefix is:
<pre>
F:/cygwin/home/DanielMorgan/mono/install
</pre>
<p>So, I would set my PATH in the Windows Control Panel as:
<pre>
F:/cygwin/home/DanielMorgan/mono/install/bin;F:/cygwin/home/DanielMorgan/mono/install/lib</li>
</pre>
</li>
<li>LD_LIBRARY_PATH - set to your mono installation lib path</li>
<li>PKG_CONFIG_PATH - set to your mono installation lib/pkgconfig path, such
as,
<pre>
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig</li>
</pre>
<p>If you got the gtk-sharp source, cd to the gtk-sharp directory, type:
<pre>
./autogen.sh --prefix=~/mono/install
</pre>
<p>Set your --prefix= to whatever your mono installation prefix is located.
This will take awhile to go through the ./autogen.sh and ./configure...
<p>After that it finishes succesfully, you run make with the makefile.win32
like:
<pre>
make -f makefile.win32
</pre>
<p>After that finishes succesfully, you can copy to your mono installation lib
path like:
<pre>
cp */*.dll ~/mono/install/lib
</pre>
</ul>
<p>The pkg-config files for
gtk+ 2.0 and dependencies will need to be set correctly if they haven't
already been.
<p>Look in your mono installation/lib/pkgconfig, such as,
<pre>
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig
</pre>
<p>You will find files like: gtk+-2.0.pc
<p>Edit the line that says
<pre>
prefix=something
</pre>
<p>And set it to your mono installation prefix, such as,
<pre>
prefix=F:/cygwin/home/DanielMorgan/mono/install
</pre>
<p>Do this for all the .pc files in that directory. If there are not any, then
you will need to create them. Or get them from somewhere like the dev
packages at
<a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a>
** GTK# On FreeBSD
TODO. Any volunteers?
** GTK# On Solaris
TODO. Any volunteers?
** GTK# On AIX
TODO. Any volunteers?
+8
View File
@@ -13,6 +13,14 @@ Some of them may start contributing because they want a mention in the
* Mono Hackers
** Zoltan Varga
Zoltan has contributed significantly to Mono, with bug reports and bug
fixes as well as pushing the envelope of the things that can be done in
and with the mono runtime: the gcc-based ngen compiler, code coverage
and more recently his work with Reflection.Emit that got mono to the
point of running the IKVM Java virtual machine.
** Sergey Chaban
Sergey has been a long time contributor to the project, from the early
Executable
+157
View File
@@ -0,0 +1,157 @@
* IBM DB2 Data Provider
<ul>
<li>ADO.NET Data Provider for <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
<li>Exists in namespace DB2ClientCS and assembly Mono.Data.DB2Client</li>
<li>The source code exists at mcs/class/Mono.Data.DB2Client</li>
<li>Requires the Call Level Interface to IBM DB2 shared library. This
is db2cli.dll on Windows. The IBM DB2 CLI API is very similar to the ODBC API. If
you take a look at Mono's <a href="http://www.go-mono.com/odbc.html">System.Data.Odbc</a> ODBC provider, you will see the
DllImport's have similiar function names.</li>
<li>IBM DB2 Provider created by Christopher Bockner.</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
** Current Status
<ul>
<li>Compiles on Windows and Linux. Works on Windows. Still needs to be tested on Linux.</li>
<li>Able to connect to IBM DB2</li>
<li>Able to execute DML, such as, CREATE TABLE via ExecuteNonQuery()</li>
<li>Christopher says it can retrieve data via the DB2ClientDataReader</li>
</ul>
** Action Plan
<ul>
<li>Still needs work to get it to retrieve data via ExecuteReader() and
use the data reader to read data.</li>
</ul>
** Testing
In order to test.
<ul>
<li>Have working mono and mcs setup</li>
<li>Have access to an IBM DB2 database. If you do not have access, download the
<a href="http://www-3.ibm.com/software/data/db2/">IBM DB2</a> software. There
are versions for Windows, Linux, AIX, and Sun Solaris.</li>
<li>Make sure the assembly Mono.Data.DB2Client.dll was built and installed
where the other class libraries are installed.</li>
<li>If you do not have the source to mcs, get the source from
<a href="http://www.go-mono.com/download">here</a></li>
<li>Has a ConnectionString format like ODBC</li>
<li>Here is a ConnectionString format if you have a DSN setup:
<pre>
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
</pre>
</li>
<li>Here is a ConnectionString format if you do not have a DSN (have not
gotten this to work though, so, I am open to suggestions):
<pre>
"DRIVER={DB2 Driver};SERVER=localhost;DATABASE=test;UID=myuserid;PASSWORD=mypassword"
</pre>
</li>
<li>In mcs/class/Mono.Data.DB2Client/Test/DBConnTest, you will find
a DBConnTest.cs.</li>
<li>To build DBConnTest:
<ul>
<li>On Unix:</li>
<pre>
mcs DBConnTest.cs -r System.Data.dll -r Mono.Data.DB2Client.dll
</pre>
</li>
<li>On Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe DBConnTest.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r Mono.Data.DB2Client.dll
</pre>
</li>
<li>To run it on mono:
<pre>
mono DBConnTest.exe database userid password
</pre>
</li>
</ul>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using Mono.Data.DB2Client;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"DSN=sample;UID=db2admin;PWD=mypass";
IDbConnection dbcon = new DB2ClientConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql =
"CREATE TABLE mono_db2_test1 ( " +
" testid varchar(2), " +
" testdesc varchar(16) " +
")";
dbcmd.CommandText = sql;
dbcmd.ExecuteNonQuery();
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r Mono.Data.DB2Client.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r Mono.Data.DB2Client.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
-5
View File
@@ -56,11 +56,6 @@ TODO=multimedia
<a name="projects">
** Projects
<ul>
TODO=xmlStorage,
* Implement an xmlStorageSystem for the CLI:
<a href="http://www.soapware.org/xmlStorageSystem">
http://www.soapware.org/xmlStorageSystem</a>
TODO=guavac,Java compiler for .NET
* You could take one of the existing Java compilers
+293 -3
View File
@@ -25,7 +25,7 @@
You might also want to <a href="download.html">Download the
source</a> for our work so far. Grab a <a
href="snapshots">snapshot</a> of our current work, or <a
href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&sortby=file&hideattic=1&cvsroot=Mono">browse
href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&sortby=file&hideattic=1&cvsroot=mono">browse
the sources</a>
You might want to <a
@@ -34,6 +34,12 @@
You can contact the team at: <a
href="mailto:[email protected]">[email protected]</a>
In order to follow the process of the project and to learn more
about the team members we have created the <a
href="http://monoevo.sf.net/mwn/index.html">Mono Weekly News letter</a>.
Which archives can be found <a
href="http://monoevo.sf.net/mwn/archives.html">here</a>.
</td>
<td>
<table border=1>
@@ -86,12 +92,294 @@
<a href="index.rss"><img src="images/xml.gif"></a>
</td>
</tr>
<tr>
<td>
<a href="screenshots.html">Screenshots</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
@item Dec 9th, 2002: VB.NET, Oracle Provider.
@item Mar 5th, 2003: Mono 0.22; MonoDoc 0.2; Debugger 0.2.1: Release-o-Rama.
Mono 0.22 has been released. See the <a
href="archive/mono-0.22">release notes</a>. This is a bug fix
release.
A new preview of MonoDoc 0.2, the Mono Documentation browser
has been <a href="http://lists.ximian.com/archives/public/gtk-sharp-list/2003-March/001266.html">released</a>.
Martin also announced a <a
href="http://lists.ximian.com/archives/public/mono-list/2003-March/012756.html">new
release</a> of the Mono Debugger (both GUI and command line).
@item Mar 3rd, 2003: The Mono Hackers Hall Of Fame welcomes Zoltan Varga
The <a href="hackers.html">Mono Hackers Hall Of Fame</a>
continues to show our appreciation to the excellent
contributors that make <b>mono::</b> a successful free
software project.
Zoltan has contributed significantly to Mono, with bug reports and bug
fixes as well as pushing the envelope of the things that can be done in
and with the mono runtime: the gcc-based ngen compiler, code coverage
and more recently his work with Reflection.Emit that got mono to the
point of running the <a href="http://www.ikvm.net">IKVM</a> Java virtual
machine.
@item Mar 2nd, 2003: New Mono mailing list.
A new mailing list for <a
href="http://lists.ximian.com/mailman/listinfo/mono-devel-list">Mono
Development</a> has been created.
@item Feb 27th, 2003: Mono 0.21 released
Mono 0.21 has been released. This is only a bug fix release.
The <a href="archive/mono-0.21">release notes</a> are available.
@item Feb 25th, 2003: Mono 0.20 for Windows released; New Apache module released.
Packages of Mono for Windows have been <a
href="archive/mono-0.20-stable-win32-2.exe">released</a>.
Thanks to Daniel, Johannes and Paolo for setting this up.
Daniel has released a new version of his Mono Apache module that
handles ASP.NET. The code is available at <a
href="http://apacheworld.org/modmono/">here</a>
Nick has posted an update on the progress on our <a
href="http://lists.ximian.com/archives/public/mono-list/2003-February/012467.html">regression
tests</a>. We are looking for more tests, and more volunteers to write them.
Also, remember to contribute to the Gtk# documentation effort,
momentum is picking up! See the entry for Feb 18th for more details.
@item Feb, 23rd, 2003: Mono 0.20 released; Gtk# 0.8 released.
Mono 0.20 has been released. Check out the <a
href="archive/mono-0.20">release notes</a> for an overview of
the changes. You can get it <a href="download.html">here</a>.
There are no major features in this release, mostly bug fixes
and performance improvements.
Gtk# 0.8 has been <a
href="http://lists.ximian.com/archives/public/gtk-sharp-list/2003-February/001114.html">released</a>
<b>Important</b>: The contributed binaries for Windows
binaries of Mono 0.20 contain a virus. Please read <a
href="virus.html">this</a> if you installed the binary.
@item Feb 18th, 2003: Volunteers to document Gtk#
With the availability of a documentation browser, we are
looking for volunteers to help us complete the documentation
of the Gtk# binding for Mono.
Experience with Gtk is useful, but not mandatory. We have
checked in stubs, and we have instructions, and resources to
how to complete this process <a
href="documentation.html">here</a>. Mail the <a
href="mailto:[email protected]">[email protected]</a>
for further discussion.
@item Feb 14th, 2003: OpenGL# bindings for Mono; Mono Basic updates.
Mark Crichton has completed his OpenGL/GLUT bindings for
Gnome. A screenshot can be seen <a
href="sshots/oglcs.png">here</a>. The bindings are available
on the Mono CVS repository on the module `glgen'. This is a
straight binding to the C API.
Marco has <a
href="http://lists.ximian.com/archives/public/mono-list/2003-February/011752.html">posted
an update</a> on the current state of the free VB.NET compiler
for Mono.
We are looking for contributors and maintainers to the
JavaScript compiler as well (Janet)
@item Feb 12th, 2003: New assemblies, Gtk# stub documentation, Authenticode, Polish site
Mono now distributes a few new assemblies: Mono.Security.Win32
as a layer to use the crypto functionality on Win32. The
Mono.Posix assembly which contains functionality for taking
advantage of Unix facilities.
A <a href="http://www.go-mono.pl/">Mono site in Poland</a>.
Stubs for the Gtk# documentation have been checked into CVS.
If you want to contribute please read <a
href="http://lists.ximian.com/archives/public/mono-list/2003-February/012108.html">this
message</a>
Mono development is moving quickly: Tim and Daniel have been
improving the Oracle database provider and Sebastien Pouliot
has got code signing to work using Authenticode with pure open
source and managed code. Plenty of new VB.NET work from Marco
(compiler) and Daniel (runtime). Also Jackson has resumed
work on the IL assembler and the fully managed library to
generate CIL images (Sergey wrote the first Mono.PEToolkit).
@item Feb 11th, 2003: Mono Weekly News, New assemblies.
<a href="http://monoevo.sourceforge.net/mwn/index.html">Mono
Weekly News</a>: Includes a new interview, software
announcements and the PHP/Mono integration.
@item Feb 5th, 2003: MonoDoc 0.1
A <a
href="http://www.go-mono.com/archive/monodoc-0.1.tar.gz">preliminary
release</a> of the Mono Documentation Browser is now availble.
Release <a
href="http://lists.ximian.com/archives/public/mono-list/2003-February/011935.html">notes</a>
@item Jan, 22th, 2003: Mono wins award, OpenLink releases Virtuoso.
Mono won the `Best Open Source Project' award at the Linux
World Expo. A description is <a
href="http://linuxtoday.com/news_story.php3?ltsn=2003-01-23-024-26-OP-EV">here</a>
Open Link has a <a
href="http://biz.yahoo.com/prnews/030123/neth013_1.html">press
release</a> about Virtuoso 3.0: the first commercial product
shipping that uses Mono.
@item Jan, 20th, 2003: Mono 0.19 released; Screenshots page; Gtk# 0.7
Mono 0.19 has been released. Check out the <a
href="archive/mono-0.19">release notes</a> for an overview of
the changes. You can get it <a href="download.html">here</a>.
There are no major features in this release, mostly bug fixes
and performance improvements.
We have now a new section <a href="screenshots.html">with
screenshots</a> of various Mono applications. You can see
there the new released Debugger, as well as the work in
progress on the documentation browser.
<a href="http://gtk-sharp.sf.net">Gtk# 0.7</a> has been <a
href="http://lists.ximian.com/archives/public/mono-list/2003-January/005222.html">released</a>
@item Jan, 19th, 2003: Mono Debugger released.
After six month of extensive development, Martin Baulig has
released the first version of the Mono debugger. The Mono
debugger is written in C# and can debug both managed and
unmanaged applications, support for multiple-threaded
applications and should be relatively easy to port to new
platforms.
Details of the release are available in <a
href="http://lists.ximian.com/archives/public/mono-list/2003-January/005192.html">post</a>.
The debugger contains both Gtk# and command line interfaces.
The debugging file format used in Dwarf (its already supported
by our class libraries and the Mono C# compiler; To debug C
applications, you need a recent GCC, or to pass the -gdwarf-2
flag to gcc).
@item Jan, 17th, 2003: DB2 provider, MacOS X
Christopher Bockner has contributed a DB2 System.Data client.
MacOS X support on the runtime has been integrated into the
distribution, and MCS works with it.
Zoltan has managed to get <a
href="http://radio.weblogs.com/0109845/">IKVM</a> (a Java VM
for .NET) to run with Mono. The HelloWorld.class runs with
the Mono runtime.
@item Jan, 13th, 2003: Mono 0.18 released
Mono 0.18 has been released. Check out the <a
href="archive/mono-0.18">release notes</a> for an overview of
the changes. You can get it <a href="download.html">here</a>.
@item Jan 10th, 2003: Mono Weekly News.
A new issue of the <a
href="http://lists.ximian.com/archives/public/mono-list/2003-January/004903.html">Mono
Weekly News</a> has been published.
Check out the <a href="crypto.html">Crypto status</a> page
that Sebastien has put together.
@item Jan 3rd, 2003: Glade#, Code Coverage, Apache, MBas, Debugger.
Rachel has made Glade# use attributes so binding C# widgets to
the designed widgets is now easier than ever. Alp has
improved this to use implicit names as well.
Martin's Mono debugger now has support for multi-thread
debugging. Special feature: breakpoints can be defined in a
per-thread basis now.
Daniel López has checked in his Apache module to integrate
Mono and Mono's ASP.NET support as an Apache module. Gonzalo
has folded his new Mono hosting classes into this module (they
are now shared between XSP and mod_mono). You can get the
mod_apache from CVS (module name: mod_mono).
Mono Basic improvements: Marco has added support for more
statements on the grammar.
Zoltan has <a href="http://www.nexus.hu/vargaz2/">posted</a>
his Code Coverage analysis tool for Mono.
@item Dec 17th, 2002: Mono: Commercial uses.
<a href="http://www.tipic.com">Tipic</a> today <a
href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=tipic_mono">announced</a>
their work on porting their Instant Messaging Server platform
to run on Mono.
<a href="http://www.winfessor.com">Winfessor</a> also <a
href="http://www.winfessor.com/press.asp">announced</a> the
availability of their Jabber SDK to run on Mono.
Also two weeks ago we mentioned <a
href="http://www.openlinksw.com">OpenLink Software's</a> <a
href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=openlink_mono">announcement</a>
of their product, also using Mono.
@item Dec 10th, 2002: Gtk# 0.6 released; Mono 0.17 packages for Windows and Debian.
Mike Kestner <a
href="http://lists.ximian.com/archives/public/mono-list/2002-December/003961.html">announced
Gtk# 0.6</a>. This new release includes many new features and
bug fixes, and is the perfect companion to the <a
href="archive/mono-0.17">Mono 0.17</a> release.
Johannes has contributed a Windows-ready package of Mono 0.17,
and its available from our <a
href="download.html">download</a> page.
Alp Toker has <a href="http://www.atoker.com/mono/">Debian packages</a>
@item Dec 9th, 2002: Mono 0.17 has been released
Mono 0.17 has been released. Check out the <a
href="archive/mono-0.17">release notes</a> for a more detailed
list. You can get it <a href="download.html">here</a>.
Many new features as well as plenty of bug fixes. Many new
System.Data providers and a more mature System.Web (ASP.NET)
which can now be hosted in any web server. A simple <a
href="archive/xsp-0.2.tar.gz">test web server</a> to host
asp.net has been released as well.
This version also integrates Neale's s390 port.
This release also includes a new exception handling system
that uses the gcc exception information that vastly improves
our internalcall speed (15% faster mcs compilation times).
@item Dec 8th, 2002: VB.NET, Oracle Provider.
Marco has got the Mono Basic compiler up to speed (support for
classes, modules, expressions, object creation, method
@@ -101,7 +389,7 @@
Screenshots: <a
href="http://modgb.sourceforge.net/monobasic_snap.png">in
Windows doing Windows.Forms</a> and in Linux doing <a
ref="images/gtk-vb.png">VB with Gtk#</a> (courtesy of Alp).
href="images/gtk-vb.png">VB with Gtk#</a> (courtesy of Alp).
Daniel Morgan has checked in his Oracle provider to the CVS
repository as well.
@@ -493,6 +781,8 @@
@item Aug 20th, 2002: Remoting work, Resources, SPARC checkins, ADO.NET
<b>San Francisco</b>: August 14th. Linux World Expo.
Mark Crichton has checked in his patches to get the SPARC port
on par with the PPC port.
+23 -5
View File
@@ -1,7 +1,7 @@
* Debugging information
Compile your programs using the `-g' flag in MCS, that will generate a file
with the extension .dbg containing the dwarf symbols for your executable.
Compile your programs using the `-g' flag in MCS, that will all a special
resource containing debugging information to your executable.
To get stack traces with line number information, you need to run your
program like this:
@@ -15,9 +15,27 @@
* Mono Debugger
A new debugger has been created in C# and using Gtk# for its
user interface, this will simplify the debugging of CLI applications.
The Mono debugger is written in C# and can debug both managed
and unmanaged applications, support for multiple-threaded
applications and should be relatively easy to port to new
platforms.
Stay turned for its first public release.
Details of the release are available in <a
href="http://lists.ximian.com/archives/public/mono-list/2003-January/011415.html">post</a>.
The debugger contains both Gtk# and command line interfaces.
The debugging file format used in Dwarf (its already supported
by our class libraries and the Mono C# compiler; To debug C
applications, you need a recent GCC, or to pass the -gdwarf-2
flag to gcc).
The debugger is available now, you can get it from <a
href="http://primates.ximian.com/~martin/debugger/mono-debugger-0.2.0.tar.gz">here</a>
-86
View File
@@ -1,86 +0,0 @@
* A debugging session using a dynamically generated symbol file.
Let's assume we have the following C# application which we want to debug:
<pre>
using System;
public class Foo
{
public struct MyStruct {
int a;
long b;
double c;
}
public static void Main ()
{
Int32 value = 5;
long test = 512;
MyStruct my_struct;
my_struct.a = 5;
my_struct.b = test;
my_struct.c = 23323.5235;
}
}
</pre>
First of all, we need to compile it and create the .il files:
<pre>
$ mcs ./Foo.cs
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
$ monodis Foo.exe > Foo.il
</pre>
Now we can start the JIT in the debugger:
<pre>
$ gdb ~/monocvs/mono/mono/jit/mono
(gdb) r --debug=dwarf --break Foo:Main ./Foo.exe
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf --break Foo:Main ./Foo.exe
0x081e8911 in ?? ()
(gdb) call mono_debug_make_symbols ()
(gdb) add-symbol-file /tmp/Foo.o
Reading symbols from /tmp/Foo.o...done.
Current language: auto; currently c++
(gdb) frame
#0 Foo.Main () at Foo.il:26
26 // method line 2
(gdb) n
Foo.Main () at Foo.il:38
38 IL_0000: ldc.i4.5
(gdb) list
33 .maxstack 2
34 .locals (
35 int32 V_0,
36 int64 V_1,
37 valuetype MyStruct V_2)
38 IL_0000: ldc.i4.5
39 IL_0001: stloc.0
40 IL_0002: ldc.i4 512
41 IL_0007: conv.i8
42 IL_0008: stloc.1
43 IL_0009: ldloca.s 2
44 IL_000b: ldc.i4.5
45 IL_000c: stfld int32 .MyStruct::a
46 IL_0011: ldloca.s 2
47 IL_0013: ldloc.1
48 IL_0014: stfld int64 .MyStruct::b
49 IL_0019: ldloca.s 2
50 IL_001b: ldc.r8 23323.5
51 IL_0024: stfld float64 .MyStruct::c
52 IL_0029: ret
(gdb) until 52
Foo.Main () at Foo.il:53
53 }
(gdb) info locals
V_0 = 5
V_1 = 512
V_2 = {a = 5, b = 512, c = 23323.523499999999}
</pre>
As you see in this example, you need to know IL code to use this debugging method - but
it may be the only way to debug a library.
-70
View File
@@ -1,70 +0,0 @@
* A debugging session using a symbol file which has been created by MCS.
Let's assume we have the following C# application which we want to debug:
<pre>
using System;
public class Foo
{
public struct MyStruct {
int a;
long b;
double c;
}
public static void Main ()
{
Int32 value = 5;
long test = 512;
MyStruct my_struct;
my_struct.a = 5;
my_struct.b = test;
my_struct.c = 23323.5235;
}
}
</pre>
First of all, we need to compile it with MCS, assemble the generated .s file and
create the .il files for all referenced assemblies which were not compiled with MCS:
<pre>
$ mcs -g ./Foo.cs
$ as -o Foo-debug.o Foo-debug.s
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
</pre>
Now we can start the JIT in the debugger:
<pre>
$ gdb ~/monocvs/mono/mono/jit/mono
(gdb) r --debug=dwarf-plus --break Foo:Main ./Foo.exe
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf-plus --break Foo:Main ./Foo.exe
Program received signal SIGTRAP, Trace/breakpoint trap.
0x081e8681 in ?? ()
(gdb) call mono_debug_make_symbols ()
(gdb) add-symbol-file Foo-debug.o
(gdb) add-symbol-file /tmp/corlib.o
` (gdb) frame
#0 Main () at ./Foo.cs:11
11 public static void Main ()
(gdb) n
Main () at ./Foo.cs:13
13 Int32 value = 5;
(gdb)
14 long test = 512;
(gdb)
17 my_struct.a = 5;
(gdb)
18 my_struct.b = test;
(gdb)
19 my_struct.c = 23323.5235;
(gdb)
20 }
(gdb) info locals
value = 5
test = 512
my_struct = { a = 5, b = 512, c = 23323.5235 }
</pre>
+23 -1
View File
@@ -8,6 +8,14 @@
* <a href="#MonoLogo">MonoLogo</a>
* <a href="#Oberon">Oberon</a>
* <a href="#Forth">Forth</a>
* <a href="#mbas">Mono Basic</a> (Mono's VB.NET compiler)
</ul>
Languages which are known to run, but we have not done a
complete ran of all their regression tests to validate it:
<ul>
* Kylix.NET.
</ul>
Languages we would like to have supported, with links to resources:
@@ -28,8 +36,15 @@
** Java
There is a very interesting project to make a JavaVM for .NET
<a href="http://radio.weblogs.com/0109845/">here</a>
<a href="http://radio.weblogs.com/0109845/">here</a>.
Zoltan has got IKVM to work with Mono.
<a name="PHP">
** PHP
Sterling has code to allow PHP developers to use Mono code, in
his <a href="http://www.php.net/~sterling/mono/">site</a>
<a name="MonoLogo">
** MonoLogo
@@ -40,6 +55,13 @@
hosted in the <a href="ccvs.html">Mono CVS</a> repository
and also available on the <a href="anoncvs.html">AnonCVS</a> mirrors.
<a name="mbas">
** Mono Basic (Mono's VB.NET compiler)
Work has resumed on the Mono Visual Basic compiler (currently
called mbas). It is part of the standard Mono distribution,
but its still an early compiler.
<a name="Oberon">
** Oberon
+57 -6
View File
@@ -6,7 +6,16 @@
There are a number of mailing lists for Mono in English:
<table>
<table border=1>
<tr>
<td>
<b><a
href="http://lists.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list</a></b>
</td>
<td>
Announcements of Mono developments.
</td>
</tr>
<tr>
<td>
<b><a
@@ -19,11 +28,39 @@
<tr>
<td>
<b><a
href="http://lists.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list</a></b>
href="http://lists.ximian.com/mailman/listinfo/mono-devel-list">mono-devel-list</a></b>
</td>
<td>
A mailing list specifically dedicated to discussions
about developing Mono and programming *with* Mono.
Programmers that work on Mono are _strongly_ encouraged
to join this list. Third-party programmers interested
in running or compiling their managed applications with
Mono or that are interested in using mono-specific
technologies should join the list as well.
<p>
Examples of on-topic arguments are:
<ul>
<li>proposals and patches for new features for the mono runtime and programs
<li>discussions about bugs in the mono runtime and programs
<li>discussions about future directions
<li>embedding API, scripting language bridges
<li>mono/mcs build issues
<li>programming with mono-specific assemblies
<li>discussions about third-party compilers that target and/or use directly the CLR
<li>discussions about getting a managed application run with mono
</ul>
<p>Topics that are better discussed on other mailing lists:
<ul>
<li> general C# questions (use the specific lists at develop.com)
<li> issues that are already covered by a more specific mono
mailing list (like System.Windows.Forms or Gtk#)
<li> success reports about new apps running on mono, including
runtime/buildtime support for new programming languages (use
mono-list to reach a wider audience)
</ul>
</td>
<td>
Announcements of Mono developments.
</td>
</tr>
<tr>
<td>
@@ -40,7 +77,7 @@
href="http://lists.ximian.com/mailman/listinfo/mono-patches">mono-patches</a></b>
</td>
<td>
Track the CVS activity of Mono on this mailing list (patches are sent to recipients).
Track the CVS activity of Mono on this mailing list (patches are sent to recipients). <p>
You can get <a href="http://www.go-mono.com/snapshots">daily snapshots</a> as well.
</td>
</tr>
@@ -80,6 +117,15 @@
Used to discuss the Windows.Forms implementatation for Mono using Wine.
</td>
</tr>
<tr>
<td>
<b><a
href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">gtk-sharp-list</a></b>
</td>
<td>
Used to discuss the Gtk bindings for Mono (<a href="http://gtk-sharp.sf.net">Gtk#</a>).
</td>
</tr>
</table>
Other mailing lists of interest:
@@ -92,6 +138,11 @@
</ul>
</ul>
* Alternative archive site
An alternate site that archives Mono List is available <a
href="http://archive.neotonic.com/archive/mono-list">http://archive.neotonic.com/archive/mono-list</a>
* Google search of the archives
<!-- Google Search with mods -->
+54
View File
@@ -0,0 +1,54 @@
* mbas: Mono's Basic.NET Compiler.
MBAS is a CIL compiler for the Visual Basic language, an extended
version of VisualBasic.NET. It's based on the MCS compiler
and still in heavy development, though many language features are
already supported.
** What works
<ul>
* Classes, Fields and Methods. Properties are still
being worked on.
* Module definition and Sub functionality (TODO: Function's)
* Namespace Import, so can you reference, instantiate
and call external assemblies
* Parameter passing between Sub's. ByVal and ByRef
parameters are being worked on.
* Delegates
* Object creation
* Events - to a limited extent. You can declare a
Class-Field as 'WithEvents' and dynamic events (i.e
AddHandler MyButton.Click, Button1_OnClick). Please
beware: just after committing the code, I discovered
that the handler field in the AddHandler call is
case-sensitive, a remnant of mBas' mcs heritage)
* Statements supported are 'If..Then..Else' ,
'While..End While' and assignment statements. Simple
operators (+, -, *, /, >, <, =) should also
work. Other statements (For..Next, etc.) should be
quite trivial to implement.
</ul>
A lot of this stuff is implemented rebuilding proper expressions and
statements on top of the classes provided by mcs (look at the grammar -
mb-parser.jay - and compare it with cs-parser.jay, if interested).
** TODO-list
At this stage almost every element of the language must be still checked for
conformance to MS'implementation. Help is particularly needed for those areas
I know little of (mcs internals are still quite obscure to me). I'd like to
implement class properties, the missing statements, exception handling,
structures and actual event support (not necessarily in this order). Once we
have all this stuff set up and reasonably bug-free, more work could be done
on helper functions and Object-vars handling.
+2 -5
View File
@@ -11,22 +11,19 @@
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/t1.html">Microsoft Windows</a>
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows/t1.html">Microsoft Windows</a>
PDF Format
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.pdf">Microsoft Windows</a>
XML Source
For <a href="mono-beginning.xml">RPM Linux based systems</a>
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.xml">Microsoft Windows</a>
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows.xml">Microsoft Windows</a>
Currently Hinne is working on a Mono Tools HOWTO. Which will be
+14 -2
View File
@@ -155,8 +155,20 @@ export PKG_CONFIG_PATH
# /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS. We could
# skip this if it would add /usr/include and /usr/lib, but leaving it
# shouldnt break anything.
iconvh=`locate include/iconv.h`
iconvh_dir=`dirname $iconvh`
iconvdirs="/usr/include /usr/local/include"
for i in $iconvdirs
do
if [ -f $i/iconv.h ]; then
iconvh_dir=$i
break
fi
done
if [ -z "$iconvh_dir" ]; then
echo "Can't find iconv headers (looked in $iconvdirs)"
exit -1
fi
iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'`
echo "Adding $iconvh_dir to CPPFLAGS"
+312 -49
View File
@@ -1,66 +1,329 @@
* MySQL Data Provider
<ul>
<li>MySQL Data Provider for
<a href="http://www.mysql.com/">MySQL</a> databases. It is written in C# and uses
the MySQL C Client Library
<p>There are two ADO.NET providers in Mono
for a <a href="http://www.mysql.com/">MySQL</a> database:
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql
<li>Works on Windows and Linux via the MySQL client shared library
(libmySQL.dll on Windows and libmysqlclient.so on Linux).
<li>Started by Daniel Morgan using C# Bindings to MySQL from Brad Meril.
<li><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL in the Microsoft .NET Environment</a> is an article
by Mr. Venu who is a MySQL AB developer.
<li>Other projects which have created a .NET Data provider for MySQL in C#
<ul>
<li><a href="http://sourceforge.net/projects/mysqlnet/">ByteFX.Data.MySQLClient</a>
<ul>
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL provider written in C#
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager provider written in C#
<li>Written in 100% C#</li>
<li>Does not require a client library</li>
<li>Works on Mono and Microsoft .NET</li>
<li>Requires at least Mono 0.18 and MySQLNet 0.65 for it to work on Mono</li>
<li>Works in the SQL# command-line and GTK# GUI version</li>
</ul>
</li>
<li>Mono.Data.MySql (deprecated)
<ul>
<li>Deprecated in favor of ByteFX.Data.MySQLClient
<li>Written in C# and uses
the MySQL C Client Library</li>
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql</li>
<li>Works on Windows and Linux via the MySQL client shared library
(libmySQL.dll on Windows and libmysqlclient.so on Linux).</li>
<li>Started by Daniel Morgan using
<a href="http://www.cybercom.net/~zbrad/DotNet/MySql/">C# Bindings to MySQL</a> from <a href="mailto:[email protected]">Brad Merill</a></li>
</ul>
</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
<p><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL
in the Microsoft .NET Environment</a> is an article
by Mr. Venu who is a MySQL AB developer.</li>
<p>Testing for Mono's Mono.Data.MySql and ByteFX's ByteFX.Data.MySQLClient is below.
* Current Status
** Current Status
Current Status of the MySQL providers:
<ul>
<li>can connect
<li>ByteFX.Data.MySQLClient
<ul>
<li>Build and Runs on Microsoft .NET and Mono</li>
<li>Works with SQL# (command-line and GTK# GUI versions)</li>
<li>MySQLCommandBuilder now implemented</li>
<li>Transaction support now implemented (not all table types support this)</li>
<li>GetSchemaTable fixed to not use xsd (for Mono)</li>
<li>Driver is now Mono-compatible</li>
<li>TIME data type now supported</li>
<li>More work to improve Timestamp data type handling</li>
<li>Changed signatures of all classes to match corresponding SqlClient classes</li>
<li>Protocol compression using <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a></li>
<li>Named pipes on Windows now working properly</li>
<li>Work done to improve Timestamp data type handling</li>
<li>Implemented IEnumerable on DataReader so DataGrid would work</li>
<li>Speed increased dramatically by removing bugging network sync code</li>
<li>Driver no longer buffers rows of data (more ADO.Net compliant)</li>
<li>Conversion bugs related to TIMESTAMP and DATETIME fields fixed</li>
</ul>
</li>
<li>can execute non-queries via ExecuteNonQuery()
<li>can execute aggregates via ExecuteScalar() and retrieve the
single row/single column result
<li>can execute queries and retrieve results using a data reader.
<li>a schema DataTable has been partially
implemented which is returned from GetSchemaTable() in MySqlDataReader.
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter
<li>Mono.Data.MySql (deprecated)
<ul>
<li>Currently, only works with version 3.23.x of MySQL</li>
<li>The shared client libraries
between windows version and linux are different: windows has libmySQL.dll
while linux has libmysqlclient.so. This is handled by the
file etc/mono/config which is mapped by the mono runtime in knowing
which native shared library to load. In cvs, this file is mono/config.in and
can be modified with a text editor.
<li>can connect</li>
<li>can execute non-queries via ExecuteNonQuery()</li>
<li>can execute aggregates via ExecuteScalar() and retrieve the
single row/single column result</li>
<li>can execute queries and retrieve results using a data reader.</li>
<li>a schema DataTable has been partially
implemented which is returned from GetSchemaTable() in MySqlDataReader.</li>
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter</li>
<li>The shared client libraries
between windows version and linux are different: windows has libmySQL.dll
while linux has libmysqlclient.so. This is handled by the
file etc/mono/config which is mapped by the mono runtime in knowing
which native shared library to load. In cvs, this file is mono/config.in and
can be modified with a text editor.</li>
<li>Works in the SQL# command-line and GTK# GUI version</li>
</ul>
</li>
</ul>
* Action plan
** Action plan
The current plan to work on the MySQL data provider:
The current plan for the MySQL data providers:
<ul>
<li>ByteFX.Data.MySQLClient
<ul>
<li>Testing and fixes</li>
<li>Implement missing features</li>
<li>Only fixes for bugs to build and run MySQLClient on Mono
will be accepted in mono-cvs. Most bugs and any new features will
go into sourceforge cvs. Anytime there is a release of MySQLClient,
the source code will be copied from sourceforge cvs to mono-cvs</li>
<li>Releases of MySQLClient are determined by Reggie Burnett and releases
of Mono are determined by Miguel de Icaza</li>
<li>Implement any missing features or fix any bugs in Mono to get new
features all of MySQLClient to work on Mono</li>
</ul>
</li>
<li>Mono.Data.MySql (deprecated)
<ul>
<li>Testing and bug fixes</li>
<li>Mono.Data.MySql is deprecated and therefore maybe removed
at a later date. It will stay in Mono for now because other
programs maybe using it now.</li>
</ul>
</li>
</ul>
** Testing for MySQLNet provider (ByteFX.Data.MySQLClient)
<ul>
<li>Have access to a MySQL database or download it from
<ul>
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
</ul>
</li>
<li>MySQLNet can be gotten from <a href="http://sourceforge.net/projects/mysqlnet/">here</a> and the
binary assembly ByteFX.Data.dll needs to be installed
in the same place as the mono class libraries.</li>
<li>MySQLNet requires <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a> which is
a Zip Library written in 100% C#. This is used for compression/decompression of data
sent/received over the network. The SharpZipLib binary assembly SharpZipLib.dll should
be installed in the same place as the mono class libraries.</li>
<li>Has a ConnectionString format:
<pre>
"Server=hostname;" +
"Database=database;" +
"User ID=username;" +
"Password=password"
</pre>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using ByteFX.Data.MySQLClient;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=test;" +
"User ID=myuserid;" +
"Password=mypassword;";
IDbConnection dbcon;
dbcon = new MySQLConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = (string) reader["firstname"];
string LastName = (string) reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Parameters support via MySqlParameter and MySqlParameterCollection
<li>Support LOBs (Large Object)
<li>Change the MySQL provider to not be dependent on a client library and
be written in 100% C#
<li>Connection pooling
<li>Get the provider to work like other data providers
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r ByteFX.Data.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r ByteFX.Data.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
** Testing for Mono's MySQL provider (Mono.Data.MySql)
<ul>
<li>Have access to a MySQL database or download it from
<ul>
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
</ul>
</li>
<li>Take a look at MySqlTest.cs in mcs/class/Mono.Data.MySql/Test</li>
<li>On Linux, you may need to make a symbolic link from libmySQL.dll to libmysqlclient.dll</li>
<li>Has a ConnectionString format:
<pre>
"Server=hostname;Database=database;User ID=username;Password=password"
(or)
"Host=hostname;Dbname=database;User=username;Passwd=password"
</pre>
<li>C# Example:
<pre>
using System;
using System.Data;
using Mono.Data.MySql;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=test;" +
"User ID=myuserid;" +
"Password=mypassword;";
IDbConnection dbcon;
dbcon = new MySqlConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs \
-r System.Data.dll \
-r Mono.Data.MySql.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll \
-r Mono.Data.MySql.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+195 -29
View File
@@ -1,52 +1,218 @@
* ODBC Data Provider
<ul>
<li>Exists in namespace System.Data.Odbc and assembly System.Data
<li>Works on Windows and Linux
<li>Works on Windows via the native Windows odbc32.dll
<li>Works on Linux via <a href="http://www.unixodbc.org/">unixODBC</a>
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a> and
an alternative list
<li>An alternative to unixODBC, but not tested with this
provider is <a href="http://www.iodbc.org">iODBC</a>
<li>Another alternative to unixODBC, but not tested this provider is
<a href="http://oplweb.openlinksw.com:8080/download/">OpenLink's</a>.
<ul>
<li>ADO.NET Data Provider for Data Sources
that have <a href="http://www.microsoft.com/data/odbc/">ODBC</a> support.</li>
<li>Exists in namespace System.Data.Odbc and assembly System.Data</li>
<li>Works on Windows and Linux. Should have no problems working on UNIX too.</li>
<li>Works on Windows via the native Windows odbc32.dll</li>
<li>Works on Linux via:
<ul>
<li><a href="http://www.unixodbc.org/">unixODBC</a> which has
commercial support
from <a href="http://www.easysoft.com/">Easysoft</a></li>
<li><a href="http://www.iodbc.org/">iODBC</a> which has
commercial support
from <a href="http://oplweb.openlinksw.com:8080/download/">OpenLink Software</a></li>
</ul>
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a>
<li>List of <a href="http://ourworld.compuserve.com/homepages/Ken_North/odbcvend.htm">ODBC Vendors</a>
<li>ODBC can connect to various databases which has an ODBC driver installed:
<ul>
<li><a href="http://www.mysql.com/">MySQL</a></li>
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
<li><a href="http://www.oracle.com/">Oracle</a></li>
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
<li><a href="http://www.sybase.com/downloads">Sybase</a> (
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a> on UNIX)</li>
</ul>
<li>ODBC Provider created by Brian Ritchie.
<li>ODBC Provider created by Brian Ritchie.</li>
<li>Does not support trusted connections</li>
</ul>
* Current Status
** Current Status
<ul>
<li>Connect on Windows via native Windows odbc32.dll
<li>Connect on Linux via unixODBC's libodbc.so
<li>Can Connect on:
<ul>
<li>Windows via native Windows odbc32.dll</a></li>
<li>Linux via:
<ul>
<li>unixODBC's libodbc.so</li>
<li>iODBC's libiodbc.so</li>
</ul>
</li>
</ul>
</li>
<li>Various databases have been tested using their
ODBC drivers: MySQL, Oracle, IBM DB2, and Microsoft SQL Server
ODBC drivers: MySQL, PostgreSQL, Oracle, IBM DB2, and Microsoft SQL Server</li>
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand</li>
<li>Can execute aggreates and retrieve a single row single column result via
ExecuteScalar of a OdbcCommand
ExecuteScalar of a OdbcCommand</li>
<li>Can execute queries via ExecuteReader of a OdbcCommand and
retrieve results using an OdbcDataReader.
retrieve results using an OdbcDataReader</li>
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader</li>
<li>Can Fill a DataTable in a DataSet via an OdbcDataAdapter</li>
<li>Works in SQL#, but Column names don't show up correctly.</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader
</ul>
* Action Plan
** Action Plan
<ul>
<li>Create a Data Adapter to Fill data into a DataTable in a DataSet
<li>TODO
<li>Fixing bugs
<li>Testing with other setups
</ul>
** Testing ODBC provider with IBM DB2 Universal Database
<ul>
<li>You need a working mono and mcs</li>
<li>For Unix, you will need unixODBC or iODBC installed</li>
<li>Have acess to a <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a> or
you can download from IBM</li>
<li>Read these web pages about Unix, ODBC, and IBM DB2
<ul>
<li><a href="http://www.unixodbc.com/doc/db2.html">unixODBC web page about IBM DB2</a></li>
<li><a href="http://www-3.ibm.com/software/data/db2/udb/ad/v8/cli/t0010406">IBM web page about unixODBC and DB2</a></li>
</ul>
</li>
<li>The ODBC provider is similar to the <a href="http://www.go-mono.com/ibmdb2.html">IBM DB2</a> provider.</li>
</ul>
** Testing ODBC provider with MySQL
<p>You can test Mono's ODBC provider System.Data.Odbc with the MySQL ODBC driver MyODBC
<p><ul>
<li>Take a look at OdbcTest.cs in mcs/class/System.Data/Test</li>
<li>Here is a ConnectionString format if you have a DSN setup:
<pre>
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
</pre>
</li>
<li>Here is a ConnectionString format if you do not have a DSN (have not
gotten this to work though):
<pre>
"DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=localhost;DATABASE=test;" +
"UID=myuserid;PASSWORD=mypassword;" +
"OPTION=3";
</pre>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using System.Data.Odbc;
public class Test
{
public static void Main(string[] args)
{
// have an ODBC DSN setup named MYSQLDSN
// that accesses a MySQL database via
// MyODBC driver for ODBC with a
// hostname of localhost and database test
string connectionString =
"DSN=MYSQLDSN;" +
"UID=myuserid;" +
"PWD=mypassword";
IDbConnection dbcon;
dbcon.Open();
dbcon = new OdbcConnection(connectionString);
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+123 -23
View File
@@ -1,53 +1,153 @@
* OLE DB Provider
<ul>
<li> Provides a OleDb-like provider for Mono
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.</li>
<li> Exists in namespace System.Data.OleDb and assembly System.Data
<li> Exists in namespace System.Data.OleDb and assembly System.Data</li>
<li>Created by Rodrigo Moya
<li>Created by Rodrigo Moya</li>
<li>LibGDA has providers for:
<li>LibGDA has providers for:</li>
<ul>
<li><a href="http://www.mysql.com/">MySQL</a>
<li><a href="http://www.postgresql.org/">PostgreSQL</a>
<li>XML
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)
<li><a href="http://www.oracle.com/">Oracle</a>
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a>
<li><a href="http://www.mysql.com/">MySQL</a></li>
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
<li>XML</li>
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)</li>
<li><a href="http://www.oracle.com/">Oracle</a></li>
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
<li><a href="http://www.sybase.com/downloads">Sybase</a> and
<a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
via <a href="http://www.freetds.org/">FreeTDS</a>)
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)
via <a href="http://www.freetds.org/">FreeTDS</a>)</li>
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a></li>
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a></li>
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)</li>
</ul>
</li>
<li>Does not support trusted connections</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
* Current Status
** Current Status
<ul>
<li>The OleDb provider is working with libgda (an OLE-DB/ADO data access for Unix).
The C-Sharp bindings to libgda currently work - meaning they can compile, run,
and you can connect to a
PostgreSQL database via libgda via the C-Sharp bindings to libgda.
PostgreSQL database via libgda via the C-Sharp bindings to libgda.</li>
<li>Basic
functionality (execution of commands, data retrieval, transactions, etc) are
now working.
now working.</li>
<li>An inital implementation of GetSchemaTable() for
the OleDbDataReader has been checked into cvs. GetSchemaTable() isn't correct for OleDb,
but the foundation is there.
but the foundation is there.</li>
</ul>
* Action Plan
** Action Plan
<ul>
<li>Current focus is on filling up the missing pieces (Data adapters
mainly) and schema support.
mainly) and schema support.</li>
<li>We need help building libgda on Windows though. libgda
builds find on linux though.
builds find on linux though.</li>
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET</li>
</ul>
** Testing OleDb with libgda's PostgreSQL provider
<ul>
<li>Requires a working mono and mcs</li>
<li>Requires Linux because the OleDb provider uses libgda and libgda only
works on Linux.</li>
<li>Connection String format: "Provider=providerName;...". providerName is the
name of the Provider you use, such as, PostgreSQL, MySQL, etc. The elipsis ...
means that the connection parameters are dependent upon the provider being used and
are passed to libgda for connecting. Such paramters, can be: Database, User ID, Password,
Server, etc...</li>
<li>See the test TestOleDb.cs found at mcs/class/System.Data/System.Data.OleDb</li>
<li>C# Example for Mono's System.Data.OleDb:
<pre>
using System;
using System.Data;
using System.Data.OleDb;
public class Test
{
public static void Main(string[] args)
{
// there is a libgda PostgreSQL provider
string connectionString =
"Provider=PostgreSQL;" +
"Addr=127.0.0.1;" +
"Database=test;" +
"User ID=postgres;" +
"Password=fun2db";
IDbConnection dbcon;
dbcon = new OleDbConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
Executable
+184
View File
@@ -0,0 +1,184 @@
* Oracle Data Provider
<ul>
<li>ADO.NET Data Provider for <a href="http://www.oracle.com/">Oracle</a> databases</li>
<li>Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient</li>
<li>Works on Windows and Linux</li>
<li>Works with Oracle 8i</li>
<li>Untested, but should work with Oracle 9i</li>
<li>Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
software</li>
<li>Internally, the OracleClient provider has OCI abstracted to an object-oriented programming model</li>
<li>Created by Daniel Morgan and Tim Coleman</li>
<li>Does not support trusted connections</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
** Current Status
<ul>
<li>OracleConnection can connect and disconnect to an Oracle 8i database on
Windows and Linux via OCI (Oracle Call-level Interface)</li>
<li>No longer uses a glue library (a library between the System.Data.OracleClient.dll
assembly and the oci library). In Current Mono cvs, System.Data.OracleClient
directly platform invokes into the oci library thanks to Tim Coleman.</li>
<li>Can have multiple connections with different transactions where each transaction is
separated from the others, so a rollback or commit in one transaction
does not affect the other.</li>
<li>Can execute simple DML SQL statements, such as,
INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method</li>
<li>The System.Data.OracleClient.dll assembly can be built with mcs/mono via
the makefile.gnu for System.Data.OracleClient or csc/.net via the
System.Data.OracleClient.build nant build file.</li>
<li>Can retrieve data via ExecuteReader and OracleDataReader. Currently,
supports character, numeric, some date data types. ExecuteScalar
also works.</li>
<li>Simple input parameters (character and numeric data) can now
be used in SQL queries. Output parameters do not yet work.</li>
<li>OracleException and Error handling exists now.</li>
<li>Message handling needs to be added for non-critical messages
received from Oracle</li>
<li>Handling of various data types need to be added.</li>
<li>Data Adapter exists, and a DataSet can be filled using it. The
Data Adapter is abstract enough that it should work as expected.</li>
<li>Lots of missing functionality and bugs.</li>
<li>Works with SQL# command-line and GTK# versions in cvs. Only works with
simple character data though. SQL# For GTK# can only show the results to
the TextView because the Data Adapter is not yet available</li>
</ul>
** Action Plan
<ul>
<li>Be able to retrieve results via a data reader (WORKING)</li>
<li>Parameters support (IN PROGRESS)</li>
<li>transactions (WORKING)</li>
<li>Stored Procedures, Functions, and Packages support</li>
<li>Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)</li>
<li>Support for Oracle 8i and 9i (UNKNOWN)</li>
<li>Support LOBs</li>
<li>Support all the data types</li>
<li>Implement Connection pooling</li>
<li>Security</li>
</ul>
** Testing System.Data.OracleClient
<ul>
<li>Have a working mono and mcs</li>
<li>Have access to an Oracle 8i database or download it from
<a href="http://www.oracle.com/">Oracle</a>. If you are connecting
remotely to an Oracle database, you need the Oracle client software.
Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
I suggest you do a lot of searching to see how others installed Oracle on Linux.</li>
<li>Make sure System.Data.OracleClient.dll assembly is built, if not, go
into System.Data.OracleClient and do a make -f makefile.gnu (on Linux) or
../../nant/NAnt.exe (on Windows using Cygwin).</li>
<li>Take a look at TestOracleClient.cs found at mcs/class/System.Data.OracleClient/Test</li>
<li>The Data Source is an Oracle TNSNAME</li>
<li>Has a connection string format:
<pre>
"Data Source=tnsname;User ID=userid;Password=password"
</pre>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using System.Data.OracleClient;
public class Test
{
public static void Main (string[] args)
{
string connectionString =
"Data Source=testdb;" +
"User ID=scott;" +
"Password=tiger;";
IDbConnection dbcon;
dbcon = new OracleConnection (connectionString);
dbcon.Open ();
IDbCommand dbcmd = dbcon.CreateCommand ();
string sql = "SELECT ename, job FROM scott.emp";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader ();
while (reader.Read ()) {
string employeeName = reader["ename"];
string job = reader["job"];
Console.WriteLine ("Employee Name: {0} Job: {1}",
employeeName, job);
}
// clean up
reader.Close ();
reader = null;
dbcmd.CommandText = sql;
dbcmd.ExecuteNonQuery ();
dbcmd.Dispose ();
dbcmd = null;
dbcon.Close ();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r System.Data.OracleClient.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r System.Data.OracleClient.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+34
View File
@@ -0,0 +1,34 @@
* International sites
<ul>
<li><a href="http://mono.es.gnome.org">Mono
Hispano</a>: The spanish-speaking community of Mono
developers and users. They have quite a number of
unique documents and tutorials.
<li><a href="http://www.go-mono.pl">Mono Poland</a>:
Mono site for polish users.
</ul>
* User sites
<ul>
<li>Alp Toker's <a
href="http://www.atoker.com/mono/">site</a>: He is an
active Mono developer (gsirc, platano) and produces
very nice Debian packages of Mono.
<li>Brian Ritchie's <a
href="http://www12.brinkster.com/brianr/">site</a>:
Brian is a contributor to Mono's class library (ODBC
provider and the database multiplexing assembly), and
has built an application server for .NET and Mono.
His site contains news, software, as well as his
weblog.
</ul>
-246
View File
@@ -1,246 +0,0 @@
System.Object
System.Exception
System.ValueType
System.Delegate
System.MulticastDelegate
System.Enum
System.Activator
System.ArgIterator
System.__ComObject
System.TypedReference
System.Security.AllowPartiallyTrustedCallersAttribute
System.Runtime.Serialization.Formatter
System.Runtime.Serialization.FormatterConverter
System.Runtime.Serialization.FormatterServices
System.Runtime.Serialization.ObjectIDGenerator
System.Runtime.Serialization.ObjectManager
System.Reflection.ModuleResolveEventHandler
System.Reflection.Pointer
System.Globalization.CompareInfo
System.Globalization.HebrewCalendar
System.Globalization.HijriCalendar
System.Globalization.JapaneseCalendar
System.Globalization.KoreanCalendar
System.Globalization.SortKey
System.Globalization.StringInfo
System.Globalization.TaiwanCalendar
System.Globalization.TextElementEnumerator
System.Globalization.TextInfo
System.Globalization.ThaiBuddhistCalendar
System.IO.IsolatedStorage.IsolatedStorageFile
System.Reflection.Emit.MethodRental
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
System.Runtime.CompilerServices.CallConvCdecl
System.Runtime.CompilerServices.CallConvStdcall
System.Runtime.CompilerServices.CallConvThiscall
System.Runtime.CompilerServices.CallConvFastcall
System.Runtime.CompilerServices.CustomConstantAttribute
System.Runtime.CompilerServices.DateTimeConstantAttribute
System.Runtime.CompilerServices.DiscardableAttribute
System.Runtime.CompilerServices.DecimalConstantAttribute
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
System.Runtime.CompilerServices.IDispatchConstantAttribute
System.Runtime.CompilerServices.IsVolatile
System.Runtime.CompilerServices.IUnknownConstantAttribute
System.Runtime.CompilerServices.RequiredAttributeAttribute
System.Runtime.InteropServices.ArrayWithOffset
System.Runtime.InteropServices.DispIdAttribute
System.Runtime.InteropServices.ClassInterfaceType
System.Runtime.InteropServices.ClassInterfaceAttribute
System.Runtime.InteropServices.ComVisibleAttribute
System.Runtime.InteropServices.LCIDConversionAttribute
System.Runtime.InteropServices.ComRegisterFunctionAttribute
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
System.Runtime.InteropServices.ProgIdAttribute
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
System.Runtime.InteropServices.IDispatchImplType
System.Runtime.InteropServices.IDispatchImplAttribute
System.Runtime.InteropServices.ComSourceInterfacesAttribute
System.Runtime.InteropServices.ComConversionLossAttribute
System.Runtime.InteropServices.TypeLibTypeFlags
System.Runtime.InteropServices.TypeLibFuncFlags
System.Runtime.InteropServices.TypeLibVarFlags
System.Runtime.InteropServices.TypeLibTypeAttribute
System.Runtime.InteropServices.TypeLibFuncAttribute
System.Runtime.InteropServices.TypeLibVarAttribute
System.Runtime.InteropServices.ComImportAttribute
System.Runtime.InteropServices.PreserveSigAttribute
System.Runtime.InteropServices.ComAliasNameAttribute
System.Runtime.InteropServices.AutomationProxyAttribute
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
System.Runtime.InteropServices.CoClassAttribute
System.Runtime.InteropServices.ComEventInterfaceAttribute
System.Runtime.InteropServices.COMException
System.Runtime.InteropServices.ComMemberType
System.Runtime.InteropServices.CurrencyWrapper
System.Runtime.InteropServices.DispatchWrapper
System.Runtime.InteropServices.ErrorWrapper
System.Runtime.InteropServices.ExtensibleClassFactory
System.Runtime.InteropServices.HandleRef
System.Runtime.InteropServices.InvalidComObjectException
System.Runtime.InteropServices.InvalidOleVariantTypeException
System.Runtime.InteropServices.TypeLibImporterFlags
System.Runtime.InteropServices.ExporterEventKind
System.Runtime.InteropServices.ITypeLibExporterNotifySink
System.Runtime.InteropServices.ITypeLibConverter
System.Runtime.InteropServices.MarshalDirectiveException
System.Runtime.InteropServices.ObjectCreationDelegate
System.Runtime.InteropServices.RuntimeEnvironment
System.Runtime.InteropServices.RegistrationServices
System.Runtime.InteropServices.SafeArrayRankMismatchException
System.Runtime.InteropServices.SafeArrayTypeMismatchException
System.Runtime.InteropServices.SEHException
System.Runtime.InteropServices.TypeLibConverter
System.Runtime.InteropServices.BIND_OPTS
System.Runtime.InteropServices.UCOMIBindCtx
System.Runtime.InteropServices.UCOMIConnectionPointContainer
System.Runtime.InteropServices.UCOMIConnectionPoint
System.Runtime.InteropServices.UCOMIEnumMoniker
System.Runtime.InteropServices.CONNECTDATA
System.Runtime.InteropServices.UCOMIEnumConnections
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
System.Runtime.InteropServices.UCOMIEnumString
System.Runtime.InteropServices.UCOMIEnumVARIANT
System.Runtime.InteropServices.FILETIME
System.Runtime.InteropServices.UCOMIMoniker
System.Runtime.InteropServices.UCOMIPersistFile
System.Runtime.InteropServices.UCOMIRunningObjectTable
System.Runtime.InteropServices.STATSTG
System.Runtime.InteropServices.UCOMIStream
System.Runtime.InteropServices.DESCKIND
System.Runtime.InteropServices.BINDPTR
System.Runtime.InteropServices.UCOMITypeComp
System.Runtime.InteropServices.TYPEKIND
System.Runtime.InteropServices.TYPEFLAGS
System.Runtime.InteropServices.IMPLTYPEFLAGS
System.Runtime.InteropServices.TYPEATTR
System.Runtime.InteropServices.FUNCDESC
System.Runtime.InteropServices.IDLFLAG
System.Runtime.InteropServices.IDLDESC
System.Runtime.InteropServices.PARAMFLAG
System.Runtime.InteropServices.PARAMDESC
System.Runtime.InteropServices.TYPEDESC
System.Runtime.InteropServices.ELEMDESC
System.Runtime.InteropServices.VARDESC
System.Runtime.InteropServices.DISPPARAMS
System.Runtime.InteropServices.EXCEPINFO
System.Runtime.InteropServices.FUNCKIND
System.Runtime.InteropServices.INVOKEKIND
System.Runtime.InteropServices.CALLCONV
System.Runtime.InteropServices.FUNCFLAGS
System.Runtime.InteropServices.VARFLAGS
System.Runtime.InteropServices.UCOMITypeInfo
System.Runtime.InteropServices.SYSKIND
System.Runtime.InteropServices.LIBFLAGS
System.Runtime.InteropServices.TYPELIBATTR
System.Runtime.InteropServices.UCOMITypeLib
System.Runtime.InteropServices.UnknownWrapper
System.Runtime.Remoting.IObjectHandle
System.Runtime.Remoting.IRemotingTypeInfo
System.Runtime.Remoting.IChannelInfo
System.Runtime.Remoting.IEnvoyInfo
System.Runtime.Remoting.RemotingConfiguration
System.Runtime.Remoting.TypeEntry
System.Runtime.Remoting.ActivatedClientTypeEntry
System.Runtime.Remoting.ActivatedServiceTypeEntry
System.Runtime.Remoting.WellKnownClientTypeEntry
System.Runtime.Remoting.WellKnownServiceTypeEntry
System.Runtime.Remoting.RemotingException
System.Runtime.Remoting.ServerException
System.Runtime.Remoting.RemotingTimeoutException
System.Runtime.Remoting.RemotingServices
System.Runtime.Remoting.InternalRemotingServices
System.Runtime.Remoting.SoapServices
System.Runtime.Remoting.Activation.UrlAttribute
System.Runtime.Remoting.Messaging.IMessageSink
System.Runtime.Remoting.Messaging.AsyncResult
System.Runtime.Remoting.Messaging.CallContext
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
System.Runtime.Remoting.Messaging.InternalMessageWrapper
System.Runtime.Remoting.Messaging.IMethodCallMessage
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
System.Runtime.Remoting.Messaging.HeaderHandler
System.Runtime.Remoting.Messaging.IMessageCtrl
System.Runtime.Remoting.Messaging.IRemotingFormatter
System.Runtime.Remoting.Messaging.ReturnMessage
System.Runtime.Remoting.Messaging.MethodCall
System.Runtime.Remoting.Messaging.ConstructionCall
System.Runtime.Remoting.Messaging.MethodResponse
System.Runtime.Remoting.Messaging.ConstructionResponse
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
System.Runtime.Remoting.Messaging.OneWayAttribute
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
System.Runtime.Remoting.Contexts.CrossContextDelegate
System.Runtime.Remoting.Contexts.ContextProperty
System.Runtime.Remoting.Contexts.IContextPropertyActivator
System.Runtime.Remoting.Contexts.IContributeClientContextSink
System.Runtime.Remoting.Contexts.IContributeDynamicSink
System.Runtime.Remoting.Contexts.IContributeEnvoySink
System.Runtime.Remoting.Contexts.IContributeObjectSink
System.Runtime.Remoting.Contexts.IContributeServerContextSink
System.Runtime.Serialization.Formatters.InternalRM
System.Runtime.Serialization.Formatters.InternalST
System.Runtime.Serialization.Formatters.SoapMessage
System.Runtime.Serialization.Formatters.SoapFault
System.Runtime.Serialization.Formatters.ServerFault
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
System.Security.Cryptography.CryptoConfig
System.Security.Cryptography.KeyedHashAlgorithm
System.Security.Cryptography.HMACSHA1
System.Security.Cryptography.MACTripleDES
System.Security.Cryptography.MaskGenerationMethod
System.Security.Cryptography.PasswordDeriveBytes
System.Security.Cryptography.PKCS1MaskGenerationMethod
System.Security.Cryptography.RC2
System.Security.Cryptography.RC2CryptoServiceProvider
System.Security.Cryptography.RSACryptoServiceProvider
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
System.Security.Cryptography.RSAPKCS1SignatureFormatter
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.TripleDES
System.Security.Cryptography.TripleDESCryptoServiceProvider
System.Security.Permissions.EnvironmentPermission
System.Security.Permissions.FileDialogPermission
System.Security.Permissions.IsolatedStorageFilePermission
System.Security.Permissions.PrincipalPermissionAttribute
System.Security.Permissions.SecurityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermission
System.Security.Permissions.ReflectionPermission
System.Security.Permissions.RegistryPermission
System.Security.Permissions.PrincipalPermission
System.Security.Permissions.SiteIdentityPermission
System.Security.Permissions.StrongNameIdentityPermission
System.Security.Permissions.StrongNamePublicKeyBlob
System.Security.Permissions.UIPermission
System.Security.Permissions.UrlIdentityPermission
System.Security.Permissions.ZoneIdentityPermission
System.Security.Policy.ApplicationDirectory
System.Security.Policy.ApplicationDirectoryMembershipCondition
System.Security.Policy.FirstMatchCodeGroup
System.Security.Policy.Hash
System.Security.Policy.HashMembershipCondition
System.Security.Policy.NetCodeGroup
System.Security.Policy.PermissionRequestEvidence
System.Security.Policy.Publisher
System.Security.Policy.PublisherMembershipCondition
System.Security.Policy.Site
System.Security.Policy.SiteMembershipCondition
System.Security.Policy.StrongName
System.Security.Policy.StrongNameMembershipCondition
System.Security.Policy.UnionCodeGroup
System.Security.Policy.Url
System.Security.Policy.UrlMembershipCondition
System.Security.Policy.Zone
System.Security.Policy.ZoneMembershipCondition
System.Security.Principal.WindowsIdentity
System.Security.Principal.WindowsImpersonationContext
System.Security.Principal.WindowsPrincipal
System.Threading.CompressedStack
+297 -231
View File
@@ -1,81 +1,187 @@
* PostgreSQL Data Provider
There are two ADO.NET data providers for <a href="http://www.postgresql.org/">PostgreSQL</a> in Mono:
<ul>
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
<ul>
<li>a .NET Managed Data Provider for PostgreSQL
<li>Written in 100% C#</li>
<li>does not require a client library</li>
<li>works on Mono and Microsoft .NET</li>
<li>created by Francisco Figueiredo jr. and has many developers working on it
<li>works in the SQL# (command-line and GTK# GUI versions)</li>
<li>in namespace Npgsql and assembly Npgsql and is found in mcs
at mcs/class/Npgsql</li>
</ul>
</li>
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
client/server database management system.
<li>Mono.Data.PostgreSQL (deprecated)
<ul>
<li>Deprecated in favor of Npgsql</li>
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql</li>
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
and libpq.so on Linux.
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
client/server database management system.</li>
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
and libpq.so on Linux.</li>
</ul>
</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
* Current Status
Below, see separate Testing sections for Npgsql and Mono.Data.PostgreSqlClient.
** Current Status
<ul>
<li>Npgsql
<ul>
<li>Builds and Runs on both Microsoft .NET and Mono.</li>
<li>Works using SQL# (command-line and GTK# versions)</li>
<li>You can send insert, update, delete queries
through NpgsqlCommand.ExecuteNonQuery() method.</li>
<li>You can send queries like, select count(*) from table, select version()
with NpgsqlCommand.ExecuteScalar() method.</li>
<li>There is logging support. (Thanks Dave Page)
To use it, place code like that in your program:</li>
<pre>
// Enable logging.
NpgsqlEventLog.Level = LogLevel.Debug; // LogLevel.
NpgsqlEventLog.LogName = "NpgsqlTests.LogFile"; // LogFile.
</pre>
<li>You can use Npgsql with Mono (Thanks Kristis Makris). It is not working perfectly.</li>
<li>There is a winforms test suite (Thanks Dave Page).</li>
<li>Clearer code in NpgsqlConnection removing *magic* numbers and constants. (Thanks Kristis Makris)</li>
<li>Better support of ODBC-like ConnectionString in NpgsqlConnection (Thanks Dave Page)</li>
<li>Thanks Ulrich Sprick for all discussion and ideas.</li>
</ul>
</li>
<li>Mono.Data.PostgreSQL status
<ul>
<li>Deprecated in favor of Npgsql</li>
<li>We are able to do simple CREATE TABLE, DROP TABLE, UPDATE, INSERT, and
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.</li>
<li>We can execute multiple queries and do a NextResult() in PgSqlDataReader()
to get the next result set.
to get the next result set.</li>
<li>We are also able to do simple aggregate functions,
ie, count(), sum(), min(), and max()
in a simple SELECT SQL query using the ExecuteScalar() now.
in a simple SELECT SQL query using the ExecuteScalar() now.</li>
<li>We are also able to retrieve data with a simple SELECT SQL query
using ExecuteReader() which returns a PgSqlDataReader. We are able to
use GetSchemaTable() to get the meta data about the table columns.
We are able to Read() to get each row from the result set.
We are able to Read() to get each row from the result set.</li>
<li>We are able to get
String data (char, character, text, varchar), Int16 (smallint),
Int32 (integer), Int64 (bigint), DateTime (time, date, timestamp),
Boolean (boolean), Single (float), and Double (double).
More data types will come later. Note, the types that do work still
need thorough testing.
need thorough testing.</li>
<li>Rows that are returned which contain columns that are NULL are handled now.
The PgSqlDataReader method IsDBNull() needs to be called to determine
if a field IS NULL before trying to read data from that field.
if a field IS NULL before trying to read data from that field.</li>
<li>Calling PostgreSQL stored procedures works. It does not work perfectly.
It may not
even work to specification - yet. If you want to test it yourself, look at
TestSqlDataReader.cs or PostgresTest.cs in
mcs/class/System.Data/Test.
mcs/class/System.Data/Test.</li>
<li>Below, I have some sample code you can
use to call a PostgreSQL stored procedure named "version". This stored
procedure returns a string containing the PostgreSQL server version. Notice
the CommandType is StoredProcedure and the method ExecuteScalar() is called.
the CommandType is StoredProcedure and the method ExecuteScalar() is called.</li>
<li>ExecuteScalar() is a lightweight method in class PgSqlCommand that only returns
one row and one column as one object - even if there is more than row or column.
one row and one column as one object - even if there is more than row or column.</li>
<li>We have the beginnings of Parameters support PostgreSQL. Only
Input Parameters are currently supported. Output, Input/Output,
and Return parameters still need to be done.
<li>A lot of functionality in System.Data is missing, but the
infrastructure is starting to come together.
and Return parameters still need to be done.</li>
<li>A lot of Exceptions need to be thrown for various exceptions. However,
PgSqlException, PgSqlErrorCollection, and PgSqlError have been partially
implemented.
implemented.</li>
<li>Tim Coleman and Rodrigo Moya got the beginnings of the
PgSqlDataAdapter/DataSet/DataTable/DataRow to work. Currently,
the PgSqlDataAdapter can Fill() relational data into a DataTable in a DataSet.
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.</li>
<li>Works in the SQL# command-line version
and the GTK# version on Linux. It only works in SQL# command-line version
on Windows.</li>
</ul>
</li>
</ul>
* Testing the PostgreSQL Provider
** Action Plan
<ul>
<li>More testing and fixing bugs</li>
<li>Better error handling</li>
<li>More Data Types to use</li>
<li>Any features for Npgsql should be implemented in Npgsql's main cvs repository at
gborg.postgresql.org. Most bugs should be fixed in gborg.postgresql.org's cvs.
Only bugs neccessary for building and running of Npgsql on Mono can be done in Mono cvs,
but once applied they should be sent to Npgsql's mailing list
at gborg.postgresql.org for inclusion into cvs there. Whenever there is
a release of Npgsql (determined by Francisco Figueiredo jr. or a release
of Mono (determined by Miguel de Icaza), then the Npgsql source
in gborg.postgresql.org's cvs will be used to update the Npgsql source in
Mono's cvs.
</li>
<li>Mono.Data.PostgreSqlClient even though deprecated can still
accept bug fixes. This is because other areas, such as, ASP.NET examples
may still use this provider.</li>
<li>Add any missing functionality to Npgsql. If this funtionality works on
.NET but not on Mono, implement the missing features or fix the bugs in Mono</li>
<li>Npgsql has replaced Mono.Data.PostgreSqlClient as the provider of
choice to use. However, Mono.Data.PostgreSqlClient will remain in a
deprecated state until nobody uses it anymore - then it can be removed</li>
<li>Implement more of PostgreSQL 7.3 features in Npgsql</li>
</ul>
** Testing Mono.Data.PostgreSqlClient
<ul>
* <p>In order to test Mono.Data.PostgreSqlClient, you will need to have
access to a remote PostgreSQL DBMS, or you will have to install
one locally. PostgreSQL was first ADO.NET provider created in Mono.
one locally. PostgreSQL was the first ADO.NET provider created in Mono.
<p>Why use PostgreSQL? Because it is free software, has a client
library that is easy to use, PostgreSQL is easy to install on
@@ -94,7 +200,9 @@
user "postgres".
<pre>
"host=localhost;dbname=test;user=postgres"
"Server=localhost;Database=test;User ID=postgres;Password=fun2db"
(or)
"host=localhost;dbname=test;user=postgres;password=fun2db"
</pre>
</ul>
@@ -179,9 +287,15 @@ create user postgres with password 'fun2db';
* <p>Important notes from this file are:
<ul>
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/OBSOLETE/V1.1/cygipc/index.html">CygIPC</a> package.
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html">CygIPC</a> package.
Cygwin includes a utility bunzip2 which can be used to unzip it. Now, change to
the root directory by
typing "cd /" then
you can use "tar xvf cygipc.xxx.tar" to untar it
in the root directory in cygwin.
<p>The cygipc package contains the ipc-daemon you will need
<p>The cygipc package contains the support to run ipc-daemon
that you will need
to run before you can
run the PostgreSQL DBMS Server daemon (postmaster) or run
initdb which initializes the PostgreSQL database.
@@ -267,34 +381,9 @@ create user postgres with password 'fun2db';
</ul>
<p>In the path mcs/class/System.Data/Test
there is a PostgreSQL test program named
there is a test for Mono.Data.PostgreSqlClient named
PostgreTest.cs. Thanks goes to Gonzalo for creating the original
PostgreSQL test.
<p>To use it to test System.Data, you
modify the file to your PostgreSQL database
connection requirements:
<p>
<ul>
<li><b>dbname</b> database, ie., test</li>
<li><b>host</b> hostname of the PostgreSQL DBMS Server, ie., localhost</li>
<li><b>user</b> username, ie., someuser</li>
<li><b>password</b> password, ie., mypass1234</li>
</ul>
<p>The connection string is in OLE-DB connection string format. Internally,
SqlConnection converts this to the PostgreSQL connection string format.
<p>
<pre>
OLE-DB: "host=localhost;dbname=test;user=joe;password=smoe"
PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
</pre>
<p>
Note that OLE-DB includes the semicolons while PostgreSQL's connection
string does not.
<p>
To compile the PostgresTest.cs program, do:
@@ -310,7 +399,7 @@ PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
to PgSqlConnection, then you need to run mcs like:
<pre>
mono f:/cygwin/home/DanielMorgan/mono/install/bin/mcs.exe \
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
PostgresTest.cs \
-r System.Data.dll \
-r Mono.Data.PostgreSqlClient.dll
@@ -328,185 +417,162 @@ mint PostgresTest.exe
To run using mono, do:
<pre>
mono PostgresTest.exe
</pre>
<p>C# Example for Mono.Data.PostgreSqlClient:
<pre>
using System;
using System.Data;
using Mono.Data.PostgreSqlClient;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=test;" +
"User ID=postgres;" +
"Password=fun2db;";
IDbConnection dbcon;
dbcon = new PgConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname" +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
<p>Below, I show how the output from PostgresTest. I have omitted a lot
of the meta data for the columns except two columns. The classes
used were from Mono.Data.PostgreSqlClient and were used to connect to a
PostgreSQL database and retrieve data.
<p>
<pre>
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
$ mcs PostgresTest.cs -r System.Data.dll
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
$ mono PostgresTest.exe
Postgres provider specific tests...
Drop table:
Error (don't worry about this one)SqlError:PGRES_FATAL_ERROR ERROR:
table "mono_postgres_test" does not exist
<Stack Trace>
Create table with all supported types:
OK
Insert values for all known types:
OK
Update values:
OK
Insert values for all known types:
OK
Aggregate: count(*)
Agg Result: 2
Aggregate: min(text_value)
Agg Result: This is a text
Aggregate: max(int4_value)
Agg Result: 1048000
Aggregate: sum(int4_value)
Agg Result: 1048003
Select values from the database:
Result is from a SELECT SQL Query. Records Affected: -1
Result Set 1...
Total Columns: 28
ColumnName = boolean_value
ColumnOrdinal = 1
ColumnSize = 1
NumericPrecision = 0
NumericScale = 0
IsUnique = False
IsKey =
BaseCatalogName =
BaseColumnName = boolean_value
BaseSchemaName =
BaseTableName =
DataType = System.Boolean
AllowDBNull = False
ProviderType = 16
IsAliased = False
IsExpression = False
IsIdentity = False
IsAutoIncrement = False
IsRowVersion = False
IsHidden = False
IsLong = False
IsReadOnly = False
...
ColumnName = null_timestamp_value
ColumnOrdinal = 28
ColumnSize = 8
NumericPrecision = 0
NumericScale = 0
IsUnique = False
IsKey =
BaseCatalogName =
BaseColumnName = null_timestamp_value
BaseSchemaName =
BaseTableName =
DataType = System.DateTime
AllowDBNull = False
ProviderType = 1184
IsAliased = False
IsExpression = False
IsIdentity = False
IsAutoIncrement = False
IsRowVersion = False
IsHidden = False
IsLong = False
IsReadOnly = False
Gonna do a Read() now...
Row 0:
Col 0: boolean_value: False
Col 1: int2_value: 5
Col 2: int4_value: 3
Col 3: bigint_value: 9
Col 4: float_value: 3.141590
Col 5: double_value: 3.14159
Col 6: numeric_value: 123456789012.345
Col 7: char_value: Mono.Data!
Col 8: varchar_value: It was not me!
Col 9: text_value: We got data!
Col 10: point_value: (1,0)
Col 11: time_value: 01/01/1 21:13:14
Col 12: date_value: 02/29/2000 00:00:00
Col 13: timestamp_value: 02/29/2004 14:00:11
Col 14: null_boolean_value is NULL
Col 15: null_int2_value is NULL
Col 16: null_int4_value is NULL
Col 17: null_bigint_value is NULL
Col 18: null_float_value is NULL
Col 19: null_double_value is NULL
Col 20: null_numeric_value is NULL
Col 21: null_char_value is NULL
Col 22: null_varchar_value is NULL
Col 23: null_text_value is NULL
Col 24: null_point_value is NULL
Col 25: null_time_value is NULL
Col 26: null_date_value is NULL
Col 27: null_timestamp_value is NULL
Row 1:
Col 0: boolean_value: True
Col 1: int2_value: -22
Col 2: int4_value: 1048000
Col 3: bigint_value: 123456789012345
Col 4: float_value: 3.141590
Col 5: double_value: 3.14159
Col 6: numeric_value: 123456789012.345
Col 7: char_value: This is a char
Col 8: varchar_value: This is a varchar
Col 9: text_value: This is a text
Col 10: point_value: (1,0)
Col 11: time_value: 01/01/1 21:13:14
Col 12: date_value: 02/29/2000 00:00:00
Col 13: timestamp_value: 02/29/2004 14:00:11
Col 14: null_boolean_value is NULL
Col 15: null_int2_value is NULL
Col 16: null_int4_value is NULL
Col 17: null_bigint_value is NULL
Col 18: null_float_value is NULL
Col 19: null_double_value is NULL
Col 20: null_numeric_value is NULL
Col 21: null_char_value is NULL
Col 22: null_varchar_value is NULL
Col 23: null_text_value is NULL
Col 24: null_point_value is NULL
Col 25: null_time_value is NULL
Col 26: null_date_value is NULL
Col 27: null_timestamp_value is NULL
Total Rows Retrieved: 2
Total Result sets: 1
Call ExecuteReader with a SQL Command.
(Not INSERT,UPDATE,DELETE
).
Result is from a SQL Command not (INSERT,UPDATE,DELETE).
Records Affected: -1
Total Result sets: 0
Call ExecuteReader with a SQL Command.
(Is INSERT,UPDATE,DELETE)
.
Result is from a SQL Command (INSERT,UPDATE,DELETE). Records Affected: 1
Total Result sets: 0
Calling stored procedure version()
Result: PostgreSQL 7.2.1 on i686-pc-cygwin, compiled by GCC 2.95.3-5
Database Server Version: PostgreSQL 7.2.1 on i686-pc-cygwin,
compiled by GCC 2.9
5.3-5
Clean up...
Drop table...
OK
RESULT: 0
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r Mono.Data.PostgreSqlClient.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r Mono.Data.PostgreSqlClient.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
* Action Plan
** Testing Npgsql
<p>Eventually replace the PostgreSQL data provider in Mono
with <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>.
Npgsql is a .Net Data Provider for PostgreSQL which implements
the <a href="http://developer.postgresql.org/docs/postgres/protocol.html">PostgreSQL Frontend/Backend Protocol</a>.
Npgsql is implemented in 100% C#. This provider was created by Francisco Figueiredo jr.
and has many programmers developing the provider.
<ul>
<li>Have a working mono and mcs</li>
<li>Get <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
and make sure the binary assembly Npgsql.dll is installed in the same place that the
mono class libraries are located.
<li>Read the Testing notes for Mono.Data.PostgreSqlClient too
<li>C# Example for Npgsql:
<pre>
using System;
using System.Data;
using Npgsql;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=test;" +
"User ID=postgres;" +
"Password=fun2db;";
IDbConnection dbcon;
dbcon.Open();
dbcon = new NpgsqlConnection(connectionString);
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r Npgsql.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r Npgsql.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+156
View File
@@ -0,0 +1,156 @@
* Provider Factory
<p>Brian Ritchie contributed a Provider Factory and Data Tools for Mono ADO.NET<br>
which gives us a foundation for abstract data provider access within Mono
** Here are the deails:
<ul>
<li>The Provider information is seperate from the connection string information.<br>
This allows the list of providers to be stored in the machine.config file.</li>
<li>Provider and ProviderCollection objects are available to access <br>
the list of providers and modify them at runtime.</li>
<li>The ProviderFactory object is used to create new connections, commands,<br>
dataadapters, parameters, etc.</li>
</ul>
** Overview of the ProviderFactory object model:
<ul>
<li><b>ProviderFactory</b>: used to create new Connections, Commands,<br>
DataAdapters, or Commands. All objects are returned using <br>
the provider interfaces such as IDbConnection, IDbCommand,<br>
IDbDataAdapter, or IDataParamter</li>
<li><b>DataTools</b>: static methods for doing <br>
common tasks like filling a DataSet <br>
with the contents of a select statement.</li>
<li><b>ProviderCollection</b>: list of providers configured <br>
in the system. Initially loaded from app.config, but can <br>
be modified at run-time.</li>
<li><b>Provider</b>: represents a given provider (factory) <br>
and holds information needed to <br>
create the types.</li>
<li><b>ProviderSectionHandler</b>: works behind the <br>
scenes to load the list of <br>
providers from the app.config into a ProviderCollection.</li>
</ul>
** C# source code samples for creating a connection:
<pre>
// Create connection using enhanced connection string
// The factory attribute specifies which provider
// to use. The factory attribute is parsed out, the
// object is created, and then the rest of the
// connection string is passed into the provider. The
// providers are defined in
// the app.config (or machine.config).
IDbConnection conn;
string connectionString =
"factory=System.Data.SqlClient;" +
"server=speedy;database=pubs;uid=sa";
conn = ProviderFactory.CreateConnection(connectionString);
// Create connection specifying provider
// and standard connection string
IDbConnection conn;
string provider = "System.Data.SqlClient";
string connectionString = "server=speedy;database=pubs;uid=sa";
conn = ProviderFactory.CreateConnection(provider,connectionString);
// Create connection using connection string stored
// in app.config under &lt;appSettings&gt;
IDbConnection conn;
string appSetting = "PubsConnStr";
conn = ProviderFactory.CreateConnectionFromConfig(appSetting);
</pre>
<p>C# Sample for Creating a DataAdapter and filling a DataSet.
<pre>
// Create Connection
IDbConnection conn =
ProviderFactory.CreateConnectionFromConfig("PubsConnStr");
// Select command
IDbCommand cmd=conn.CreateCommand();
cmd.Text="select * from author";
// Data Adapter
DataSet ds=new DataSet();
IDbDataAdapter adapter=ProviderFactory.CreateDataAdapter(cmd);
adapter.Fill(ds, "Table1");
</pre>
<p>Creating a DataAdapter and filling a DataSet. <br>
The super lazy method for people like me.
<pre>
// Create Connection
IDbConnection conn =
ProviderFactory.CreateConnectionFromConfig("TdsPubsConnStr");
// Data Adapter
DataSet ds=DataTools.FillDataSet(conn, "select * from author");
</pre>
<p>Here's some sample code on displaying a list <br>
of configured ADO.NET providers:
<pre>
Console.WriteLine("Configured Providers:");
foreach (Provider p in ProviderFactory.Providers)
Console.WriteLine(p.Description);
</pre>
<p>A Super lazy overload to the FillDataSet method (in <br>
DataTools.cs) that will fill a dataset in one line of code.
<pre>
DataSet ds=DataTools.FillDataSet("PubsConnStr", "select * from authors");
</pre>
** About Configuration Files
<p>Information about <a href="http://msdn.microsoft.com/library/en-us/vbcon/html/vboriintroductiontoapplicationsettingstorage.asp?frame=true">app.config</a> files
can be found at <a href="http://msdn.microsoft.com/">MSDN</a>.
<p>See the mcs/class/Mono.Data/app.config for sample configuration file in<br>
mcs source. Basically, if your application is named blah.exe, <br>
you would create an app.config file named blah.exe.config
<p>Here's a sample app.config file showing the provider <br>
declarations along with sample connection strings:
<pre>
&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;configuration&gt;
&lt;configSections&gt;
&lt;sectionGroup name="mono.data"&gt;
&lt;section name="providers" type="Mono.Data.ProviderSectionHandler,Mono.Data" /&gt;
&lt;/sectionGroup&gt;
&lt;/configSections&gt;
&lt;appSettings&gt;
&lt;add key="PubsConnStr" value="factory=System.Data.SqlClient;server=speedy;database=pubs;uid=sa;pwd=" /&gt;
&lt;/appSettings&gt;
&lt;mono.data&gt;
&lt;providers&gt;
&lt;provider name="System.Data.SqlClient" connection="System.Data.SqlClient.SqlConnection" adapter="System.Data.SqlClient.SqlDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
&lt;provider name="System.Data.OleDb" connection="System.Data.OleDb.OleDbConnection" adapter="System.Data.OleDb.OleDbDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
&lt;provider name="System.Data.Odbc" connection="System.Data.Odbc.OdbcConnection" adapter="System.Data.OleDb.OdbcDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt;
&lt;provider name="Mono.Data.TdsClient" connection="Mono.Data.TdsClient.TdsConnection" adapter="Mono.Data.TdsClient.TdsDataAdapter" assembly="Mono.Data.TdsClient" /&gt;
&lt;provider name="Mono.Data.MySql" connection="Mono.Data.MySql.MySqlConnection" adapter="Mono.Data.MySql.MySqlDataAdapter" assembly="Mono.Data.MySql" /&gt;
&lt;provider name="Mono.Data.PostgreSqlClient" connection="Mono.Data.PostgreSqlClient.PgSqlConnection" adapter="Mono.Data.PostgreSqlClient.PgSqlDataAdapter" assembly="Mono.Data.PostgreSqlClient" /&gt;
&lt;provider name="Mono.Data.SqliteClient" connection="Mono.Data.SqliteClient.SqliteConnection" adapter="Mono.Data.SqliteClient.SqliteDataAdapter" assembly="Mono.Data.SqliteClient" /&gt;
&lt;provider name="Mono.Data.SybaseClient" connection="Mono.Data.SybaseClient.SybaseConnection" adapter="Mono.Data.SybaseClient.SybaseDataAdapter" assembly="Mono.Data.SybaseClient" /&gt;
&lt;/providers&gt;
&lt;/mono.data&gt;
&lt;/configuration&gt;
</pre>
+55 -27
View File
@@ -11,9 +11,13 @@
The <a href="http://msdn.microsoft.com/net">Microsoft.NET site.</a>
The Microsoft .NET Framework 1.0 can be downloaded <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
The Microsoft .NET Framework 1.0 can be downloaded <a
href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
New methods that are not documented in 1.0, are documented <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
New methods that are not documented in 1.0, are documented <a
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
The changes between .NET 1.0 and .NET 1.1 are available <a href="http://www.csharphelp.com/archives2/archive406.html">here</a>
** IRC
@@ -24,7 +28,7 @@
The Mono Tutorial:
<a href="http://mwh.sysrq.dk/the_mono_tutorial/">Mono Tutorial</a>
<a href="http://http://go-mono.com/gnometutorial/">GNOME.NET Tutorial</a>
and other useful tutorials (Gtk#, Glade#, Embeded, etc) (in Spanish) at
@@ -53,6 +57,14 @@
href="http://www.foundstone.com/pdf/dotnet-security-framework.pdf">.NET
security architecture</a>.
** Development Tools
A tool to compare two assemblies:
<ul>
<li><a href="http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn">http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn</a>
</ul>
** Presentations
Currently the <a href="Presentations/O-Reilly">O'Reilly</a>
@@ -111,31 +123,53 @@
There are a number of related projects to Mono:
<li><b>Development tools</b></li>
<ul>
* <a
href="http://qtcsharp.sourceforge.net">Qt#:</a>
C# bindings for the Qt toolkit.
* <a
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
Develop:</a> an IDE for the C# language written in C#.
* <a
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
Plugin for C#</a>
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
version of JavaScript) in C#
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
testing framework for .NET classes.
* <a
href="http://xmarks.sourceforge.net/doc.html">XMarks DOC.NET:</a> For
creating online documentation you can browse for your own classes.
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
testing framework for .NET classes.
</ul>
<li><b>Class Libraries</b></li>
<ul>
* <a href="http://9mm.com/~ogl/sdldotnet/">SDL for
.NET:</a> Bindings for the popular SDL graphics library.
* C# bindings for OpenGL and SDL are available here: <a
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
* <a
href="http://qtcsharp.sourceforge.net">Qt#:</a>
C# bindings for the Qt toolkit.
* <a
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
Sorry only in portuguese, for now.
</ul>
<li><b>Programming languages:</b></li>
<ul>
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
version of JavaScript) in C#
</ul>
<li><b>Other projects</b></li>
<ul>
* <a
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
Plugin for C#</a>
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
Free Software JIT engine for Java.
@@ -143,19 +177,13 @@
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
JIT/VM/GC system from Intel.
* C# bindings for OpenGL and SDL are available here: <a
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
* <a
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
Another implementation of the CLI and C# compiler.
* A Free (GFDL) tutorial on C# in Spanish with examples, slides, and extras (under development). Get it <a href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
* <a
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
Sorry only in portuguese, for now.
* A Free (GFDL) tutorial on C# in Spanish with
examples, slides, and extras (under development). Get it <a
href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
</ul>
** GNOME Documentation
+153
View File
@@ -0,0 +1,153 @@
* Screenshots
** Mono Debugger
Some shots of the <a href="jit-debug.html">Mono Debugger</a>
<table border=1>
<tr>
<td>
<a href="images/Screenshot-Debugger-1.png"><img src="images/Screenshot-Debugger-1-thumb.png"></a>
</td>
</tr>
<tr>
Debugger showing the source code view.
</tr>
</table>
<table>
<tr>
<td>
<a href="images/Screenshot-Debugger-2.png"><img src="images/Screenshot-Debugger-2-thumb.png"></a>
</td>
</tr>
<tr>
Debugger showing the CPU view.
</tr>
</table>
** Mono Documentation Browser
The Mono Documentation Browser is available from <a
href="anoncvs.html">CVS</a>, module `monodoc'.
<table border=1>
<tr>
<td>
<a href="images/Screenshot-B2.png"><img src="images/Screenshot-B2-thumb.png"></a>
</td>
</tr>
<tr>
Mono Documentation Browser rendering a method description.
</tr>
</table>
<table>
<tr>
<td>
<a href="images/Screenshot-MethodSummary.png"><img src="images/Screenshot-MethodSummary-thumb.png"></a>
</td>
</tr>
<tr>
Mono Documentation Browser rendering the class method summary
</tr>
</table>
** Mono Basic
The Mono Basic compiler ships with the Mono distribution.
<table border=1>
<tr>
<td>
<a href="images/gtk-vb.png"><img src="images/gtk-vb-thumb.png"></a>
</td>
</tr>
<tr>
Mono Basic running a sample Gtk# application.
</tr>
</table>
** Platano Media Player
Alp's <a href="http://www.atoker.com/platano/">Platano</a>
Media Player is written with Gtk# (with GStreamer support):
<table border=1>
<tr>
<td>
<img src="images/platano_s.png"></a>
</td>
</tr>
<tr>
Platano startup.
</tr>
</table>
<table>
<tr>
<td>
<img src="images/platano-playing_s.png">
</td>
</tr>
<tr>
Platano playing the <a
href="http://developer.ximian.com/projects/third_party/codemonkey/index.html">Code
Monkey At Work</a> video.
</tr>
</table>
** GSIRC
Alp's <a href="http://www.atoker.com/gsirc/">GSIRC</a>
Gtk-Sharp IRC written with Gtk#
<table border=1>
<tr>
<td>
<a href="http://go-mono.com/images/gsirc-0.2a_overview.jpg"><img src="images/gsirc-0.2a_overview-thumb.jpg"></a>
</td>
</tr>
<tr>
GSIRC is shown with the preferences dialog and chatting on some channels (rooms).
</tr>
</table>
** SQL# For GTK#
Daniel Morgan's SQL query tool that runs on Mono on Linux and Windows. It is
written in C# and allows you to connect to various Mono ADO.NET providers and
enter SQL commands.
<table border=1>
<tr>
<td>
<img src="http://go-mono.com/images/sqlsharp.png">
</td>
</tr>
<tr>
SQL# For GTK# is shown retrieving data from a Microsoft SQL Server 2000 database.
</tr>
</table>
** SkyNET
SkyNET is written in C# and uses GTK# for displaying a star chart.
<table border=1>
<tr>
<td>
<img src="http://go-mono.com/images/skynet.png">
</td>
</tr>
</table>
** Windows.Forms
Windows.Forms running with Wine on Linux:
<table border=1>
<tr>
<td>
<a href="http://go-mono.com/images/WINESWF.JPG"><img src="http://go-mono.com/images/WINESWF-thumb.JPG"></a>
</td>
</tr>
</table>
+180 -24
View File
@@ -1,58 +1,214 @@
* Microsoft SQL Server Provider
<ul>
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases</li>
<li>Exists in namespace System.Data.SqlClient and assembly System.Data
<li>Exists in namespace System.Data.SqlClient and assembly System.Data</li>
<li>Created by Tim Coleman
<li>Created by Tim Coleman</li>
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
<li>Implemented in 100% C#
<li>Implemented in 100% C#</li>
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.</li>
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
<li>Uses TDS Protocol Version 7.0</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.
</ul>
* Current Status
** Current Status
<ul>
<li>Able to connect to Microsoft SQL Server 7/2000 databases
<li>Able to connect to Microsoft SQL Server 7/2000 databases</li>
<li>Connection pooling works.
<li>Connection pooling works.</li>
<li>Stored Procedures work
<li>Stored Procedures work</li>
<li>Parameters work.
<li>Parameters work.</li>
<li>Prepare works.
<li>Prepare works.</li>
<li>SQL commands can be executed
via ExecuteNonQuery() of a SqlCommand.
via ExecuteNonQuery() of a SqlCommand.</li>
<li>SQL aggregates can be executed and a single row and single column
result can be retrieved via ExecuteScalar() of a SqlCommand
result can be retrieved via ExecuteScalar() of a SqlCommand</li>
<li>SQL queries can be executed via ExecuteReader() and results
can be retrieved via SqlDataReader.
can be retrieved via SqlDataReader.</li>
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
in a SqlDataReader
in a SqlDataReader</li>
<li>XML can be read via ExecuteXmlReader in a SqlCommand.
<li>XML can be read via ExecuteXmlReader in a SqlCommand.</li>
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter</li>
<li>Uses TDS Protocol Version 7.0
<li>Uses TDS Protocol Version 7.0</li>
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a></li>
<li>Works in the SQL# command-line and GTK# GUI version</li>
</ul>
* Action plan
** Action plan
<ul>
<li>Connection timeouts is being developed now.
<li>Connection timeouts is being developed now</li>
<li>Needs more testing</li>
<li>Would like to figure out how to connect via Trusted_Connection or Integrated Security</li>
<li>Start work on TDS Protocol Version 8.0 support</li>
<li>TODO
</ul>
** Testing
<ul>
<li>Have a working mono and mcs installed</li>
<li>Have access to a Microsoft SQL Server database
or either download it:
<ul>
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
</ul>
</li>
<li>If using Microsoft SQL Server 2000, make sure
you are using at least Service Pack 3 for Microsoft SQL Server 2000. If using
MSDE 2000, make sure you have the special Service Pack 3 for MSDE 2000.</li>
<li>For those that only have MSDE installed. You can change the authentication mode
from Windows Only Authentication to SQL Server and Windows Authentications (also knows as Mixed-mode authentication)
via the <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322336&sd=tech#4">registry</a></li>. It is
the LoginMode you need to change. By default,
MSDE is installed with Windows Only Authentication. For SqlClient to work with MSDE, you will
need to change the setting.</a>
<li>If using MSDE, you might need to create a new user with password. Give
this user access to various databases in this MSDE instance. Also, for each
database, give this new user at least SELECT access to the various tables you want
to retrieve data from.</li>
<li>If you have Enterprise Manager, you can easily change the authentication mode
for both MSDE and Microsoft SQL Server. To change the authentication mode in
Enterprise Mananger, select the instance, right-click on it, and select properites.
The SQL Server properties dialog for that instance will pop up. Choose the Security
tab. Change the authentication from Windows Only to SQL Server and Windows. If
the instance of your database does not show up in Enterprise Manager, Register first
by selecting the Action menu and choosing New SQL Server Registration.</li>
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
named SqlTest.cs and you could use this as a basis for your test.</li>
<li>Mono's SqlClient does not support trusted connections
nor integrated security. You can not use this when connecting. You need
to explicitly use a User ID and Password
authenticated by SQL Server.</li>
<li>Has a connection string format:
<pre>
Server=hostname;Database=databaseName;User ID=userid;Password=password
</pre>
</li>
<li>The Server part can be used three ways:
<table border=1>
<tr>
<td><b>Server Definition</b></td> <td><b>Example</b></td>
</tr>
<tr>
<td>hostname</td> <td>Server=MYHOST</td>
</tr>
<tr>
<td>hostname,port</td> <td>Server=MYHOST,1433</td>
</tr>
<tr>
<td>hostname\\instance</td> <td>Server=MYHOST\\NETSDK</td>
</tr>
</table>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using System.Data.SqlClient;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=pubs;" +
"User ID=myuserid;" +
"Password=mypassword;";
IDbConnection dbcon;
dbcon = new SqlConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql =
"SELECT fname, lname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["fname"];
string LastName = reader["lname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs -r System.Data.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+127 -12
View File
@@ -1,28 +1,143 @@
* SQL Lite Data Provider
<ul>
<li>Exists in namespace and assembly Mono.Data.SqliteClient
<li>Created by Vladimir Vukicevic
<li><a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
<li>ADO.NET Data Provider for
the <a href"http://www.hwaci.com/sw/sqlite/">SQL Lite</a> which
is an embeddable SQL database engine</li>
<li>From the SQL Lite web page: SQLite is a C library that
implements an embeddable SQL database engine. Programs that link with
the SQLite library can have SQL database access without
running a separate RDBMS process. The distribution
comes with a standalone command-line access program (sqlite) that
can be used to administer an SQLite database and which serves
as an example of how to use the SQLite library. SQLite is not a client library
used to connect to a big database server. SQLite is the server. The SQLite
library reads and writes directly to and from the database files on disk.</li>
<li>SQL Lite can be downloaded
from <a href"http://www.hwaci.com/sw/sqlite/download.html">here</a>.
binaries exist for Linux and Windows. sqlite.dll on Windows
and sqlite.so on Linux.
and sqlite.so on Linux. The source code is available too.</li>
<li>Exists in namespace and assembly Mono.Data.SqliteClient</li>
<li>Created by Vladimir Vukicevic so he could have a database of
thumbnail images for mPhoto. mPhoto is GUI application
for cataloging images. mPhoto runs on Mono
and uses <a href="http:www.go-mono.com/gtk-sharp.html">GTK#</a> for its GUI.</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
* Current Status
** Current Status
<ul>
<li>Able to connect, execute commands, and retrieve data...
<li>Able to connect, execute commands, and retrieve data...</li>
<li>Works in mPhoto
<li>Works in mPhoto by providing access to a SQL Lite database to store images.</li>
</ul>
* Action Plan
** Action Plan
<ul>
<li>Create a DataAdapter for SQL Lite named SqliteDataAdapter that can be used to
Fill a DataTable in a DataSet
Fill a DataTable in a DataSet</li>
<li>TODO
<li>Get the method GetSchemaTable() in class SqliteDataReader to return a DataTable
that works</li>
</ul>
** Testing
<ul>
<li>Have a working mcs and mono</li>
<li>Make sure Mono.Data.SqliteClient.dll was built and is installed
in the same place as the mono class libraries.</li>
<li>If you do not have <a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>,
download it. There are binaries for Windows and Linux.</li>
<li>There is a test named SqliteTest.cs found at mcs/class/Mono.Data.SqliteTest/Test</li>
<li>Has a connection string format of "URI=file:some/path". For example,
the connection string "URI=file:SqliteTest.db" will use the database file
named SqliteTest.db, if it does not exist, the file will be created.</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using Mono.Data.SqliteClient;
public class Test
{
public static void Main(string[] args)
{
string connectionString = "URI=file:SqliteTest.db";
IDbConnection dbcon;
dbcon = new MySQLConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
// requires a table to be created named employee
// with columns firstname and lastname
// such as,
// CREATE TABLE employee (
// firstname varchar(32),
// lastname varchar(32));
string sql =
"SELECT firstname, lastname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader[0];
string LastName = reader[1];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r Mono.Data.SqliteClient.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll \
-r Mono.Data.SqliteClient.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+124 -17
View File
@@ -1,48 +1,155 @@
* Sybase Data Provider
<ul>
<li>ADO.NET Provider for Sybase SQL Server databases
<li>ADO.NET Provider for Sybase SQL Server databases</li>
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient</li>
<li>Created by Tim Coleman
<li>Created by Tim Coleman</li>
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
<li>Implemented in 100% C#
<li>Implemented in 100% C#</li>
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.</li>
<li>Uses TDS Protocol Version 5.0
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
<li>Uses TDS Protocol Version 5.0</li>
<li>Does not support trusted connections</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
* Current Status
** Current Status
<ul>
<li>Able to connect to Sybase databases
<li>Able to connect to Sybase databases</li>
<li>SQL commands can be executed
via ExecuteNonQuery() of a SybaseCommand.
via ExecuteNonQuery() of a SybaseCommand.</li>
<li>SQL aggregates can be executed and a single row and single column
result can be retrieved via ExecuteScalar() of a SybaseCommand
result can be retrieved via ExecuteScalar() of a SybaseCommand</li>
<li>SQL queries can be executed via ExecuteReader() and results
can be retrieved via SybaseDataReader.
can be retrieved via SybaseDataReader.</li>
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
in a SybaseDataReader
in a SybaseDataReader</li>
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter</li>
</ul>
* Action plan
** Action plan
<ul>
<li>Connection timeouts is being developed now.
<li>Needs more testing...
<li>TODO
</ul>
** Testing
<ul>
<li>Have a working mono and mcs installed</li>
<li>Have access to a Sybase database
or either download it:
<ul>
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
</ul>
</li>
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
named SqlTest.cs and you could use this as a basis for your test.</li>
<li>Has a connection string format:
<pre>
Server=hostname;Database=databaseName;User ID=userid;Password=password
</pre>
</li>
<li>The Server part can be used two ways:
<ul>
<li>hostname - "Server=MYHOST"</li>
<li>hostname,port - "Server=MYHOST,1533"</li>
</ul>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using Mono.Data.SybaseClient;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=pubs;" +
"User ID=myuserid;" +
"Password=mypassword;";
IDbConnection dbcon;
dbcon = new SybaseConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql =
"SELECT fname, lname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["fname"];
string LastName = reader["lname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r Mono.Data.SybaseClient.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r Mono.Data.SybaseClient.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+127 -19
View File
@@ -1,51 +1,159 @@
* TDS Generic Provider
<ul>
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases</li>
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient</li>
<li>Created by Tim Coleman
<li>Created by Tim Coleman</li>
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
<li>Implemented in 100% C#
<li>Implemented in 100% C#</li>
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.</li>
<li>Uses TDS Protocol Version 4.2 by default
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
<li>Uses TDS Protocol Version 4.2 by default</li>
<li>Does not support trusted connections</li>
<li>Bugs with Mono or the data provider should be reported
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
do not have Bugzilla user account, it is free
and easy to
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
</ul>
* Current Status
** Current Status
<ul>
<li>Only builds on Windows currently due to mcs does not support modules and mcs
has problems with code that is internal.
has problems with code that is internal.</li>
<li>Able to connect to Microsoft SQL Server and Sybase databases
<li>Able to connect to Microsoft SQL Server and Sybase databases</li>
<li>SQL commands can be executed
via ExecuteNonQuery() of a TdsCommand.
via ExecuteNonQuery() of a TdsCommand.</li>
<li>SQL aggregates can be executed and a single row and single column
result can be retrieved via ExecuteScalar() of a TdsCommand
result can be retrieved via ExecuteScalar() of a TdsCommand</li>
<li>SQL queries can be executed via ExecuteReader() and results
can be retrieved via TdsDataReader.
can be retrieved via TdsDataReader.</li>
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
in a TdsDataReader
in a TdsDataReader</li>
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter</li>
</ul>
* Action plan
** Action plan
<ul>
<li>Connection timeouts is being developed now.
<li>Connection timeouts is being developed now.</li>
<li>TODO
<li>TODO</li>
</ul>
** Testing
<ul>
<li>Have a working mono and mcs installed</li>
<li>Have access to a Sybase or Microsoft SQL Server database
or either download it:
<ul>
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
</ul>
</li>
<li>If using Microsoft SQL Server 2000, make sure
you are using at least Service Pack 3 for Microsoft SQL Server 2000</li>
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
named SqlTest.cs and you could use this as a basis for your test.</li>
<li>Has a connection string format:
<pre>
Server=hostname;Database=databaseName;User ID=userid;Password=password
</pre>
</li>
<li>The Server part can be used two ways:
<ul>
<li>hostname - "Server=MYHOST"</li>
<li>hostname,port - "Server=MYHOST,1533"</li>
</ul>
</li>
<li>C# Example:
<pre>
using System;
using System.Data;
using Mono.Data.TdsClient;
public class Test
{
public static void Main(string[] args)
{
string connectionString =
"Server=localhost;" +
"Database=pubs;" +
"User ID=myuserid;" +
"Password=mypassword;";
IDbConnection dbcon;
dbcon = new TdsConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql =
"SELECT fname, lname " +
"FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["fname"];
string LastName = reader["lname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
</pre>
</li>
<li>Building C# Example:
<ul>
<li>Save the example to a file, such as, TestExample.cs</li>
<li>Build on Linux:
<pre>
mcs TestExample.cs -r System.Data.dll \
-r Mono.Data.TdsClient.dll
</pre>
</li>
<li>Build on Windows via Cygwin:
<pre>
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
TestExample.cs \
-lib:C:/cygwin/home/MyHome/mono/install/lib \
-r System.Data.dll -r Mono.Data.TdsClient.dll
</pre>
</li>
</ul>
</li>
<li>Running the Example:
<pre>
mono TestExample.exe
</pre>
</li>
</ul>
+36 -27
View File
@@ -1,26 +1,17 @@
0,Home,index.html,index.src
1,FAQ,faq.html,faq.src
1,News archive,http://monoevo.sf.net/mwn/archives.html
1,Screenshots,screenshots.html,screenshots.src
1,Other sites,other.html,other.src
0,Mono,rationale.html,rationale.src
1,Runtime,runtime.html,runtime.src
2,Embedding,embedded-api.html,embedded-api.src
1,Classes,class-library.html,class-library.src
1,Gtk#,http://gtk-sharp.sourceforge.net
1,Gtk#,gtk-sharp.html,gtk-sharp.src
1,ASP.NET,asp-net.html,asp-net.src
1,ADO.NET,ado-net.html,ado-net.src
1,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
2,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
2,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
2,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
2,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
2,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
2,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
2,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
2,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
2,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
2,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
2,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
1,C# Compiler,c-sharp.html,c-sharp.src
1,Status,status.html,status.src
1,VB Compiler,mbas.html,mbas.src
0,Download,download.html,download.src
1,CVS access,ccvs.html,ccvs.src
1,AnonCVS access,anoncvs.html,anoncvs.src
@@ -34,19 +25,6 @@
1,Porting,porting.html,porting.src
2,PowerPC,ppc.html,ppc.src
1,HOWTO,mono-contribution-howto.html,mono-contribution-howto.src
0,Plans,plans.html,plans.src
1,ADO.NET,ado-net.html,ado-net.src
2,Firebird Interbase,firebird.html,firebird.src
2,Microsft SQL Server,sqlclient.html,sqlclient.src
2,MySQL,mysql.html,mysql.src
2,ODBC,odbc.html,odbc.src
2,OLE DB,oledb.html,oledb.src
2,PostgreSQL,postgresql.html,postgresql.src
2,SQL Lite,sqlite.html,sqlite.src
2,Sybase,sybase.html,sybase.src
2,TDS Generic,tdsclient.html,tdsclient.src
1,Java,java.html,java.src
1,Windows.Forms,winforms.html,winforms.src
0,Resources,resources.html,resources.src
1,Beginning,mono-beginning.html,mono-beginning.src
1,Mailing Lists,mailing-lists.html,mailing-lists.src
@@ -56,4 +34,35 @@
1,Papers,papers.html,papers.src
1,Languages,languages.html,languages.src
1,Debugging,jit-debug.html,jit-debug.src
0,Plans,plans.html,plans.src
1,ADO.NET,ado-net.html,ado-net.src
2,ProviderFactory,provider-factory.html,provider-factory.src
2,Firebird Interbase,firebird.html,firebird.src
2,IBM DB2,ibmdb2.html,ibmdb2.src
2,Microsft SQL Server,sqlclient.html,sqlclient.src
2,MySQL,mysql.html,mysql.src
2,ODBC,odbc.html,odbc.src
2,OLE DB,oledb.html,oledb.src
2,Oracle,oracle.html,oracle.src
2,PostgreSQL,postgresql.html,postgresql.src
2,SQL Lite,sqlite.html,sqlite.src
2,Sybase,sybase.html,sybase.src
2,TDS Generic,tdsclient.html,tdsclient.src
1,Crypto,crypto.html,crypto.src
1,Java,java.html,java.src
1,Windows.Forms,winforms.html,winforms.src
0,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
1,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
1,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
1,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
1,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
1,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
1,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
1,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
1,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
1,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
1,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
1,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
1,Cscompmgd,class-status-Cscompmgd.html,class-status-Cscompmgd.src,cm/cormissing.css,cm/cormissing.js
1,System.Security,class-status-System.Security.html,class-status-System.Security.src,cm/cormissing.css,cm/cormissing.js
0,Contact,contact.html,contact.src
+1 -1
View File
@@ -212,7 +212,7 @@ function clickHandler (evt)
if (evt.ctrlKey)
{
var strRoot = 'http://cvs.hispalinux.es/cgi-bin/cvsweb/mcs/class/';
var strExtra = '?cvsroot=Mono';
var strExtra = '?cvsroot=mono';
if (strAssembly)
{
+48 -36
View File
@@ -1,14 +1,16 @@
CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
ROOT=C:/WINNT
CSCRIPT = $(ROOT)/system32/cscript.exe
CSC=csc
CORCOMPARE=../../../mcs/tools/corcompare
OBJECTS= \
deploy/ado-net.html \
deploy/firebird.html \
deploy/provider-factory.html \
deploy/mysql.html \
deploy/odbc.html \
deploy/oledb.html \
deploy/oracle.html \
deploy/postgresql.html \
deploy/sqlclient.html \
deploy/sqlite.html \
@@ -18,6 +20,44 @@ OBJECTS= \
deploy/asp-net.html \
deploy/books.html \
deploy/contributing.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/crypto.html \
deploy/embedded-api.html \
deploy/faq.html \
deploy/firebird.html \
deploy/gcc-frontend.html \
deploy/gtk-sharp.html \
deploy/hackers.html \
deploy/ideas.html \
deploy/ibmdb2.html \
deploy/index.html \
deploy/java.html \
deploy/jit-debug.html \
deploy/languages.html \
deploy/mailing-lists.html \
deploy/mbas.html \
deploy/mono-beginning.html \
deploy/mono-contribution-howto.html \
deploy/monodoc-xml.html \
deploy/other.html \
deploy/papers.html \
deploy/passport.html \
deploy/plans.html \
deploy/porting.html \
deploy/ppc.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/screenshots.html \
deploy/status.html \
deploy/testing.html \
deploy/tools.html \
deploy/winforms.html \
deploy/class-status.html \
deploy/class-status-corlib.html \
deploy/class-status-System.html \
@@ -29,42 +69,12 @@ OBJECTS= \
deploy/class-status-Microsoft.VisualBasic.html \
deploy/class-status-System.EnterpriseServices.html \
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html \
deploy/class-status-System.Security.html \
deploy/class-status-System.Windows.Forms.html \
deploy/class-status-Cscompmgd.html \
deploy/class-library.html \
deploy/classlib-doc.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/embedded-api.html \
deploy/faq.html \
deploy/gcc-frontend.html \
deploy/hackers.html \
deploy/index.html \
deploy/ideas.html \
deploy/java.html \
deploy/jit-debug.html \
deploy/jit-debug-sample.html \
deploy/jit-debug-sample2.html \
deploy/languages.html \
deploy/mailing-lists.html \
deploy/mono-beginning.html \
deploy/mono-contribution-howto.html \
deploy/monodoc-xml.html \
deploy/papers.html \
deploy/passport.html \
deploy/plans.html \
deploy/porting.html \
deploy/ppc.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/status.html \
deploy/testing.html \
deploy/tools.html \
deploy/winforms.html
deploy/classlib-doc.html
#2,Configuration.Install,class-status-System.Configuration.Install.html,class-status-System.Configuration.Install.src,cm/cormissing.css,cm/cormissing.js
#2,Runtime.Remoting,class-status-System.Runtime.Remoting.html,class-status-System.Runtime.Remoting.src,cm/cormissing.css,cm/cormissing.js
@@ -139,6 +149,8 @@ src/%.xml: ../../../mcs/class/lib/%.dll $(CORCOMPARE)/CorCompare.exe
src/corlib.xml: ../../../mcs/class/lib/corlib_cmp.dll $(CORCOMPARE)/CorCompare.exe
$(CORCOMPARE)/CorCompare.exe -f corlib -ms mscorlib -x $@ $<
src/System.Security.xml: ../../../mcs/class/lib/System.Security_cmp.dll $(CORCOMPARE)/CorCompare.exe
$(CORCOMPARE)/CorCompare.exe -f System.Security -ms System.Security -x $@ $<
../class-status: ../class-status.in
cp -f $< $@
+2 -1
View File
@@ -2,12 +2,13 @@
<html>
<head>
<title>#TITLE#</title>
<link rel="icon" href="../MonoIcon.png" type="image/png">
<!-- background-image: url("images/bgsquares.gif"); -->
<style type="text/css">
<!--
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
background-attachment: fixed; }
}
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
font-size: 14px; }
+9
View File
@@ -1,5 +1,8 @@
* System.Windows.Forms
<table>
<tr>
<td>
System.Windows.Forms is currently being implemented using the
Win32 API, we will be using <a
href="http://www.winehq.com">WineLib</a> on Unix systems to
@@ -19,6 +22,12 @@
Gtk/FrameBuffer is an option. If you have suggestions or
recommendations, please let us <a
href="mailto:[email protected]">let us know</a>
</td>
<td>
<a href="images/WINESWF.JPG"><img src="images/WINESWF-mini.JPG"></a>
</td>
</table>
* Contributing
+9
View File
@@ -225,6 +225,15 @@
It may not be possible to manage exceptions in that case,
though. I need to think more about it.
** Threading issues
If your application creates threads on its own, and you want them to
be able to call code into the CIL universe with Mono, you have to
register the thread with Mono before issuing the call.
To do so, call the mono_thread_attach() function before you execute
any managed code from the thread
* Samples
See the sample programs inmono/sample/embed for examples of
+156
View File
@@ -0,0 +1,156 @@
Threading in Mono
=================
0. Terminology
--------------
"Main thread" - The initial OS-native thread that the
application started with.
"Helper thread" - A native thread created internally
by the runtime, such as the finalizer thread, or an
asynchronous delegate invocation thread. These
threads can run managed code.
"Primary CLR thread" - The native thread that called
the Main() method when executing an assembly.
"Secondary CLR thread" - A native thread created by a
program that instantiates a System.Threading.Thread object
and calls its Start() method.
1. Thread exit behaviour in the standalone mono runtime
-------------------------------------------------------
The correct behaviour of the runtime should be:
a) If Main() returns, the runtime should wait for all
foreground secondary CLR threads to finish. The
wording in the class documentation states: "Once all
foreground threads belonging to a process have
terminated, the common language runtime ends the
process by invoking Abort on any background threads
that are still alive." Testing seems to indicate that
the background thread can't cancel the Abort by
catching the ThreadAbortException and calling
ResetAbort here. Indeed, not even the finally block
seems to be executed.
b) if any of the primary CLR thread, a secondary CLR
thread or a helper thread calls
System.Environment.Exit(), the application should
terminate immediately without waiting for foreground
primary or secondary CLR threads to finish.
c) if the primary CLR thread throws an uncaught
exception, the application should terminate
immediately without waiting for secondary CLR threads
to finish. This might be implemented internally by
pretending that all the running secondary CLR threads
are background threads.
d) if a secondary CLR thread throws an uncaught
exception that thread should terminate and all other
threads should continue to execute.
e) if a helper thread throws an uncaught exception and
that thread happens to be the GC finalizer thread,
testing seems to indicate that the exception stack
trace is displayed as normal, and the exception is
then ignored (as though there is a try {} catch{}
around all finalizers that just prints the stack
trace.) Calling Abort() on the GC finalizer thread
also does not cause it to exit: it behaves as though
the ThreadAbortException is caught and ResetAbort is
called. Asynchronous delegate helper threads should
behave as secondary CLR threads, but uncaught
exceptions should be rethrown on the thread that calls
EndInvoke().
The difficulties happen with cases b) and c):
The current implementation of
System.Environment.Exit() calls exit(2) directly,
which is rather unfriendly: it prevents any runtime
cleanup, statistics gathering, etc. and is pretty
obnoxious to embedded code.
The current exception handling code calls ExitThread()
(emulated with pthread_exit() in the io-layer) if an
exception is not caught.
When called from the main thread, both POSIX
pthread_exit() and w32 ExitThread() block if there are
other threads still running (in the w32 case, if there
are other foreground threads still running; threads
can set as background.) If the main thread is also
the primary CLR thread, then the application will
block until all other threads (including helper
threads) terminate. Some helper threads will not
terminate until specifically told to by the runtime:
for example, the GC finalizer thread needs to run
until all of the primary and secondary CLR threads
have finished.
Also, if the main thread is also the primary CLR
thread, the runtime loses the opportunity to do any
cleaning up. Adding a special case to call exit(2)
instead of ExitThread() in the primary CLR thread
suffers from the same problems as
System.Environment.Exit() calling exit(2).
The simple solution is to run the primary CLR thread
in a new native thread, leaving the main thread free
for housekeeping duties. There still needs to be some
special handling for the case where the primary CLR
thread fails to catch an exception: the secondary CLR
threads then need to be terminated.
When the primary and secondary CLR threads have all
terminated, the helper threads can be killed off and
the runtime can clean itself up and exit.
2. Thread initialisation
------------------------
Threads have to undergo some initialisation before
managed code can be executed. A
System.Threading.Thread object must be created, and
the thread details need to be stored so that the
threads can be managed later. The JIT needs to record
the last managed frame stack pointer in a TLS slot,
and the current Thread object is also recorded.
New threads created by managed calls to
System.Threading.Thread methods will have all needed
initialisation performed. Threads created by the
runtime with calls to mono_thread_create() will too.
Existing threads can be passed to the runtime; these
must call mono_thread_attach() before any CLR code can
be executed on that thread.
3. Constraints on embedding the Mono runtime
--------------------------------------------
The discussion above concerning application behaviour
in the event of threads terminating, whether by
returning from the start function, throwing uncaught
exceptions or by calling System.Environment.Exit(),
only really applies to the standalone Mono runtime.
An embedding application should specify what behaviour
is required when, for example,
System.Environment.Exit() is called. The application
is also responsible for its own thread management, and
it should be prepared for any of the primary CLR
thread or secondary CLR threads to terminate at any
time. The application should also take into account
that the runtime will create helper threads as needed,
as this may cause pthread_exit() or ExitThread() to
block indefinitely, as noted above.
+1 -1
View File
@@ -1,4 +1,4 @@
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharpcli.1
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharp.1
EXTRA_DIST = $(man_MANS)
+42
View File
@@ -0,0 +1,42 @@
.\"
.\" cert2spc manual page.
.\" Copyright 2002, 2003 Motus Technologies
.\" Author:
.\" Sebastien Pouliot ([email protected])
.\"
.TH Mono "cert2spc"
.SH NAME
cert2spc \- Transform multiple X.509 certificates to a Software
Publisher Certificate
.SH SYNOPSIS
.PP
.B cert2spc certificate|crl [certificate|crl ...] outputfile.spc
.SH DESCRIPTION
Combine a list of X.509 certificates or X.509 CRL (Certificate
Revocation List) into a Software Publisher Certificate (PKCS#7
file). The SPC file is required for signing a PE file (like an
assembly) using signcode.
.SH PARAMETERS
.TP
.I "certificate"
One (or more) X.509 certificate to add (space separated).
.TP
.I "crl"
One (or more) X.509 CRL to add (space separated).
.TP
.I "output.spc"
Software Publisher Certificate to output. If the specified file
exists it will be overwritten.
.SH AUTHOR
Written by Sebastien Pouliot
.SH COPYRIGHT
Copyright (C) 2002, 2003 Motus Technologies.
Released under BSD license.
.SH MAILING LISTS
Visit http://mail.ximian.com/mailman/mono-list for details.
.SH WEB SITE
Visit: http://www.go-mono.com for details
.SH SEE ALSO
.BR makecert(1), signcode(1)
+9
View File
@@ -136,6 +136,15 @@ Provides a search path to mono and mint where to look for library files.
Directories are separated by the platform path separator (colons on unix). Example:
.B /home/username/lib:/usr/local/mono/lib
.PP
.TP
.I "MONO_DISABLE_SHM"
If this variable is set, it disables the Windows I/O Emulation layer,
and handles (files, events, mutexes, pipes) will not be shared across
processes. This option is only available on Unix.
.TP
.I "MONO_CFG_DIR"
If set, this variable overrides the default system configuration directory
($PREFIX/etc). It's used to locate machine.config file.
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
+45
View File
@@ -0,0 +1,45 @@
.\"
.\" secutil manual page.
.\" Copyright 2002, 2003 Motus Technologies
.\" Author:
.\" Sebastien Pouliot ([email protected])
.\"
.TH Mono "secutil"
.SH NAME
secutil \- Extract X.509 certificates and strongnames from assemblies.
.SH SYNOPSIS
.PP
.B secutil [options] filename
.SH DESCRIPTION
Extract X.509 certificates and strongnames from assemblies in a
format that can be easily re-used in source code (C# or VB.NET syntax).
.SH OPTIONS
.TP
.I "-s assembly", "-strongname assembly"
Display strongname informations about the assembly.
.TP
.I "-x assembly", "-x509certificate assembly"
Display the X509 Authenticode certificate for the assembly.
.TP
.I "-a", "-array"
Display data in a decimal array (default).
.TP
.I "-v", "-vbmode"
Display data in a VisualBasic friendly format.
.TP
.I "-c", "-cmode"
Display data in a C/C++/C# friendly format (default).
.TP
.I "-help", "-h", "-?"
Display help about this tool.
.SH AUTHOR
Written by Sebastien Pouliot
.SH COPYRIGHT
Copyright (C) 2002, 2003 Motus Technologies.
Released under BSD license.
.SH MAILING LISTS
Visit http://mail.ximian.com/mailman/mono-list for details.
.SH WEB SITE
Visit: http://www.go-mono.com for details
.SH SEE ALSO
.BR sn(1), signcode(1)
+83 -59
View File
@@ -1,13 +1,26 @@
.TH sqlsharpcli 1 "30 November 2002"
.TH sqlsharp 1 "10 December 2002"
.SH NAME
sqlsharpcli \- Mono SQL# Command Line SQL Query tool
sqlsharp \- Mono SQL# command-line SQL Query tool
.SH SYNOPSIS
.B sqlsharpcli
[option] [source-files]
.B sqlsharp
[\-f filename] [\-o filename] [\-s]
.SH DESCRIPTION
sqlsharpcli is the Mono SQL# tool used for entering SQL queries
sqlsharp is the Mono SQL# tool used for entering SQL queries
to a database using Mono ADO.NET providers.
.PP
.SH OPTIONS
The following options are supported:
.TP
.I "-f filename"
Output file to load SQL# commands from.
.TP
.I "-o filename"
Output file to send results.
.TP
.I "-s"
Silent mode.
.PP
.SH HOW TO USE
The SQL# tool accepts commands via its command line interface. Commands
begin with a backslash followed by the command name.
.PP
@@ -46,35 +59,6 @@ To connect to a database, you need to do the following:
.fi
.PP
.SH COMMANDS
The following commands are supported:
.PP
.TP
.I "Open"
Opens connection to database.
.nf
Example:
SQL# \\open
.fi
.TP
.I "ConnectionString"
Sets the Connection String.
.nf
Example:
SQL# \\connectionstring Database=test
.fi
.TP
.I "Provider"
Sets the data provider.
.nf
Example:
SQL# \\provider mysql
.fi
.SH CONNECTION AND PROVIDER COMMANDS
These commands are used to setup the provider,
connection string, and open/close the database connnection
@@ -358,16 +342,30 @@ ption defaulting to true.
.SH PROVIDERS
.nf
PROVIDER NAME NAMESPACE ASSEMBLY
PROVIDER NAME NAMESPACE ASSEMBLY
OleDb OLE DB System.Data.OleDb System.Data
SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
Odbc ODBC System.Data.Odbc System.Data
MySql MySQL Mono.Data.MySql Mono.Data.MySql
Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
Tds TDS Generic Mono.Data.TdsClient Mono.Data.TdsClient
PostgreSql PostgreSQL Mono.Data.PostgreSqlClient Mono.Data.PostgreSqlClient
Internal
--------
OleDb OLE DB System.Data.OleDb System.Data
SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
Odbc ODBC System.Data.Odbc System.Data
External to System.Data
-----------------------
MySql MySQL Mono.Data.MySql Mono.Data.MySql
Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
Tds TDS Generic Mono.Data.TdsClient Mono.Data.TdsClient
PostgreSql M PostgreSQL Mono.Data.PostgreSqlClient Mono.Data.PostgreSqlClient
DB2 IBM DB2 Mono.Data.DB2Client Mono.Data.DB2Client
Oracle Oracle 8i System.Data.OracleClient System.Data.OracleClient
External to Mono
----------------
Npgsql NetPostgreSQL Npgsql Npgsql
MySQLNet ByteFX MySQL ByteFX.Data.MySQL ByteFX.Data
.fi
.SH CONNECTION STRING SAMPLES
@@ -423,34 +421,60 @@ which connects to a PostgreSQL database:
Provider=PostgreSQL;Addr=127.0.0.1;Database=rodrigo
Oracle via System.Data.OracleClient
Data Source=testdb;User ID=scott;Password=tiger
IBM DB2 Universal Database via Mono.Data.DB2Client
DSN=sample;User ID=db2admin;Password=mysecret
Npgsql (.NET PostgreSQL) from
http://gborg.postgresql.org/project/npgsql/projdisplay.php
Server=localhost;Database=test;User ID=postgres;Password=fun2db
MySQLNet (ByteFX MySQL) from
http://sourceforge.net/projects/mysqlnet/
Server=localhost;Database=test;User ID=mysql;Password=
.fi
.SH DEBUGGING SUPPORT
No debugging support.
.SH NOTES
No notes.
.SH TRACING SUPPORT
No support for tracing right now.
.SH AUTHORS
The Mono SQL# Tool was written
.nf
by Daniel Morgan <[email protected]>
.fi
.PP
.SH LICENSE
The Mono SQL# Tool is released under the terms of the GNU GPL.
Please read the accompanying `COPYING' file for details. Alternative
licenses are available from Ximian or Daniel Morgan.
.PP
.SH SEE ALSO
mono(1), mint(1), mcs(1)
.PP
.SH BUGS
To report bugs in the compiler, you can use `bug-buddy', or you can
file bug reports in our bug tracking system:
.nf
http://bugzilla.ximian.com.
.SH MAILING LIST
The Mono Mailing List is available at: [email protected]
.SH MORE INFORMATION
The Mono C# compiler is developed by Ximian, Inc
(http://www.ximian.com) (http://www.ximian.com) and is based on the
ECMA C# language standard available here:
http://www.ecma.ch/ecma1/STAND/ecma-334.htm
.fi
.PP
.SH MAILING LISTS
For details, visit:
.nf
http://mail.ximian.com/mailman/mono-list
.fi
.SH WEB SITE
For details, visit:
.nf
http://www.go-mono.com
.fi
.PP
.SH SEE ALSO
mono(1), mint(1)
+3 -1
View File
@@ -5,7 +5,7 @@ C# Compiler:
Class Libraries:
Patrik Torstensson <[email protected]>
Gaurav Vaish <gvaish@iitk.ac.in>
Gaurav Vaish <gvaish[email protected]>
Jeff Stedfast ([email protected])
Joe Shaw ([email protected])
Miguel de Icaza ([email protected])
@@ -15,3 +15,5 @@ Class Libraries:
Bob Smith ([email protected])
John Barnette ([email protected])
Daniel Morgan <[email protected]>
Sebastien Pouliot <[email protected]>
Per Arneng <[email protected]>
+77 -16
View File
@@ -1,3 +1,64 @@
2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* makefile: added Mono.Posix and System.Management.
2003-02-16 Martin Baulig <[email protected]>
* docs/compiler: Added a few works about the new `Location' code.
2003-02-15 Nick Drochak <[email protected]>
* makefile.gnu: Add testcorlib target to run just the corlib unit tests.
2003-02-10 Nick Drochak <[email protected]>
* makefile: Add testcorlib target to run just the corlib unit tests.
2003-01-16 Nick Drochak <[email protected]>
* makefile.gnu: Add corlib target to just build that.
2003-01-14 Duncan Mak <[email protected]>
* ilasm/parser/ScannerAdapter.cs: Remove the cleanup method now that
it's no longer in the interface.
2003-01-13 Duncan Mak <[email protected]>
* ilasm/parser/ScannerAdapter.cs: Implement the new cleanup method
in the tokenizer. This fixes the build.
2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* README.building: New file.
* makefile.gnu: install README.building file.
2003-01-09 Sebastien Pouliot <[email protected]>
* AUTHORS: add myself to class library list
2002-12-15 Alp Toker <[email protected]>
* makefile.gnu: make sure mcs is in PATH, otherwise tell user to read
INSTALL.txt
2002-12-10 Daniel Morgan <[email protected]>
* makefile
* tools/makefile
* tools/makefile.gnu: change target
from SqlSharpCli.exe
to sqlsharp.exe
2002-12-10 Alp Toker <[email protected]>
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644
* ilasm/makefile: ditto
2002-12-10 Gaurav Vaish <[email protected]>
* AUTHORS: Corrected my email-ID.
2002-11-29 Daniel Morgan <[email protected]>
* INSTALL: renamed to INSTALL.txt because INSTALL
@@ -165,20 +226,20 @@
* makefile (linux): Abandon the build if any of the subdir makes fail
2002-03-07 Nick Drochak <[email protected]>
* makefile: Change order of build so corlib is built before nunit since
Nunit needs corlib now.
2002-02-14 Nick Drochak <[email protected]>
* makefile: Build mcs/doctools too when one does 'make'
2002-01-20 Nick Drochak <[email protected]>
* on the 'test' target, make sure NUnit is built first before building
and running tests
2002-01-20 Nick Drochak <[email protected]>
2002-03-07 Nick Drochak <[email protected]>
* makefile: Change order of build so corlib is built before nunit since
Nunit needs corlib now.
2002-02-14 Nick Drochak <[email protected]>
* makefile: Build mcs/doctools too when one does 'make'
2002-01-20 Nick Drochak <[email protected]>
* on the 'test' target, make sure NUnit is built first before building
and running tests
2002-01-20 Nick Drochak <[email protected]>
* add nunit directory to the list of dirs to build in
+33
View File
@@ -0,0 +1,33 @@
[1] Building mono + mcs from CVS on *NIX. The Easy Way (tm)
-------------------------------------------------------------
1. Get mono and mcs from CVS (http://www.go-mono.com/download.html)
2. Use the script to build mono (mono/doc/mono-build.sh).
3. Copy the dlls and mcs.exe from the latest monocharge tarball
(http://www.gnome-db.org/~gonzalo/mono/) to /where/you/installed/mono/lib and
..../bin respectively.
[2] Keeping the stuff up to date
----------------------------------
Once you have followed the above steps, do these ones to keep your installation
up to date:
1. In mcs directory,
cvs -z3 update -Pd
make -f makefile.gnu
2. Use the mono-build.sh script to update, rebuild and install mono from CVS.
Doing a cvs update of mono/doc/mono-build.sh file is also a good idea.
3. In mcs directory:
make -f makefile.gnu install prefix=/prefix/of/your/installation/path
4. In case of troubles (ie, unable to compile mcs/* sources) go to [1].
-Gonzalo
+3 -1
View File
@@ -22,7 +22,9 @@
</sources>
</csc>
<copy file="../lib/Accessibility.dll" tofile="Test/Accessibility.dll"/>
<nant basedir="Test" target="build"/>
<!-- TODO: missing tests & buildfile
<nant basedir="Test" target="build"/>
-->
</target>
<target name="test" depends="build">
+3
View File
@@ -0,0 +1,3 @@
2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file to correctly build with Nant
+74
View File
@@ -1,3 +1,77 @@
2003-03-06 Jackson Harper <[email protected]>
* makefile.gnu: Add PEAPI to the build
2003-03-06 Sebastien Pouliot <[email protected]>
* library.build: added Mono.Security to build, test and clean.
2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* class/library.build:
* class/makefile.gnu: added Mono.Posix and System.Management.
2003-03-02 Jackson Harper <[email protected]>
* mcs/class: Add PEAPI directory
2003-02-22 Martin Baulig <[email protected]>
* library.make: Pass `MCS_FLAGS' to MCS.
2003-02-15 Zoltan Varga <[email protected]>
* makefile.gnu (test): do not install .dbg files since mcs no longer
generates them.
2003-02-13 Tim Coleman <[email protected]>
* makefile.gnu: Add System.Data.OracleClient to linux build.
2003-02-10 Nick Drochak <[email protected]>
* library.build:
* makefile: add testcorlib target to run unit tests just for corlib.
2003-02-05 Sebastien Pouliot <[email protected]>
* library.build: added Mono.Security.Win32 to build, test and
clean. There's no makefile.gnu for this assembly as it is
specific to Win32.
2003-01-23 Nick Drochak <[email protected]>
* makefile: install the .dbg files too so the debugger can use them.
2003-01-17 Sebastien Pouliot <[email protected]>
* library.build: added System.Security to build, test and clean.
There's no makefile.gnu yet for this assembly.
2003-01-16 Rodrigo Moya <[email protected]>
* makefile.gnu: added Mono.Data.DB2Client directory.
2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile : Added new directory
2002-12-11 Jeroen Janssen <[email protected]>
* enabled building Mono.Directory.LDAP and
System.Design in .build file
2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file(s) to correctly contain required buildfile
attribute for nant
2002-12-09 Daniel Morgan <[email protected]>
* library.build: add Mono.GetOptions to windows build
* Mono.GetOptions/Mono.GetOptions.build: add file
for windows build
2002-12-08 Radek Doulik <[email protected]>
* makefile.gnu (DIRS): place System.Data before Mono.GetOptions,
+14 -2
View File
@@ -1,8 +1,20 @@
2002-13-07 Jackson Harper <[email protected]>
2003-02-23 Jackson Harper <[email protected]>
* CompilerError.cs: Use fields not properties, and remove unneeded finalizer
2002-12-15 Jackson Harper <[email protected]>
* CompilerError.cs ErrorLevel.cs: Moved ErrorLevel enum into its own file
2002-12-12 Jackson Harper <[email protected]>
* Compiler.cs: Partially implemented bugreport option, also only allow valid options now
2002-12-07 Jackson Harper <[email protected]>
* Compiler.cs: Moved StreamWriter creation into a try block
2002-13-07 Jackson Harper <[email protected]>
2002-12-07 Jackson Harper <[email protected]>
* Compiler.cs: Source text is now implemented so you can pass strings of C# code to be compiled
@@ -30,11 +30,20 @@ namespace Microsoft.CSharp {
string[] temp_cs_files;
CompilerError[] errors;
string bugreport_path = null;
StreamWriter bug_report = null;
temp_cs_files = CreateCsFiles (sourceTexts, sourceTextNames);
if (options != null)
bugreport_path = (string)options["bugreport"];
if (bugreport_path != null) {
bug_report = CreateBugReport (sourceTexts, sourceTextNames, bugreport_path);
}
try {
errors = CompileFiles (temp_cs_files, target, imports, options);
errors = CompileFiles (temp_cs_files, target, imports, options, bug_report);
} catch {
throw;
} finally {
@@ -42,6 +51,8 @@ namespace Microsoft.CSharp {
FileInfo file = new FileInfo (temp_file);
file.Delete ();
}
if (bug_report != null)
bug_report.Close ();
}
return errors;
@@ -52,7 +63,7 @@ namespace Microsoft.CSharp {
//
private static CompilerError[] CompileFiles (string[] cs_files,
string target, string[] imports, IDictionary options)
string target, string[] imports, IDictionary options, StreamWriter bug_report)
{
ArrayList error_list = new ArrayList ();
Process mcs = new Process ();
@@ -82,6 +93,11 @@ namespace Microsoft.CSharp {
error_list.Add (error);
}
if (bug_report != null) {
bug_report.WriteLine ("### Compiler Output");
bug_report.Write (mcs_output);
}
return (CompilerError[])error_list.ToArray (typeof(CompilerError));
}
@@ -152,6 +168,8 @@ namespace Microsoft.CSharp {
if (null != options) {
foreach (object option in options.Keys) {
object value = options[option];
if (!ValidOption ((string)option))
continue;
args.AppendFormat ("{0} ", OptionString (option,value));
}
}
@@ -184,6 +202,64 @@ namespace Microsoft.CSharp {
throw new IndexOutOfRangeException ();
}
private static StreamWriter CreateBugReport (string[] source_texts,
string[] source_names, string path)
{
StreamWriter bug_report = null;
try {
bug_report = new StreamWriter (path);
bug_report.WriteLine ("### C# Compiler Defect Report," +
" created {0}", DateTime.Now);
// Compiler Version
// Runtime
// Operating System
// Username
for (int i=0; i<source_texts.Length; i++) {
bug_report.WriteLine ("### Source file: '{0}'",
source_names[i]);
bug_report.Write (source_texts[i]);
}
} catch {
if (bug_report != null)
bug_report.Close ();
throw;
}
return bug_report;
}
private static bool ValidOption (string option)
{
switch (option) {
case "addmodule":
case "baseaddress":
case "checked":
case "d":
case "debug":
case "doc":
case "filealign":
case "incr":
case "lib":
case "linkres":
case "m":
case "nostdlib":
case "nowarn":
case "o":
case "r":
case "res":
case "target":
case "unsafe":
case "w":
case "warnaserror":
case "win32icon":
case "win32res":
return true;
}
return false;
}
}
}
@@ -11,73 +11,25 @@ using System.Text;
namespace Microsoft.CSharp {
public enum ErrorLevel {
None,
Warning,
Error,
FatalError,
}
public class CompilerError {
private ErrorLevel level = ErrorLevel.None;
private string message = null;
private string file = null;
private int number = 0;
private int column = 0;
private int line = 0;
public ErrorLevel ErrorLevel;
public string ErrorMessage;
public string SourceFile;
public int ErrorNumber;
public int SourceColumn;
public int SourceLine;
public CompilerError()
public CompilerError ()
{
ErrorLevel = ErrorLevel.None;
ErrorMessage = String.Empty;
SourceFile = String.Empty;
ErrorNumber = 0;
SourceColumn = 0;
SourceLine = 0;
}
~CompilerError()
{
message = null;
file = null;
}
//
// Public Properties
//
public ErrorLevel ErrorLevel {
get { return level; }
set { level = value; }
}
public string ErrorMessage {
get {
return (null == message ? String.Empty : message);
}
set {
message = value;
}
}
public int ErrorNumber {
get { return number; }
set { number = value; }
}
public int SourceColumn {
get { return column; }
set { column = value; }
}
public string SourceFile {
get {
return (null == file ? String.Empty : file);
}
set { file = value; }
}
public int SourceLine {
get { return line; }
set { line = value; }
}
//
// Public Methods
//
@@ -99,6 +51,7 @@ namespace Microsoft.CSharp {
return builder.ToString ();
}
//
// Private Properties
//
@@ -0,0 +1,17 @@
// Microsoft.CSharp.ErrorLevel
//
// Author(s):
// Jackson Harper ([email protected])
//
// (C) 2002 Jackson Harper, All rights reserved.
//
namespace Microsoft.CSharp {
public enum ErrorLevel {
None,
Warning,
Error,
FatalError,
}
}
+1
View File
@@ -1,3 +1,4 @@
Microsoft.CSharp/Compiler.cs
Microsoft.CSharp/CompilerError.cs
Microsoft.CSharp/ErrorLevel.cs
Microsoft.CSharp/TODOAttribute.cs
@@ -0,0 +1,50 @@
// AssemblyInfo.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("SharpZipLibrary")]
[assembly: AssemblyDescription("free C# zlib implementation")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("#ZipLibrary")]
[assembly: AssemblyCopyright("(c) Mike Krueger 2001-2002")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("0.31.0.0")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("SharpZipLib.key")]
@@ -0,0 +1,98 @@
// BZip2.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
namespace ICSharpCode.SharpZipLib.BZip2 {
/// <summary>
/// Does all the compress and decompress pre-operation stuff.
/// Sets up the streams and file header characters.
/// Uses multiply overloaded methods to call for the compress/decompress.
/// </summary>
public sealed class BZip2
{
public static void Decompress(Stream instream, Stream outstream)
{
BufferedStream bos = new BufferedStream(outstream);
BufferedStream bis = new BufferedStream(instream);
int b = bis.ReadByte();
if (b != 'B') {
return;
}
b = bis.ReadByte();
if (b != 'Z') {
return;
}
BZip2InputStream bzis = new BZip2InputStream(bis);
int ch = bzis.ReadByte();
while (ch != -1) {
bos.WriteByte((byte)ch);
ch = bzis.ReadByte();
}
bos.Flush();
}
public static void Compress(Stream instream, Stream outstream, int blockSize)
{
BufferedStream bos = new BufferedStream(outstream);
bos.WriteByte((byte)'B');
bos.WriteByte((byte)'Z');
BufferedStream bis = new BufferedStream(instream);
int ch = bis.ReadByte();
BZip2OutputStream bzos = new BZip2OutputStream(bos);
while(ch != -1) {
bzos.WriteByte((byte)ch);
ch = bis.ReadByte();
}
bis.Close();
bzos.Close();
}
}
}
/* derived from a file which contained this license :
* Copyright (c) 1999-2001 Keiron Liddle, Aftex Software
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
@@ -0,0 +1,155 @@
// BZip2Constants.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
namespace ICSharpCode.SharpZipLib.BZip2 {
/// <summary>
/// Base class for both the compress and decompress classes.
/// Holds common arrays, and static data.
/// </summary>
public sealed class BZip2Constants
{
public readonly static int[] rNums = {
619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
419, 436, 278, 496, 867, 210, 399, 680, 480, 51,
878, 465, 811, 169, 869, 675, 611, 697, 867, 561,
862, 687, 507, 283, 482, 129, 807, 591, 733, 623,
150, 238, 59, 379, 684, 877, 625, 169, 643, 105,
170, 607, 520, 932, 727, 476, 693, 425, 174, 647,
73, 122, 335, 530, 442, 853, 695, 249, 445, 515,
909, 545, 703, 919, 874, 474, 882, 500, 594, 612,
641, 801, 220, 162, 819, 984, 589, 513, 495, 799,
161, 604, 958, 533, 221, 400, 386, 867, 600, 782,
382, 596, 414, 171, 516, 375, 682, 485, 911, 276,
98, 553, 163, 354, 666, 933, 424, 341, 533, 870,
227, 730, 475, 186, 263, 647, 537, 686, 600, 224,
469, 68, 770, 919, 190, 373, 294, 822, 808, 206,
184, 943, 795, 384, 383, 461, 404, 758, 839, 887,
715, 67, 618, 276, 204, 918, 873, 777, 604, 560,
951, 160, 578, 722, 79, 804, 96, 409, 713, 940,
652, 934, 970, 447, 318, 353, 859, 672, 112, 785,
645, 863, 803, 350, 139, 93, 354, 99, 820, 908,
609, 772, 154, 274, 580, 184, 79, 626, 630, 742,
653, 282, 762, 623, 680, 81, 927, 626, 789, 125,
411, 521, 938, 300, 821, 78, 343, 175, 128, 250,
170, 774, 972, 275, 999, 639, 495, 78, 352, 126,
857, 956, 358, 619, 580, 124, 737, 594, 701, 612,
669, 112, 134, 694, 363, 992, 809, 743, 168, 974,
944, 375, 748, 52, 600, 747, 642, 182, 862, 81,
344, 805, 988, 739, 511, 655, 814, 334, 249, 515,
897, 955, 664, 981, 649, 113, 974, 459, 893, 228,
433, 837, 553, 268, 926, 240, 102, 654, 459, 51,
686, 754, 806, 760, 493, 403, 415, 394, 687, 700,
946, 670, 656, 610, 738, 392, 760, 799, 887, 653,
978, 321, 576, 617, 626, 502, 894, 679, 243, 440,
680, 879, 194, 572, 640, 724, 926, 56, 204, 700,
707, 151, 457, 449, 797, 195, 791, 558, 945, 679,
297, 59, 87, 824, 713, 663, 412, 693, 342, 606,
134, 108, 571, 364, 631, 212, 174, 643, 304, 329,
343, 97, 430, 751, 497, 314, 983, 374, 822, 928,
140, 206, 73, 263, 980, 736, 876, 478, 430, 305,
170, 514, 364, 692, 829, 82, 855, 953, 676, 246,
369, 970, 294, 750, 807, 827, 150, 790, 288, 923,
804, 378, 215, 828, 592, 281, 565, 555, 710, 82,
896, 831, 547, 261, 524, 462, 293, 465, 502, 56,
661, 821, 976, 991, 658, 869, 905, 758, 745, 193,
768, 550, 608, 933, 378, 286, 215, 979, 792, 961,
61, 688, 793, 644, 986, 403, 106, 366, 905, 644,
372, 567, 466, 434, 645, 210, 389, 550, 919, 135,
780, 773, 635, 389, 707, 100, 626, 958, 165, 504,
920, 176, 193, 713, 857, 265, 203, 50, 668, 108,
645, 990, 626, 197, 510, 357, 358, 850, 858, 364,
936, 638
};
public readonly static int baseBlockSize = 100000;
public readonly static int MAX_ALPHA_SIZE = 258;
public readonly static int MAX_CODE_LEN = 23;
public readonly static int RUNA = 0;
public readonly static int RUNB = 1;
public readonly static int N_GROUPS = 6;
public readonly static int G_SIZE = 50;
public readonly static int N_ITERS = 4;
public readonly static int MAX_SELECTORS = (2 + (900000 / G_SIZE));
public readonly static int NUM_OVERSHOOT_BYTES = 20;
}
}
/* This file was derived from a file containing under this license:
*
* This file is a part of bzip2 and/or libbzip2, a program and
* library for lossless, block-sorting data compression.
*
* Copyright (C) 1996-1998 Julian R Seward. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. The origin of this software must not be misrepresented; you must
* not claim that you wrote the original software. If you use this
* software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 3. Altered source versions must be plainly marked as such, and must
* not be misrepresented as being the original software.
*
* 4. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Java version ported by Keiron Liddle, Aftex Software <[email protected]> 1999-2001
*/
@@ -0,0 +1,945 @@
// BZip2InputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Checksums;
namespace ICSharpCode.SharpZipLib.BZip2 {
/// <summary>
/// An input stream that decompresses from the BZip2 format (without the file
/// header chars) to be read as any other stream.
/// </summary>
public class BZip2InputStream : Stream
{
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanRead {
get {
return baseStream.CanRead;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanSeek {
get {
return baseStream.CanSeek;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanWrite {
get {
return baseStream.CanWrite;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Length {
get {
return baseStream.Length;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Position {
get {
return baseStream.Position;
}
set {
baseStream.Position = value;
}
}
/// <summary>
/// Flushes the baseInputStream
/// </summary>
public override void Flush()
{
if (baseStream != null) {
baseStream.Flush();
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Seek(long offset, SeekOrigin origin)
{
return baseStream.Seek(offset, origin);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void SetLength(long val)
{
baseStream.SetLength(val);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void Write(byte[] array, int offset, int count)
{
baseStream.Write(array, offset, count);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void WriteByte(byte val)
{
baseStream.WriteByte(val);
}
public override int Read(byte[] b, int off, int len)
{
for (int i = 0; i < len; ++i) {
int rb = ReadByte();
if (rb == -1) {
return i;
}
b[off + i] = (byte)rb;
}
return len;
}
/// <summary>
/// Closes the input stream
/// </summary>
public override void Close()
{
if (baseStream != null) {
baseStream.Close();
}
}
static void Cadvise()
{
Console.WriteLine("CRC Error");
//throw new CCoruptionError();
}
static void BadBGLengths()
{
Console.WriteLine("bad BG lengths");
}
static void bitStreamEOF()
{
Console.WriteLine("bit stream eof");
}
static void CompressedStreamEOF()
{
Console.WriteLine("compressed stream eof");
}
void MakeMaps()
{
nInUse = 0;
for (int i = 0; i < 256; ++i) {
if (inUse[i]) {
seqToUnseq[nInUse] = (byte)i;
unseqToSeq[i] = (byte)nInUse;
nInUse++;
}
}
}
/*--
index of the last char in the block, so
the block size == last + 1.
--*/
int last;
/*--
index in zptr[] of original string after sorting.
--*/
int origPtr;
/*--
always: in the range 0 .. 9.
The current block size is 100000 * this number.
--*/
int blockSize100k;
bool blockRandomised;
// private int bytesIn;
// private int bytesOut;
int bsBuff;
int bsLive;
IChecksum mCrc = new StrangeCRC();
bool[] inUse = new bool[256];
int nInUse;
byte[] seqToUnseq = new byte[256];
byte[] unseqToSeq = new byte[256];
byte[] selector = new byte[BZip2Constants.MAX_SELECTORS];
byte[] selectorMtf = new byte[BZip2Constants.MAX_SELECTORS];
int[] tt;
byte[] ll8;
/*--
freq table collected to save a pass over the data
during decompression.
--*/
int[] unzftab = new int[256];
int[][] limit = new int[BZip2Constants.N_GROUPS][];
int[][] baseArray = new int[BZip2Constants.N_GROUPS][];
int[][] perm = new int[BZip2Constants.N_GROUPS][];
int[] minLens = new int[BZip2Constants.N_GROUPS];
Stream baseStream;
bool streamEnd = false;
int currentChar = -1;
const int START_BLOCK_STATE = 1;
const int RAND_PART_A_STATE = 2;
const int RAND_PART_B_STATE = 3;
const int RAND_PART_C_STATE = 4;
const int NO_RAND_PART_A_STATE = 5;
const int NO_RAND_PART_B_STATE = 6;
const int NO_RAND_PART_C_STATE = 7;
int currentState = START_BLOCK_STATE;
int storedBlockCRC, storedCombinedCRC;
int computedBlockCRC;
uint computedCombinedCRC;
int count, chPrev, ch2;
int tPos;
int rNToGo = 0;
int rTPos = 0;
int i2, j2;
byte z;
public BZip2InputStream(Stream zStream)
{
// init arrays
for (int i = 0; i < BZip2Constants.N_GROUPS; ++i) {
limit[i] = new int[BZip2Constants.MAX_ALPHA_SIZE];
baseArray[i] = new int[BZip2Constants.MAX_ALPHA_SIZE];
perm[i] = new int[BZip2Constants.MAX_ALPHA_SIZE];
}
ll8 = null;
tt = null;
BsSetStream(zStream);
Initialize();
InitBlock();
SetupBlock();
}
public override int ReadByte()
{
if (streamEnd) {
return -1;
}
int retChar = currentChar;
switch (currentState) {
case RAND_PART_B_STATE:
SetupRandPartB();
break;
case RAND_PART_C_STATE:
SetupRandPartC();
break;
case NO_RAND_PART_B_STATE:
SetupNoRandPartB();
break;
case NO_RAND_PART_C_STATE:
SetupNoRandPartC();
break;
case START_BLOCK_STATE:
case NO_RAND_PART_A_STATE:
case RAND_PART_A_STATE:
break;
default:
break;
}
return retChar;
}
void Initialize()
{
char magic3 = BsGetUChar();
char magic4 = BsGetUChar();
if (magic3 != 'h' || magic4 < '1' || magic4 > '9') {
streamEnd = true;
return;
}
SetDecompressStructureSizes(magic4 - '0');
computedCombinedCRC = 0;
}
void InitBlock()
{
char magic1 = BsGetUChar();
char magic2 = BsGetUChar();
char magic3 = BsGetUChar();
char magic4 = BsGetUChar();
char magic5 = BsGetUChar();
char magic6 = BsGetUChar();
if (magic1 == 0x17 && magic2 == 0x72 && magic3 == 0x45 && magic4 == 0x38 && magic5 == 0x50 && magic6 == 0x90) {
Complete();
return;
}
if (magic1 != 0x31 || magic2 != 0x41 || magic3 != 0x59 || magic4 != 0x26 || magic5 != 0x53 || magic6 != 0x59) {
BadBlockHeader();
streamEnd = true;
return;
}
storedBlockCRC = BsGetInt32();
blockRandomised = (BsR(1) == 1);
// currBlockNo++;
GetAndMoveToFrontDecode();
mCrc.Reset();
currentState = START_BLOCK_STATE;
}
void EndBlock()
{
computedBlockCRC = (int)mCrc.Value;
/*-- A bad CRC is considered a fatal error. --*/
if (storedBlockCRC != computedBlockCRC) {
CrcError();
}
// 1528150659
computedCombinedCRC = ((computedCombinedCRC << 1) & 0xFFFFFFFF) | (computedCombinedCRC >> 31);
computedCombinedCRC = computedCombinedCRC ^ (uint)computedBlockCRC;
}
void Complete()
{
storedCombinedCRC = BsGetInt32();
if (storedCombinedCRC != (int)computedCombinedCRC) {
CrcError();
}
streamEnd = true;
}
static void BlockOverrun()
{
Console.WriteLine("Block overrun");
}
static void BadBlockHeader()
{
Console.WriteLine("Bad block header");
}
static void CrcError()
{
Console.WriteLine("crc error");
}
void BsSetStream(Stream f)
{
baseStream = f;
bsLive = 0;
bsBuff = 0;
}
void FillBuffer()
{
int thech = 0;
try {
thech = baseStream.ReadByte();
} catch (Exception) {
CompressedStreamEOF();
}
if (thech == -1) {
CompressedStreamEOF();
}
bsBuff = (bsBuff << 8) | (thech & 0xFF);
bsLive += 8;
}
int BsR(int n)
{
while (bsLive < n) {
FillBuffer();
}
int v = (bsBuff >> (bsLive - n)) & ((1 << n) - 1);
bsLive -= n;
return v;
}
char BsGetUChar()
{
return (char)BsR(8);
}
int BsGetint()
{
int u = 0;
u = (u << 8) | BsR(8);
u = (u << 8) | BsR(8);
u = (u << 8) | BsR(8);
u = (u << 8) | BsR(8);
return u;
}
int BsGetIntVS(int numBits)
{
return (int)BsR(numBits);
}
int BsGetInt32()
{
return (int)BsGetint();
}
void HbCreateDecodeTables(int[] limit, int[] baseArray, int[] perm, char[] length, int minLen, int maxLen, int alphaSize)
{
int pp = 0;
for (int i = minLen; i <= maxLen; ++i) {
for (int j = 0; j < alphaSize; ++j) {
if (length[j] == i) {
perm[pp] = j;
++pp;
}
}
}
for (int i = 0; i < BZip2Constants.MAX_CODE_LEN; i++) {
baseArray[i] = 0;
}
for (int i = 0; i < alphaSize; i++) {
++baseArray[length[i] + 1];
}
for (int i = 1; i < BZip2Constants.MAX_CODE_LEN; i++) {
baseArray[i] += baseArray[i - 1];
}
for (int i = 0; i < BZip2Constants.MAX_CODE_LEN; i++) {
limit[i] = 0;
}
int vec = 0;
for (int i = minLen; i <= maxLen; i++) {
vec += (baseArray[i + 1] - baseArray[i]);
limit[i] = vec - 1;
vec <<= 1;
}
for (int i = minLen + 1; i <= maxLen; i++) {
baseArray[i] = ((limit[i - 1] + 1) << 1) - baseArray[i];
}
}
void RecvDecodingTables()
{
char[][] len = new char[BZip2Constants.N_GROUPS][];
for (int i = 0; i < BZip2Constants.N_GROUPS; ++i) {
len[i] = new char[BZip2Constants.MAX_ALPHA_SIZE];
}
bool[] inUse16 = new bool[16];
/*--- Receive the mapping table ---*/
for (int i = 0; i < 16; i++) {
inUse16[i] = (BsR(1) == 1);
}
for (int i = 0; i < 16; i++) {
if (inUse16[i]) {
for (int j = 0; j < 16; j++) {
inUse[i * 16 + j] = (BsR(1) == 1);
}
}
}
MakeMaps();
int alphaSize = nInUse + 2;
/*--- Now the selectors ---*/
int nGroups = BsR(3);
int nSelectors = BsR(15);
for (int i = 0; i < nSelectors; i++) {
int j = 0;
while (BsR(1) == 1) {
j++;
}
selectorMtf[i] = (byte)j;
}
/*--- Undo the MTF values for the selectors. ---*/
byte[] pos = new byte[BZip2Constants.N_GROUPS];
for (int v = 0; v < nGroups; v++) {
pos[v] = (byte)v;
}
for (int i = 0; i < nSelectors; i++) {
int v = selectorMtf[i];
byte tmp = pos[v];
while (v > 0) {
pos[v] = pos[v - 1];
v--;
}
pos[0] = tmp;
selector[i] = tmp;
}
/*--- Now the coding tables ---*/
for (int t = 0; t < nGroups; t++) {
int curr = BsR(5);
for (int i = 0; i < alphaSize; i++) {
while (BsR(1) == 1) {
if (BsR(1) == 0) {
curr++;
} else {
curr--;
}
}
len[t][i] = (char)curr;
}
}
/*--- Create the Huffman decoding tables ---*/
for (int t = 0; t < nGroups; t++) {
int minLen = 32;
int maxLen = 0;
for (int i = 0; i < alphaSize; i++) {
maxLen = Math.Max(maxLen, len[t][i]);
minLen = Math.Min(minLen, len[t][i]);
}
HbCreateDecodeTables(limit[t], baseArray[t], perm[t], len[t], minLen, maxLen, alphaSize);
minLens[t] = minLen;
}
}
void GetAndMoveToFrontDecode()
{
byte[] yy = new byte[256];
int nextSym;
int limitLast = BZip2Constants.baseBlockSize * blockSize100k;
origPtr = BsGetIntVS(24);
RecvDecodingTables();
int EOB = nInUse+1;
int groupNo = -1;
int groupPos = 0;
/*--
Setting up the unzftab entries here is not strictly
necessary, but it does save having to do it later
in a separate pass, and so saves a block's worth of
cache misses.
--*/
for (int i = 0; i <= 255; i++) {
unzftab[i] = 0;
}
for (int i = 0; i <= 255; i++) {
yy[i] = (byte)i;
}
last = -1;
if (groupPos == 0) {
groupNo++;
groupPos = BZip2Constants.G_SIZE;
}
groupPos--;
int zt = selector[groupNo];
int zn = minLens[zt];
int zvec = BsR(zn);
int zj;
while (zvec > limit[zt][zn]) {
zn++;
while (bsLive < 1) {
FillBuffer();
}
zj = (bsBuff >> (bsLive-1)) & 1;
bsLive--;
zvec = (zvec << 1) | zj;
}
nextSym = perm[zt][zvec - baseArray[zt][zn]];
while (true) {
if (nextSym == EOB) {
break;
}
if (nextSym == BZip2Constants.RUNA || nextSym == BZip2Constants.RUNB) {
int s = -1;
int n = 1;
do {
if (nextSym == BZip2Constants.RUNA) {
s += (0+1) * n;
} else if (nextSym == BZip2Constants.RUNB) {
s += (1+1) * n;
}
n <<= 1;
if (groupPos == 0) {
groupNo++;
groupPos = BZip2Constants.G_SIZE;
}
groupPos--;
zt = selector[groupNo];
zn = minLens[zt];
zvec = BsR(zn);
while (zvec > limit[zt][zn]) {
zn++;
while (bsLive < 1) {
FillBuffer();
}
zj = (bsBuff >> (bsLive - 1)) & 1;
bsLive--;
zvec = (zvec << 1) | zj;
}
nextSym = perm[zt][zvec - baseArray[zt][zn]];
} while (nextSym == BZip2Constants.RUNA || nextSym == BZip2Constants.RUNB);
s++;
byte ch = seqToUnseq[yy[0]];
unzftab[ch] += s;
while (s > 0) {
last++;
ll8[last] = ch;
s--;
}
if (last >= limitLast) {
BlockOverrun();
}
continue;
} else {
last++;
if (last >= limitLast) {
BlockOverrun();
}
byte tmp = yy[nextSym - 1];
unzftab[seqToUnseq[tmp]]++;
ll8[last] = seqToUnseq[tmp];
for (int j = nextSym-1; j > 0; --j) {
yy[j] = yy[j - 1];
}
yy[0] = tmp;
if (groupPos == 0) {
groupNo++;
groupPos = BZip2Constants.G_SIZE;
}
groupPos--;
zt = selector[groupNo];
zn = minLens[zt];
zvec = BsR(zn);
while (zvec > limit[zt][zn]) {
zn++;
while (bsLive < 1) {
FillBuffer();
}
zj = (bsBuff >> (bsLive-1)) & 1;
bsLive--;
zvec = (zvec << 1) | zj;
}
nextSym = perm[zt][zvec - baseArray[zt][zn]];
continue;
}
}
}
void SetupBlock()
{
int[] cftab = new int[257];
cftab[0] = 0;
Array.Copy(unzftab, 0, cftab, 1, 256);
for (int i = 1; i <= 256; i++) {
cftab[i] += cftab[i - 1];
}
for (int i = 0; i <= last; i++) {
byte ch = ll8[i];
tt[cftab[ch]] = i;
cftab[ch]++;
}
cftab = null;
tPos = tt[origPtr];
count = 0;
i2 = 0;
ch2 = 256; /*-- not a char and not EOF --*/
if (blockRandomised) {
rNToGo = 0;
rTPos = 0;
SetupRandPartA();
} else {
SetupNoRandPartA();
}
}
void SetupRandPartA()
{
if(i2 <= last) {
chPrev = ch2;
ch2 = ll8[tPos];
tPos = tt[tPos];
if (rNToGo == 0) {
rNToGo = BZip2Constants.rNums[rTPos];
rTPos++;
if(rTPos == 512) {
rTPos = 0;
}
}
rNToGo--;
ch2 ^= (int)((rNToGo == 1) ? 1 : 0);
i2++;
currentChar = ch2;
currentState = RAND_PART_B_STATE;
mCrc.Update(ch2);
} else {
EndBlock();
InitBlock();
SetupBlock();
}
}
void SetupNoRandPartA()
{
if (i2 <= last) {
chPrev = ch2;
ch2 = ll8[tPos];
tPos = tt[tPos];
i2++;
currentChar = ch2;
currentState = NO_RAND_PART_B_STATE;
mCrc.Update(ch2);
} else {
EndBlock();
InitBlock();
SetupBlock();
}
}
void SetupRandPartB()
{
if (ch2 != chPrev) {
currentState = RAND_PART_A_STATE;
count = 1;
SetupRandPartA();
} else {
count++;
if (count >= 4) {
z = ll8[tPos];
tPos = tt[tPos];
if (rNToGo == 0) {
rNToGo = BZip2Constants.rNums[rTPos];
rTPos++;
if (rTPos == 512) {
rTPos = 0;
}
}
rNToGo--;
z ^= (byte)((rNToGo == 1) ? 1 : 0);
j2 = 0;
currentState = RAND_PART_C_STATE;
SetupRandPartC();
} else {
currentState = RAND_PART_A_STATE;
SetupRandPartA();
}
}
}
void SetupRandPartC()
{
if (j2 < (int)z) {
currentChar = ch2;
mCrc.Update(ch2);
j2++;
} else {
currentState = RAND_PART_A_STATE;
i2++;
count = 0;
SetupRandPartA();
}
}
void SetupNoRandPartB()
{
if (ch2 != chPrev) {
currentState = NO_RAND_PART_A_STATE;
count = 1;
SetupNoRandPartA();
} else {
count++;
if (count >= 4) {
z = ll8[tPos];
tPos = tt[tPos];
currentState = NO_RAND_PART_C_STATE;
j2 = 0;
SetupNoRandPartC();
} else {
currentState = NO_RAND_PART_A_STATE;
SetupNoRandPartA();
}
}
}
void SetupNoRandPartC()
{
if (j2 < (int)z) {
currentChar = ch2;
mCrc.Update(ch2);
j2++;
} else {
currentState = NO_RAND_PART_A_STATE;
i2++;
count = 0;
SetupNoRandPartA();
}
}
void SetDecompressStructureSizes(int newSize100k)
{
if (!(0 <= newSize100k && newSize100k <= 9 &&
0 <= blockSize100k && blockSize100k <= 9)) {
throw new ApplicationException("Invalid block size");
}
blockSize100k = newSize100k;
if (newSize100k == 0) {
return;
}
int n = BZip2Constants.baseBlockSize * newSize100k;
ll8 = new byte[n];
tt = new int[n];
}
}
}
/* This file was derived from a file containing under this license:
*
* This file is a part of bzip2 and/or libbzip2, a program and
* library for lossless, block-sorting data compression.
*
* Copyright (C) 1996-1998 Julian R Seward. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. The origin of this software must not be misrepresented; you must
* not claim that you wrote the original software. If you use this
* software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 3. Altered source versions must be plainly marked as such, and must
* not be misrepresented as being the original software.
*
* 4. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Java version ported by Keiron Liddle, Aftex Software <[email protected]> 1999-2001
*/
@@ -0,0 +1,199 @@
// Adler32.cs - Computes Adler32 data checksum of a data stream
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Checksums {
/// <summary>
/// Computes Adler32 checksum for a stream of data. An Adler32
/// checksum is not as reliable as a CRC32 checksum, but a lot faster to
/// compute.
///
/// The specification for Adler32 may be found in RFC 1950.
/// ZLIB Compressed Data Format Specification version 3.3)
///
///
/// From that document:
///
/// "ADLER32 (Adler-32 checksum)
/// This contains a checksum value of the uncompressed data
/// (excluding any dictionary data) computed according to Adler-32
/// algorithm. This algorithm is a 32-bit extension and improvement
/// of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
/// standard.
///
/// Adler-32 is composed of two sums accumulated per byte: s1 is
/// the sum of all bytes, s2 is the sum of all s1 values. Both sums
/// are done modulo 65521. s1 is initialized to 1, s2 to zero. The
/// Adler-32 checksum is stored as s2*65536 + s1 in most-
/// significant-byte first (network) order."
///
/// "8.2. The Adler-32 algorithm
///
/// The Adler-32 algorithm is much faster than the CRC32 algorithm yet
/// still provides an extremely low probability of undetected errors.
///
/// The modulo on unsigned long accumulators can be delayed for 5552
/// bytes, so the modulo operation time is negligible. If the bytes
/// are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
/// and order sensitive, unlike the first sum, which is just a
/// checksum. That 65521 is prime is important to avoid a possible
/// large class of two-byte errors that leave the check unchanged.
/// (The Fletcher checksum uses 255, which is not prime and which also
/// makes the Fletcher check insensitive to single byte changes 0 -
/// 255.)
///
/// The sum s1 is initialized to 1 instead of zero to make the length
/// of the sequence part of s2, so that the length does not have to be
/// checked separately. (Any sequence of zeroes has a Fletcher
/// checksum of zero.)"
/// </summary>
/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream"/>
/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream"/>
public sealed class Adler32 : IChecksum
{
/// <summary>
/// largest prime smaller than 65536
/// </summary>
readonly static uint BASE = 65521;
uint checksum;
/// <summary>
/// Returns the Adler32 data checksum computed so far.
/// </summary>
public long Value {
get {
return checksum;
}
}
/// <summary>
/// Creates a new instance of the <code>Adler32</code> class.
/// The checksum starts off with a value of 1.
/// </summary>
public Adler32()
{
Reset();
}
/// <summary>
/// Resets the Adler32 checksum to the initial value.
/// </summary>
public void Reset()
{
checksum = 1; //Initialize to 1
}
/// <summary>
/// Updates the checksum with the byte b.
/// </summary>
/// <param name="bval">
/// the data value to add. The high byte of the int is ignored.
/// </param>
public void Update(int bval)
{
//We could make a length 1 byte array and call update again, but I
//would rather not have that overhead
uint s1 = checksum & 0xFFFF;
uint s2 = checksum >> 16;
s1 = (s1 + ((uint)bval & 0xFF)) % BASE;
s2 = (s1 + s2) % BASE;
checksum = (s2 << 16) + s1;
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
public void Update(byte[] buffer)
{
Update(buffer, 0, buffer.Length);
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buf">
/// an array of bytes
/// </param>
/// <param name="off">
/// the start of the data used for this update
/// </param>
/// <param name="len">
/// the number of bytes to use for this update
/// </param>
public void Update(byte[] buf, int off, int len)
{
if (buf == null) {
throw new ArgumentNullException("buf");
}
if (off < 0 || len < 0 || off + len > buf.Length) {
throw new ArgumentOutOfRangeException();
}
//(By Per Bothner)
uint s1 = checksum & 0xFFFF;
uint s2 = checksum >> 16;
while (len > 0) {
// We can defer the modulo operation:
// s1 maximally grows from 65521 to 65521 + 255 * 3800
// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
int n = 3800;
if (n > len) {
n = len;
}
len -= n;
while (--n >= 0) {
s1 = s1 + (uint)(buf[off++] & 0xFF);
s2 = s2 + s1;
}
s1 %= BASE;
s2 %= BASE;
}
checksum = (s2 << 16) | s1;
}
}
}
@@ -0,0 +1,202 @@
// CRC32.cs - Computes CRC32 data checksum of a data stream
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Checksums {
/// <summary>
/// Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
/// x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
///
/// Polynomials over GF(2) are represented in binary, one bit per coefficient,
/// with the lowest powers in the most significant bit. Then adding polynomials
/// is just exclusive-or, and multiplying a polynomial by x is a right shift by
/// one. If we call the above polynomial p, and represent a byte as the
/// polynomial q, also with the lowest power in the most significant bit (so the
/// byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
/// where a mod b means the remainder after dividing a by b.
///
/// This calculation is done using the shift-register method of multiplying and
/// taking the remainder. The register is initialized to zero, and for each
/// incoming bit, x^32 is added mod p to the register if the bit is a one (where
/// x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
/// x (which is shifting right by one and adding x^32 mod p if the bit shifted
/// out is a one). We start with the highest power (least significant bit) of
/// q and repeat for all eight bits of q.
///
/// The table is simply the CRC of all possible eight bit values. This is all
/// the information needed to generate CRC's on data a byte at a time for all
/// combinations of CRC register values and incoming bytes.
/// </summary>
public sealed class Crc32 : IChecksum
{
readonly static uint CrcSeed = 0xFFFFFFFF;
readonly static uint[] CrcTable = new uint[] {
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,
0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,
0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,
0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,
0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,
0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,
0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,
0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,
0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,
0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,
0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,
0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,
0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,
0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,
0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,
0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,
0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,
0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,
0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,
0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,
0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,
0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,
0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,
0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,
0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,
0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,
0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,
0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,
0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,
0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,
0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,
0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,
0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,
0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,
0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,
0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,
0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,
0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,
0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,
0x2D02EF8D
};
/// <summary>
/// The crc data checksum so far.
/// </summary>
uint crc = 0;
/// <summary>
/// Returns the CRC32 data checksum computed so far.
/// </summary>
public long Value {
get {
return (long)crc;
}
}
/// <summary>
/// Resets the CRC32 data checksum as if no update was ever called.
/// </summary>
public void Reset()
{
crc = 0;
}
/// <summary>
/// Updates the checksum with the int bval.
/// </summary>
/// <param name = "bval">
/// the byte is taken as the lower 8 bits of bval
/// </param>
public void Update(int bval)
{
crc ^= CrcSeed;
crc = CrcTable[(crc ^ bval) & 0xFF] ^ (crc >> 8);
crc ^= CrcSeed;
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
public void Update(byte[] buffer)
{
Update(buffer, 0, buffer.Length);
}
/// <summary>
/// Adds the byte array to the data checksum.
/// </summary>
/// <param name = "buf">
/// the buffer which contains the data
/// </param>
/// <param name = "off">
/// the offset in the buffer where the data starts
/// </param>
/// <param name = "len">
/// the length of the data
/// </param>
public void Update(byte[] buf, int off, int len)
{
if (buf == null) {
throw new ArgumentNullException("buf");
}
if (off < 0 || len < 0 || off + len > buf.Length) {
throw new ArgumentOutOfRangeException();
}
crc ^= CrcSeed;
while (--len >= 0) {
crc = CrcTable[(crc ^ buf[off++]) & 0xFF] ^ (crc >> 8);
}
crc ^= CrcSeed;
}
}
}
@@ -0,0 +1,91 @@
// IChecksum.cs - Interface to compute a data checksum
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
namespace ICSharpCode.SharpZipLib.Checksums {
/// <summary>
/// Interface to compute a data checksum used by checked input/output streams.
/// A data checksum can be updated by one byte or with a byte array. After each
/// update the value of the current checksum can be returned by calling
/// <code>getValue</code>. The complete checksum object can also be reset
/// so it can be used again with new data.
/// </summary>
public interface IChecksum
{
/// <summary>
/// Returns the data checksum computed so far.
/// </summary>
long Value {
get;
}
/// <summary>
/// Resets the data checksum as if no update was ever called.
/// </summary>
void Reset();
/// <summary>
/// Adds one byte to the data checksum.
/// </summary>
/// <param name = "bval">
/// the data value to add. The high byte of the int is ignored.
/// </param>
void Update(int bval);
/// <summary>
/// Updates the data checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
void Update(byte[] buffer);
/// <summary>
/// Adds the byte array to the data checksum.
/// </summary>
/// <param name = "buf">
/// the buffer which contains the data
/// </param>
/// <param name = "off">
/// the offset in the buffer where the data starts
/// </param>
/// <param name = "len">
/// the length of the data
/// </param>
void Update(byte[] buf, int off, int len);
}
}
@@ -0,0 +1,158 @@
// StrangeCRC.cs - computes a crc used in the bziplib ... I don't think that
// this is the 'standard' crc, please correct me, if I'm wrong
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Checksums {
public class StrangeCRC : IChecksum
{
readonly static uint[] crc32Table = {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
};
int globalCrc;
public StrangeCRC()
{
Reset();
}
public void Reset()
{
globalCrc = -1;
}
public long Value {
get {
return ~globalCrc;
}
}
public void Update(int inCh)
{
int temp = (globalCrc >> 24) ^ inCh;
if (temp < 0) {
temp = 256 + temp;
}
globalCrc = (int)((globalCrc << 8) ^ crc32Table[temp]);
}
public void Update(byte[] buf)
{
Update(buf, 0, buf.Length);
}
public void Update(byte[] buf, int off, int len)
{
if (buf == null) {
throw new ArgumentNullException("buf");
}
if (off < 0 || len < 0 || off + len > buf.Length) {
throw new ArgumentOutOfRangeException();
}
for (int i = 0; i < len; ++i) {
Update(buf[off++]);
}
}
}
}
@@ -0,0 +1,67 @@
// GZIPConstants.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
namespace ICSharpCode.SharpZipLib.GZip {
/// <summary>
/// This class contains constants used for gzip.
/// </summary>
public class GZipConstants
{
/// <summary>
/// Magic number found at start of GZIP header
/// </summary>
public static readonly int GZIP_MAGIC = 0x1F8B;
/* The flag byte is divided into individual bits as follows:
bit 0 FTEXT
bit 1 FHCRC
bit 2 FEXTRA
bit 3 FNAME
bit 4 FCOMMENT
bit 5 reserved
bit 6 reserved
bit 7 reserved
*/
public const int FTEXT = 0x1;
public const int FHCRC = 0x2;
public const int FEXTRA = 0x4;
public const int FNAME = 0x8;
public const int FCOMMENT = 0x10;
}
}
@@ -0,0 +1,337 @@
// GzipInputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace ICSharpCode.SharpZipLib.GZip {
/// <summary>
/// This filter stream is used to decompress a "GZIP" format stream.
/// The "GZIP" format is described baseInputStream RFC 1952.
///
/// author of the original java version : John Leuner
/// </summary>
/// <example> This sample shows how to unzip a gzipped file
/// <code>
/// using System;
/// using System.IO;
///
/// using NZlib.GZip;
///
/// class MainClass
/// {
/// public static void Main(string[] args)
/// {
/// Stream s = new GZipInputStream(File.OpenRead(args[0]));
/// FileStream fs = File.Create(Path.GetFileNameWithoutExtension(args[0]));
/// int size = 2048;
/// byte[] writeData = new byte[2048];
/// while (true) {
/// size = s.Read(writeData, 0, size);
/// if (size > 0) {
/// fs.Write(writeData, 0, size);
/// } else {
/// break;
/// }
/// }
/// s.Close();
/// }
/// }
/// </code>
/// </example>
public class GZipInputStream : InflaterInputStream
{
//Variables
/// <summary>
/// CRC-32 value for uncompressed data
/// </summary>
protected Crc32 crc = new Crc32();
/// <summary>
/// Indicates end of stream
/// </summary>
protected bool eos;
/// <summary>
/// Creates a GzipInputStream with the default buffer size
/// </summary>
/// <param name="baseInputStream">
/// The stream to read compressed data from (baseInputStream GZIP format)
/// </param>
public GZipInputStream(Stream baseInputStream) : this(baseInputStream, 4096)
{
}
/// <summary>
/// Creates a GZIPInputStream with the specified buffer size
/// </summary>
/// <param name="baseInputStream">
/// The stream to read compressed data from (baseInputStream GZIP format)
/// </param>
/// <param name="size">
/// Size of the buffer to use
/// </param>
public GZipInputStream(Stream baseInputStream, int size) : base(baseInputStream, new Inflater(true), size)
{
}
/// <summary>
/// Reads uncompressed data into an array of bytes
/// </summary>
/// <param name="buf">
/// the buffer to read uncompressed data into
/// </param>
/// <param name="offset">
/// the offset indicating where the data should be placed
/// </param>
/// <param name="len">
/// the number of uncompressed bytes to be read
/// </param>
public override int Read(byte[] buf, int offset, int len)
{
// We first have to slurp baseInputStream the GZIP header, then we feed all the
// rest of the data to the superclass.
//
// As we do that we continually update the CRC32. Once the data is
// finished, we check the CRC32
//
// This means we don't need our own buffer, as everything is done
// baseInputStream the superclass.
if (!readGZIPHeader) {
ReadHeader();
}
if (eos) {
return 0;
}
// System.err.println("GZIPIS.read(byte[], off, len ... " + offset + " and len " + len);
//We don't have to read the header, so we just grab data from the superclass
int numRead = base.Read(buf, offset, len);
if (numRead > 0) {
crc.Update(buf, offset, numRead);
}
if (inf.IsFinished) {
ReadFooter();
}
return numRead;
}
private void ReadHeader()
{
/* 1. Check the two magic bytes */
Crc32 headCRC = new Crc32();
int magic = baseInputStream.ReadByte();
if (magic < 0) {
eos = true;
return;
}
headCRC.Update(magic);
if (magic != (GZipConstants.GZIP_MAGIC >> 8)) {
throw new IOException("Error baseInputStream GZIP header, first byte doesn't match");
}
magic = baseInputStream.ReadByte();
if (magic != (GZipConstants.GZIP_MAGIC & 0xFF)) {
throw new IOException("Error baseInputStream GZIP header, second byte doesn't match");
}
headCRC.Update(magic);
/* 2. Check the compression type (must be 8) */
int CM = baseInputStream.ReadByte();
if (CM != 8) {
throw new IOException("Error baseInputStream GZIP header, data not baseInputStream deflate format");
}
headCRC.Update(CM);
/* 3. Check the flags */
int flags = baseInputStream.ReadByte();
if (flags < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
headCRC.Update(flags);
/* This flag byte is divided into individual bits as follows:
bit 0 FTEXT
bit 1 FHCRC
bit 2 FEXTRA
bit 3 FNAME
bit 4 FCOMMENT
bit 5 reserved
bit 6 reserved
bit 7 reserved
*/
/* 3.1 Check the reserved bits are zero */
if ((flags & 0xd0) != 0) {
throw new IOException("Reserved flag bits baseInputStream GZIP header != 0");
}
/* 4.-6. Skip the modification time, extra flags, and OS type */
for (int i=0; i< 6; i++) {
int readByte = baseInputStream.ReadByte();
if (readByte < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
headCRC.Update(readByte);
}
/* 7. Read extra field */
if ((flags & GZipConstants.FEXTRA) != 0) {
/* Skip subfield id */
for (int i=0; i< 2; i++) {
int readByte = baseInputStream.ReadByte();
if (readByte < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
headCRC.Update(readByte);
}
if (baseInputStream.ReadByte() < 0 || baseInputStream.ReadByte() < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
int len1, len2, extraLen;
len1 = baseInputStream.ReadByte();
len2 = baseInputStream.ReadByte();
if ((len1 < 0) || (len2 < 0)) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
headCRC.Update(len1);
headCRC.Update(len2);
extraLen = (len1 << 8) | len2;
for (int i = 0; i < extraLen;i++) {
int readByte = baseInputStream.ReadByte();
if (readByte < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
headCRC.Update(readByte);
}
}
/* 8. Read file name */
if ((flags & GZipConstants.FNAME) != 0) {
int readByte;
while ( (readByte = baseInputStream.ReadByte()) > 0) {
headCRC.Update(readByte);
}
if (readByte < 0) {
throw new Exception("Early EOF baseInputStream GZIP file name");
}
headCRC.Update(readByte);
}
/* 9. Read comment */
if ((flags & GZipConstants.FCOMMENT) != 0) {
int readByte;
while ( (readByte = baseInputStream.ReadByte()) > 0) {
headCRC.Update(readByte);
}
if (readByte < 0) {
throw new Exception("Early EOF baseInputStream GZIP comment");
}
headCRC.Update(readByte);
}
/* 10. Read header CRC */
if ((flags & GZipConstants.FHCRC) != 0) {
int tempByte;
int crcval = baseInputStream.ReadByte();
if (crcval < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
tempByte = baseInputStream.ReadByte();
if (tempByte < 0) {
throw new Exception("Early EOF baseInputStream GZIP header");
}
crcval = (crcval << 8) | tempByte;
if (crcval != ((int) headCRC.Value & 0xffff)) {
throw new IOException("Header CRC value mismatch");
}
}
readGZIPHeader = true;
//System.err.println("Read GZIP header");
}
private void ReadFooter()
{
byte[] footer = new byte[8];
int avail = inf.RemainingInput;
if (avail > 8) {
avail = 8;
}
System.Array.Copy(buf, len - inf.RemainingInput, footer, 0, avail);
int needed = 8 - avail;
while (needed > 0) {
int count = baseInputStream.Read(footer, 8-needed, needed);
if (count <= 0) {
throw new Exception("Early EOF baseInputStream GZIP footer");
}
needed -= count; //Jewel Jan 16
}
int crcval = (footer[0] & 0xff) | ((footer[1] & 0xff) << 8) | ((footer[2] & 0xff) << 16) | (footer[3] << 24);
if (crcval != (int) crc.Value) {
throw new IOException("GZIP crc sum mismatch, theirs \"" + crcval + "\" and ours \"" + (int) crc.Value);
}
int total = (footer[4] & 0xff) | ((footer[5] & 0xff) << 8) | ((footer[6] & 0xff) << 16) | (footer[7] << 24);
if (total != inf.TotalOut) {
throw new IOException("Number of bytes mismatch");
}
/* XXX Should we support multiple members.
* Difficult, since there may be some bytes still baseInputStream buf
*/
eos = true;
}
/* Have we read the GZIP header yet? */
private bool readGZIPHeader;
}
}
@@ -0,0 +1,170 @@
// GzipOutputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace ICSharpCode.SharpZipLib.GZip {
/// <summary>
/// This filter stream is used to compress a stream into a "GZIP" stream.
/// The "GZIP" format is described in RFC 1952.
///
/// author of the original java version : John Leuner
/// </summary>
/// <example> This sample shows how to gzip a file
/// <code>
/// using System;
/// using System.IO;
///
/// using NZlib.GZip;
///
/// class MainClass
/// {
/// public static void Main(string[] args)
/// {
/// Stream s = new GZipOutputStream(File.Create(args[0] + ".gz"));
/// FileStream fs = File.OpenRead(args[0]);
/// byte[] writeData = new byte[fs.Length];
/// fs.Read(writeData, 0, (int)fs.Length);
/// s.Write(writeData, 0, writeData.Length);
/// s.Close();
/// }
/// }
/// </code>
/// </example>
public class GZipOutputStream : DeflaterOutputStream
{
//Variables
/// <summary>
/// CRC-32 value for uncompressed data
/// </summary>
protected Crc32 crc = new Crc32();
// Constructors
/// <summary>
/// Creates a GzipOutputStream with the default buffer size
/// </summary>
/// <param name="baseOutputStream">
/// The stream to read data (to be compressed) from
/// </param>
public GZipOutputStream(Stream baseOutputStream) : this(baseOutputStream, 4096)
{
}
/// <summary>
/// Creates a GZIPOutputStream with the specified buffer size
/// </summary>
/// <param name="baseOutputStream">
/// The stream to read data (to be compressed) from
/// </param>
/// <param name="size">
/// Size of the buffer to use
/// </param>
public GZipOutputStream(Stream baseOutputStream, int size) : base(baseOutputStream, new Deflater(Deflater.DEFAULT_COMPRESSION, true), size)
{
// TODO : find out correctness, orgininally this was : (int) (System.currentTimeMillis() / 1000L);
int mod_time = (int)(DateTime.Now.Ticks / 10000L); // Ticks give back 100ns intervals
byte[] gzipHeader = {
/* The two magic bytes */
(byte) (GZipConstants.GZIP_MAGIC >> 8), (byte) GZipConstants.GZIP_MAGIC,
/* The compression type */
(byte) Deflater.DEFLATED,
/* The flags (not set) */
0,
/* The modification time */
(byte) mod_time, (byte) (mod_time >> 8),
(byte) (mod_time >> 16), (byte) (mod_time >> 24),
/* The extra flags */
0,
/* The OS type (unknown) */
(byte) 255
};
baseOutputStream.Write(gzipHeader, 0, gzipHeader.Length);
// System.err.println("wrote GZIP header (" + gzipHeader.length + " bytes )");
}
public override void Write(byte[] buf, int off, int len)
{
crc.Update(buf, off, len);
base.Write(buf, off, len);
}
/// <summary>
/// Writes remaining compressed output data to the output stream
/// and closes it.
/// </summary>
public override void Close()
{
Finish();
baseOutputStream.Close();
}
public override void Finish()
{
base.Finish();
int totalin = def.TotalIn;
int crcval = (int) (crc.Value & 0xffffffff);
// System.err.println("CRC val is " + Integer.toHexString( crcval ) + " and length " + Integer.toHexString(totalin));
byte[] gzipFooter = {
(byte) crcval, (byte) (crcval >> 8),
(byte) (crcval >> 16), (byte) (crcval >> 24),
(byte) totalin, (byte) (totalin >> 8),
(byte) (totalin >> 16), (byte) (totalin >> 24)
};
baseOutputStream.Write(gzipFooter, 0, gzipFooter.Length);
// System.err.println("wrote GZIP trailer (" + gzipFooter.length + " bytes )");
}
}
}
@@ -0,0 +1,72 @@
// BZip2OutputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Checksums;
namespace ICSharpCode.SharpZipLib.Tar {
/// <summary>
/// This exception is used to indicate that there is a problem
/// with a TAR archive header.
/// </summary>
public class InvalidHeaderException : System.IO.IOException
{
public InvalidHeaderException()
{
}
public InvalidHeaderException(string msg) : base(msg)
{
}
}
}
/* The original Java file had this header:
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,693 @@
// TarInputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using System.Text;
namespace ICSharpCode.SharpZipLib.Tar {
public delegate void ProgressMessageHandler(TarArchive archive, string message);
/// <summary>
/// The TarArchive class implements the concept of a
/// tar archive. A tar archive is a series of entries, each of
/// which represents a file system object. Each entry in
/// the archive consists of a header record. Directory entries
/// consist only of the header record, and are followed by entries
/// for the directory's contents. File entries consist of a
/// header record followed by the number of records needed to
/// contain the file's contents. All entries are written on
/// record boundaries. Records are 512 bytes long.
///
/// TarArchives are instantiated in either read or write mode,
/// based upon whether they are instantiated with an InputStream
/// or an OutputStream. Once instantiated TarArchives read/write
/// mode can not be changed.
///
/// There is currently no support for random access to tar archives.
/// However, it seems that subclassing TarArchive, and using the
/// TarBuffer.getCurrentRecordNum() and TarBuffer.getCurrentBlockNum()
/// methods, this would be rather trvial.
/// </summary>
public class TarArchive
{
protected bool verbose;
protected bool debug;
protected bool keepOldFiles;
protected bool asciiTranslate;
protected int userId;
protected string userName;
protected int groupId;
protected string groupName;
protected string rootPath;
protected string pathPrefix;
protected int recordSize;
protected byte[] recordBuf;
protected TarInputStream tarIn;
protected TarOutputStream tarOut;
public event ProgressMessageHandler ProgressMessageEvent;
protected virtual void OnProgressMessageEvent(string message)
{
if (ProgressMessageEvent != null) {
ProgressMessageEvent(this, message);
}
}
protected TarArchive()
{
}
/// <summary>
/// The InputStream based constructors create a TarArchive for the
/// purposes of e'x'tracting or lis't'ing a tar archive. Thus, use
/// these constructors when you wish to extract files from or list
/// the contents of an existing tar archive.
/// </summary>
public static TarArchive CreateInputTarArchive(Stream inputStream)
{
return CreateInputTarArchive(inputStream, TarBuffer.DEFAULT_BLKSIZE);
}
public static TarArchive CreateInputTarArchive(Stream inputStream, int blockSize)
{
return CreateInputTarArchive(inputStream, blockSize, TarBuffer.DEFAULT_RCDSIZE);
}
public static TarArchive CreateInputTarArchive(Stream inputStream, int blockSize, int recordSize)
{
TarArchive archive = new TarArchive();
archive.tarIn = new TarInputStream(inputStream, blockSize, recordSize);
archive.Initialize(recordSize);
return archive;
}
/// <summary>
/// The OutputStream based constructors create a TarArchive for the
/// purposes of 'c'reating a tar archive. Thus, use these constructors
/// when you wish to create a new tar archive and write files into it.
/// </summary>
public static TarArchive CreateOutputTarArchive(Stream outputStream)
{
return CreateOutputTarArchive(outputStream, TarBuffer.DEFAULT_BLKSIZE);
}
public static TarArchive CreateOutputTarArchive(Stream outputStream, int blockSize)
{
return CreateOutputTarArchive(outputStream, blockSize, TarBuffer.DEFAULT_RCDSIZE);
}
public static TarArchive CreateOutputTarArchive(Stream outputStream, int blockSize, int recordSize)
{
TarArchive archive = new TarArchive();
archive.tarOut = new TarOutputStream(outputStream, blockSize, recordSize);
archive.Initialize(recordSize);
return archive;
}
/// <summary>
/// Common constructor initialization code.
/// </summary>
void Initialize(int recordSize)
{
this.rootPath = null;
this.pathPrefix = null;
// this.tempPath = System.getProperty( "user.dir" );
this.userId = 0;
this.userName = String.Empty;
this.groupId = 0;
this.groupName = String.Empty;
this.debug = false;
this.verbose = false;
this.keepOldFiles = false;
this.recordBuf = new byte[RecordSize];
}
/**
* Set the debugging flag.
*
* @param debugF The new debug setting.
*/
public void SetDebug(bool debugF)
{
this.debug = debugF;
if (this.tarIn != null) {
this.tarIn.SetDebug(debugF);
}
if (this.tarOut != null) {
this.tarOut.SetDebug(debugF);
}
}
/// <summary>
/// Get/Set the verbosity setting.
/// </summary>
public bool IsVerbose {
get {
return verbose;
}
set {
verbose = value;
}
}
/// <summary>
/// Set the flag that determines whether existing files are
/// kept, or overwritten during extraction.
/// </summary>
/// <param name="keepOldFiles">
/// If true, do not overwrite existing files.
/// </param>
public void SetKeepOldFiles(bool keepOldFiles)
{
this.keepOldFiles = keepOldFiles;
}
/// <summary>
/// Set the ascii file translation flag. If ascii file translatio
/// is true, then the MIME file type will be consulted to determine
/// if the file is of type 'text/*'. If the MIME type is not found,
/// then the TransFileTyper is consulted if it is not null. If
/// either of these two checks indicates the file is an ascii text
/// file, it will be translated. The translation converts the local
/// operating system's concept of line ends into the UNIX line end,
/// '\n', which is the defacto standard for a TAR archive. This makes
/// text files compatible with UNIX, and since most tar implementations
/// text files compatible with UNIX, and since most tar implementations
/// </summary>
/// <param name= "asciiTranslate">
/// If true, translate ascii text files.
/// </param>
public void SetAsciiTranslation(bool asciiTranslate)
{
this.asciiTranslate = asciiTranslate;
}
/*
/// <summary>
/// Set the object that will determine if a file is of type
/// ascii text for translation purposes.
/// </summary>
/// <param name="transTyper">
/// The new TransFileTyper object.
/// </param>
public void SetTransFileTyper(TarTransFileTyper transTyper)
{
this.transTyper = transTyper;
}*/
/// <summary>
/// Set user and group information that will be used to fill in the
/// tar archive's entry headers. Since Java currently provides no means
/// of determining a user name, user id, group name, or group id for
/// a given File, TarArchive allows the programmer to specify values
/// to be used in their place.
/// </summary>
/// <param name="userId">
/// The user Id to use in the headers.
/// </param>
/// <param name="userName">
/// The user name to use in the headers.
/// </param>
/// <param name="groupId">
/// The group id to use in the headers.
/// </param>
/// <param name="groupName">
/// The group name to use in the headers.
/// </param>
public void SetUserInfo(int userId, string userName, int groupId, string groupName)
{
this.userId = userId;
this.userName = userName;
this.groupId = groupId;
this.groupName = groupName;
}
/// <summary>
/// Get the user id being used for archive entry headers.
/// </summary>
/// <returns>
/// The current user id.
/// </returns>
public int UserId {
get {
return this.userId;
}
}
/// <summary>
/// Get the user name being used for archive entry headers.
/// </summary>
/// <returns>
/// The current user name.
/// </returns>
public string UserName {
get {
return this.userName;
}
}
/// <summary>
/// Get the group id being used for archive entry headers.
/// </summary>
/// <returns>
/// The current group id.
/// </returns>
public int GroupId {
get {
return this.groupId;
}
}
/// <summary>
/// Get the group name being used for archive entry headers.
/// </summary>
/// <returns>
/// The current group name.
/// </returns>
public string GroupName {
get {
return this.groupName;
}
}
/// <summary>
/// Get the archive's record size. Because of its history, tar
/// supports the concept of buffered IO consisting of BLOCKS of
/// RECORDS. This allowed tar to match the IO characteristics of
/// the physical device being used. Of course, in the Java world,
/// this makes no sense, WITH ONE EXCEPTION - archives are expected
/// to be propertly "blocked". Thus, all of the horrible TarBuffer
/// support boils down to simply getting the "boundaries" correct.
/// </summary>
/// <returns>
/// The record size this archive is using.
/// </returns>
public int RecordSize {
get {
if (this.tarIn != null) {
return this.tarIn.GetRecordSize();
} else if (this.tarOut != null) {
return this.tarOut.GetRecordSize();
}
return TarBuffer.DEFAULT_RCDSIZE;
}
}
/// <summary>
/// Close the archive. This simply calls the underlying
/// tar stream's close() method.
/// </summary>
public void CloseArchive()
{
if (this.tarIn != null) {
this.tarIn.Close();
} else if (this.tarOut != null) {
this.tarOut.Flush();
this.tarOut.Close();
}
}
/// <summary>
/// Perform the "list" command and list the contents of the archive.
///
/// NOTE That this method uses the progress display to actually list
/// the conents. If the progress display is not set, nothing will be
/// listed!
/// </summary>
public void ListContents()
{
while (true) {
TarEntry entry = this.tarIn.GetNextEntry();
if (entry == null) {
if (this.debug) {
Console.Error.WriteLine("READ EOF RECORD");
}
break;
}
OnProgressMessageEvent(entry.Name);
}
}
/// <summary>
/// Perform the "extract" command and extract the contents of the archive.
/// </summary>
/// <param name="destDir">
/// The destination directory into which to extract.
/// </param>
public void ExtractContents(string destDir)
{
while (true) {
TarEntry entry = this.tarIn.GetNextEntry();
if (entry == null) {
if (this.debug) {
Console.Error.WriteLine("READ EOF RECORD");
}
break;
}
this.ExtractEntry(destDir, entry);
}
}
void EnsureDirectoryExists(string directoryName)
{
if (!Directory.Exists(directoryName)) {
try {
Directory.CreateDirectory(directoryName);
} catch (Exception e) {
throw new IOException("error making directory path '" + directoryName + "', " + e.Message);
}
}
}
bool IsBinary(string filename)
{
FileStream fs = File.OpenRead(filename);
byte[] content = new byte[fs.Length];
fs.Read(content, 0, (int)fs.Length);
fs.Close();
// assume that ascii 0 or
// ascii 255 are only found in non text files.
// and that all non text files contain 0 and 255
foreach (byte b in content) {
if (b == 0 || b == 255) {
return true;
}
}
return false;
}
/// <summary>
/// Extract an entry from the archive. This method assumes that the
/// tarIn stream has been properly set with a call to getNextEntry().
/// </summary>
/// <param name="destDir">
/// The destination directory into which to extract.
/// </param>
/// <param name="entry">
/// The TarEntry returned by tarIn.getNextEntry().
/// </param>
void ExtractEntry(string destDir, TarEntry entry)
{
if (this.verbose) {
OnProgressMessageEvent(entry.Name);
}
string name = entry.Name;
name = name.Replace('/', Path.DirectorySeparatorChar);
if (!destDir.EndsWith(Path.DirectorySeparatorChar.ToString())) {
destDir += Path.DirectorySeparatorChar;
}
string destFile = destDir + name;
if (entry.IsDirectory) {
EnsureDirectoryExists(destFile);
} else {
string parentDirectory = Path.GetDirectoryName(destFile);
EnsureDirectoryExists(parentDirectory);
if (this.keepOldFiles && File.Exists(destFile)) {
if (this.verbose) {
OnProgressMessageEvent("not overwriting " + entry.Name);
}
} else {
bool asciiTrans = false;
Stream outputStream = File.Create(destFile);
if (this.asciiTranslate) {
asciiTrans = !IsBinary(destFile);
// original java sourcecode :
// MimeType mime = null;
// string contentType = null;
// try {
// contentType = FileTypeMap.getDefaultFileTypeMap().getContentType( destFile );
//
// mime = new MimeType(contentType);
//
// if (mime.getPrimaryType().equalsIgnoreCase( "text" )) {
// asciiTrans = true;
// } else if ( this.transTyper != null ) {
// if ( this.transTyper.isAsciiFile( entry.getName() ) ) {
// asciiTrans = true;
// }
// }
// } catch (MimeTypeParseException ex) {
// }
//
// if (this.debug) {
// Console.Error.WriteLine(("EXTRACT TRANS? '" + asciiTrans + "' ContentType='" + contentType + "' PrimaryType='" + mime.getPrimaryType() + "'" );
// }
}
StreamWriter outw = null;
if (asciiTrans) {
outw = new StreamWriter(outputStream);
}
byte[] rdbuf = new byte[32 * 1024];
while (true) {
int numRead = this.tarIn.Read(rdbuf, 0, rdbuf.Length);
if (numRead <= 0) {
break;
}
if (asciiTrans) {
for (int off = 0, b = 0; b < numRead; ++b) {
if (rdbuf[b] == 10) {
string s = Encoding.ASCII.GetString(rdbuf, off, (b - off));
outw.WriteLine(s);
off = b + 1;
}
}
} else {
outputStream.Write(rdbuf, 0, numRead);
}
}
if (asciiTrans) {
outw.Close();
} else {
outputStream.Close();
}
}
}
}
/// <summary>
/// Write an entry to the archive. This method will call the putNextEntry
/// and then write the contents of the entry, and finally call closeEntry()()
/// for entries that are files. For directories, it will call putNextEntry(),
/// and then, if the recurse flag is true, process each entry that is a
/// child of the directory.
/// </summary>
/// <param name="entry">
/// The TarEntry representing the entry to write to the archive.
/// </param>
/// <param name="recurse">
/// If true, process the children of directory entries.
/// </param>
public void WriteEntry(TarEntry entry, bool recurse)
{
bool asciiTrans = false;
string tempFileName = null;
string eFile = entry.File;
// Work on a copy of the entry so we can manipulate it.
// Note that we must distinguish how the entry was constructed.
//
if (eFile == null || eFile.Length == 0) {
entry = TarEntry.CreateTarEntry(entry.Name);
} else {
//
// The user may have explicitly set the entry's name to
// something other than the file's path, so we must save
// and restore it. This should work even when the name
// was set from the File's name.
//
string saveName = entry.Name;
entry = TarEntry.CreateEntryFromFile(eFile);
entry.Name = saveName;
}
if (this.verbose) {
OnProgressMessageEvent(entry.Name);
}
if (this.asciiTranslate && !entry.IsDirectory) {
asciiTrans = !IsBinary(eFile);
// original java source :
// MimeType mime = null;
// string contentType = null;
//
// try {
// contentType = FileTypeMap.getDefaultFileTypeMap(). getContentType( eFile );
//
// mime = new MimeType( contentType );
//
// if ( mime.getPrimaryType().
// equalsIgnoreCase( "text" ) )
// {
// asciiTrans = true;
// }
// else if ( this.transTyper != null )
// {
// if ( this.transTyper.isAsciiFile( eFile ) )
// {
// asciiTrans = true;
// }
// }
// } catch ( MimeTypeParseException ex )
// {
// // IGNORE THIS ERROR...
// }
//
// if (this.debug) {
// Console.Error.WriteLine("CREATE TRANS? '" + asciiTrans + "' ContentType='" + contentType + "' PrimaryType='" + mime.getPrimaryType()+ "'" );
// }
if (asciiTrans) {
tempFileName = Path.GetTempFileName();
StreamReader inStream = File.OpenText(eFile);
Stream outStream = new BufferedStream(File.Create(tempFileName));
while (true) {
string line = inStream.ReadLine();
if (line == null) {
break;
}
byte[] data = Encoding.ASCII.GetBytes(line);
outStream.Write(data, 0, data.Length);
outStream.WriteByte((byte)'\n');
}
inStream.Close();
outStream.Flush();
outStream.Close();
entry.Size = new FileInfo(tempFileName).Length;
eFile = tempFileName;
}
}
string newName = null;
if (this.rootPath != null) {
if (entry.Name.StartsWith(this.rootPath)) {
newName = entry.Name.Substring(this.rootPath.Length + 1 );
}
}
if (this.pathPrefix != null) {
newName = (newName == null) ? this.pathPrefix + "/" + entry.Name : this.pathPrefix + "/" + newName;
}
if (newName != null) {
entry.Name = newName;
}
this.tarOut.PutNextEntry(entry);
if (entry.IsDirectory) {
if (recurse) {
TarEntry[] list = entry.GetDirectoryEntries();
for (int i = 0; i < list.Length; ++i) {
this.WriteEntry(list[i], recurse);
}
}
} else {
Stream inputStream = File.OpenRead(eFile);
int numWritten = 0;
byte[] eBuf = new byte[32 * 1024];
while (true) {
int numRead = inputStream.Read(eBuf, 0, eBuf.Length);
if (numRead <=0) {
break;
}
this.tarOut.Write(eBuf, 0, numRead);
numWritten += numRead;
}
Console.WriteLine("written " + numWritten + " bytes");
inputStream.Close();
if (tempFileName != null && tempFileName.Length > 0) {
File.Delete(tempFileName);
}
this.tarOut.CloseEntry();
}
}
}
}
/* The original Java file had this header:
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,437 @@
// TarBuffer.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using System.Text;
namespace ICSharpCode.SharpZipLib.Tar {
/// <summary>
/// The TarBuffer class implements the tar archive concept
/// of a buffered input stream. This concept goes back to the
/// days of blocked tape drives and special io devices. In the
/// C# universe, the only real function that this class
/// performs is to ensure that files have the correct "block"
/// size, or other tars will complain.
/// <p>
/// You should never have a need to access this class directly.
/// TarBuffers are created by Tar IO Streams.
/// </p>
/// </summary>
public class TarBuffer
{
public static readonly int DEFAULT_RCDSIZE = 512;
public static readonly int DEFAULT_BLKSIZE = DEFAULT_RCDSIZE * 20;
Stream inputStream;
Stream outputStream;
byte[] blockBuffer;
int currBlkIdx;
int currRecIdx;
int blockSize;
int recordSize;
int recsPerBlock;
bool debug;
protected TarBuffer()
{
}
public static TarBuffer CreateInputTarBuffer(Stream inputStream)
{
return CreateInputTarBuffer(inputStream, TarBuffer.DEFAULT_BLKSIZE);
}
public static TarBuffer CreateInputTarBuffer(Stream inputStream, int blockSize )
{
return CreateInputTarBuffer(inputStream, blockSize, TarBuffer.DEFAULT_RCDSIZE);
}
public static TarBuffer CreateInputTarBuffer(Stream inputStream, int blockSize, int recordSize)
{
TarBuffer tarBuffer = new TarBuffer();
tarBuffer.inputStream = inputStream;
tarBuffer.outputStream = null;
tarBuffer.Initialize(blockSize, recordSize);
return tarBuffer;
}
public static TarBuffer CreateOutputTarBuffer(Stream outputStream)
{
return CreateOutputTarBuffer(outputStream, TarBuffer.DEFAULT_BLKSIZE);
}
public static TarBuffer CreateOutputTarBuffer(Stream outputStream, int blockSize )
{
return CreateOutputTarBuffer(outputStream, blockSize, TarBuffer.DEFAULT_RCDSIZE);
}
public static TarBuffer CreateOutputTarBuffer(Stream outputStream, int blockSize, int recordSize)
{
TarBuffer tarBuffer = new TarBuffer();
tarBuffer.inputStream = null;
tarBuffer.outputStream = outputStream;
tarBuffer.Initialize(blockSize, recordSize);
return tarBuffer;
}
/// <summary>
/// Initialization common to all constructors.
/// </summary>
void Initialize(int blockSize, int recordSize)
{
this.debug = false;
this.blockSize = blockSize;
this.recordSize = recordSize;
this.recsPerBlock = this.blockSize / this.recordSize;
this.blockBuffer = new byte[this.blockSize];
if (inputStream != null) {
this.currBlkIdx = -1;
this.currRecIdx = this.recsPerBlock;
} else {
this.currBlkIdx = 0;
this.currRecIdx = 0;
}
}
/// <summary>
/// Get the TAR Buffer's block size. Blocks consist of multiple records.
/// </summary>
public int GetBlockSize()
{
return this.blockSize;
}
/// <summary>
/// Get the TAR Buffer's record size.
/// </summary>
public int GetRecordSize()
{
return this.recordSize;
}
/// <summary>
/// Set the debugging flag for the buffer.
/// </summary>
public void SetDebug(bool debug)
{
this.debug = debug;
}
/// <summary>
/// Determine if an archive record indicate End of Archive. End of
/// archive is indicated by a record that consists entirely of null bytes.
/// </summary>
/// <param name = "record">
/// The record data to check.
/// </param>
public bool IsEOFRecord(byte[] record)
{
for (int i = 0, sz = this.GetRecordSize(); i < sz; ++i) {
if (record[i] != 0) {
return false;
}
}
return true;
}
/// <summary>
/// Skip over a record on the input stream.
/// </summary>
public void SkipRecord()
{
if (this.debug) {
Console.Error.WriteLine("SkipRecord: recIdx = " + this.currRecIdx + " blkIdx = " + this.currBlkIdx);
}
if (this.inputStream == null) {
throw new System.IO.IOException("no input stream defined");
}
if (this.currRecIdx >= this.recsPerBlock) {
if (!this.ReadBlock()) {
return; // UNDONE
}
}
this.currRecIdx++;
}
/// <summary>
/// Read a record from the input stream and return the data.
/// </summary>
/// <returns>
/// The record data.
/// </returns>
public byte[] ReadRecord()
{
if (this.debug) {
Console.Error.WriteLine( "ReadRecord: recIdx = " + this.currRecIdx + " blkIdx = " + this.currBlkIdx );
}
if (this.inputStream == null) {
throw new System.IO.IOException("no input stream defined");
}
if (this.currRecIdx >= this.recsPerBlock) {
if (!this.ReadBlock()) {
return null;
}
}
byte[] result = new byte[this.recordSize];
Array.Copy(this.blockBuffer, (this.currRecIdx * this.recordSize), result, 0, this.recordSize );
this.currRecIdx++;
return result;
}
/// <returns>
/// false if End-Of-File, else true
/// </returns>
bool ReadBlock()
{
Console.WriteLine(this.debug);
if (this.debug) {
Console.Error.WriteLine("ReadBlock: blkIdx = " + this.currBlkIdx);
}
if (this.inputStream == null) {
throw new System.IO.IOException("no input stream stream defined");
}
this.currRecIdx = 0;
int offset = 0;
int bytesNeeded = this.blockSize;
for (; bytesNeeded > 0 ;) {
long numBytes = this.inputStream.Read(this.blockBuffer, offset, bytesNeeded);
//
// NOTE
// We have fit EOF, and the block is not full!
//
// This is a broken archive. It does not follow the standard
// blocking algorithm. However, because we are generous, and
// it requires little effort, we will simply ignore the error
// and continue as if the entire block were read. This does
// not appear to break anything upstream. We used to return
// false in this case.
//
// Thanks to '[email protected]' for this fix.
//
if (numBytes <= 0) {
break;
}
offset += (int)numBytes;
bytesNeeded -= (int)numBytes;
if (numBytes != this.blockSize) {
if (this.debug) {
Console.Error.WriteLine("ReadBlock: INCOMPLETE READ " + numBytes + " of " + this.blockSize + " bytes read.");
}
}
}
this.currBlkIdx++;
return true;
}
/// <summary>
/// Get the current block number, zero based.
/// </summary>
/// <returns>
/// The current zero based block number.
/// </returns>
public int GetCurrentBlockNum()
{
return this.currBlkIdx;
}
/// <summary>
/// Get the current record number, within the current block, zero based.
/// Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.
/// </summary>
/// <returns>
/// The current zero based record number.
/// </returns>
public int GetCurrentRecordNum()
{
return this.currRecIdx - 1;
}
/// <summary>
/// Write an archive record to the archive.
/// </summary>
/// <param name="record">
/// The record data to write to the archive.
/// </param>
///
public void WriteRecord(byte[] record)
{
if (this.debug) {
Console.Error.WriteLine("WriteRecord: recIdx = " + this.currRecIdx + " blkIdx = " + this.currBlkIdx );
}
if (this.outputStream == null) {
throw new System.IO.IOException("no output stream defined");
}
if (record.Length != this.recordSize) {
throw new IOException("record to write has length '" + record.Length + "' which is not the record size of '" + this.recordSize + "'" );
}
if (this.currRecIdx >= this.recsPerBlock) {
this.WriteBlock();
}
Array.Copy(record, 0, this.blockBuffer, (this.currRecIdx * this.recordSize), this.recordSize );
this.currRecIdx++;
}
/// <summary>
/// Write an archive record to the archive, where the record may be
/// inside of a larger array buffer. The buffer must be "offset plus
/// record size" long.
/// </summary>
/// <param name="buf">
/// The buffer containing the record data to write.
/// </param>
/// <param name="offset">
/// The offset of the record data within buf.
/// </param>
public void WriteRecord(byte[] buf, int offset)
{
if (this.debug) {
Console.Error.WriteLine("WriteRecord: recIdx = " + this.currRecIdx + " blkIdx = " + this.currBlkIdx );
}
if (this.outputStream == null) {
throw new System.IO.IOException("no output stream stream defined");
}
if ((offset + this.recordSize) > buf.Length) {
throw new IOException("record has length '" + buf.Length + "' with offset '" + offset + "' which is less than the record size of '" + this.recordSize + "'" );
}
if (this.currRecIdx >= this.recsPerBlock) {
this.WriteBlock();
}
Array.Copy(buf, offset, this.blockBuffer, (this.currRecIdx * this.recordSize), this.recordSize );
this.currRecIdx++;
}
/// <summary>
/// Write a TarBuffer block to the archive.
/// </summary>
void WriteBlock()
{
if (this.debug) {
Console.Error.WriteLine("WriteBlock: blkIdx = " + this.currBlkIdx);
}
if (this.outputStream == null) {
throw new System.IO.IOException("no output stream defined");
}
this.outputStream.Write(this.blockBuffer, 0, this.blockSize);
this.outputStream.Flush();
this.currRecIdx = 0;
this.currBlkIdx++;
}
/// <summary>
/// Flush the current data block if it has any data in it.
/// </summary>
void Flush()
{
if (this.debug) {
Console.Error.WriteLine("TarBuffer.FlushBlock() called.");
}
if (this.outputStream == null) {
throw new System.IO.IOException("no output base stream defined");
}
if (this.currRecIdx > 0) {
this.WriteBlock();
}
outputStream.Flush();
}
/// <summary>
/// Close the TarBuffer. If this is an output buffer, also flush the
/// current block before closing.
/// </summary>
public void Close()
{
if (this.debug) {
Console.Error.WriteLine("TarBuffer.Close().");
}
if (outputStream != null ) {
Flush();
// if ( this.outStream != System.out
// && this.outStream != System.err ) {
outputStream.Close();
outputStream = null;
} else if (inputStream != null) {
// if (this.inStream != System.in ) {
inputStream.Close();
inputStream = null;
}
}
}
}
/* The original Java file had this header:
*
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,672 @@
// TarEntry.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using System.Text;
namespace ICSharpCode.SharpZipLib.Tar {
/// <summary>
/// This class represents an entry in a Tar archive. It consists
/// of the entry's header, as well as the entry's File. Entries
/// can be instantiated in one of three ways, depending on how
/// they are to be used.
/// <p>
/// TarEntries that are created from the header bytes read from
/// an archive are instantiated with the TarEntry( byte[] )
/// constructor. These entries will be used when extracting from
/// or listing the contents of an archive. These entries have their
/// header filled in using the header bytes. They also set the File
/// to null, since they reference an archive entry not a file.</p>
/// <p>
/// TarEntries that are created from Files that are to be written
/// into an archive are instantiated with the TarEntry( File )
/// constructor. These entries have their header filled in using
/// the File's information. They also keep a reference to the File
/// for convenience when writing entries.</p>
/// <p>
/// Finally, TarEntries can be constructed from nothing but a name.
/// This allows the programmer to construct the entry by hand, for
/// instance when only an InputStream is available for writing to
/// the archive, and the header information is constructed from
/// other information. In this case the header fields are set to
/// defaults and the File is set to null.</p>
///
/// <p>
/// The C structure for a Tar Entry's header is:
/// <pre>
/// struct header {
/// char name[NAMSIZ];
/// char mode[8];
/// char uid[8];
/// char gid[8];
/// char size[12];
/// char mtime[12];
/// char chksum[8];
/// char linkflag;
/// char linkname[NAMSIZ];
/// char magic[8];
/// char uname[TUNMLEN];
/// char gname[TGNMLEN];
/// char devmajor[8];
/// char devminor[8];
/// } header;
/// </pre>
/// </p>
/// <see cref="TarHeader"/>
/// </summary>
public class TarEntry
{
/// <summary>
/// If this entry represents a File, this references it.
/// </summary>
protected string file;
/// <summary>
/// This is the entry's header information.
/// </summary>
protected TarHeader header;
/// <summary>
/// Only Create Entries with the static CreateXYZ methods or a headerBuffer.
/// </summary>
private TarEntry()
{
}
/// <summary>
/// Construct an entry from an archive's header bytes. File is set
/// to null.
/// </summary>
/// <param name = "headerBuf">
/// The header bytes from a tar archive entry.
/// </param>
public TarEntry(byte[] headerBuf)
{
this.Initialize();
this.ParseTarHeader(this.header, headerBuf);
}
/// <summary>
/// Construct an entry with only a name. This allows the programmer
/// to construct the entry's header "by hand". File is set to null.
/// </summary>
public static TarEntry CreateTarEntry(string name)
{
TarEntry entry = new TarEntry();
entry.Initialize();
entry.NameTarHeader(entry.header, name);
return entry;
}
/// <summary>
/// Construct an entry for a file. File is set to file, and the
/// header is constructed from information from the file.
/// </summary>
/// <param name = "fileName">
/// The file that the entry represents.
/// </param>
public static TarEntry CreateEntryFromFile(string fileName)
{
TarEntry entry = new TarEntry();
entry.Initialize();
entry.GetFileTarHeader(entry.header, fileName);
return entry;
}
/// <summary>
/// Initialization code common to all constructors.
/// </summary>
void Initialize()
{
this.file = null;
this.header = new TarHeader();
}
/// <summary>
/// Determine if the two entries are equal. Equality is determined
/// by the header names being equal.
/// </summary>
/// <returns>
/// True if the entries are equal.
/// </returns>
public override bool Equals(object it)
{
if (!(it is TarEntry)) {
return false;
}
return this.header.name.ToString().Equals(((TarEntry)it).header.name.ToString());
}
/// <summary>
/// Must be overridden when you override Equals.
/// </summary>
public override int GetHashCode()
{
return this.header.name.ToString().GetHashCode();
}
/// <summary>
/// Determine if the given entry is a descendant of this entry.
/// Descendancy is determined by the name of the descendant
/// starting with this entry's name.
/// </summary>
/// <param name = "desc">
/// Entry to be checked as a descendent of this.
/// </param>
/// <returns>
/// True if entry is a descendant of this.
/// </returns>
public bool IsDescendent(TarEntry desc)
{
return desc.header.name.ToString().StartsWith(this.header.name.ToString());
}
/// <summary>
/// Get this entry's header.
/// </summary>
/// <returns>
/// This entry's TarHeader.
/// </returns>
public TarHeader TarHeader {
get {
return this.header;
}
}
/// <summary>
/// Get/Set this entry's name.
/// </summary>
public string Name {
get {
return this.header.name.ToString();
}
set {
this.header.name = new StringBuilder(value);
}
}
/// <summary>
/// Get/set this entry's user id.
/// </summary>
public int UserId {
get {
return this.header.userId;
}
set {
this.header.userId = value;
}
}
/// <summary>
/// Get/set this entry's group id.
/// </summary>
public int GroupId {
get {
return this.header.groupId;
}
set {
this.header.groupId = value;
}
}
/// <summary>
/// Get/set this entry's user name.
/// </summary>
public string UserName {
get {
return this.header.userName.ToString();
}
set {
this.header.userName = new StringBuilder(value);
}
}
/// <summary>
/// Get/set this entry's group name.
/// </summary>
public string GroupName {
get {
return this.header.groupName.ToString();
}
set {
this.header.groupName = new StringBuilder(value);
}
}
/// <summary>
/// Convenience method to set this entry's group and user ids.
/// </summary>
/// <param name="userId">
/// This entry's new user id.
/// </param>
/// <param name="groupId">
/// This entry's new group id.
/// </param>
public void SetIds(int userId, int groupId)
{
UserId = userId;
GroupId = groupId;
}
/// <summary>
/// Convenience method to set this entry's group and user names.
/// </summary>
/// <param name="userName">
/// This entry's new user name.
/// </param>
/// <param name="groupName">
/// This entry's new group name.
/// </param>
public void SetNames(string userName, string groupName)
{
UserName = userName;
GroupName = groupName;
}
// TODO :
// /**
// * Set this entry's modification time. The parameter passed
// * to this method is in "Java time".
// *
// * @param time This entry's new modification time.
// */
// public void setModTime( long time )
// {
// this.header.modTime = time / 1000;
// }
/// Convert time to DateTimes
/**
* Get/Set this entry's modification time.
*
* @param time This entry's new modification time.
*/
public DateTime ModTime {
get {
return this.header.modTime;
}
set {
this.header.modTime = value;
}
}
/// <summary>
/// Get this entry's file.
/// </summary>
/// <returns>
/// This entry's file.
/// </returns>
public string File {
get {
return this.file;
}
}
/// <summary>
/// Get/set this entry's file size.
/// </summary>
public long Size {
get {
return this.header.size;
}
set {
this.header.size = value;
}
}
/// <summary>
/// Convenience method that will modify an entry's name directly
/// in place in an entry header buffer byte array.
/// </summary>
/// <param name="outbuf">
/// The buffer containing the entry header to modify.
/// </param>
/// <param name="newName">
/// The new name to place into the header buffer.
/// </param>
public void AdjustEntryName(byte[] outbuf, string newName)
{
int offset = 0;
offset = TarHeader.GetNameBytes(new StringBuilder(newName), outbuf, offset, TarHeader.NAMELEN);
}
/// <summary>
/// Return whether or not this entry represents a directory.
/// </summary>
/// <returns>
/// True if this entry is a directory.
/// </returns>
public bool IsDirectory
{
get {
if (this.file != null) {
return Directory.Exists(file);
}
if (this.header != null) {
if (this.header.linkFlag == TarHeader.LF_DIR || this.header.name.ToString().EndsWith( "/" )) {
return true;
}
}
return false;
}
}
/// <summary>
/// Fill in a TarHeader with information from a File.
/// </summary>
/// <param name="hdr">
/// The TarHeader to fill in.
/// </param>
/// <param name="file">
/// The file from which to get the header information.
/// </param>
public void GetFileTarHeader(TarHeader hdr, string file)
{
this.file = file;
string name = Path.GetDirectoryName(file);
if (Path.DirectorySeparatorChar == '\\') { // check if the OS is a windows
// Strip off drive letters!
if (name.Length > 2) {
char ch1 = name[0];
char ch2 = name[1];
if (ch2 == ':' && Char.IsLetter(ch1)) {
name = name.Substring(2);
}
}
}
name = name.Replace(Path.DirectorySeparatorChar, '/');
// No absolute pathnames
// Windows (and Posix?) paths can start with "\\NetworkDrive\",
// so we loop on starting /'s.
while (name.StartsWith("/")) {
name = name.Substring(1);
}
hdr.linkName = new StringBuilder(String.Empty);
hdr.name = new StringBuilder(name);
if (Directory.Exists(file)) {
hdr.mode = 040755; // TODO : what does this magic number ?? Mike
hdr.linkFlag = TarHeader.LF_DIR;
if (hdr.name[hdr.name.Length - 1] != '/') {
hdr.name.Append("/");
}
hdr.size = 0;
} else {
hdr.mode = 0100644; // TODO : again a magic number
hdr.linkFlag = TarHeader.LF_NORMAL;
Console.WriteLine(file.Replace('/', Path.DirectorySeparatorChar));
hdr.size = new FileInfo(file.Replace('/', Path.DirectorySeparatorChar)).Length;
}
// UNDONE When File lets us get the userName, use it!
hdr.modTime = System.IO.File.GetLastAccessTime(file.Replace('/', Path.DirectorySeparatorChar));
hdr.checkSum = 0;
hdr.devMajor = 0;
hdr.devMinor = 0;
}
/// <summary>
/// If this entry represents a file, and the file is a directory, return
/// an array of TarEntries for this entry's children.
/// </summary>
/// <returns>
/// An array of TarEntry's for this entry's children.
/// </returns>
public TarEntry[] GetDirectoryEntries()
{
if (this.file == null || !Directory.Exists(this.file)) {
return new TarEntry[0];
}
string[] list = Directory.GetFileSystemEntries(this.file);
TarEntry[] result = new TarEntry[list.Length];
string dirName = file;
if (!dirName.EndsWith(Path.DirectorySeparatorChar.ToString())) {
dirName += Path.DirectorySeparatorChar;
}
for (int i = 0; i < list.Length; ++i) {
result[i] = TarEntry.CreateEntryFromFile(list[i]);
}
return result;
}
/// <summary>
/// Compute the checksum of a tar entry header.
/// </summary>
/// <param name = "buf">
/// The tar entry's header buffer.
/// </param>
/// <returns>
/// The computed checksum.
/// </returns>
public long ComputeCheckSum(byte[] buf)
{
long sum = 0;
for (int i = 0; i < buf.Length; ++i) {
sum += 255 & buf[i]; // TODO : I think the 255 & x isn't neccessary += buf[i] should be enough. CHECK IT!
}
return sum;
}
/// <summary>
/// Write an entry's header information to a header buffer.
/// </summary>
/// <param name = "outbuf">
/// The tar entry header buffer to fill in.
/// </param>
public void WriteEntryHeader(byte[] outbuf)
{
int offset = 0;
offset = TarHeader.GetNameBytes(this.header.name, outbuf, offset, TarHeader.NAMELEN);
offset = TarHeader.GetOctalBytes(this.header.mode, outbuf, offset, TarHeader.MODELEN);
offset = TarHeader.GetOctalBytes(this.header.userId, outbuf, offset, TarHeader.UIDLEN);
offset = TarHeader.GetOctalBytes(this.header.groupId, outbuf, offset, TarHeader.GIDLEN);
long size = this.header.size;
offset = TarHeader.GetLongOctalBytes(size, outbuf, offset, TarHeader.SIZELEN);
offset = TarHeader.GetLongOctalBytes(GetCTime(this.header.modTime), outbuf, offset, TarHeader.MODTIMELEN);
int csOffset = offset;
for (int c = 0; c < TarHeader.CHKSUMLEN; ++c) {
outbuf[offset++] = (byte)' ';
}
outbuf[offset++] = this.header.linkFlag;
offset = TarHeader.GetNameBytes(this.header.linkName, outbuf, offset, TarHeader.NAMELEN);
offset = TarHeader.GetNameBytes(this.header.magic, outbuf, offset, TarHeader.MAGICLEN);
offset = TarHeader.GetNameBytes(this.header.userName, outbuf, offset, TarHeader.UNAMELEN);
offset = TarHeader.GetNameBytes(this.header.groupName, outbuf, offset, TarHeader.GNAMELEN);
offset = TarHeader.GetOctalBytes(this.header.devMajor, outbuf, offset, TarHeader.DEVLEN);
offset = TarHeader.GetOctalBytes(this.header.devMinor, outbuf, offset, TarHeader.DEVLEN);
for (; offset < outbuf.Length;) {
outbuf[offset++] = 0;
}
long checkSum = this.ComputeCheckSum(outbuf);
TarHeader.GetCheckSumOctalBytes(checkSum, outbuf, csOffset, TarHeader.CHKSUMLEN);
}
// time conversion functions
readonly static long timeConversionFactor = 10000000L;
readonly static DateTime datetTime1970 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
static int GetCTime(System.DateTime dateTime)
{
return (int)((dateTime.Ticks - datetTime1970.Ticks) / timeConversionFactor);
}
static DateTime GetDateTimeFromCTime(long ticks)
{
return new DateTime(datetTime1970.Ticks + ticks * timeConversionFactor);
}
/// <summary>
/// Parse an entry's TarHeader information from a header buffer.
/// </summary>
/// <param name ="hdr">
/// Parse an entry's TarHeader information from a header buffer.
/// </param>
/// <param name = "header">
/// The tar entry header buffer to get information from.
/// </param>
public void ParseTarHeader(TarHeader hdr, byte[] header)
{
int offset = 0;
hdr.name = TarHeader.ParseName(header, offset, TarHeader.NAMELEN);
offset += TarHeader.NAMELEN;
hdr.mode = (int)TarHeader.ParseOctal(header, offset, TarHeader.MODELEN);
offset += TarHeader.MODELEN;
hdr.userId = (int)TarHeader.ParseOctal(header, offset, TarHeader.UIDLEN);
offset += TarHeader.UIDLEN;
hdr.groupId = (int)TarHeader.ParseOctal(header, offset, TarHeader.GIDLEN);
offset += TarHeader.GIDLEN;
hdr.size = TarHeader.ParseOctal(header, offset, TarHeader.SIZELEN);
offset += TarHeader.SIZELEN;
hdr.modTime = GetDateTimeFromCTime(TarHeader.ParseOctal(header, offset, TarHeader.MODTIMELEN));
offset += TarHeader.MODTIMELEN;
hdr.checkSum = (int)TarHeader.ParseOctal(header, offset, TarHeader.CHKSUMLEN);
offset += TarHeader.CHKSUMLEN;
hdr.linkFlag = header[ offset++ ];
hdr.linkName = TarHeader.ParseName(header, offset, TarHeader.NAMELEN);
offset += TarHeader.NAMELEN;
hdr.magic = TarHeader.ParseName(header, offset, TarHeader.MAGICLEN);
offset += TarHeader.MAGICLEN;
hdr.userName = TarHeader.ParseName(header, offset, TarHeader.UNAMELEN);
offset += TarHeader.UNAMELEN;
hdr.groupName = TarHeader.ParseName(header, offset, TarHeader.GNAMELEN);
offset += TarHeader.GNAMELEN;
hdr.devMajor = (int)TarHeader.ParseOctal(header, offset, TarHeader.DEVLEN);
offset += TarHeader.DEVLEN;
hdr.devMinor = (int)TarHeader.ParseOctal(header, offset, TarHeader.DEVLEN);
}
/// <summary>
/// Fill in a TarHeader given only the entry's name.
/// </summary>
/// <param name="hdr">
/// The TarHeader to fill in.
/// </param>
/// <param name="name">
/// The tar entry name.
/// </param>
public void NameTarHeader(TarHeader hdr, string name)
{
bool isDir = name.EndsWith("/");
hdr.checkSum = 0;
hdr.devMajor = 0;
hdr.devMinor = 0;
hdr.name = new StringBuilder(name);
hdr.mode = isDir ? 040755 : 0100644; // TODO : I think I've seen these magics before ...
hdr.userId = 0;
hdr.groupId = 0;
hdr.size = 0;
hdr.checkSum = 0;
hdr.modTime = DateTime.Now;//(new java.util.Date()).getTime() / 1000;
hdr.linkFlag = isDir ? TarHeader.LF_DIR : TarHeader.LF_NORMAL;
hdr.linkName = new StringBuilder(String.Empty);
hdr.userName = new StringBuilder(String.Empty);
hdr.groupName = new StringBuilder(String.Empty);
hdr.devMajor = 0;
hdr.devMinor = 0;
}
}
}
/* The original Java file had this header:
*
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,500 @@
// TarHeader.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.Text;
namespace ICSharpCode.SharpZipLib.Tar {
/// <summary>
/// This class encapsulates the Tar Entry Header used in Tar Archives.
/// The class also holds a number of tar constants, used mostly in headers.
/// </summary>
public class TarHeader : ICloneable
{
/// <summary>
/// The length of the name field in a header buffer.
/// </summary>
public readonly static int NAMELEN = 100;
/// <summary>
/// The length of the mode field in a header buffer.
/// </summary>
public readonly static int MODELEN = 8;
/// <summary>
/// The length of the user id field in a header buffer.
/// </summary>
public readonly static int UIDLEN = 8;
/// <summary>
/// The length of the group id field in a header buffer.
/// </summary>
public readonly static int GIDLEN = 8;
/// <summary>
/// The length of the checksum field in a header buffer.
/// </summary>
public readonly static int CHKSUMLEN = 8;
/// <summary>
/// The length of the size field in a header buffer.
/// </summary>
public readonly static int SIZELEN = 12;
/// <summary>
/// The length of the magic field in a header buffer.
/// </summary>
public readonly static int MAGICLEN = 8;
/// <summary>
/// The length of the modification time field in a header buffer.
/// </summary>
public readonly static int MODTIMELEN = 12;
/// <summary>
/// The length of the user name field in a header buffer.
/// </summary>
public readonly static int UNAMELEN = 32;
/// <summary>
/// The length of the group name field in a header buffer.
/// </summary>
public readonly static int GNAMELEN = 32;
/// <summary>
/// The length of the devices field in a header buffer.
/// </summary>
public readonly static int DEVLEN = 8;
/// <summary>
/// LF_ constants represent the "link flag" of an entry, or more commonly,
/// the "entry type". This is the "old way" of indicating a normal file.
/// </summary>
public readonly static byte LF_OLDNORM = 0;
/// <summary>
/// Normal file type.
/// </summary>
public readonly static byte LF_NORMAL = (byte) '0';
/// <summary>
/// Link file type.
/// </summary>
public readonly static byte LF_LINK = (byte) '1';
/// <summary>
/// Symbolic link file type.
/// </summary>
public readonly static byte LF_SYMLINK = (byte) '2';
/// <summary>
/// Character device file type.
/// </summary>
public readonly static byte LF_CHR = (byte) '3';
/// <summary>
/// Block device file type.
/// </summary>
public readonly static byte LF_BLK = (byte) '4';
/// <summary>
/// Directory file type.
/// </summary>
public readonly static byte LF_DIR = (byte) '5';
/// <summary>
/// FIFO (pipe) file type.
/// </summary>
public readonly static byte LF_FIFO = (byte) '6';
/// <summary>
/// Contiguous file type.
/// </summary>
public readonly static byte LF_CONTIG = (byte) '7';
/// <summary>
/// The magic tag representing a POSIX tar archive.
/// </summary>
public readonly static string TMAGIC = "ustar";
/// <summary>
/// The magic tag representing a GNU tar archive.
/// </summary>
public readonly static string GNU_TMAGIC = "ustar ";
/// <summary>
/// The entry's name.
/// </summary>
public StringBuilder name;
/// <summary>
/// The entry's permission mode.
/// </summary>
public int mode;
/// <summary>
/// The entry's user id.
/// </summary>
public int userId;
/// <summary>
/// The entry's group id.
/// </summary>
public int groupId;
/// <summary>
/// The entry's size.
/// </summary>
public long size;
/// <summary>
/// The entry's modification time.
/// </summary>
public DateTime modTime;
/// <summary>
/// The entry's checksum.
/// </summary>
public int checkSum;
/// <summary>
/// The entry's link flag.
/// </summary>
public byte linkFlag;
/// <summary>
/// The entry's link name.
/// </summary>
public StringBuilder linkName;
/// <summary>
/// The entry's magic tag.
/// </summary>
public StringBuilder magic;
/// <summary>
/// The entry's user name.
/// </summary>
public StringBuilder userName;
/// <summary>
/// The entry's group name.
/// </summary>
public StringBuilder groupName;
/// <summary>
/// The entry's major device number.
/// </summary>
public int devMajor;
/// <summary>
/// The entry's minor device number.
/// </summary>
public int devMinor;
public TarHeader()
{
this.magic = new StringBuilder(TarHeader.TMAGIC);
this.name = new StringBuilder();
this.linkName = new StringBuilder();
string user = Environment.UserName;
if (user.Length > 31) {
user = user.Substring(0, 31);
}
this.userId = 0;
this.groupId = 0;
this.userName = new StringBuilder(user);
this.groupName = new StringBuilder(String.Empty);
}
/// <summary>
/// TarHeaders can be cloned.
/// </summary>
public object Clone()
{
TarHeader hdr = new TarHeader();
hdr.name = (this.name == null) ? null : new StringBuilder(this.name.ToString());
hdr.mode = this.mode;
hdr.userId = this.userId;
hdr.groupId = this.groupId;
hdr.size = this.size;
hdr.modTime = this.modTime;
hdr.checkSum = this.checkSum;
hdr.linkFlag = this.linkFlag;
hdr.linkName = (this.linkName == null) ? null : new StringBuilder(this.linkName.ToString());
hdr.magic = (this.magic == null) ? null : new StringBuilder(this.magic.ToString());
hdr.userName = (this.userName == null) ? null : new StringBuilder(this.userName.ToString());
hdr.groupName = (this.groupName == null) ? null : new StringBuilder(this.groupName.ToString());
hdr.devMajor = this.devMajor;
hdr.devMinor = this.devMinor;
return hdr;
}
/// <summary>
/// Get the name of this entry.
/// </summary>
/// <returns>
/// The entry's name.
/// </returns>
public string GetName()
{
return this.name.ToString();
}
/// <summary>
/// Parse an octal string from a header buffer. This is used for the
/// file permission mode value.
/// </summary>
/// <param name = "header">
/// The header buffer from which to parse.
/// </param>
/// <param name = "offset">
/// The offset into the buffer from which to parse.
/// </param>
/// <param name = "length">
/// The number of header bytes to parse.
/// </param>
/// <returns>
/// The long value of the octal string.
/// </returns>
public static long ParseOctal(byte[] header, int offset, int length)
{
long result = 0;
bool stillPadding = true;
int end = offset + length;
for (int i = offset; i < end ; ++i) {
if (header[i] == 0) {
break;
}
if (header[i] == (byte)' ' || header[i] == '0') {
if (stillPadding) {
continue;
}
if (header[i] == (byte)' ') {
break;
}
}
stillPadding = false;
result = (result << 3) + (header[i] - '0');
}
return result;
}
/// <summary>
/// Parse an entry name from a header buffer.
/// </summary>
/// <param name="header">
/// The header buffer from which to parse.
/// </param>
/// <param name="offset">
/// The offset into the buffer from which to parse.
/// </param>
/// <param name="length">
/// The number of header bytes to parse.
/// </param>
/// <returns>
/// The header's entry name.
/// </returns>
public static StringBuilder ParseName(byte[] header, int offset, int length)
{
StringBuilder result = new StringBuilder(length);
for (int i = offset; i < offset + length; ++i) {
if (header[i] == 0) {
break;
}
result.Append((char)header[i]);
}
return result;
}
/// <summary>
/// Determine the number of bytes in an entry name.
/// </summary>
/// <param name="name">
/// </param>
/// <param name="buf">
/// The header buffer from which to parse.
/// </param>
/// <param name="offset">
/// The offset into the buffer from which to parse.
/// </param>
/// <param name="length">
/// The number of header bytes to parse.
/// </param>
/// <returns>
/// The number of bytes in a header's entry name.
/// </returns>
public static int GetNameBytes(StringBuilder name, byte[] buf, int offset, int length)
{
int i;
for (i = 0 ; i < length && i < name.Length; ++i) {
buf[offset + i] = (byte)name[i];
}
for (; i < length ; ++i) {
buf[offset + i] = 0;
}
return offset + length;
}
/// <summary>
/// Parse an octal integer from a header buffer.
/// </summary>
/// <param name = "val">
/// </param>
/// <param name = "buf">
/// The header buffer from which to parse.
/// </param>
/// <param name = "offset">
/// The offset into the buffer from which to parse.
/// </param>
/// <param name = "length">
/// The number of header bytes to parse.
/// </param>
/// <returns>
/// The integer value of the octal bytes.
/// </returns>
public static int GetOctalBytes(long val, byte[] buf, int offset, int length)
{
byte[] result = new byte[length];
int idx = length - 1;
buf[offset + idx] = 0;
--idx;
buf[offset + idx] = (byte)' ';
--idx;
if (val == 0) {
buf[offset + idx] = (byte)'0';
--idx;
} else {
for (long v = val; idx >= 0 && v > 0; --idx) {
buf[offset + idx] = (byte)((byte)'0' + (byte)(v & 7));
v >>= 3;
}
}
for (; idx >= 0; --idx) {
buf[offset + idx] = (byte)' ';
}
return offset + length;
}
/// <summary>
/// Parse an octal long integer from a header buffer.
/// </summary>
/// <param name = "val">
/// </param>
/// <param name = "buf">
/// The header buffer from which to parse.
/// </param>
/// <param name = "offset">
/// The offset into the buffer from which to parse.
/// </param>
/// <param name = "length">
/// The number of header bytes to parse.
/// </param>
/// <returns>
/// The long value of the octal bytes.
/// </returns>
public static int GetLongOctalBytes(long val, byte[] buf, int offset, int length)
{
byte[] temp = new byte[length + 1];
TarHeader.GetOctalBytes(val, temp, 0, length + 1);
Array.Copy(temp, 0, buf, offset, length);
return offset + length;
}
/// <summary>
/// Parse the checksum octal integer from a header buffer.
/// </summary>
/// <param name = "val">
/// </param>
/// <param name = "buf">
/// The header buffer from which to parse.
/// </param>
/// <param name = "offset">
/// The offset into the buffer from which to parse.
/// </param>
/// <param name = "length">
/// The number of header bytes to parse.
/// </param>
/// <returns>
/// The integer value of the entry's checksum.
/// </returns>
public static int GetCheckSumOctalBytes(long val, byte[] buf, int offset, int length)
{
TarHeader.GetOctalBytes(val, buf, offset, length);
buf[offset + length - 1] = (byte)' ';
buf[offset + length - 2] = 0;
return offset + length;
}
}
}
/* The original Java file had this header:
*
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,522 @@
// TarInputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using System.Text;
namespace ICSharpCode.SharpZipLib.Tar {
/// <summary>
/// The TarInputStream reads a UNIX tar archive as an InputStream.
/// methods are provided to position at each successive entry in
/// the archive, and the read each entry as a normal input stream
/// using read().
/// </summary>
public class TarInputStream : Stream
{
protected bool debug;
protected bool hasHitEOF;
protected int entrySize;
protected int entryOffset;
protected byte[] readBuf;
protected TarBuffer buffer;
protected TarEntry currEntry;
protected IEntryFactory eFactory;
Stream inputStream;
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanRead {
get {
return inputStream.CanRead;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanSeek {
get {
return inputStream.CanSeek;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanWrite {
get {
return inputStream.CanWrite;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Length {
get {
return inputStream.Length;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Position {
get {
return inputStream.Position;
}
set {
inputStream.Position = value;
}
}
/// <summary>
/// Flushes the baseInputStream
/// </summary>
public override void Flush()
{
inputStream.Flush();
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Seek(long offset, SeekOrigin origin)
{
return inputStream.Seek(offset, origin);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void SetLength(long val)
{
inputStream.SetLength(val);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void Write(byte[] array, int offset, int count)
{
inputStream.Write(array, offset, count);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void WriteByte(byte val)
{
inputStream.WriteByte(val);
}
public TarInputStream(Stream inputStream) : this(inputStream, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE)
{
}
public TarInputStream(Stream inputStream, int blockSize) : this(inputStream, blockSize, TarBuffer.DEFAULT_RCDSIZE)
{
}
public TarInputStream(Stream inputStream, int blockSize, int recordSize)
{
this.inputStream = inputStream;
this.buffer = TarBuffer.CreateInputTarBuffer(inputStream, blockSize, recordSize);
this.readBuf = null;
this.debug = false;
this.hasHitEOF = false;
this.eFactory = null;
}
public void SetDebug(bool debugF)
{
this.debug = debugF;
SetBufferDebug(debugF);
}
public void SetBufferDebug(bool debug)
{
this.buffer.SetDebug(debug);
}
public void SetEntryFactory(IEntryFactory factory)
{
this.eFactory = factory;
}
/// <summary>
/// Closes this stream. Calls the TarBuffer's close() method.
/// The underlying stream is closed by the TarBuffer.
/// </summary>
public override void Close()
{
this.buffer.Close();
}
/// <summary>
/// Get the record size being used by this stream's TarBuffer.
/// </summary>
/// <returns>
/// TarBuffer record size.
/// </returns>
public int GetRecordSize()
{
return this.buffer.GetRecordSize();
}
/// <summary>
/// Get the available data that can be read from the current
/// entry in the archive. This does not indicate how much data
/// is left in the entire archive, only in the current entry.
/// This value is determined from the entry's size header field
/// and the amount of data already read from the current entry.
/// </summary>
/// <returns>
/// The number of available bytes for the current entry.
/// </returns>
public int Available {
get {
return this.entrySize - this.entryOffset;
}
}
/// <summary>
/// Skip bytes in the input buffer. This skips bytes in the
/// current entry's data, not the entire archive, and will
/// stop at the end of the current entry's data if the number
/// to skip extends beyond that point.
/// </summary>
/// <param name="numToSkip">
/// The number of bytes to skip.
/// </param>
public void Skip(int numToSkip)
{
// REVIEW
// This is horribly inefficient, but it ensures that we
// properly skip over bytes via the TarBuffer...
//
byte[] skipBuf = new byte[8 * 1024];
for (int num = numToSkip; num > 0;){
int numRead = this.Read(skipBuf, 0, (num > skipBuf.Length ? skipBuf.Length : num));
if (numRead == -1) {
break;
}
num -= numRead;
}
}
/// <summary>
/// Since we do not support marking just yet, we return false.
/// </summary>
public bool IsMarkSupported {
get {
return false;
}
}
/// <summary>
/// Since we do not support marking just yet, we do nothing.
/// </summary>
/// <param name ="markLimit">
/// The limit to mark.
/// </param>
public void Mark(int markLimit)
{
}
/// <summary>
/// Since we do not support marking just yet, we do nothing.
/// </summary>
public void Reset()
{
}
/// <summary>
/// Get the next entry in this tar archive. This will skip
/// over any remaining data in the current entry, if there
/// is one, and place the input stream at the header of the
/// next entry, and read the header and instantiate a new
/// TarEntry from the header bytes and return that entry.
/// If there are no more entries in the archive, null will
/// be returned to indicate that the end of the archive has
/// been reached.
/// </summary>
/// <returns>
/// The next TarEntry in the archive, or null.
/// </returns>
public TarEntry GetNextEntry()
{
if (this.hasHitEOF) {
return null;
}
if (this.currEntry != null) {
int numToSkip = this.entrySize - this.entryOffset;
if (this.debug) {
Console.Error.WriteLine("TarInputStream: SKIP currENTRY '" + this.currEntry.Name + "' SZ " + this.entrySize + " OFF " + this.entryOffset + " skipping " + numToSkip + " bytes");
}
if (numToSkip > 0) {
this.Skip(numToSkip);
}
this.readBuf = null;
}
byte[] headerBuf = this.buffer.ReadRecord();
if (headerBuf == null) {
if (this.debug) {
Console.Error.WriteLine("READ NULL RECORD");
}
this.hasHitEOF = true;
} else if (this.buffer.IsEOFRecord(headerBuf)) {
if (this.debug) {
Console.Error.WriteLine( "READ EOF RECORD" );
}
this.hasHitEOF = true;
}
if (this.hasHitEOF) {
this.currEntry = null;
} else {
try {
if (this.eFactory == null) {
this.currEntry = new TarEntry(headerBuf);
} else {
this.currEntry = this.eFactory.CreateEntry(headerBuf);
}
if (!(headerBuf[257] == 'u' && headerBuf[258] == 's' && headerBuf[259] == 't' && headerBuf[260] == 'a' && headerBuf[261] == 'r')) {
throw new InvalidHeaderException("header magic is not 'ustar', but '" + headerBuf[257] + headerBuf[258] + headerBuf[259] + headerBuf[260] + headerBuf[261] +
"', or (dec) " + ((int)headerBuf[257]) + ", " + ((int)headerBuf[258]) + ", " + ((int)headerBuf[259]) + ", " + ((int)headerBuf[260]) + ", " + ((int)headerBuf[261]));
}
if (this.debug) {
Console.Error.WriteLine("TarInputStream: SET CURRENTRY '" + this.currEntry.Name + "' size = " + this.currEntry.Size);
}
this.entryOffset = 0;
// REVIEW How do we resolve this discrepancy?!
this.entrySize = (int) this.currEntry.Size;
} catch (InvalidHeaderException ex) {
this.entrySize = 0;
this.entryOffset = 0;
this.currEntry = null;
throw new InvalidHeaderException("bad header in block " + this.buffer.GetCurrentBlockNum() + " record " + this.buffer.GetCurrentRecordNum() + ", " + ex.Message);
}
}
return this.currEntry;
}
/// <summary>
/// Reads a byte from the current tar archive entry.
/// This method simply calls read(byte[], int, int).
/// </summary>
public override int ReadByte()
{
byte[] oneByteBuffer = new byte[1];
int num = this.Read(oneByteBuffer, 0, 1);
if (num <= 0) { // return -1 to indicate that no byte was read.
return -1;
}
return (int)oneByteBuffer[0];
}
/// <summary>
/// Reads bytes from the current tar archive entry.
///
/// This method is aware of the boundaries of the current
/// entry in the archive and will deal with them as if they
/// entry in the archive and will deal with them as if they
/// </summary>
/// <param name="buf">
/// The buffer into which to place bytes read.
/// </param>
/// <param name="offset">
/// The offset at which to place bytes read.
/// </param>
/// <param name="numToRead">
/// The number of bytes to read.
/// </param>
/// <returns>
/// The number of bytes read, or -1 at EOF.
/// </returns>
public override int Read(byte[] buf, int offset, int numToRead)
{
int totalRead = 0;
if (this.entryOffset >= this.entrySize) {
return -1;
}
if ((numToRead + this.entryOffset) > this.entrySize) {
numToRead = this.entrySize - this.entryOffset;
}
if (this.readBuf != null) {
int sz = (numToRead > this.readBuf.Length) ? this.readBuf.Length : numToRead;
Array.Copy(this.readBuf, 0, buf, offset, sz);
if (sz >= this.readBuf.Length) {
this.readBuf = null;
} else {
int newLen = this.readBuf.Length - sz;
byte[] newBuf = new byte[ newLen ];
Array.Copy(this.readBuf, sz, newBuf, 0, newLen);
this.readBuf = newBuf;
}
totalRead += sz;
numToRead -= sz;
offset += sz;
}
while (numToRead > 0) {
byte[] rec = this.buffer.ReadRecord();
if (rec == null) {
// Unexpected EOF!
throw new IOException("unexpected EOF with " + numToRead + " bytes unread");
}
int sz = numToRead;
int recLen = rec.Length;
if (recLen > sz) {
Array.Copy(rec, 0, buf, offset, sz);
this.readBuf = new byte[recLen - sz];
Array.Copy(rec, sz, this.readBuf, 0, recLen - sz);
} else {
sz = recLen;
Array.Copy(rec, 0, buf, offset, recLen);
}
totalRead += sz;
numToRead -= sz;
offset += sz;
}
this.entryOffset += totalRead;
return totalRead;
}
/// <summary>
/// Copies the contents of the current tar archive entry directly into
/// an output stream.
/// </summary>
/// <param name="outputStream">
/// The OutputStream into which to write the entry's data.
/// </param>
public void CopyEntryContents(Stream outputStream)
{
byte[] buf = new byte[32 * 1024];
while (true) {
int numRead = this.Read(buf, 0, buf.Length);
if (numRead <= 0) {
break;
}
outputStream.Write(buf, 0, numRead);
}
}
/// <summary>
/// This interface is provided, with the method setEntryFactory(), to allow
/// the programmer to have their own TarEntry subclass instantiated for the
/// entries return from getNextEntry().
/// </summary>
public interface IEntryFactory
{
TarEntry CreateEntry(string name);
TarEntry CreateEntryFromFile(string fileName);
TarEntry CreateEntry(byte[] headerBuf);
}
public class EntryFactoryAdapter : IEntryFactory
{
public TarEntry CreateEntry(string name)
{
return TarEntry.CreateTarEntry(name);
}
public TarEntry CreateEntryFromFile(string fileName)
{
return TarEntry.CreateEntryFromFile(fileName);
}
public TarEntry CreateEntry(byte[] headerBuf)
{
return new TarEntry(headerBuf);
}
}
}
}
/* The original Java file had this header:
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,379 @@
// TarOutputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using System.Text;
namespace ICSharpCode.SharpZipLib.Tar {
/// <summary>
/// The TarOutputStream writes a UNIX tar archive as an OutputStream.
/// Methods are provided to put entries, and then write their contents
/// by writing to this stream using write().
/// </summary>
/// public
public class TarOutputStream : Stream
{
protected bool debug;
protected int currSize;
protected int currBytes;
protected byte[] recordBuf;
protected int assemLen;
protected byte[] assemBuf;
protected TarBuffer buffer;
protected Stream outputStream;
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanRead {
get {
return outputStream.CanRead;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanSeek {
get {
return outputStream.CanSeek;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanWrite {
get {
return outputStream.CanWrite;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Length {
get {
return outputStream.Length;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Position {
get {
return outputStream.Position;
}
set {
outputStream.Position = value;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Seek(long offset, SeekOrigin origin)
{
return outputStream.Seek(offset, origin);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void SetLength(long val)
{
outputStream.SetLength(val);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override int ReadByte()
{
return outputStream.ReadByte();
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override int Read(byte[] b, int off, int len)
{
return outputStream.Read(b, off, len);
}
public override void Flush()
{
outputStream.Flush();
}
public TarOutputStream(Stream outputStream) : this(outputStream, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE)
{
}
public TarOutputStream(Stream outputStream, int blockSize) : this(outputStream, blockSize, TarBuffer.DEFAULT_RCDSIZE)
{
}
public TarOutputStream(Stream outputStream, int blockSize, int recordSize)
{
this.outputStream = outputStream;
this.buffer = TarBuffer.CreateOutputTarBuffer(outputStream, blockSize, recordSize);
this.debug = false;
this.assemLen = 0;
this.assemBuf = new byte[recordSize];
this.recordBuf = new byte[recordSize];
}
/// <summary>
/// Sets the debugging flag.
/// </summary>
/// <param name = "debugF">
/// True to turn on debugging.
/// </param>
public void SetDebug(bool debugF)
{
this.debug = debugF;
SetBufferDebug(debugF);
}
public void SetBufferDebug(bool debug)
{
this.buffer.SetDebug(debug);
}
/// <summary>
/// Ends the TAR archive without closing the underlying OutputStream.
/// The result is that the EOF record of nulls is written.
/// </summary>
public void Finish()
{
this.WriteEOFRecord();
}
/// <summary>
/// Ends the TAR archive and closes the underlying OutputStream.
/// This means that finish() is called followed by calling the
/// TarBuffer's close().
/// </summary>
public override void Close()
{
this.Finish();
this.buffer.Close();
}
/// <summary>
/// Get the record size being used by this stream's TarBuffer.
/// </summary>
/// <returns>
/// The TarBuffer record size.
/// </returns>
public int GetRecordSize()
{
return this.buffer.GetRecordSize();
}
/// <summary>
/// Put an entry on the output stream. This writes the entry's
/// header record and positions the output stream for writing
/// the contents of the entry. Once this method is called, the
/// stream is ready for calls to write() to write the entry's
/// contents. Once the contents are written, closeEntry()
/// <B>MUST</B> be called to ensure that all buffered data
/// is completely written to the output stream.
/// </summary>
/// <param name="entry">
/// The TarEntry to be written to the archive.
/// </param>
public void PutNextEntry(TarEntry entry)
{
if (entry.TarHeader.name.Length > TarHeader.NAMELEN) {
throw new InvalidHeaderException("file name '" + entry.TarHeader.name + "' is too long ( > " + TarHeader.NAMELEN + " bytes )");
}
entry.WriteEntryHeader(this.recordBuf);
this.buffer.WriteRecord(this.recordBuf);
this.currBytes = 0;
this.currSize = entry.IsDirectory ? 0 : (int)entry.Size;
}
/// <summary>
/// Close an entry. This method MUST be called for all file
/// entries that contain data. The reason is that we must
/// buffer data written to the stream in order to satisfy
/// the buffer's record based writes. Thus, there may be
/// data fragments still being assembled that must be written
/// to the output stream before this entry is closed and the
/// next entry written.
/// </summary>
public void CloseEntry()
{
if (this.assemLen > 0) {
for (int i = this.assemLen; i < this.assemBuf.Length; ++i) {
this.assemBuf[i] = 0;
}
this.buffer.WriteRecord(this.assemBuf);
this.currBytes += this.assemLen;
this.assemLen = 0;
}
if (this.currBytes < this.currSize) {
throw new IOException("entry closed at '" + this.currBytes + "' before the '" + this.currSize + "' bytes specified in the header were written");
}
}
/// <summary>
/// Writes a byte to the current tar archive entry.
/// This method simply calls Write(byte[], int, int).
/// </summary>
/// <param name="b">
/// The byte written.
/// </param>
public override void WriteByte(byte b)
{
this.Write(new byte[] { b }, 0, 1);
}
/// <summary>
/// Writes bytes to the current tar archive entry. This method
/// is aware of the current entry and will throw an exception if
/// you attempt to write bytes past the length specified for the
/// current entry. The method is also (painfully) aware of the
/// record buffering required by TarBuffer, and manages buffers
/// that are not a multiple of recordsize in length, including
/// assembling records from small buffers.
/// </summary>
/// <param name = "wBuf">
/// The buffer to write to the archive.
/// </param>
/// <param name = "wOffset">
/// The offset in the buffer from which to get bytes.
/// </param>
/// <param name = "numToWrite">
/// The number of bytes to write.
/// </param>
public override void Write(byte[] wBuf, int wOffset, int numToWrite)
{
if ((this.currBytes + numToWrite) > this.currSize) {
throw new IOException("request to write '" + numToWrite + "' bytes exceeds size in header of '" + this.currSize + "' bytes");
}
//
// We have to deal with assembly!!!
// The programmer can be writing little 32 byte chunks for all
// we know, and we must assemble complete records for writing.
// REVIEW Maybe this should be in TarBuffer? Could that help to
// eliminate some of the buffer copying.
//
if (this.assemLen > 0) {
if ((this.assemLen + numToWrite ) >= this.recordBuf.Length) {
int aLen = this.recordBuf.Length - this.assemLen;
Array.Copy(this.assemBuf, 0, this.recordBuf, 0, this.assemLen);
Array.Copy(wBuf, wOffset, this.recordBuf, this.assemLen, aLen);
this.buffer.WriteRecord(this.recordBuf);
this.currBytes += this.recordBuf.Length;
wOffset += aLen;
numToWrite -= aLen;
this.assemLen = 0;
} else {// ( (this.assemLen + numToWrite ) < this.recordBuf.length )
Array.Copy(wBuf, wOffset, this.assemBuf, this.assemLen, numToWrite);
wOffset += numToWrite;
this.assemLen += numToWrite;
numToWrite -= numToWrite;
}
}
//
// When we get here we have EITHER:
// o An empty "assemble" buffer.
// o No bytes to write (numToWrite == 0)
//
while (numToWrite > 0) {
if (numToWrite < this.recordBuf.Length) {
Array.Copy(wBuf, wOffset, this.assemBuf, this.assemLen, numToWrite);
this.assemLen += numToWrite;
break;
}
this.buffer.WriteRecord(wBuf, wOffset);
int num = this.recordBuf.Length;
this.currBytes += num;
numToWrite -= num;
wOffset += num;
}
}
/// <summary>
/// Write an EOF (end of archive) record to the tar archive.
/// An EOF record consists of a record of all zeros.
/// </summary>
void WriteEOFRecord()
{
for (int i = 0; i < this.recordBuf.Length; ++i) {
this.recordBuf[i] = 0;
}
this.buffer.WriteRecord(this.recordBuf);
}
}
}
/* The original Java file had this header:
** Authored by Timothy Gerard Endres
** <mailto:[email protected]> <http://www.trustice.com>
**
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE.
**
*/
@@ -0,0 +1,542 @@
// Deflater.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
/// <summary>
/// This is the Deflater class. The deflater class compresses input
/// with the deflate algorithm described in RFC 1951. It has several
/// compression levels and three different strategies described below.
///
/// This class is <i>not</i> thread safe. This is inherent in the API, due
/// to the split of deflate and setInput.
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class Deflater
{
/// <summary>
/// The best and slowest compression level. This tries to find very
/// long and distant string repetitions.
/// </summary>
public static int BEST_COMPRESSION = 9;
/// <summary>
/// The worst but fastest compression level.
/// </summary>
public static int BEST_SPEED = 1;
/// <summary>
/// The default compression level.
/// </summary>
public static int DEFAULT_COMPRESSION = -1;
/// <summary>
/// This level won't compress at all but output uncompressed blocks.
/// </summary>
public static int NO_COMPRESSION = 0;
/// <summary>
/// The compression method. This is the only method supported so far.
/// There is no need to use this constant at all.
/// </summary>
public static int DEFLATED = 8;
/*
* The Deflater can do the following state transitions:
*
* (1) -> INIT_STATE ----> INIT_FINISHING_STATE ---.
* / | (2) (5) |
* / v (5) |
* (3)| SETDICT_STATE ---> SETDICT_FINISHING_STATE |(3)
* \ | (3) | ,-------'
* | | | (3) /
* v v (5) v v
* (1) -> BUSY_STATE ----> FINISHING_STATE
* | (6)
* v
* FINISHED_STATE
* \_____________________________________/
* | (7)
* v
* CLOSED_STATE
*
* (1) If we should produce a header we start in INIT_STATE, otherwise
* we start in BUSY_STATE.
* (2) A dictionary may be set only when we are in INIT_STATE, then
* we change the state as indicated.
* (3) Whether a dictionary is set or not, on the first call of deflate
* we change to BUSY_STATE.
* (4) -- intentionally left blank -- :)
* (5) FINISHING_STATE is entered, when flush() is called to indicate that
* there is no more INPUT. There are also states indicating, that
* the header wasn't written yet.
* (6) FINISHED_STATE is entered, when everything has been flushed to the
* internal pending output buffer.
* (7) At any time (7)
*
*/
private static int IS_SETDICT = 0x01;
private static int IS_FLUSHING = 0x04;
private static int IS_FINISHING = 0x08;
private static int INIT_STATE = 0x00;
private static int SETDICT_STATE = 0x01;
// private static int INIT_FINISHING_STATE = 0x08;
// private static int SETDICT_FINISHING_STATE = 0x09;
private static int BUSY_STATE = 0x10;
private static int FLUSHING_STATE = 0x14;
private static int FINISHING_STATE = 0x1c;
private static int FINISHED_STATE = 0x1e;
private static int CLOSED_STATE = 0x7f;
/// <summary>
/// Compression level.
/// </summary>
private int level;
/// <summary>
/// should we include a header.
/// </summary>
private bool noHeader;
// /// <summary>
// /// Compression strategy.
// /// </summary>
// private int strategy;
/// <summary>
/// The current state.
/// </summary>
private int state;
/// <summary>
/// The total bytes of output written.
/// </summary>
private int totalOut;
/// <summary>
/// The pending output.
/// </summary>
private DeflaterPending pending;
/// <summary>
/// The deflater engine.
/// </summary>
private DeflaterEngine engine;
/// <summary>
/// Creates a new deflater with default compression level.
/// </summary>
public Deflater() : this(DEFAULT_COMPRESSION, false)
{
}
/// <summary>
/// Creates a new deflater with given compression level.
/// </summary>
/// <param name="lvl">
/// the compression level, a value between NO_COMPRESSION
/// and BEST_COMPRESSION, or DEFAULT_COMPRESSION.
/// </param>
/// <exception cref="System.ArgumentOutOfRangeException">if lvl is out of range.</exception>
public Deflater(int lvl) : this(lvl, false)
{
}
/// <summary>
/// Creates a new deflater with given compression level.
/// </summary>
/// <param name="lvl">
/// the compression level, a value between NO_COMPRESSION
/// and BEST_COMPRESSION.
/// </param>
/// <param name="nowrap">
/// true, if we should suppress the deflate header at the
/// beginning and the adler checksum at the end of the output. This is
/// useful for the GZIP format.
/// </param>
/// <exception cref="System.ArgumentOutOfRangeException">if lvl is out of range.</exception>
public Deflater(int lvl, bool nowrap)
{
if (lvl == DEFAULT_COMPRESSION) {
lvl = 6;
} else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) {
throw new ArgumentOutOfRangeException("lvl");
}
pending = new DeflaterPending();
engine = new DeflaterEngine(pending);
this.noHeader = nowrap;
SetStrategy(DeflateStrategy.Default);
SetLevel(lvl);
Reset();
}
/// <summary>
/// Resets the deflater. The deflater acts afterwards as if it was
/// just created with the same compression level and strategy as it
/// had before.
/// </summary>
public void Reset()
{
state = (noHeader ? BUSY_STATE : INIT_STATE);
totalOut = 0;
pending.Reset();
engine.Reset();
}
/// <summary>
/// Gets the current adler checksum of the data that was processed so far.
/// </summary>
public int Adler {
get {
return engine.Adler;
}
}
/// <summary>
/// Gets the number of input bytes processed so far.
/// </summary>
public int TotalIn {
get {
return engine.TotalIn;
}
}
/// <summary>
/// Gets the number of output bytes so far.
/// </summary>
public int TotalOut {
get {
return totalOut;
}
}
/// <summary>
/// Flushes the current input block. Further calls to deflate() will
/// produce enough output to inflate everything in the current input
/// block. This is not part of Sun's JDK so I have made it package
/// private. It is used by DeflaterOutputStream to implement
/// flush().
/// </summary>
public void Flush()
{
state |= IS_FLUSHING;
}
/// <summary>
/// Finishes the deflater with the current input block. It is an error
/// to give more input after this method was called. This method must
/// be called to force all bytes to be flushed.
/// </summary>
public void Finish()
{
state |= IS_FLUSHING | IS_FINISHING;
}
/// <summary>
/// Returns true if the stream was finished and no more output bytes
/// are available.
/// </summary>
public bool IsFinished {
get {
return state == FINISHED_STATE && pending.IsFlushed;
}
}
/// <summary>
/// Returns true, if the input buffer is empty.
/// You should then call setInput().
/// NOTE: This method can also return true when the stream
/// was finished.
/// </summary>
public bool IsNeedingInput {
get {
return engine.NeedsInput();
}
}
/// <summary>
/// Sets the data which should be compressed next. This should be only
/// called when needsInput indicates that more input is needed.
/// If you call setInput when needsInput() returns false, the
/// previous input that is still pending will be thrown away.
/// The given byte array should not be changed, before needsInput() returns
/// true again.
/// This call is equivalent to <code>setInput(input, 0, input.length)</code>.
/// </summary>
/// <param name="input">
/// the buffer containing the input data.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if the buffer was finished() or ended().
/// </exception>
public void SetInput(byte[] input)
{
SetInput(input, 0, input.Length);
}
/// <summary>
/// Sets the data which should be compressed next. This should be
/// only called when needsInput indicates that more input is needed.
/// The given byte array should not be changed, before needsInput() returns
/// true again.
/// </summary>
/// <param name="input">
/// the buffer containing the input data.
/// </param>
/// <param name="off">
/// the start of the data.
/// </param>
/// <param name="len">
/// the length of the data.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if the buffer was finished() or ended() or if previous input is still pending.
/// </exception>
public void SetInput(byte[] input, int off, int len)
{
if ((state & IS_FINISHING) != 0) {
throw new InvalidOperationException("finish()/end() already called");
}
engine.SetInput(input, off, len);
}
/// <summary>
/// Sets the compression level. There is no guarantee of the exact
/// position of the change, but if you call this when needsInput is
/// true the change of compression level will occur somewhere near
/// before the end of the so far given input.
/// </summary>
/// <param name="lvl">
/// the new compression level.
/// </param>
public void SetLevel(int lvl)
{
if (lvl == DEFAULT_COMPRESSION) {
lvl = 6;
} else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) {
throw new ArgumentOutOfRangeException("lvl");
}
if (level != lvl) {
level = lvl;
engine.SetLevel(lvl);
}
}
/// <summary>
/// Sets the compression strategy. Strategy is one of
/// DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact
/// position where the strategy is changed, the same as for
/// setLevel() applies.
/// </summary>
/// <param name="stgy">
/// the new compression strategy.
/// </param>
public void SetStrategy(DeflateStrategy stgy)
{
engine.Strategy = stgy;
}
/// <summary>
/// Deflates the current input block to the given array. It returns
/// the number of bytes compressed, or 0 if either
/// needsInput() or finished() returns true or length is zero.
/// </summary>
/// <param name="output">
/// the buffer where to write the compressed data.
/// </param>
public int Deflate(byte[] output)
{
return Deflate(output, 0, output.Length);
}
/// <summary>
/// Deflates the current input block to the given array. It returns
/// the number of bytes compressed, or 0 if either
/// needsInput() or finished() returns true or length is zero.
/// </summary>
/// <param name="output">
/// the buffer where to write the compressed data.
/// </param>
/// <param name="offset">
/// the offset into the output array.
/// </param>
/// <param name="length">
/// the maximum number of bytes that may be written.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if end() was called.
/// </exception>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if offset and/or length don't match the array length.
/// </exception>
public int Deflate(byte[] output, int offset, int length)
{
int origLength = length;
if (state == CLOSED_STATE) {
throw new InvalidOperationException("Deflater closed");
}
if (state < BUSY_STATE) {
/* output header */
int header = (DEFLATED +
((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8;
int level_flags = (level - 1) >> 1;
if (level_flags < 0 || level_flags > 3) {
level_flags = 3;
}
header |= level_flags << 6;
if ((state & IS_SETDICT) != 0) {
/* Dictionary was set */
header |= DeflaterConstants.PRESET_DICT;
}
header += 31 - (header % 31);
pending.WriteShortMSB(header);
if ((state & IS_SETDICT) != 0) {
int chksum = engine.Adler;
engine.ResetAdler();
pending.WriteShortMSB(chksum >> 16);
pending.WriteShortMSB(chksum & 0xffff);
}
state = BUSY_STATE | (state & (IS_FLUSHING | IS_FINISHING));
}
for (;;) {
int count = pending.Flush(output, offset, length);
offset += count;
totalOut += count;
length -= count;
if (length == 0 || state == FINISHED_STATE) {
break;
}
if (!engine.Deflate((state & IS_FLUSHING) != 0, (state & IS_FINISHING) != 0)) {
if (state == BUSY_STATE) {
/* We need more input now */
return origLength - length;
} else if (state == FLUSHING_STATE) {
if (level != NO_COMPRESSION) {
/* We have to supply some lookahead. 8 bit lookahead
* are needed by the zlib inflater, and we must fill
* the next byte, so that all bits are flushed.
*/
int neededbits = 8 + ((-pending.BitCount) & 7);
while (neededbits > 0) {
/* write a static tree block consisting solely of
* an EOF:
*/
pending.WriteBits(2, 10);
neededbits -= 10;
}
}
state = BUSY_STATE;
} else if (state == FINISHING_STATE) {
pending.AlignToByte();
/* We have completed the stream */
if (!noHeader) {
int adler = engine.Adler;
pending.WriteShortMSB(adler >> 16);
pending.WriteShortMSB(adler & 0xffff);
}
state = FINISHED_STATE;
}
}
}
return origLength - length;
}
/// <summary>
/// Sets the dictionary which should be used in the deflate process.
/// This call is equivalent to <code>setDictionary(dict, 0, dict.Length)</code>.
/// </summary>
/// <param name="dict">
/// the dictionary.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if setInput () or deflate () were already called or another dictionary was already set.
/// </exception>
public void SetDictionary(byte[] dict)
{
SetDictionary(dict, 0, dict.Length);
}
/// <summary>
/// Sets the dictionary which should be used in the deflate process.
/// The dictionary should be a byte array containing strings that are
/// likely to occur in the data which should be compressed. The
/// dictionary is not stored in the compressed output, only a
/// checksum. To decompress the output you need to supply the same
/// dictionary again.
/// </summary>
/// <param name="dict">
/// the dictionary.
/// </param>
/// <param name="offset">
/// an offset into the dictionary.
/// </param>
/// <param name="length">
/// the length of the dictionary.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if setInput () or deflate () were already called or another dictionary was already set.
/// </exception>
public void SetDictionary(byte[] dict, int offset, int length)
{
if (state != INIT_STATE) {
throw new InvalidOperationException();
}
state = SETDICT_STATE;
engine.SetDictionary(dict, offset, length);
}
}
}
@@ -0,0 +1,84 @@
// DeflaterConstants.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
/// <summary>
/// This class contains constants used for the deflater.
/// </summary>
public class DeflaterConstants
{
public const bool DEBUGGING = false;
public const int STORED_BLOCK = 0;
public const int STATIC_TREES = 1;
public const int DYN_TREES = 2;
public const int PRESET_DICT = 0x20;
public const int DEFAULT_MEM_LEVEL = 8;
public const int MAX_MATCH = 258;
public const int MIN_MATCH = 3;
public const int MAX_WBITS = 15;
public const int WSIZE = 1 << MAX_WBITS;
public const int WMASK = WSIZE - 1;
public const int HASH_BITS = DEFAULT_MEM_LEVEL + 7;
public const int HASH_SIZE = 1 << HASH_BITS;
public const int HASH_MASK = HASH_SIZE - 1;
public const int HASH_SHIFT = (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH;
public const int MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1;
public const int MAX_DIST = WSIZE - MIN_LOOKAHEAD;
public const int PENDING_BUF_SIZE = 1 << (DEFAULT_MEM_LEVEL + 8);
public static int MAX_BLOCK_SIZE = Math.Min(65535, PENDING_BUF_SIZE-5);
public const int DEFLATE_STORED = 0;
public const int DEFLATE_FAST = 1;
public const int DEFLATE_SLOW = 2;
public static int[] GOOD_LENGTH = { 0, 4, 4, 4, 4, 8, 8, 8, 32, 32 };
public static int[] MAX_LAZY = { 0, 4, 5, 6, 4,16, 16, 32, 128, 258 };
public static int[] NICE_LENGTH = { 0, 8,16,32,16,32,128,128, 258, 258 };
public static int[] MAX_CHAIN = { 0, 4, 8,32,16,32,128,256,1024,4096 };
public static int[] COMPR_FUNC = { 0, 1, 1, 1, 1, 2, 2, 2, 2, 2 };
}
}
@@ -0,0 +1,650 @@
// DeflaterEngine.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using ICSharpCode.SharpZipLib.Checksums;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
public enum DeflateStrategy {
// The default strategy.
Default = 0,
// This strategy will only allow longer string repetitions. It is
// useful for random data with a small character set.
Filtered = 1,
// This strategy will not look for string repetitions at all. It
// only encodes with Huffman trees (which means, that more common
// characters get a smaller encoding.
HuffmanOnly = 2
}
public class DeflaterEngine : DeflaterConstants
{
static int TOO_FAR = 4096;
int ins_h;
// private byte[] buffer;
short[] head;
short[] prev;
int matchStart, matchLen;
bool prevAvailable;
int blockStart;
int strstart, lookahead;
byte[] window;
DeflateStrategy strategy;
int max_chain, max_lazy, niceLength, goodLength;
/// <summary>
/// The current compression function.
/// </summary>
int comprFunc;
/// <summary>
/// The input data for compression.
/// </summary>
byte[] inputBuf;
/// <summary>
/// The total bytes of input read.
/// </summary>
int totalIn;
/// <summary>
/// The offset into inputBuf, where input data starts.
/// </summary>
int inputOff;
/// <summary>
/// The end offset of the input data.
/// </summary>
int inputEnd;
DeflaterPending pending;
DeflaterHuffman huffman;
/// <summary>
/// The adler checksum
/// </summary>
Adler32 adler;
public DeflaterEngine(DeflaterPending pending)
{
this.pending = pending;
huffman = new DeflaterHuffman(pending);
adler = new Adler32();
window = new byte[2 * WSIZE];
head = new short[HASH_SIZE];
prev = new short[WSIZE];
/* We start at index 1, to avoid a implementation deficiency, that
* we cannot build a repeat pattern at index 0.
*/
blockStart = strstart = 1;
}
public void Reset()
{
huffman.Reset();
adler.Reset();
blockStart = strstart = 1;
lookahead = 0;
totalIn = 0;
prevAvailable = false;
matchLen = MIN_MATCH - 1;
for (int i = 0; i < HASH_SIZE; i++) {
head[i] = 0;
}
for (int i = 0; i < WSIZE; i++) {
prev[i] = 0;
}
}
public void ResetAdler()
{
adler.Reset();
}
public int Adler {
get {
return (int)adler.Value;
}
}
public int TotalIn {
get {
return totalIn;
}
}
public DeflateStrategy Strategy {
get {
return strategy;
}
set {
strategy = value;
}
}
public void SetLevel(int lvl)
{
goodLength = DeflaterConstants.GOOD_LENGTH[lvl];
max_lazy = DeflaterConstants.MAX_LAZY[lvl];
niceLength = DeflaterConstants.NICE_LENGTH[lvl];
max_chain = DeflaterConstants.MAX_CHAIN[lvl];
if (DeflaterConstants.COMPR_FUNC[lvl] != comprFunc) {
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("Change from "+comprFunc +" to "
// + DeflaterConstants.COMPR_FUNC[lvl]);
// }
switch (comprFunc) {
case DEFLATE_STORED:
if (strstart > blockStart) {
huffman.FlushStoredBlock(window, blockStart,
strstart - blockStart, false);
blockStart = strstart;
}
UpdateHash();
break;
case DEFLATE_FAST:
if (strstart > blockStart) {
huffman.FlushBlock(window, blockStart, strstart - blockStart,
false);
blockStart = strstart;
}
break;
case DEFLATE_SLOW:
if (prevAvailable) {
huffman.TallyLit(window[strstart-1] & 0xff);
}
if (strstart > blockStart) {
huffman.FlushBlock(window, blockStart, strstart - blockStart,
false);
blockStart = strstart;
}
prevAvailable = false;
matchLen = MIN_MATCH - 1;
break;
}
comprFunc = COMPR_FUNC[lvl];
}
}
private void UpdateHash()
{
// if (DEBUGGING) {
// Console.WriteLine("updateHash: "+strstart);
// }
ins_h = (window[strstart] << HASH_SHIFT) ^ window[strstart + 1];
}
private int InsertString()
{
short match;
int hash = ((ins_h << HASH_SHIFT) ^ window[strstart + (MIN_MATCH -1)]) & HASH_MASK;
// if (DEBUGGING) {
// if (hash != (((window[strstart] << (2*HASH_SHIFT)) ^
// (window[strstart + 1] << HASH_SHIFT) ^
// (window[strstart + 2])) & HASH_MASK)) {
// throw new Exception("hash inconsistent: "+hash+"/"
// +window[strstart]+","
// +window[strstart+1]+","
// +window[strstart+2]+","+HASH_SHIFT);
// }
// }
prev[strstart & WMASK] = match = head[hash];
head[hash] = (short)strstart;
ins_h = hash;
return match & 0xffff;
}
void SlideWindow()
{
Array.Copy(window, WSIZE, window, 0, WSIZE);
matchStart -= WSIZE;
strstart -= WSIZE;
blockStart -= WSIZE;
/* Slide the hash table (could be avoided with 32 bit values
* at the expense of memory usage).
*/
for (int i = 0; i < HASH_SIZE; ++i) {
int m = head[i] & 0xffff;
head[i] = (short)(m >= WSIZE ? (m - WSIZE) : 0);
}
/* Slide the prev table. */
for (int i = 0; i < WSIZE; i++) {
int m = prev[i] & 0xffff;
prev[i] = (short)(m >= WSIZE ? (m - WSIZE) : 0);
}
}
public void FillWindow()
{
/* If the window is almost full and there is insufficient lookahead,
* move the upper half to the lower one to make room in the upper half.
*/
if (strstart >= WSIZE + MAX_DIST) {
SlideWindow();
}
/* If there is not enough lookahead, but still some input left,
* read in the input
*/
while (lookahead < DeflaterConstants.MIN_LOOKAHEAD && inputOff < inputEnd) {
int more = 2 * WSIZE - lookahead - strstart;
if (more > inputEnd - inputOff) {
more = inputEnd - inputOff;
}
System.Array.Copy(inputBuf, inputOff, window, strstart + lookahead, more);
adler.Update(inputBuf, inputOff, more);
inputOff += more;
totalIn += more;
lookahead += more;
}
if (lookahead >= MIN_MATCH) {
UpdateHash();
}
}
private bool FindLongestMatch(int curMatch)
{
int chainLength = this.max_chain;
int niceLength = this.niceLength;
short[] prev = this.prev;
int scan = this.strstart;
int match;
int best_end = this.strstart + matchLen;
int best_len = Math.Max(matchLen, MIN_MATCH - 1);
int limit = Math.Max(strstart - MAX_DIST, 0);
int strend = strstart + MAX_MATCH - 1;
byte scan_end1 = window[best_end - 1];
byte scan_end = window[best_end];
/* Do not waste too much time if we already have a good match: */
if (best_len >= this.goodLength) {
chainLength >>= 2;
}
/* Do not look for matches beyond the end of the input. This is necessary
* to make deflate deterministic.
*/
if (niceLength > lookahead) {
niceLength = lookahead;
}
if (DeflaterConstants.DEBUGGING && strstart > 2 * WSIZE - MIN_LOOKAHEAD) {
throw new InvalidOperationException("need lookahead");
}
do {
if (DeflaterConstants.DEBUGGING && curMatch >= strstart) {
throw new InvalidOperationException("future match");
}
if (window[curMatch + best_len] != scan_end ||
window[curMatch + best_len - 1] != scan_end1 ||
window[curMatch] != window[scan] ||
window[curMatch + 1] != window[scan + 1]) {
continue;
}
match = curMatch + 2;
scan += 2;
/* We check for insufficient lookahead only every 8th comparison;
* the 256th check will be made at strstart+258.
*/
while (window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] && scan < strend) ;
if (scan > best_end) {
// if (DeflaterConstants.DEBUGGING && ins_h == 0)
// System.err.println("Found match: "+curMatch+"-"+(scan-strstart));
matchStart = curMatch;
best_end = scan;
best_len = scan - strstart;
if (best_len >= niceLength) {
break;
}
scan_end1 = window[best_end - 1];
scan_end = window[best_end];
}
scan = strstart;
} while ((curMatch = (prev[curMatch & WMASK] & 0xffff)) > limit && --chainLength != 0);
matchLen = Math.Min(best_len, lookahead);
return matchLen >= MIN_MATCH;
}
public void SetDictionary(byte[] buffer, int offset, int length)
{
if (DeflaterConstants.DEBUGGING && strstart != 1) {
throw new InvalidOperationException("strstart not 1");
}
adler.Update(buffer, offset, length);
if (length < MIN_MATCH) {
return;
}
if (length > MAX_DIST) {
offset += length - MAX_DIST;
length = MAX_DIST;
}
System.Array.Copy(buffer, offset, window, strstart, length);
UpdateHash();
--length;
while (--length > 0) {
InsertString();
strstart++;
}
strstart += 2;
blockStart = strstart;
}
private bool DeflateStored(bool flush, bool finish)
{
if (!flush && lookahead == 0) {
return false;
}
strstart += lookahead;
lookahead = 0;
int storedLen = strstart - blockStart;
if ((storedLen >= DeflaterConstants.MAX_BLOCK_SIZE) || /* Block is full */
(blockStart < WSIZE && storedLen >= MAX_DIST) || /* Block may move out of window */
flush) {
bool lastBlock = finish;
if (storedLen > DeflaterConstants.MAX_BLOCK_SIZE) {
storedLen = DeflaterConstants.MAX_BLOCK_SIZE;
lastBlock = false;
}
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("storedBlock["+storedLen+","+lastBlock+"]");
// }
huffman.FlushStoredBlock(window, blockStart, storedLen, lastBlock);
blockStart += storedLen;
return !lastBlock;
}
return true;
}
private bool DeflateFast(bool flush, bool finish)
{
if (lookahead < MIN_LOOKAHEAD && !flush) {
return false;
}
while (lookahead >= MIN_LOOKAHEAD || flush) {
if (lookahead == 0) {
/* We are flushing everything */
huffman.FlushBlock(window, blockStart, strstart - blockStart, finish);
blockStart = strstart;
return false;
}
if (strstart > 2 * WSIZE - MIN_LOOKAHEAD)
{
/* slide window, as findLongestMatch need this.
* This should only happen when flushing and the window
* is almost full.
*/
SlideWindow();
}
int hashHead;
if (lookahead >= MIN_MATCH &&
(hashHead = InsertString()) != 0 &&
strategy != DeflateStrategy.HuffmanOnly &&
strstart - hashHead <= MAX_DIST &&
FindLongestMatch(hashHead)) {
/* longestMatch sets matchStart and matchLen */
// if (DeflaterConstants.DEBUGGING) {
// for (int i = 0 ; i < matchLen; i++) {
// if (window[strstart+i] != window[matchStart + i]) {
// throw new Exception();
// }
// }
// }
huffman.TallyDist(strstart - matchStart, matchLen);
lookahead -= matchLen;
if (matchLen <= max_lazy && lookahead >= MIN_MATCH) {
while (--matchLen > 0) {
++strstart;
InsertString();
}
++strstart;
} else {
strstart += matchLen;
if (lookahead >= MIN_MATCH - 1) {
UpdateHash();
}
}
matchLen = MIN_MATCH - 1;
continue;
} else {
/* No match found */
huffman.TallyLit(window[strstart] & 0xff);
++strstart;
--lookahead;
}
if (huffman.IsFull()) {
bool lastBlock = finish && lookahead == 0;
huffman.FlushBlock(window, blockStart, strstart - blockStart,
lastBlock);
blockStart = strstart;
return !lastBlock;
}
}
return true;
}
private bool DeflateSlow(bool flush, bool finish)
{
if (lookahead < MIN_LOOKAHEAD && !flush) {
return false;
}
while (lookahead >= MIN_LOOKAHEAD || flush) {
if (lookahead == 0) {
if (prevAvailable) {
huffman.TallyLit(window[strstart-1] & 0xff);
}
prevAvailable = false;
/* We are flushing everything */
if (DeflaterConstants.DEBUGGING && !flush) {
throw new Exception("Not flushing, but no lookahead");
}
huffman.FlushBlock(window, blockStart, strstart - blockStart,
finish);
blockStart = strstart;
return false;
}
if (strstart >= 2 * WSIZE - MIN_LOOKAHEAD)
{
/* slide window, as findLongestMatch need this.
* This should only happen when flushing and the window
* is almost full.
*/
SlideWindow();
}
int prevMatch = matchStart;
int prevLen = matchLen;
if (lookahead >= MIN_MATCH) {
int hashHead = InsertString();
if (strategy != DeflateStrategy.HuffmanOnly && hashHead != 0 && strstart - hashHead <= MAX_DIST && FindLongestMatch(hashHead))
{
/* longestMatch sets matchStart and matchLen */
/* Discard match if too small and too far away */
if (matchLen <= 5 && (strategy == DeflateStrategy.Filtered || (matchLen == MIN_MATCH && strstart - matchStart > TOO_FAR))) {
matchLen = MIN_MATCH - 1;
}
}
}
/* previous match was better */
if (prevLen >= MIN_MATCH && matchLen <= prevLen) {
// if (DeflaterConstants.DEBUGGING) {
// for (int i = 0 ; i < matchLen; i++) {
// if (window[strstart-1+i] != window[prevMatch + i])
// throw new Exception();
// }
// }
huffman.TallyDist(strstart - 1 - prevMatch, prevLen);
prevLen -= 2;
do {
strstart++;
lookahead--;
if (lookahead >= MIN_MATCH) {
InsertString();
}
} while (--prevLen > 0);
strstart ++;
lookahead--;
prevAvailable = false;
matchLen = MIN_MATCH - 1;
} else {
if (prevAvailable) {
huffman.TallyLit(window[strstart-1] & 0xff);
}
prevAvailable = true;
strstart++;
lookahead--;
}
if (huffman.IsFull()) {
int len = strstart - blockStart;
if (prevAvailable) {
len--;
}
bool lastBlock = (finish && lookahead == 0 && !prevAvailable);
huffman.FlushBlock(window, blockStart, len, lastBlock);
blockStart += len;
return !lastBlock;
}
}
return true;
}
public bool Deflate(bool flush, bool finish)
{
bool progress;
do {
FillWindow();
bool canFlush = flush && inputOff == inputEnd;
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("window: ["+blockStart+","+strstart+","
// +lookahead+"], "+comprFunc+","+canFlush);
// }
switch (comprFunc) {
case DEFLATE_STORED:
progress = DeflateStored(canFlush, finish);
break;
case DEFLATE_FAST:
progress = DeflateFast(canFlush, finish);
break;
case DEFLATE_SLOW:
progress = DeflateSlow(canFlush, finish);
break;
default:
throw new InvalidOperationException("unknown comprFunc");
}
} while (pending.IsFlushed && progress); /* repeat while we have no pending output and progress was made */
return progress;
}
public void SetInput(byte[] buf, int off, int len)
{
if (inputOff < inputEnd) {
throw new InvalidOperationException("Old input was not completely processed");
}
int end = off + len;
/* We want to throw an ArrayIndexOutOfBoundsException early. The
* check is very tricky: it also handles integer wrap around.
*/
if (0 > off || off > end || end > buf.Length) {
throw new ArgumentOutOfRangeException();
}
inputBuf = buf;
inputOff = off;
inputEnd = end;
}
public bool NeedsInput()
{
return inputEnd == inputOff;
}
}
}
@@ -0,0 +1,778 @@
// DeflaterHuffman.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
/// <summary>
/// This is the DeflaterHuffman class.
///
/// This class is <i>not</i> thread safe. This is inherent in the API, due
/// to the split of deflate and setInput.
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class DeflaterHuffman
{
private static int BUFSIZE = 1 << (DeflaterConstants.DEFAULT_MEM_LEVEL + 6);
private static int LITERAL_NUM = 286;
private static int DIST_NUM = 30;
private static int BITLEN_NUM = 19;
private static int REP_3_6 = 16;
private static int REP_3_10 = 17;
private static int REP_11_138 = 18;
private static int EOF_SYMBOL = 256;
private static int[] BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
private static byte[] bit4Reverse = {
0,
8,
4,
12,
2,
10,
6,
14,
1,
9,
5,
13,
3,
11,
7,
15
};
public class Tree
{
public short[] freqs;
public short[] codes;
public byte[] length;
public int[] bl_counts;
public int minNumCodes, numCodes;
public int maxLength;
DeflaterHuffman dh;
public Tree(DeflaterHuffman dh, int elems, int minCodes, int maxLength)
{
this.dh = dh;
this.minNumCodes = minCodes;
this.maxLength = maxLength;
freqs = new short[elems];
bl_counts = new int[maxLength];
}
public void Reset()
{
for (int i = 0; i < freqs.Length; i++) {
freqs[i] = 0;
}
codes = null;
length = null;
}
public void WriteSymbol(int code)
{
// if (DeflaterConstants.DEBUGGING) {
// freqs[code]--;
// // Console.Write("writeSymbol("+freqs.length+","+code+"): ");
// }
dh.pending.WriteBits(codes[code] & 0xffff, length[code]);
}
public void CheckEmpty()
{
bool empty = true;
for (int i = 0; i < freqs.Length; i++) {
if (freqs[i] != 0) {
Console.WriteLine("freqs["+i+"] == "+freqs[i]);
empty = false;
}
}
if (!empty) {
throw new Exception();
}
Console.WriteLine("checkEmpty suceeded!");
}
public void SetStaticCodes(short[] stCodes, byte[] stLength)
{
codes = stCodes;
length = stLength;
}
public void BuildCodes()
{
int numSymbols = freqs.Length;
int[] nextCode = new int[maxLength];
int code = 0;
codes = new short[freqs.Length];
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("buildCodes: "+freqs.Length);
// }
for (int bits = 0; bits < maxLength; bits++) {
nextCode[bits] = code;
code += bl_counts[bits] << (15 - bits);
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("bits: "+(bits+1)+" count: "+bl_counts[bits]
// +" nextCode: "+code); // HACK : Integer.toHexString(
// }
}
if (DeflaterConstants.DEBUGGING && code != 65536) {
throw new Exception("Inconsistent bl_counts!");
}
for (int i=0; i < numCodes; i++) {
int bits = length[i];
if (bits > 0) {
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("codes["+i+"] = rev(" + nextCode[bits-1]+")," // HACK : Integer.toHexString(
// +bits);
// }
codes[i] = BitReverse(nextCode[bits-1]);
nextCode[bits-1] += 1 << (16 - bits);
}
}
}
private void BuildLength(int[] childs)
{
this.length = new byte [freqs.Length];
int numNodes = childs.Length / 2;
int numLeafs = (numNodes + 1) / 2;
int overflow = 0;
for (int i = 0; i < maxLength; i++) {
bl_counts[i] = 0;
}
/* First calculate optimal bit lengths */
int[] lengths = new int[numNodes];
lengths[numNodes-1] = 0;
for (int i = numNodes - 1; i >= 0; i--) {
if (childs[2*i+1] != -1) {
int bitLength = lengths[i] + 1;
if (bitLength > maxLength) {
bitLength = maxLength;
overflow++;
}
lengths[childs[2*i]] = lengths[childs[2*i+1]] = bitLength;
} else {
/* A leaf node */
int bitLength = lengths[i];
bl_counts[bitLength - 1]++;
this.length[childs[2*i]] = (byte) lengths[i];
}
}
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("Tree "+freqs.Length+" lengths:");
// for (int i=0; i < numLeafs; i++) {
// Console.WriteLine("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]]
// + " len: "+length[childs[2*i]]);
// }
// }
if (overflow == 0) {
return;
}
int incrBitLen = maxLength - 1;
do {
/* Find the first bit length which could increase: */
while (bl_counts[--incrBitLen] == 0)
;
/* Move this node one down and remove a corresponding
* amount of overflow nodes.
*/
do {
bl_counts[incrBitLen]--;
bl_counts[++incrBitLen]++;
overflow -= 1 << (maxLength - 1 - incrBitLen);
} while (overflow > 0 && incrBitLen < maxLength - 1);
} while (overflow > 0);
/* We may have overshot above. Move some nodes from maxLength to
* maxLength-1 in that case.
*/
bl_counts[maxLength-1] += overflow;
bl_counts[maxLength-2] -= overflow;
/* Now recompute all bit lengths, scanning in increasing
* frequency. It is simpler to reconstruct all lengths instead of
* fixing only the wrong ones. This idea is taken from 'ar'
* written by Haruhiko Okumura.
*
* The nodes were inserted with decreasing frequency into the childs
* array.
*/
int nodePtr = 2 * numLeafs;
for (int bits = maxLength; bits != 0; bits--) {
int n = bl_counts[bits-1];
while (n > 0) {
int childPtr = 2*childs[nodePtr++];
if (childs[childPtr + 1] == -1) {
/* We found another leaf */
length[childs[childPtr]] = (byte) bits;
n--;
}
}
}
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("*** After overflow elimination. ***");
// for (int i=0; i < numLeafs; i++) {
// Console.WriteLine("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]]
// + " len: "+length[childs[2*i]]);
// }
// }
}
public void BuildTree()
{
int numSymbols = freqs.Length;
/* heap is a priority queue, sorted by frequency, least frequent
* nodes first. The heap is a binary tree, with the property, that
* the parent node is smaller than both child nodes. This assures
* that the smallest node is the first parent.
*
* The binary tree is encoded in an array: 0 is root node and
* the nodes 2*n+1, 2*n+2 are the child nodes of node n.
*/
int[] heap = new int[numSymbols];
int heapLen = 0;
int maxCode = 0;
for (int n = 0; n < numSymbols; n++) {
int freq = freqs[n];
if (freq != 0) {
/* Insert n into heap */
int pos = heapLen++;
int ppos;
while (pos > 0 && freqs[heap[ppos = (pos - 1) / 2]] > freq) {
heap[pos] = heap[ppos];
pos = ppos;
}
heap[pos] = n;
maxCode = n;
}
}
/* We could encode a single literal with 0 bits but then we
* don't see the literals. Therefore we force at least two
* literals to avoid this case. We don't care about order in
* this case, both literals get a 1 bit code.
*/
while (heapLen < 2) {
int node = maxCode < 2 ? ++maxCode : 0;
heap[heapLen++] = node;
}
numCodes = Math.Max(maxCode + 1, minNumCodes);
int numLeafs = heapLen;
int[] childs = new int[4*heapLen - 2];
int[] values = new int[2*heapLen - 1];
int numNodes = numLeafs;
for (int i = 0; i < heapLen; i++) {
int node = heap[i];
childs[2*i] = node;
childs[2*i+1] = -1;
values[i] = freqs[node] << 8;
heap[i] = i;
}
/* Construct the Huffman tree by repeatedly combining the least two
* frequent nodes.
*/
do {
int first = heap[0];
int last = heap[--heapLen];
/* Propagate the hole to the leafs of the heap */
int ppos = 0;
int path = 1;
while (path < heapLen) {
if (path + 1 < heapLen && values[heap[path]] > values[heap[path+1]]) {
path++;
}
heap[ppos] = heap[path];
ppos = path;
path = path * 2 + 1;
}
/* Now propagate the last element down along path. Normally
* it shouldn't go too deep.
*/
int lastVal = values[last];
while ((path = ppos) > 0 && values[heap[ppos = (path - 1)/2]] > lastVal) {
heap[path] = heap[ppos];
}
heap[path] = last;
int second = heap[0];
/* Create a new node father of first and second */
last = numNodes++;
childs[2*last] = first;
childs[2*last+1] = second;
int mindepth = Math.Min(values[first] & 0xff, values[second] & 0xff);
values[last] = lastVal = values[first] + values[second] - mindepth + 1;
/* Again, propagate the hole to the leafs */
ppos = 0;
path = 1;
while (path < heapLen) {
if (path + 1 < heapLen && values[heap[path]] > values[heap[path+1]]) {
path++;
}
heap[ppos] = heap[path];
ppos = path;
path = ppos * 2 + 1;
}
/* Now propagate the new element down along path */
while ((path = ppos) > 0 && values[heap[ppos = (path - 1)/2]] > lastVal) {
heap[path] = heap[ppos];
}
heap[path] = last;
} while (heapLen > 1);
if (heap[0] != childs.Length / 2 - 1) {
throw new Exception("Weird!");
}
BuildLength(childs);
}
public int GetEncodedLength()
{
int len = 0;
for (int i = 0; i < freqs.Length; i++) {
len += freqs[i] * length[i];
}
return len;
}
public void CalcBLFreq(Tree blTree)
{
int max_count; /* max repeat count */
int min_count; /* min repeat count */
int count; /* repeat count of the current code */
int curlen = -1; /* length of current code */
int i = 0;
while (i < numCodes) {
count = 1;
int nextlen = length[i];
if (nextlen == 0) {
max_count = 138;
min_count = 3;
} else {
max_count = 6;
min_count = 3;
if (curlen != nextlen) {
blTree.freqs[nextlen]++;
count = 0;
}
}
curlen = nextlen;
i++;
while (i < numCodes && curlen == length[i]) {
i++;
if (++count >= max_count) {
break;
}
}
if (count < min_count) {
blTree.freqs[curlen] += (short)count;
} else if (curlen != 0) {
blTree.freqs[REP_3_6]++;
} else if (count <= 10) {
blTree.freqs[REP_3_10]++;
} else {
blTree.freqs[REP_11_138]++;
}
}
}
public void WriteTree(Tree blTree)
{
int max_count; /* max repeat count */
int min_count; /* min repeat count */
int count; /* repeat count of the current code */
int curlen = -1; /* length of current code */
int i = 0;
while (i < numCodes) {
count = 1;
int nextlen = length[i];
if (nextlen == 0) {
max_count = 138;
min_count = 3;
} else {
max_count = 6;
min_count = 3;
if (curlen != nextlen) {
blTree.WriteSymbol(nextlen);
count = 0;
}
}
curlen = nextlen;
i++;
while (i < numCodes && curlen == length[i]) {
i++;
if (++count >= max_count) {
break;
}
}
if (count < min_count) {
while (count-- > 0) {
blTree.WriteSymbol(curlen);
}
}
else if (curlen != 0) {
blTree.WriteSymbol(REP_3_6);
dh.pending.WriteBits(count - 3, 2);
} else if (count <= 10) {
blTree.WriteSymbol(REP_3_10);
dh.pending.WriteBits(count - 3, 3);
} else {
blTree.WriteSymbol(REP_11_138);
dh.pending.WriteBits(count - 11, 7);
}
}
}
}
public DeflaterPending pending;
private Tree literalTree, distTree, blTree;
private short[] d_buf;
private byte[] l_buf;
private int last_lit;
private int extra_bits;
private static short[] staticLCodes;
private static byte[] staticLLength;
private static short[] staticDCodes;
private static byte[] staticDLength;
/// <summary>
/// Reverse the bits of a 16 bit value.
/// </summary>
public static short BitReverse(int value)
{
return (short) (bit4Reverse[value & 0xF] << 12
| bit4Reverse[(value >> 4) & 0xF] << 8
| bit4Reverse[(value >> 8) & 0xF] << 4
| bit4Reverse[value >> 12]);
}
static DeflaterHuffman()
{
/* See RFC 1951 3.2.6 */
/* Literal codes */
staticLCodes = new short[LITERAL_NUM];
staticLLength = new byte[LITERAL_NUM];
int i = 0;
while (i < 144) {
staticLCodes[i] = BitReverse((0x030 + i) << 8);
staticLLength[i++] = 8;
}
while (i < 256) {
staticLCodes[i] = BitReverse((0x190 - 144 + i) << 7);
staticLLength[i++] = 9;
}
while (i < 280) {
staticLCodes[i] = BitReverse((0x000 - 256 + i) << 9);
staticLLength[i++] = 7;
}
while (i < LITERAL_NUM) {
staticLCodes[i] = BitReverse((0x0c0 - 280 + i) << 8);
staticLLength[i++] = 8;
}
/* Distant codes */
staticDCodes = new short[DIST_NUM];
staticDLength = new byte[DIST_NUM];
for (i = 0; i < DIST_NUM; i++) {
staticDCodes[i] = BitReverse(i << 11);
staticDLength[i] = 5;
}
}
public DeflaterHuffman(DeflaterPending pending)
{
this.pending = pending;
literalTree = new Tree(this, LITERAL_NUM, 257, 15);
distTree = new Tree(this, DIST_NUM, 1, 15);
blTree = new Tree(this, BITLEN_NUM, 4, 7);
d_buf = new short[BUFSIZE];
l_buf = new byte [BUFSIZE];
}
public void Reset()
{
last_lit = 0;
extra_bits = 0;
literalTree.Reset();
distTree.Reset();
blTree.Reset();
}
private int L_code(int len)
{
if (len == 255) {
return 285;
}
int code = 257;
while (len >= 8) {
code += 4;
len >>= 1;
}
return code + len;
}
private int D_code(int distance)
{
int code = 0;
while (distance >= 4) {
code += 2;
distance >>= 1;
}
return code + distance;
}
public void SendAllTrees(int blTreeCodes)
{
blTree.BuildCodes();
literalTree.BuildCodes();
distTree.BuildCodes();
pending.WriteBits(literalTree.numCodes - 257, 5);
pending.WriteBits(distTree.numCodes - 1, 5);
pending.WriteBits(blTreeCodes - 4, 4);
for (int rank = 0; rank < blTreeCodes; rank++) {
pending.WriteBits(blTree.length[BL_ORDER[rank]], 3);
}
literalTree.WriteTree(blTree);
distTree.WriteTree(blTree);
// if (DeflaterConstants.DEBUGGING) {
// blTree.CheckEmpty();
// }
}
public void CompressBlock()
{
for (int i = 0; i < last_lit; i++) {
int litlen = l_buf[i] & 0xff;
int dist = d_buf[i];
if (dist-- != 0) {
// if (DeflaterConstants.DEBUGGING) {
// Console.Write("["+(dist+1)+","+(litlen+3)+"]: ");
// }
int lc = L_code(litlen);
literalTree.WriteSymbol(lc);
int bits = (lc - 261) / 4;
if (bits > 0 && bits <= 5) {
pending.WriteBits(litlen & ((1 << bits) - 1), bits);
}
int dc = D_code(dist);
distTree.WriteSymbol(dc);
bits = dc / 2 - 1;
if (bits > 0) {
pending.WriteBits(dist & ((1 << bits) - 1), bits);
}
} else {
// if (DeflaterConstants.DEBUGGING) {
// if (litlen > 32 && litlen < 127) {
// Console.Write("("+(char)litlen+"): ");
// } else {
// Console.Write("{"+litlen+"}: ");
// }
// }
literalTree.WriteSymbol(litlen);
}
}
// if (DeflaterConstants.DEBUGGING) {
// Console.Write("EOF: ");
// }
literalTree.WriteSymbol(EOF_SYMBOL);
// if (DeflaterConstants.DEBUGGING) {
// literalTree.CheckEmpty();
// distTree.CheckEmpty();
// }
}
public void FlushStoredBlock(byte[] stored, int stored_offset, int stored_len, bool lastBlock)
{
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("Flushing stored block "+ stored_len);
// }
pending.WriteBits((DeflaterConstants.STORED_BLOCK << 1)
+ (lastBlock ? 1 : 0), 3);
pending.AlignToByte();
pending.WriteShort(stored_len);
pending.WriteShort(~stored_len);
pending.WriteBlock(stored, stored_offset, stored_len);
Reset();
}
public void FlushBlock(byte[] stored, int stored_offset, int stored_len, bool lastBlock)
{
literalTree.freqs[EOF_SYMBOL]++;
/* Build trees */
literalTree.BuildTree();
distTree.BuildTree();
/* Calculate bitlen frequency */
literalTree.CalcBLFreq(blTree);
distTree.CalcBLFreq(blTree);
/* Build bitlen tree */
blTree.BuildTree();
int blTreeCodes = 4;
for (int i = 18; i > blTreeCodes; i--) {
if (blTree.length[BL_ORDER[i]] > 0) {
blTreeCodes = i+1;
}
}
int opt_len = 14 + blTreeCodes * 3 + blTree.GetEncodedLength() +
literalTree.GetEncodedLength() + distTree.GetEncodedLength() +
extra_bits;
int static_len = extra_bits;
for (int i = 0; i < LITERAL_NUM; i++) {
static_len += literalTree.freqs[i] * staticLLength[i];
}
for (int i = 0; i < DIST_NUM; i++) {
static_len += distTree.freqs[i] * staticDLength[i];
}
if (opt_len >= static_len) {
/* Force static trees */
opt_len = static_len;
}
if (stored_offset >= 0 && stored_len+4 < opt_len >> 3) {
/* Store Block */
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("Storing, since " + stored_len + " < " + opt_len
// + " <= " + static_len);
// }
FlushStoredBlock(stored, stored_offset, stored_len, lastBlock);
} else if (opt_len == static_len) {
/* Encode with static tree */
pending.WriteBits((DeflaterConstants.STATIC_TREES << 1) + (lastBlock ? 1 : 0), 3);
literalTree.SetStaticCodes(staticLCodes, staticLLength);
distTree.SetStaticCodes(staticDCodes, staticDLength);
CompressBlock();
Reset();
} else {
/* Encode with dynamic tree */
pending.WriteBits((DeflaterConstants.DYN_TREES << 1) + (lastBlock ? 1 : 0), 3);
SendAllTrees(blTreeCodes);
CompressBlock();
Reset();
}
}
public bool IsFull()
{
return last_lit + 16 >= BUFSIZE; // HACK: This was == 'last_lit == BUFSIZE', but errors occured with DeflateFast
}
public bool TallyLit(int lit)
{
// if (DeflaterConstants.DEBUGGING) {
// if (lit > 32 && lit < 127) {
// Console.WriteLine("("+(char)lit+")");
// } else {
// Console.WriteLine("{"+lit+"}");
// }
// }
d_buf[last_lit] = 0;
l_buf[last_lit++] = (byte)lit;
literalTree.freqs[lit]++;
return IsFull();
}
public bool TallyDist(int dist, int len)
{
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("["+dist+","+len+"]");
// }
d_buf[last_lit] = (short)dist;
l_buf[last_lit++] = (byte)(len - 3);
int lc = L_code(len - 3);
literalTree.freqs[lc]++;
if (lc >= 265 && lc < 285) {
extra_bits += (lc - 261) / 4;
}
int dc = D_code(dist - 1);
distTree.freqs[dc]++;
if (dc >= 4) {
extra_bits += dc / 2 - 1;
}
return IsFull();
}
}
}
@@ -0,0 +1,51 @@
// DeflaterPending.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
namespace ICSharpCode.SharpZipLib.Zip.Compression {
/// <summary>
/// This class stores the pending output of the Deflater.
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class DeflaterPending : PendingBuffer
{
public DeflaterPending() : base(DeflaterConstants.PENDING_BUF_SIZE)
{
}
}
}
@@ -0,0 +1,778 @@
// Inflater.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
/// <summary>
/// Inflater is used to decompress data that has been compressed according
/// to the "deflate" standard described in rfc1950.
///
/// The usage is as following. First you have to set some input with
/// <code>setInput()</code>, then inflate() it. If inflate doesn't
/// inflate any bytes there may be three reasons:
/// <ul>
/// <li>needsInput() returns true because the input buffer is empty.
/// You have to provide more input with <code>setInput()</code>.
/// NOTE: needsInput() also returns true when, the stream is finished.
/// </li>
/// <li>needsDictionary() returns true, you have to provide a preset
/// dictionary with <code>setDictionary()</code>.</li>
/// <li>finished() returns true, the inflater has finished.</li>
/// </ul>
/// Once the first output byte is produced, a dictionary will not be
/// needed at a later stage.
///
/// author of the original java version : John Leuner, Jochen Hoenicke
/// </summary>
public class Inflater
{
/// <summary>
/// Copy lengths for literal codes 257..285
/// </summary>
private static int[] CPLENS = {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258
};
/// <summary>
/// Extra bits for literal codes 257..285
/// </summary>
private static int[] CPLEXT = {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0
};
/// <summary>
/// Copy offsets for distance codes 0..29
/// </summary>
private static int[] CPDIST = {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577
};
/// <summary>
/// Extra bits for distance codes
/// </summary>
private static int[] CPDEXT = {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13
};
/// <summary>
/// This are the state in which the inflater can be.
/// </summary>
private const int DECODE_HEADER = 0;
private const int DECODE_DICT = 1;
private const int DECODE_BLOCKS = 2;
private const int DECODE_STORED_LEN1 = 3;
private const int DECODE_STORED_LEN2 = 4;
private const int DECODE_STORED = 5;
private const int DECODE_DYN_HEADER = 6;
private const int DECODE_HUFFMAN = 7;
private const int DECODE_HUFFMAN_LENBITS = 8;
private const int DECODE_HUFFMAN_DIST = 9;
private const int DECODE_HUFFMAN_DISTBITS = 10;
private const int DECODE_CHKSUM = 11;
private const int FINISHED = 12;
/// <summary>
/// This variable contains the current state.
/// </summary>
private int mode;
/// <summary>
/// The adler checksum of the dictionary or of the decompressed
/// stream, as it is written in the header resp. footer of the
/// compressed stream.
/// Only valid if mode is DECODE_DICT or DECODE_CHKSUM.
/// </summary>
private int readAdler;
/// <summary>
/// The number of bits needed to complete the current state. This
/// is valid, if mode is DECODE_DICT, DECODE_CHKSUM,
/// DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS.
/// </summary>
private int neededBits;
private int repLength, repDist;
private int uncomprLen;
/// <summary>
/// True, if the last block flag was set in the last block of the
/// inflated stream. This means that the stream ends after the
/// current block.
/// </summary>
private bool isLastBlock;
/// <summary>
/// The total number of inflated bytes.
/// </summary>
private int totalOut;
/// <summary>
/// The total number of bytes set with setInput(). This is not the
/// value returned by getTotalIn(), since this also includes the
/// unprocessed input.
/// </summary>
private int totalIn;
/// <summary>
/// This variable stores the nowrap flag that was given to the constructor.
/// True means, that the inflated stream doesn't contain a header nor the
/// checksum in the footer.
/// </summary>
private bool nowrap;
private StreamManipulator input;
private OutputWindow outputWindow;
private InflaterDynHeader dynHeader;
private InflaterHuffmanTree litlenTree, distTree;
private Adler32 adler;
/// <summary>
/// Creates a new inflater.
/// </summary>
public Inflater() : this(false)
{
}
/// <summary>
/// Creates a new inflater.
/// </summary>
/// <param name="nowrap">
/// true if no header and checksum field appears in the
/// stream. This is used for GZIPed input. For compatibility with
/// Sun JDK you should provide one byte of input more than needed in
/// this case.
/// </param>
public Inflater(bool nowrap)
{
this.nowrap = nowrap;
this.adler = new Adler32();
input = new StreamManipulator();
outputWindow = new OutputWindow();
mode = nowrap ? DECODE_BLOCKS : DECODE_HEADER;
}
/// <summary>
/// Resets the inflater so that a new stream can be decompressed. All
/// pending input and output will be discarded.
/// </summary>
public void Reset()
{
mode = nowrap ? DECODE_BLOCKS : DECODE_HEADER;
totalIn = totalOut = 0;
input.Reset();
outputWindow.Reset();
dynHeader = null;
litlenTree = null;
distTree = null;
isLastBlock = false;
adler.Reset();
}
/// <summary>
/// Decodes the deflate header.
/// </summary>
/// <returns>
/// false if more input is needed.
/// </returns>
/// <exception cref="System.FormatException">
/// if header is invalid.
/// </exception>
private bool DecodeHeader()
{
int header = input.PeekBits(16);
if (header < 0) {
return false;
}
input.DropBits(16);
/* The header is written in "wrong" byte order */
header = ((header << 8) | (header >> 8)) & 0xffff;
if (header % 31 != 0) {
throw new FormatException("Header checksum illegal");
}
if ((header & 0x0f00) != (Deflater.DEFLATED << 8)) {
throw new FormatException("Compression Method unknown");
}
/* Maximum size of the backwards window in bits.
* We currently ignore this, but we could use it to make the
* inflater window more space efficient. On the other hand the
* full window (15 bits) is needed most times, anyway.
int max_wbits = ((header & 0x7000) >> 12) + 8;
*/
if ((header & 0x0020) == 0) { // Dictionary flag?
mode = DECODE_BLOCKS;
} else {
mode = DECODE_DICT;
neededBits = 32;
}
return true;
}
/// <summary>
/// Decodes the dictionary checksum after the deflate header.
/// </summary>
/// <returns>
/// false if more input is needed.
/// </returns>
private bool DecodeDict()
{
while (neededBits > 0) {
int dictByte = input.PeekBits(8);
if (dictByte < 0) {
return false;
}
input.DropBits(8);
readAdler = (readAdler << 8) | dictByte;
neededBits -= 8;
}
return false;
}
/// <summary>
/// Decodes the huffman encoded symbols in the input stream.
/// </summary>
/// <returns>
/// false if more input is needed, true if output window is
/// full or the current block ends.
/// </returns>
/// <exception cref="System.FormatException">
/// if deflated stream is invalid.
/// </exception>
private bool DecodeHuffman()
{
int free = outputWindow.GetFreeSpace();
while (free >= 258) {
int symbol;
switch (mode) {
case DECODE_HUFFMAN:
/* This is the inner loop so it is optimized a bit */
while (((symbol = litlenTree.GetSymbol(input)) & ~0xff) == 0) {
outputWindow.Write(symbol);
if (--free < 258) {
return true;
}
}
if (symbol < 257) {
if (symbol < 0) {
return false;
} else {
/* symbol == 256: end of block */
distTree = null;
litlenTree = null;
mode = DECODE_BLOCKS;
return true;
}
}
try {
repLength = CPLENS[symbol - 257];
neededBits = CPLEXT[symbol - 257];
} catch (Exception) {
throw new FormatException("Illegal rep length code");
}
goto case DECODE_HUFFMAN_LENBITS;/* fall through */
case DECODE_HUFFMAN_LENBITS:
if (neededBits > 0) {
mode = DECODE_HUFFMAN_LENBITS;
int i = input.PeekBits(neededBits);
if (i < 0) {
return false;
}
input.DropBits(neededBits);
repLength += i;
}
mode = DECODE_HUFFMAN_DIST;
goto case DECODE_HUFFMAN_DIST;/* fall through */
case DECODE_HUFFMAN_DIST:
symbol = distTree.GetSymbol(input);
if (symbol < 0) {
return false;
}
try {
repDist = CPDIST[symbol];
neededBits = CPDEXT[symbol];
} catch (Exception) {
throw new FormatException("Illegal rep dist code");
}
goto case DECODE_HUFFMAN_DISTBITS;/* fall through */
case DECODE_HUFFMAN_DISTBITS:
if (neededBits > 0) {
mode = DECODE_HUFFMAN_DISTBITS;
int i = input.PeekBits(neededBits);
if (i < 0) {
return false;
}
input.DropBits(neededBits);
repDist += i;
}
outputWindow.Repeat(repLength, repDist);
free -= repLength;
mode = DECODE_HUFFMAN;
break;
default:
throw new FormatException();
}
}
return true;
}
/// <summary>
/// Decodes the adler checksum after the deflate stream.
/// </summary>
/// <returns>
/// false if more input is needed.
/// </returns>
/// <exception cref="System.FormatException">
/// DataFormatException, if checksum doesn't match.
/// </exception>
private bool DecodeChksum()
{
while (neededBits > 0) {
int chkByte = input.PeekBits(8);
if (chkByte < 0) {
return false;
}
input.DropBits(8);
readAdler = (readAdler << 8) | chkByte;
neededBits -= 8;
}
if ((int) adler.Value != readAdler) {
throw new FormatException("Adler chksum doesn't match: "
+ (int)adler.Value
+ " vs. " + readAdler);
}
mode = FINISHED;
return false;
}
/// <summary>
/// Decodes the deflated stream.
/// </summary>
/// <returns>
/// false if more input is needed, or if finished.
/// </returns>
/// <exception cref="System.FormatException">
/// DataFormatException, if deflated stream is invalid.
/// </exception>
private bool Decode()
{
switch (mode) {
case DECODE_HEADER:
return DecodeHeader();
case DECODE_DICT:
return DecodeDict();
case DECODE_CHKSUM:
return DecodeChksum();
case DECODE_BLOCKS:
if (isLastBlock) {
if (nowrap) {
mode = FINISHED;
return false;
} else {
input.SkipToByteBoundary();
neededBits = 32;
mode = DECODE_CHKSUM;
return true;
}
}
int type = input.PeekBits(3);
if (type < 0) {
return false;
}
input.DropBits(3);
if ((type & 1) != 0) {
isLastBlock = true;
}
switch (type >> 1) {
case DeflaterConstants.STORED_BLOCK:
input.SkipToByteBoundary();
mode = DECODE_STORED_LEN1;
break;
case DeflaterConstants.STATIC_TREES:
litlenTree = InflaterHuffmanTree.defLitLenTree;
distTree = InflaterHuffmanTree.defDistTree;
mode = DECODE_HUFFMAN;
break;
case DeflaterConstants.DYN_TREES:
dynHeader = new InflaterDynHeader();
mode = DECODE_DYN_HEADER;
break;
default:
throw new FormatException("Unknown block type "+type);
}
return true;
case DECODE_STORED_LEN1: {
if ((uncomprLen = input.PeekBits(16)) < 0) {
return false;
}
input.DropBits(16);
mode = DECODE_STORED_LEN2;
}
goto case DECODE_STORED_LEN2; /* fall through */
case DECODE_STORED_LEN2: {
int nlen = input.PeekBits(16);
if (nlen < 0) {
return false;
}
input.DropBits(16);
if (nlen != (uncomprLen ^ 0xffff)) {
throw new FormatException("broken uncompressed block");
}
mode = DECODE_STORED;
}
goto case DECODE_STORED;/* fall through */
case DECODE_STORED: {
int more = outputWindow.CopyStored(input, uncomprLen);
uncomprLen -= more;
if (uncomprLen == 0) {
mode = DECODE_BLOCKS;
return true;
}
return !input.IsNeedingInput;
}
case DECODE_DYN_HEADER:
if (!dynHeader.Decode(input)) {
return false;
}
litlenTree = dynHeader.BuildLitLenTree();
distTree = dynHeader.BuildDistTree();
mode = DECODE_HUFFMAN;
goto case DECODE_HUFFMAN; /* fall through */
case DECODE_HUFFMAN:
case DECODE_HUFFMAN_LENBITS:
case DECODE_HUFFMAN_DIST:
case DECODE_HUFFMAN_DISTBITS:
return DecodeHuffman();
case FINISHED:
return false;
default:
throw new FormatException();
}
}
/// <summary>
/// Sets the preset dictionary. This should only be called, if
/// needsDictionary() returns true and it should set the same
/// dictionary, that was used for deflating. The getAdler()
/// function returns the checksum of the dictionary needed.
/// </summary>
/// <param name="buffer">
/// the dictionary.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if no dictionary is needed.
/// </exception>
/// <exception cref="System.ArgumentException">
/// if the dictionary checksum is wrong.
/// </exception>
public void SetDictionary(byte[] buffer)
{
SetDictionary(buffer, 0, buffer.Length);
}
/// <summary>
/// Sets the preset dictionary. This should only be called, if
/// needsDictionary() returns true and it should set the same
/// dictionary, that was used for deflating. The getAdler()
/// function returns the checksum of the dictionary needed.
/// </summary>
/// <param name="buffer">
/// the dictionary.
/// </param>
/// <param name="off">
/// the offset into buffer where the dictionary starts.
/// </param>
/// <param name="len">
/// the length of the dictionary.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if no dictionary is needed.
/// </exception>
/// <exception cref="System.ArgumentException">
/// if the dictionary checksum is wrong.
/// </exception>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if the off and/or len are wrong.
/// </exception>
public void SetDictionary(byte[] buffer, int off, int len)
{
if (!IsNeedingDictionary) {
throw new InvalidOperationException();
}
adler.Update(buffer, off, len);
if ((int) adler.Value != readAdler) {
throw new ArgumentException("Wrong adler checksum");
}
adler.Reset();
outputWindow.CopyDict(buffer, off, len);
mode = DECODE_BLOCKS;
}
/// <summary>
/// Sets the input. This should only be called, if needsInput()
/// returns true.
/// </summary>
/// <param name="buf">
/// the input.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if no input is needed.
/// </exception>
public void SetInput(byte[] buf)
{
SetInput(buf, 0, buf.Length);
}
/// <summary>
/// Sets the input. This should only be called, if needsInput()
/// returns true.
/// </summary>
/// <param name="buf">
/// the input.
/// </param>
/// <param name="off">
/// the offset into buffer where the input starts.
/// </param>
/// <param name="len">
/// the length of the input.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if no input is needed.
/// </exception>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if the off and/or len are wrong.
/// </exception>
public void SetInput(byte[] buf, int off, int len)
{
input.SetInput(buf, off, len);
totalIn += len;
}
/// <summary>
/// Inflates the compressed stream to the output buffer. If this
/// returns 0, you should check, whether needsDictionary(),
/// needsInput() or finished() returns true, to determine why no
/// further output is produced.
/// </summary>
/// <param name = "buf">
/// the output buffer.
/// </param>
/// <returns>
/// the number of bytes written to the buffer, 0 if no further
/// output can be produced.
/// </returns>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if buf has length 0.
/// </exception>
/// <exception cref="System.FormatException">
/// if deflated stream is invalid.
/// </exception>
public int Inflate(byte[] buf)
{
return Inflate(buf, 0, buf.Length);
}
/// <summary>
/// Inflates the compressed stream to the output buffer. If this
/// returns 0, you should check, whether needsDictionary(),
/// needsInput() or finished() returns true, to determine why no
/// further output is produced.
/// </summary>
/// <param name = "buf">
/// the output buffer.
/// </param>
/// <param name = "off">
/// the offset into buffer where the output should start.
/// </param>
/// <param name = "len">
/// the maximum length of the output.
/// </param>
/// <returns>
/// the number of bytes written to the buffer, 0 if no further output can be produced.
/// </returns>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if len is &lt;= 0.
/// </exception>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if the off and/or len are wrong.
/// </exception>
/// <exception cref="System.FormatException">
/// if deflated stream is invalid.
/// </exception>
public int Inflate(byte[] buf, int off, int len)
{
if (len < 0) {
throw new ArgumentOutOfRangeException("len < 0");
}
// Special case: len may be zero
if (len == 0) {
return 0;
}
/* // Check for correct buff, off, len triple
if (off < 0 || off + len >= buf.Length) {
throw new ArgumentException("off/len outside buf bounds");
}*/
int count = 0;
int more;
do {
if (mode != DECODE_CHKSUM) {
/* Don't give away any output, if we are waiting for the
* checksum in the input stream.
*
* With this trick we have always:
* needsInput() and not finished()
* implies more output can be produced.
*/
more = outputWindow.CopyOutput(buf, off, len);
adler.Update(buf, off, more);
off += more;
count += more;
totalOut += more;
len -= more;
if (len == 0) {
return count;
}
}
} while (Decode() || (outputWindow.GetAvailable() > 0 &&
mode != DECODE_CHKSUM));
return count;
}
/// <summary>
/// Returns true, if the input buffer is empty.
/// You should then call setInput().
/// NOTE: This method also returns true when the stream is finished.
/// </summary>
public bool IsNeedingInput {
get {
return input.IsNeedingInput;
}
}
/// <summary>
/// Returns true, if a preset dictionary is needed to inflate the input.
/// </summary>
public bool IsNeedingDictionary {
get {
return mode == DECODE_DICT && neededBits == 0;
}
}
/// <summary>
/// Returns true, if the inflater has finished. This means, that no
/// input is needed and no output can be produced.
/// </summary>
public bool IsFinished {
get {
return mode == FINISHED && outputWindow.GetAvailable() == 0;
}
}
/// <summary>
/// Gets the adler checksum. This is either the checksum of all
/// uncompressed bytes returned by inflate(), or if needsDictionary()
/// returns true (and thus no output was yet produced) this is the
/// adler checksum of the expected dictionary.
/// </summary>
/// <returns>
/// the adler checksum.
/// </returns>
public int Adler {
get {
return IsNeedingDictionary ? readAdler : (int) adler.Value;
}
}
/// <summary>
/// Gets the total number of output bytes returned by inflate().
/// </summary>
/// <returns>
/// the total number of output bytes.
/// </returns>
public int TotalOut {
get {
return totalOut;
}
}
/// <summary>
/// Gets the total number of processed compressed input bytes.
/// </summary>
/// <returns>
/// the total number of bytes of processed input bytes.
/// </returns>
public int TotalIn {
get {
return totalIn - RemainingInput;
}
}
/// <summary>
/// Gets the number of unprocessed input. Useful, if the end of the
/// stream is reached and you want to further process the bytes after
/// the deflate stream.
/// </summary>
/// <returns>
/// the number of bytes of the input which were not processed.
/// </returns>
public int RemainingInput {
get {
return input.AvailableBytes;
}
}
}
}
@@ -0,0 +1,203 @@
// InflaterDynHeader.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
class InflaterDynHeader
{
const int LNUM = 0;
const int DNUM = 1;
const int BLNUM = 2;
const int BLLENS = 3;
const int LENS = 4;
const int REPS = 5;
static readonly int[] repMin = { 3, 3, 11 };
static readonly int[] repBits = { 2, 3, 7 };
byte[] blLens;
byte[] litdistLens;
InflaterHuffmanTree blTree;
int mode;
int lnum, dnum, blnum, num;
int repSymbol;
byte lastLen;
int ptr;
static readonly int[] BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
public InflaterDynHeader()
{
}
public bool Decode(StreamManipulator input)
{
decode_loop:
for (;;) {
switch (mode) {
case LNUM:
lnum = input.PeekBits(5);
if (lnum < 0) {
return false;
}
lnum += 257;
input.DropBits(5);
// System.err.println("LNUM: "+lnum);
mode = DNUM;
goto case DNUM; // fall through
case DNUM:
dnum = input.PeekBits(5);
if (dnum < 0) {
return false;
}
dnum++;
input.DropBits(5);
// System.err.println("DNUM: "+dnum);
num = lnum+dnum;
litdistLens = new byte[num];
mode = BLNUM;
goto case BLNUM; // fall through
case BLNUM:
blnum = input.PeekBits(4);
if (blnum < 0) {
return false;
}
blnum += 4;
input.DropBits(4);
blLens = new byte[19];
ptr = 0;
// System.err.println("BLNUM: "+blnum);
mode = BLLENS;
goto case BLLENS; // fall through
case BLLENS:
while (ptr < blnum) {
int len = input.PeekBits(3);
if (len < 0) {
return false;
}
input.DropBits(3);
// System.err.println("blLens["+BL_ORDER[ptr]+"]: "+len);
blLens[BL_ORDER[ptr]] = (byte) len;
ptr++;
}
blTree = new InflaterHuffmanTree(blLens);
blLens = null;
ptr = 0;
mode = LENS;
goto case LENS; // fall through
case LENS: {
int symbol;
while (((symbol = blTree.GetSymbol(input)) & ~15) == 0) {
/* Normal case: symbol in [0..15] */
// System.err.println("litdistLens["+ptr+"]: "+symbol);
litdistLens[ptr++] = lastLen = (byte)symbol;
if (ptr == num) {
/* Finished */
return true;
}
}
/* need more input ? */
if (symbol < 0)
return false;
/* otherwise repeat code */
if (symbol >= 17) {
/* repeat zero */
// System.err.println("repeating zero");
lastLen = 0;
} else {
if (ptr == 0) {
throw new Exception();
}
}
repSymbol = symbol-16;
}
mode = REPS;
goto case REPS; // fall through
case REPS:
{
int bits = repBits[repSymbol];
int count = input.PeekBits(bits);
if (count < 0) {
return false;
}
input.DropBits(bits);
count += repMin[repSymbol];
// System.err.println("litdistLens repeated: "+count);
if (ptr + count > num) {
throw new Exception();
}
while (count-- > 0) {
litdistLens[ptr++] = lastLen;
}
if (ptr == num) {
/* Finished */
return true;
}
}
mode = LENS;
goto decode_loop;
}
}
}
public InflaterHuffmanTree BuildLitLenTree()
{
byte[] litlenLens = new byte[lnum];
Array.Copy(litdistLens, 0, litlenLens, 0, lnum);
return new InflaterHuffmanTree(litlenLens);
}
public InflaterHuffmanTree BuildDistTree()
{
byte[] distLens = new byte[dnum];
Array.Copy(litdistLens, lnum, distLens, 0, dnum);
return new InflaterHuffmanTree(distLens);
}
}
}
@@ -0,0 +1,208 @@
// InflaterHuffmanTree.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
public class InflaterHuffmanTree
{
private static int MAX_BITLEN = 15;
private short[] tree;
public static InflaterHuffmanTree defLitLenTree, defDistTree;
static InflaterHuffmanTree()
{
try {
byte[] codeLengths = new byte[288];
int i = 0;
while (i < 144) {
codeLengths[i++] = 8;
}
while (i < 256) {
codeLengths[i++] = 9;
}
while (i < 280) {
codeLengths[i++] = 7;
}
while (i < 288) {
codeLengths[i++] = 8;
}
defLitLenTree = new InflaterHuffmanTree(codeLengths);
codeLengths = new byte[32];
i = 0;
while (i < 32) {
codeLengths[i++] = 5;
}
defDistTree = new InflaterHuffmanTree(codeLengths);
} catch (Exception) {
throw new ApplicationException("InflaterHuffmanTree: static tree length illegal");
}
}
/// <summary>
/// Constructs a Huffman tree from the array of code lengths.
/// </summary>
/// <param name = "codeLengths">
/// the array of code lengths
/// </param>
public InflaterHuffmanTree(byte[] codeLengths)
{
BuildTree(codeLengths);
}
private void BuildTree(byte[] codeLengths)
{
int[] blCount = new int[MAX_BITLEN + 1];
int[] nextCode = new int[MAX_BITLEN + 1];
for (int i = 0; i < codeLengths.Length; i++) {
int bits = codeLengths[i];
if (bits > 0)
blCount[bits]++;
}
int code = 0;
int treeSize = 512;
for (int bits = 1; bits <= MAX_BITLEN; bits++) {
nextCode[bits] = code;
code += blCount[bits] << (16 - bits);
if (bits >= 10) {
/* We need an extra table for bit lengths >= 10. */
int start = nextCode[bits] & 0x1ff80;
int end = code & 0x1ff80;
treeSize += (end - start) >> (16 - bits);
}
}
if (code != 65536) {
throw new Exception("Code lengths don't add up properly.");
}
/* Now create and fill the extra tables from longest to shortest
* bit len. This way the sub trees will be aligned.
*/
tree = new short[treeSize];
int treePtr = 512;
for (int bits = MAX_BITLEN; bits >= 10; bits--) {
int end = code & 0x1ff80;
code -= blCount[bits] << (16 - bits);
int start = code & 0x1ff80;
for (int i = start; i < end; i += 1 << 7) {
tree[DeflaterHuffman.BitReverse(i)] = (short) ((-treePtr << 4) | bits);
treePtr += 1 << (bits-9);
}
}
for (int i = 0; i < codeLengths.Length; i++) {
int bits = codeLengths[i];
if (bits == 0) {
continue;
}
code = nextCode[bits];
int revcode = DeflaterHuffman.BitReverse(code);
if (bits <= 9) {
do {
tree[revcode] = (short) ((i << 4) | bits);
revcode += 1 << bits;
} while (revcode < 512);
} else {
int subTree = tree[revcode & 511];
int treeLen = 1 << (subTree & 15);
subTree = -(subTree >> 4);
do {
tree[subTree | (revcode >> 9)] = (short) ((i << 4) | bits);
revcode += 1 << bits;
} while (revcode < treeLen);
}
nextCode[bits] = code + (1 << (16 - bits));
}
}
/// <summary>
/// Reads the next symbol from input. The symbol is encoded using the
/// huffman tree.
/// </summary>
/// <param name="input">
/// input the input source.
/// </param>
/// <returns>
/// the next symbol, or -1 if not enough input is available.
/// </returns>
public int GetSymbol(StreamManipulator input)
{
int lookahead, symbol;
if ((lookahead = input.PeekBits(9)) >= 0) {
if ((symbol = tree[lookahead]) >= 0) {
input.DropBits(symbol & 15);
return symbol >> 4;
}
int subtree = -(symbol >> 4);
int bitlen = symbol & 15;
if ((lookahead = input.PeekBits(bitlen)) >= 0) {
symbol = tree[subtree | (lookahead >> 9)];
input.DropBits(symbol & 15);
return symbol >> 4;
} else {
int bits = input.AvailableBits;
lookahead = input.PeekBits(bits);
symbol = tree[subtree | (lookahead >> 9)];
if ((symbol & 15) <= bits) {
input.DropBits(symbol & 15);
return symbol >> 4;
} else {
return -1;
}
}
} else {
int bits = input.AvailableBits;
lookahead = input.PeekBits(bits);
symbol = tree[lookahead];
if (symbol >= 0 && (symbol & 15) <= bits) {
input.DropBits(symbol & 15);
return symbol >> 4;
} else {
return -1;
}
}
}
}
}
@@ -0,0 +1,208 @@
// PendingBuffer.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression {
/// <summary>
/// This class is general purpose class for writing data to a buffer.
///
/// It allows you to write bits as well as bytes
/// Based on DeflaterPending.java
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class PendingBuffer
{
protected byte[] buf;
int start;
int end;
uint bits;
int bitCount;
public PendingBuffer() : this( 4096 )
{
}
public PendingBuffer(int bufsize)
{
buf = new byte[bufsize];
}
public void Reset()
{
start = end = bitCount = 0;
}
public void WriteByte(int b)
{
if (DeflaterConstants.DEBUGGING && start != 0)
throw new Exception();
buf[end++] = (byte) b;
}
public void WriteShort(int s)
{
if (DeflaterConstants.DEBUGGING && start != 0) {
throw new Exception();
}
buf[end++] = (byte) s;
buf[end++] = (byte) (s >> 8);
}
public void WriteInt(int s)
{
if (DeflaterConstants.DEBUGGING && start != 0) {
throw new Exception();
}
buf[end++] = (byte) s;
buf[end++] = (byte) (s >> 8);
buf[end++] = (byte) (s >> 16);
buf[end++] = (byte) (s >> 24);
}
public void WriteBlock(byte[] block, int offset, int len)
{
if (DeflaterConstants.DEBUGGING && start != 0) {
throw new Exception();
}
System.Array.Copy(block, offset, buf, end, len);
end += len;
}
public int BitCount {
get {
return bitCount;
}
}
public void AlignToByte()
{
if (DeflaterConstants.DEBUGGING && start != 0) {
throw new Exception();
}
if (bitCount > 0) {
buf[end++] = (byte) bits;
if (bitCount > 8) {
buf[end++] = (byte) (bits >> 8);
}
}
bits = 0;
bitCount = 0;
}
public void WriteBits(int b, int count)
{
if (DeflaterConstants.DEBUGGING && start != 0) {
throw new Exception();
}
// if (DeflaterConstants.DEBUGGING) {
// Console.WriteLine("writeBits("+b+","+count+")");
// }
bits |= (uint)(b << bitCount);
bitCount += count;
if (bitCount >= 16) {
buf[end++] = (byte) bits;
buf[end++] = (byte) (bits >> 8);
bits >>= 16;
bitCount -= 16;
}
}
public void WriteShortMSB(int s)
{
if (DeflaterConstants.DEBUGGING && start != 0) {
throw new Exception();
}
buf[end++] = (byte) (s >> 8);
buf[end++] = (byte) s;
}
public bool IsFlushed {
get {
return end == 0;
}
}
/// <summary>
/// Flushes the pending buffer into the given output array. If the
/// output array is to small, only a partial flush is done.
/// </summary>
/// <param name="output">
/// the output array;
/// </param>
/// <param name="offset">
/// the offset into output array;
/// </param>
/// <param name="length">
/// length the maximum number of bytes to store;
/// </param>
/// <exception name="ArgumentOutOfRangeException">
/// IndexOutOfBoundsException if offset or length are invalid.
/// </exception>
public int Flush(byte[] output, int offset, int length)
{
if (bitCount >= 8) {
buf[end++] = (byte) bits;
bits >>= 8;
bitCount -= 8;
}
if (length > end - start) {
length = end - start;
System.Array.Copy(buf, start, output, offset, length);
start = 0;
end = 0;
} else {
System.Array.Copy(buf, start, output, offset, length);
start += length;
}
return length;
}
public byte[] ToByteArray()
{
byte[] ret = new byte[ end - start ];
System.Array.Copy(buf, start, ret, 0, ret.Length);
start = 0;
end = 0;
return ret;
}
}
}
@@ -0,0 +1,296 @@
// DeflaterOutputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Zip.Compression;
namespace ICSharpCode.SharpZipLib.Zip.Compression.Streams {
/// <summary>
/// This is a special FilterOutputStream deflating the bytes that are
/// written through it. It uses the Deflater for deflating.
///
/// authors of the original java version : Tom Tromey, Jochen Hoenicke
/// </summary>
public class DeflaterOutputStream : Stream
{
/// <summary>
/// This buffer is used temporarily to retrieve the bytes from the
/// deflater and write them to the underlying output stream.
/// </summary>
protected byte[] buf;
/// <summary>
/// The deflater which is used to deflate the stream.
/// </summary>
protected Deflater def;
/// <summary>
/// base stream the deflater depends on.
/// </summary>
protected Stream baseOutputStream;
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanRead {
get {
return baseOutputStream.CanRead;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanSeek {
get {
return baseOutputStream.CanSeek;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanWrite {
get {
return baseOutputStream.CanWrite;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Length {
get {
return baseOutputStream.Length;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Position {
get {
return baseOutputStream.Position;
}
set {
baseOutputStream.Position = value;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Seek(long offset, SeekOrigin origin)
{
return baseOutputStream.Seek(offset, origin);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void SetLength(long val)
{
baseOutputStream.SetLength(val);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override int ReadByte()
{
return baseOutputStream.ReadByte();
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override int Read(byte[] b, int off, int len)
{
return baseOutputStream.Read(b, off, len);
}
/// <summary>
/// Deflates everything in the def's input buffers. This will call
/// <code>def.deflate()</code> until all bytes from the input buffers
/// are processed.
/// </summary>
protected void deflate()
{
while (!def.IsNeedingInput) {
int len = def.Deflate(buf, 0, buf.Length);
// System.err.println("DOS deflated " + len + " baseOutputStream of " + buf.length);
if (len <= 0) {
break;
}
baseOutputStream.Write(buf, 0, len);
}
if (!def.IsNeedingInput) {
throw new ApplicationException("Can't deflate all input?");
}
}
/// <summary>
/// Creates a new DeflaterOutputStream with a default Deflater and default buffer size.
/// </summary>
/// <param name="baseOutputStream">
/// the output stream where deflated output should be written.
/// </param>
public DeflaterOutputStream(Stream baseOutputStream) : this(baseOutputStream, new Deflater(), 512)
{
}
/// <summary>
/// Creates a new DeflaterOutputStream with the given Deflater and
/// default buffer size.
/// </summary>
/// <param name="baseOutputStream">
/// the output stream where deflated output should be written.
/// </param>
/// <param name="defl">
/// the underlying deflater.
/// </param>
public DeflaterOutputStream(Stream baseOutputStream, Deflater defl) :this(baseOutputStream, defl, 512)
{
}
/// <summary>
/// Creates a new DeflaterOutputStream with the given Deflater and
/// buffer size.
/// </summary>
/// <param name="baseOutputStream">
/// the output stream where deflated output should be written.
/// </param>
/// <param name="defl">
/// the underlying deflater.
/// </param>
/// <param name="bufsize">
/// the buffer size.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if bufsize isn't positive.
/// </exception>
public DeflaterOutputStream(Stream baseOutputStream, Deflater defl, int bufsize)
{
this.baseOutputStream = baseOutputStream;
if (bufsize <= 0) {
throw new InvalidOperationException("bufsize <= 0");
}
buf = new byte[bufsize];
def = defl;
}
/// <summary>
/// Flushes the stream by calling flush() on the deflater and then
/// on the underlying stream. This ensures that all bytes are
/// flushed.
/// </summary>
public override void Flush()
{
def.Flush();
deflate();
baseOutputStream.Flush();
}
/// <summary>
/// Finishes the stream by calling finish() on the deflater.
/// </summary>
public virtual void Finish()
{
def.Finish();
while (!def.IsFinished) {
int len = def.Deflate(buf, 0, buf.Length);
if (len <= 0) {
break;
}
baseOutputStream.Write(buf, 0, len);
}
if (!def.IsFinished) {
throw new ApplicationException("Can't deflate all input?");
}
baseOutputStream.Flush();
}
/// <summary>
/// Calls finish () and closes the stream.
/// </summary>
public override void Close()
{
Finish();
baseOutputStream.Close();
}
/// <summary>
/// Writes a single byte to the compressed output stream.
/// </summary>
/// <param name="bval">
/// the byte value.
/// </param>
public override void WriteByte(byte bval)
{
byte[] b = new byte[1];
b[0] = (byte) bval;
Write(b, 0, 1);
}
/// <summary>
/// Writes a len bytes from an array to the compressed stream.
/// </summary>
/// <param name="buf">
/// the byte array.
/// </param>
/// <param name="off">
/// the offset into the byte array where to start.
/// </param>
/// <param name="len">
/// the number of bytes to write.
/// </param>
public override void Write(byte[] buf, int off, int len)
{
// System.err.println("DOS with off " + off + " and len " + len);
def.SetInput(buf, off, len);
deflate();
}
}
}
@@ -0,0 +1,333 @@
// InflaterInputStream.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Zip.Compression;
namespace ICSharpCode.SharpZipLib.Zip.Compression.Streams {
/// <summary>
/// This filter stream is used to decompress data compressed baseInputStream the "deflate"
/// format. The "deflate" format is described baseInputStream RFC 1951.
///
/// This stream may form the basis for other decompression filters, such
/// as the <code>GzipInputStream</code>.
///
/// author of the original java version : John Leuner
/// </summary>
public class InflaterInputStream : Stream
{
//Variables
/// <summary>
/// Decompressor for this filter
/// </summary>
protected Inflater inf;
/// <summary>
/// Byte array used as a buffer
/// </summary>
protected byte[] buf;
/// <summary>
/// Size of buffer
/// </summary>
protected int len;
//We just use this if we are decoding one byte at a time with the read() call
private byte[] onebytebuffer = new byte[1];
/// <summary>
/// base stream the inflater depends on.
/// </summary>
protected Stream baseInputStream;
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanRead {
get {
return baseInputStream.CanRead;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanSeek {
get {
return baseInputStream.CanSeek;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override bool CanWrite {
get {
return baseInputStream.CanWrite;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Length {
get {
return len;
}
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Position {
get {
return baseInputStream.Position;
}
set {
baseInputStream.Position = value;
}
}
/// <summary>
/// Flushes the baseInputStream
/// </summary>
public override void Flush()
{
baseInputStream.Flush();
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override long Seek(long offset, SeekOrigin origin)
{
return baseInputStream.Seek(offset, origin);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void SetLength(long val)
{
baseInputStream.SetLength(val);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void Write(byte[] array, int offset, int count)
{
baseInputStream.Write(array, offset, count);
}
/// <summary>
/// I needed to implement the abstract member.
/// </summary>
public override void WriteByte(byte val)
{
baseInputStream.WriteByte(val);
}
//Constructors
/// <summary>
/// Create an InflaterInputStream with the default decompresseor
/// and a default buffer size.
/// </summary>
/// <param name = "baseInputStream">
/// the InputStream to read bytes from
/// </param>
public InflaterInputStream(Stream baseInputStream) : this(baseInputStream, new Inflater(), 4096)
{
}
/// <summary>
/// Create an InflaterInputStream with the specified decompresseor
/// and a default buffer size.
/// </summary>
/// <param name = "baseInputStream">
/// the InputStream to read bytes from
/// </param>
/// <param name = "inf">
/// the decompressor used to decompress data read from baseInputStream
/// </param>
public InflaterInputStream(Stream baseInputStream, Inflater inf) : this(baseInputStream, inf, 4096)
{
}
/// <summary>
/// Create an InflaterInputStream with the specified decompresseor
/// and a specified buffer size.
/// </summary>
/// <param name = "baseInputStream">
/// the InputStream to read bytes from
/// </param>
/// <param name = "inf">
/// the decompressor used to decompress data read from baseInputStream
/// </param>
/// <param name = "size">
/// size of the buffer to use
/// </param>
public InflaterInputStream(Stream baseInputStream, Inflater inf, int size)
{
this.baseInputStream = baseInputStream;
this.inf = inf;
try {
this.len = (int)baseInputStream.Length;
} catch (Exception) { // the stream may not support .Length
this.len = 0;
}
if (size <= 0) {
throw new ArgumentOutOfRangeException("size <= 0");
}
buf = new byte[size]; //Create the buffer
}
//Methods
/// <summary>
/// Returns 0 once the end of the stream (EOF) has been reached.
/// Otherwise returns 1.
/// </summary>
public virtual int Available {
get {
return inf.IsFinished ? 0 : 1;
}
}
/// <summary>
/// Closes the input stream
/// </summary>
public override void Close()
{
baseInputStream.Close();
}
/// <summary>
/// Fills the buffer with more data to decompress.
/// </summary>
protected void Fill()
{
len = baseInputStream.Read(buf, 0, buf.Length);
if (len < 0) {
throw new ApplicationException("Deflated stream ends early.");
}
inf.SetInput(buf, 0, len);
}
/// <summary>
/// Reads one byte of decompressed data.
///
/// The byte is baseInputStream the lower 8 bits of the int.
/// </summary>
public override int ReadByte()
{
int nread = Read(onebytebuffer, 0, 1); //read one byte
if (nread > 0) {
return onebytebuffer[0] & 0xff;
}
return -1;
}
/// <summary>
/// Decompresses data into the byte array
/// </summary>
/// <param name ="b">
/// the array to read and decompress data into
/// </param>
/// <param name ="off">
/// the offset indicating where the data should be placed
/// </param>
/// <param name ="len">
/// the number of bytes to decompress
/// </param>
public override int Read(byte[] b, int off, int len)
{
for (;;) {
int count;
try {
count = inf.Inflate(b, off, len);
} catch (Exception e) {
throw new ZipException(e.ToString());
}
if (count > 0) {
return count;
}
if (inf.IsNeedingDictionary) {
throw new ZipException("Need a dictionary");
} else if (inf.IsFinished) {
return 0;
} else if (inf.IsNeedingInput) {
Fill();
} else {
throw new InvalidOperationException("Don't know what to do");
}
}
}
/// <summary>
/// Skip specified number of bytes of uncompressed data
/// </summary>
/// <param name ="n">
/// number of bytes to skip
/// </param>
public long Skip(long n)
{
if (n < 0) {
throw new ArgumentOutOfRangeException("n");
}
int len = 2048;
if (n < len) {
len = (int) n;
}
byte[] tmp = new byte[len];
return (long)baseInputStream.Read(tmp, 0, tmp.Length);
}
}
}
Loaded 100 of 1812 files, more files were not shown because too many files have changed in this diff. Show more