[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Private/NumberFormat C
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Private/NumberFormat CustomFormatter.cs,1.2,1.3 Formatter.cs,1.1,1.2 GeneralFormatter.cs,1.2,1.3 HexadecimalFormatter.cs,1.1,1.2 NumberFormatter.cs,1.2,1.3 PercentFormatter.cs,1.2,1.3 |
Date: |
Thu, 28 Nov 2002 19:58:40 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat
In directory subversions:/tmp/cvs-serv19254/runtime/System/Private/NumberFormat
Modified Files:
CustomFormatter.cs Formatter.cs GeneralFormatter.cs
HexadecimalFormatter.cs NumberFormatter.cs PercentFormatter.cs
Log Message:
Fix errors and warnings shown up by csc.
Index: CustomFormatter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat/CustomFormatter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** CustomFormatter.cs 27 Nov 2002 20:29:56 -0000 1.2
--- CustomFormatter.cs 29 Nov 2002 00:58:38 -0000 1.3
***************
*** 104,108 ****
int ret, pos;
! pos = format.IndexOfAny(engineeringFormat, pos);
while (pos != -1)
--- 104,108 ----
int ret, pos;
! pos = format.IndexOfAny(engineeringFormat, 0);
while (pos != -1)
Index: Formatter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat/Formatter.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Formatter.cs 27 Nov 2002 14:37:27 -0000 1.1
--- Formatter.cs 29 Nov 2002 00:58:38 -0000 1.2
***************
*** 293,297 ****
decimal r;
! for (int i=0, r=5; i<= precision; i++)
{
r /= 10;
--- 293,297 ----
decimal r;
! for (i=0, r=5; i<= precision; i++)
{
r /= 10;
***************
*** 441,445 ****
// Search for cached formats
! if (formats[format] != 0)
{
return (Formatter) formats[format];
--- 441,445 ----
// Search for cached formats
! if (formats[format] != null)
{
return (Formatter) formats[format];
Index: GeneralFormatter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat/GeneralFormatter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** GeneralFormatter.cs 27 Nov 2002 20:29:56 -0000 1.2
--- GeneralFormatter.cs 29 Nov 2002 00:58:38 -0000 1.3
***************
*** 46,50 ****
default:
throw new
FormatException(_("Format_StringException"));
- break;
}
}
--- 46,49 ----
***************
*** 68,71 ****
--- 67,74 ----
{
precision = PrecisionOf(o);
+ }
+ else
+ {
+ precision = this.precision;
}
Index: HexadecimalFormatter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat/HexadecimalFormatter.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** HexadecimalFormatter.cs 27 Nov 2002 14:37:27 -0000 1.1
--- HexadecimalFormatter.cs 29 Nov 2002 00:58:38 -0000 1.2
***************
*** 50,54 ****
default:
throw new FormatException(_("Format_StringException"));
- break;
}
}
--- 50,53 ----
***************
*** 65,69 ****
for (uvalue = unchecked((ulong)value);
uvalue < System.UInt64.MaxValue;
! uvalue = unchecked((ulong) ((long)uvalue) >> 4)); //
Signed shift
{
buf.Insert(0, digits[uvalue % 16]);
--- 64,68 ----
for (uvalue = unchecked((ulong)value);
uvalue < System.UInt64.MaxValue;
! uvalue = unchecked((ulong) ((long)uvalue) >> 4)) //
Signed shift
{
buf.Insert(0, digits[uvalue % 16]);
***************
*** 89,93 ****
public override string Format(Object o, IFormatProvider provider)
{
- bool isNegative = false;
long value;
--- 88,91 ----
Index: NumberFormatter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat/NumberFormatter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** NumberFormatter.cs 27 Nov 2002 20:29:56 -0000 1.2
--- NumberFormatter.cs 29 Nov 2002 00:58:38 -0000 1.3
***************
*** 46,49 ****
--- 46,50 ----
case 1:
+ default:
ret = nfi.NegativeSign + value;
break;
Index: PercentFormatter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Private/NumberFormat/PercentFormatter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** PercentFormatter.cs 27 Nov 2002 20:29:56 -0000 1.2
--- PercentFormatter.cs 29 Nov 2002 00:58:38 -0000 1.3
***************
*** 46,49 ****
--- 46,50 ----
case 1:
+ default:
ret = nfi.NegativeSign + value +
nfi.PercentSymbol;
break;
***************
*** 63,66 ****
--- 64,68 ----
case 1:
+ default:
ret = value + nfi.PercentSymbol;
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Private/NumberFormat CustomFormatter.cs,1.2,1.3 Formatter.cs,1.1,1.2 GeneralFormatter.cs,1.2,1.3 HexadecimalFormatter.cs,1.1,1.2 NumberFormatter.cs,1.2,1.3 PercentFormatter.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=