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 Guid.cs,1.6,1.7


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Guid.cs,1.6,1.7
Date: Mon, 14 Apr 2003 02:38:41 -0400

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

Modified Files:
        Guid.cs 
Log Message:


Alternative hex form for Guid's.


Index: Guid.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Guid.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Guid.cs     14 Apr 2003 06:19:11 -0000      1.6
--- Guid.cs     14 Apr 2003 06:38:39 -0000      1.7
***************
*** 77,80 ****
--- 77,81 ----
                                int value = 0;
                                char ch;
+                               bool sawDigit = false;
                                if((length - posn) <= 2 || g[posn] != '0' ||
                                   (g[posn + 1] != 'x' && g[posn + 1] != 'X'))
***************
*** 107,110 ****
--- 108,112 ----
                                                break;
                                        }
+                                       sawDigit = true;
                                        --digits;
                                        if(digits < 0)
***************
*** 113,116 ****
--- 115,122 ----
                                        }
                                }
+                               if(!sawDigit)
+                               {
+                                       throw new 
FormatException(_("Format_GuidValue"));
+                               }
                                return value;
                        }
***************
*** 152,184 ****
                                        GetChar(g, ref posn, length, '{');
                                        d__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       e__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       f__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       g__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       h__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       i__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       j__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
!                                       GetChar(g, ref posn, length, ',');
!                                       GetChar(g, ref posn, length, '{');
!                                       k__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       GetChar(g, ref posn, length, '}');
                                }
                                else
--- 158,213 ----
                                        GetChar(g, ref posn, length, '{');
                                        d__ = (byte)GetVarHex(g, ref posn, 
length, 2);
!                                       if(posn < length && g[posn] == '}')
!                                       {
!                                               // The byte values must be 
individually bracketed.
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               e__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               f__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               g__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               h__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               i__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               j__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                               GetChar(g, ref posn, length, 
',');
!                                               GetChar(g, ref posn, length, 
'{');
!                                               k__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                       }
!                                       else
!                                       {
!                                               // The byte values are not 
individually bracketed.
!                                               GetChar(g, ref posn, length, 
',');
!                                               e__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
',');
!                                               f__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
',');
!                                               g__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
',');
!                                               h__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
',');
!                                               i__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
',');
!                                               j__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
',');
!                                               k__ = (byte)GetVarHex(g, ref 
posn, length, 2);
!                                               GetChar(g, ref posn, length, 
'}');
!                                       }
                                }
                                else





reply via email to

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