[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/Basic Basic.build,1.1,1.2 ErrObject.
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/Basic Basic.build,1.1,1.2 ErrObject.cs,1.4,1.5 FileSystem.cs,1.2,1.3 Information.cs,1.2,1.3 |
Date: |
Thu, 29 May 2003 04:07:02 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/Basic
In directory subversions:/tmp/cvs-serv20651/Basic
Modified Files:
Basic.build ErrObject.cs FileSystem.cs Information.cs
Log Message:
Modifications to build the VB library in ECMA_COMPAT modes.
Index: Basic.build
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Basic/Basic.build,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Basic.build 16 May 2003 05:35:00 -0000 1.1
--- Basic.build 29 May 2003 08:07:00 -0000 1.2
***************
*** 12,17 ****
<sources>
! <includes if="${NON_ECMA}" name="**/*.cs"/>
! <excludes if="${NON_ECMA}" name="S.cs"/>
<file name="S.cs"/>
</sources>
--- 12,17 ----
<sources>
! <includes if="${CONFIG_EXTENDED_NUMERICS}"
name="**/*.cs"/>
! <excludes if="${CONFIG_EXTENDED_NUMERICS}"
name="S.cs"/>
<file name="S.cs"/>
</sources>
Index: ErrObject.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Basic/ErrObject.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ErrObject.cs 29 May 2003 01:22:39 -0000 1.4
--- ErrObject.cs 29 May 2003 08:07:00 -0000 1.5
***************
*** 94,99 ****
--- 94,101 ----
this.exception = CreateExceptionFromNumber
(Number, this.Description);
+ #if !ECMA_COMPAT
this.exception.Source = this.Source;
this.exception.HelpLink = this.HelpFile;
+ #endif
throw this.exception;
}
***************
*** 144,151 ****
--- 146,155 ----
{
helpFile = value;
+ #if !ECMA_COMPAT
if(exception != null)
{
exception.HelpLink = helpFile;
}
+ #endif
}
}
***************
*** 203,208 ****
return 28;
}
! if(exception is DllNotFoundException ||
! exception is FileNotFoundException)
{
return 53;
--- 207,217 ----
return 28;
}
! #if !ECMA_COMPAT
! if(exception is DllNotFoundException)
! {
! return 53;
! }
! #endif
! if(exception is FileNotFoundException)
{
return 53;
***************
*** 371,378 ****
--- 380,389 ----
{
source = value;
+ #if !ECMA_COMPAT
if(exception != null)
{
exception.Source = value;
}
+ #endif
}
}
Index: FileSystem.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Basic/FileSystem.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** FileSystem.cs 23 May 2003 01:08:15 -0000 1.2
--- FileSystem.cs 29 May 2003 08:07:00 -0000 1.3
***************
*** 63,67 ****
--- 63,71 ----
Utils.ThrowException(68);
}
+ #if !ECMA_COMPAT
char volumeSep = Path.VolumeSeparatorChar;
+ #else
+ char volumeSep = ':';
+ #endif
if(volumeSep != 0)
{
***************
*** 88,92 ****
--- 92,100 ----
Utils.ThrowException(68);
}
+ #if !ECMA_COMPAT
char volumeSep = Path.VolumeSeparatorChar;
+ #else
+ char volumeSep = ':';
+ #endif
if(volumeSep != 0)
{
***************
*** 107,110 ****
--- 115,120 ----
}
+ #if !ECMA_COMPAT
+
// Directory scan information.
private sealed class DirScanInfo
***************
*** 267,270 ****
--- 277,282 ----
}
+ #endif // !ECMA_COMPAT
+
// Determine if a particular file is at EOF.
public static bool EOF(int FileNumber)
***************
*** 349,353 ****
OpenMode.Binary | OpenMode.Random);
file.SetRecord(RecordNumber);
! Value =
DateTime.FromOADate(file.Reader.ReadDouble());
}
public static void FileGet
--- 361,365 ----
OpenMode.Binary | OpenMode.Random);
file.SetRecord(RecordNumber);
! Value =
Utils.FromOADate(file.Reader.ReadDouble());
}
public static void FileGet
***************
*** 443,446 ****
--- 455,460 ----
}
+ #if !ECMA_COMPAT
+
// Get the length of a file.
public static long FileLen(String PathName)
***************
*** 449,452 ****
--- 463,468 ----
}
+ #endif
+
// Open a file.
public static void FileOpen
***************
*** 641,645 ****
OpenMode.Binary | OpenMode.Random);
file.SetRecord(RecordNumber);
! file.Writer.Write(Value.ToOADate());
}
public static void FilePut
--- 657,661 ----
OpenMode.Binary | OpenMode.Random);
file.SetRecord(RecordNumber);
! file.Writer.Write(Utils.ToOADate(Value));
}
public static void FilePut
***************
*** 780,783 ****
--- 796,801 ----
}
+ #if !ECMA_COMPAT
+
// Get the attributes on a specific file.
public static FileAttribute GetAttr(String PathName)
***************
*** 788,791 ****
--- 806,811 ----
}
+ #endif
+
// Input a value from a file.
[TODO]
***************
*** 909,912 ****
--- 929,934 ----
}
+ #if !ECMA_COMPAT
+
// Make a new directory.
public static void MkDir(String Path)
***************
*** 915,918 ****
--- 937,942 ----
}
+ #endif
+
// Inner version of "Print" and "Write".
private static void Print(File file, Object[] Output,
***************
*** 1154,1157 ****
--- 1178,1183 ----
}
+ #if !ECMA_COMPAT
+
// Set the attributes on a file.
public static void SetAttr(String PathName, FileAttribute Attributes)
***************
*** 1160,1163 ****
--- 1186,1191 ----
(PathName, (FileAttributes)Attributes);
}
+
+ #endif
// Create a "TabInfo" object.
Index: Information.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Basic/Information.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Information.cs 22 May 2003 02:24:09 -0000 1.2
--- Information.cs 29 May 2003 08:07:00 -0000 1.3
***************
*** 63,67 ****
--- 63,71 ----
public static bool IsDBNull(Object VarName)
{
+ #if !ECMA_COMPAT
return (VarName is DBNull);
+ #else
+ return false;
+ #endif
}
public static bool IsDate(Object VarName)
***************
*** 98,101 ****
--- 102,106 ----
public static bool IsNumeric(Object VarName)
{
+ #if !ECMA_COMPAT
IConvertible ic = (VarName as IConvertible);
if(ic != null)
***************
*** 128,131 ****
--- 133,167 ----
}
return false;
+ #else
+ if(VarName != null)
+ {
+ switch(ObjectType.GetTypeCode(VarName))
+ {
+ case TypeCode.Boolean:
+ case TypeCode.Byte:
+ case TypeCode.Int16:
+ case TypeCode.Int32:
+ case TypeCode.Int64:
+ case TypeCode.Single:
+ case TypeCode.Double:
+ case TypeCode.Decimal: return
true;
+
+ case TypeCode.String:
+ {
+ try
+ {
+
DoubleType.Parse(VarName.ToString());
+ return true;
+ }
+ catch(Exception e)
+ {
+ // If we cannot
parse, then it isn't numeric.
+ }
+ }
+ break;
+ }
+ }
+ return false;
+ #endif
}
public static bool IsReference(Object VarName)
***************
*** 212,217 ****
--- 248,257 ----
public static String SystemTypeName(String VbName)
{
+ #if !ECMA_COMPAT
VbName = (VbName.Trim()).ToLower
(CultureInfo.InvariantCulture);
+ #else
+ VbName = (VbName.Trim()).ToLower();
+ #endif
switch(VbName)
{
***************
*** 330,339 ****
return VariantType.Date;
}
else if(type == typeof(DBNull))
{
return VariantType.Null;
}
! else if(type == typeof(Missing) ||
!
typeof(Exception).IsAssignableFrom(type))
{
return VariantType.Error;
--- 370,384 ----
return VariantType.Date;
}
+ #if !ECMA_COMPAT
else if(type == typeof(DBNull))
{
return VariantType.Null;
}
! else if(type == typeof(Missing))
! {
! return VariantType.Error;
! }
! #endif
! else
if(typeof(Exception).IsAssignableFrom(type))
{
return VariantType.Error;
***************
*** 364,369 ****
--- 409,418 ----
{
// Normalize the name.
+ #if !ECMA_COMPAT
UrtName = (UrtName.Trim()).ToLower
(CultureInfo.InvariantCulture);
+ #else
+ UrtName = (UrtName.Trim()).ToLower();
+ #endif
if(UrtName.StartsWith("system."))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/Basic Basic.build,1.1,1.2 ErrObject.cs,1.4,1.5 FileSystem.cs,1.2,1.3 Information.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.956,1.957
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/Basic/CompilerServices BooleanType.cs,1.3,1.4 ByteType.cs,1.4,1.5 CharArrayType.cs,1.3,1.4 CharType.cs,1.3,1.4 DateType.cs,1.3,1.4 DecimalType.cs,1.4,1.5 DoubleType.cs,1.4,1.5 FlowControl.cs,1.3,1.4 IntegerType.cs,1.4,1.5 LongType.cs,1.4,1.5 ObjectType.cs,1.4,1.5 ShortType.cs,1.4,1.5 SingleType.cs,1.4,1.5 StringType.cs,1.3,1.4 Utils.cs,1.3,1.4
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.956,1.957
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/Basic/CompilerServices BooleanType.cs,1.3,1.4 ByteType.cs,1.4,1.5 CharArrayType.cs,1.3,1.4 CharType.cs,1.3,1.4 DateType.cs,1.3,1.4 DecimalType.cs,1.4,1.5 DoubleType.cs,1.4,1.5 FlowControl.cs,1.3,1.4 IntegerType.cs,1.4,1.5 LongType.cs,1.4,1.5 ObjectType.cs,1.4,1.5 ShortType.cs,1.4,1.5 SingleType.cs,1.4,1.5 StringType.cs,1.3,1.4 Utils.cs,1.3,1.4
- Index(es):