dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO Path.cs,1.13,1.14


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO Path.cs,1.13,1.14 TextWriter.cs,1.8,1.9
Date: Tue, 15 Apr 2003 00:37:46 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO
In directory subversions:/tmp/cvs-serv15684/runtime/System/IO

Modified Files:
        Path.cs TextWriter.cs 
Log Message:


Various ECMA-compatibility fixes.


Index: Path.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/Path.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** Path.cs     29 Mar 2003 06:48:17 -0000      1.13
--- Path.cs     15 Apr 2003 04:37:44 -0000      1.14
***************
*** 2,6 ****
   * Path.cs - Implementation of the "System.IO.Path" class.
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * Contributions from Charlie Carnow <address@hidden>
--- 2,6 ----
   * Path.cs - Implementation of the "System.IO.Path" class.
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * Contributions from Charlie Carnow <address@hidden>
***************
*** 36,46 ****
                public static readonly char DirectorySeparatorChar = 
p.dirSeparator;
                public static readonly char AltDirectorySeparatorChar = 
p.altDirSeparator;
-               public static readonly char VolumeSeparatorChar = 
p.volumeSeparator;
                public static readonly char PathSeparator = p.pathSeparator;
                public static readonly char[] InvalidPathChars = 
p.invalidPathChars;
!               private static readonly char[] PathSeparatorChars = { 
DirectorySeparatorChar, AltDirectorySeparatorChar, VolumeSeparatorChar};
!                       
                // entropy for GetTempFilename()
                static Random r=new Random();
  
                public static String ChangeExtension(String path, String 
extension)
--- 36,48 ----
                public static readonly char DirectorySeparatorChar = 
p.dirSeparator;
                public static readonly char AltDirectorySeparatorChar = 
p.altDirSeparator;
                public static readonly char PathSeparator = p.pathSeparator;
+               public static readonly char VolumeSeparatorChar = 
p.volumeSeparator;
                public static readonly char[] InvalidPathChars = 
p.invalidPathChars;
! 
                // entropy for GetTempFilename()
                static Random r=new Random();
+ 
+               // This class cannot be instantiated.
+               private Path() {}
  
                public static String ChangeExtension(String path, String 
extension)

Index: TextWriter.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/TextWriter.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** TextWriter.cs       17 Jun 2002 06:55:08 -0000      1.8
--- TextWriter.cs       15 Apr 2003 04:37:44 -0000      1.9
***************
*** 33,37 ****
  
        // Local state.
!       protected char[] newLine;
        private IFormatProvider provider; 
  
--- 33,41 ----
  
        // Local state.
! #if !ECMA_COMPAT
!       protected char[] CoreNewLine;
! #else
!       private char[] CoreNewLine;
! #endif
        private IFormatProvider provider; 
  
***************
*** 39,48 ****
        protected TextWriter()
                        {
!                               newLine = Environment.NewLine.ToCharArray();
                                provider = null;
                        }
        protected TextWriter(IFormatProvider provider)
                        {
!                               newLine = Environment.NewLine.ToCharArray();
                                this.provider = provider;
                        }
--- 43,52 ----
        protected TextWriter()
                        {
!                               CoreNewLine = Environment.NewLine.ToCharArray();
                                provider = null;
                        }
        protected TextWriter(IFormatProvider provider)
                        {
!                               CoreNewLine = Environment.NewLine.ToCharArray();
                                this.provider = provider;
                        }
***************
*** 191,195 ****
        public virtual void WriteLine()
                        {
!                               Write(newLine);
                        }
  
--- 195,199 ----
        public virtual void WriteLine()
                        {
!                               Write(CoreNewLine);
                        }
  
***************
*** 290,294 ****
                                get
                                {
!                                       return new String(newLine);
                                }
                                set
--- 294,298 ----
                                get
                                {
!                                       return new String(CoreNewLine);
                                }
                                set
***************
*** 296,304 ****
                                        if(value != null)
                                        {
!                                               newLine = value.ToCharArray();
                                        }
                                        else
                                        {
!                                               newLine = "\r\n".ToCharArray();
                                        }
                                }
--- 300,308 ----
                                        if(value != null)
                                        {
!                                               CoreNewLine = 
value.ToCharArray();
                                        }
                                        else
                                        {
!                                               CoreNewLine = 
"\r\n".ToCharArray();
                                        }
                                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]