--- a/Character.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Character.st Thu Jan 28 14:59:07 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -648,7 +646,6 @@
or:[ (asciivalue == 247 ) ]]]]]
! !
-
!Character methodsFor:'accessing'!
codePoint
@@ -1499,7 +1496,7 @@
^ s contents
"
- 'ä' utf8Encoded
+ 'ä' utf8Encoded
"
! !
@@ -2565,9 +2562,9 @@
"
$e asNonDiacritical
- $é asNonDiacritical
- $ä asNonDiacritical
- $Ã¥ asNonDiacritical
+ $é asNonDiacritical
+ $ä asNonDiacritical
+ $å asNonDiacritical
"
!
@@ -2597,8 +2594,8 @@
isNationalLetter
"return true, if the receiver is a letter.
CAVEAT:
- for now, this method is only correct for unicode characters up to u+1d6ff (Unicode3.1).
- (which is more than mozilla does, btw. ;-)"
+ for now, this method is only correct for unicode characters up to u+1d6ff (Unicode3.1).
+ (which is more than mozilla does, btw. ;-)"
%{ /* NOCONTEXT */
@@ -2607,470 +2604,470 @@
/* because used so often, this is open coded, instead of table driven */
val = __intVal(__INST(asciivalue));
switch (val >> 8) {
- case 0x00:
- if ((unsigned INT)(val - 'A') <= ('Z' - 'A')) {
- RETURN ( true );
- }
- if ((unsigned INT)(val - 'a') <= ('z' - 'a')) {
- RETURN ( true );
- }
- if (val == 0xAA) { RETURN (true); }
- if (val == 0xB5) { RETURN (true); }
- if (val == 0xBA) { RETURN (true); }
- if (val < 0xC0) { RETURN (false); }
- if (val == 0xD7) { RETURN (false); }
- if (val == 0xF7) { RETURN (false); }
- RETURN (true);
-
- case 0x01:
- RETURN (true);
-
- case 0x02:
+ case 0x00:
+ if ((unsigned INT)(val - 'A') <= ('Z' - 'A')) {
+ RETURN ( true );
+ }
+ if ((unsigned INT)(val - 'a') <= ('z' - 'a')) {
+ RETURN ( true );
+ }
+ if (val == 0xAA) { RETURN (true); }
+ if (val == 0xB5) { RETURN (true); }
+ if (val == 0xBA) { RETURN (true); }
+ if (val < 0xC0) { RETURN (false); }
+ if (val == 0xD7) { RETURN (false); }
+ if (val == 0xF7) { RETURN (false); }
+ RETURN (true);
+
+ case 0x01:
+ RETURN (true);
+
+ case 0x02:
#ifdef UNICODE_3_2
- if (val <= 0x2B8) { RETURN (true); }
- if (val == 0x2B9) { RETURN (false); }
- if (val == 0x2BA) { RETURN (false); }
+ if (val <= 0x2B8) { RETURN (true); }
+ if (val == 0x2B9) { RETURN (false); }
+ if (val == 0x2BA) { RETURN (false); }
#else
- if (val <= 0x2BA) { RETURN (true); }
+ if (val <= 0x2BA) { RETURN (true); }
#endif
- if (val <= 0x2C1) { RETURN (true); }
+ if (val <= 0x2C1) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val <= 0x2C5) { RETURN (false); }
- if (val <= 0x2CF) { RETURN (true); }
+ if (val <= 0x2C5) { RETURN (false); }
+ if (val <= 0x2CF) { RETURN (true); }
#endif
- if (val == 0x2D0) { RETURN (true); }
- if (val == 0x2D1) { RETURN (true); }
- if (val <= 0x2DF) { RETURN (false); }
- if (val <= 0x2E4) { RETURN (true); }
- if (val == 0x2EE) { RETURN (true); }
- RETURN (false);
-
- case 0x03:
- if (val == 0x37A) { RETURN (true); }
- if (val <= 0x385) { RETURN (false); }
- if (val == 0x387) { RETURN (false); }
+ if (val == 0x2D0) { RETURN (true); }
+ if (val == 0x2D1) { RETURN (true); }
+ if (val <= 0x2DF) { RETURN (false); }
+ if (val <= 0x2E4) { RETURN (true); }
+ if (val == 0x2EE) { RETURN (true); }
+ RETURN (false);
+
+ case 0x03:
+ if (val == 0x37A) { RETURN (true); }
+ if (val <= 0x385) { RETURN (false); }
+ if (val == 0x387) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0x3F6) { RETURN (false); }
+ if (val == 0x3F6) { RETURN (false); }
#endif
- RETURN (true);
-
- case 0x04:
- if (val <= 0x481) { RETURN (true); }
- if (val <= 0x486) { RETURN (false); }
- if (val == 0x487) { RETURN (true); }
+ RETURN (true);
+
+ case 0x04:
+ if (val <= 0x481) { RETURN (true); }
+ if (val <= 0x486) { RETURN (false); }
+ if (val == 0x487) { RETURN (true); }
#ifdef UNICODE_3_2
- if (val <= 0x48A) { RETURN (false); }
+ if (val <= 0x48A) { RETURN (false); }
#else
- if (val <= 0x489) { RETURN (false); }
+ if (val <= 0x489) { RETURN (false); }
#endif
- RETURN (true);
-
- case 0x05:
- if (val <= 0x50f) { RETURN (true); }
- if (val <= 0x530) { RETURN (false); }
- if (val <= 0x556) { RETURN (true); }
- if (val <= 0x558) { RETURN (false); }
- if (val <= 0x559) { RETURN (true); }
- if (val <= 0x55F) { RETURN (false); }
- if (val <= 0x587) { RETURN (true); }
- if (val <= 0x5cf) { RETURN (false); }
- if (val <= 0x5f2) { RETURN (true); }
- RETURN (false);
-
- case 0x06:
- if (val <= 0x620) { RETURN (false); }
- if (val <= 0x64A) { RETURN (true); }
- if (val <= 0x66D) { RETURN (false); }
- if (val == 0x670) { RETURN (false); }
- if (val <= 0x6D3) { RETURN (true); }
- if (val == 0x6D5) { RETURN (true); }
- if (val == 0x6E5) { RETURN (true); }
- if (val == 0x6E6) { RETURN (true); }
- if (val == 0x6EE) { RETURN (true); }
- if (val == 0x6EF) { RETURN (true); }
- if (val == 0x6FA) { RETURN (true); }
- if (val == 0x6FB) { RETURN (true); }
- if (val == 0x6FC) { RETURN (true); }
+ RETURN (true);
+
+ case 0x05:
+ if (val <= 0x50f) { RETURN (true); }
+ if (val <= 0x530) { RETURN (false); }
+ if (val <= 0x556) { RETURN (true); }
+ if (val <= 0x558) { RETURN (false); }
+ if (val <= 0x559) { RETURN (true); }
+ if (val <= 0x55F) { RETURN (false); }
+ if (val <= 0x587) { RETURN (true); }
+ if (val <= 0x5cf) { RETURN (false); }
+ if (val <= 0x5f2) { RETURN (true); }
+ RETURN (false);
+
+ case 0x06:
+ if (val <= 0x620) { RETURN (false); }
+ if (val <= 0x64A) { RETURN (true); }
+ if (val <= 0x66D) { RETURN (false); }
+ if (val == 0x670) { RETURN (false); }
+ if (val <= 0x6D3) { RETURN (true); }
+ if (val == 0x6D5) { RETURN (true); }
+ if (val == 0x6E5) { RETURN (true); }
+ if (val == 0x6E6) { RETURN (true); }
+ if (val == 0x6EE) { RETURN (true); }
+ if (val == 0x6EF) { RETURN (true); }
+ if (val == 0x6FA) { RETURN (true); }
+ if (val == 0x6FB) { RETURN (true); }
+ if (val == 0x6FC) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val == 0x6FF) { RETURN (true); }
+ if (val == 0x6FF) { RETURN (true); }
#endif
- RETURN (false);
-
- case 0x07:
- if (val <= 0x70F) { RETURN (false); }
- if (val == 0x711) { RETURN (false); }
- if (val <= 0x72F) { RETURN (true); }
+ RETURN (false);
+
+ case 0x07:
+ if (val <= 0x70F) { RETURN (false); }
+ if (val == 0x711) { RETURN (false); }
+ if (val <= 0x72F) { RETURN (true); }
#ifdef UNICODE_3_2
- if (val <= 0x74d) { RETURN (false); }
- if (val <= 0x74e) { RETURN (true); }
+ if (val <= 0x74d) { RETURN (false); }
+ if (val <= 0x74e) { RETURN (true); }
#else
- if (val <= 0x74c) { RETURN (false); }
- if (val <= 0x74f) { RETURN (true); }
+ if (val <= 0x74c) { RETURN (false); }
+ if (val <= 0x74f) { RETURN (true); }
#endif
- if (val <= 0x77F) { RETURN (false); }
- if (val <= 0x7a5) { RETURN (true); }
- if (val <= 0x7af) { RETURN (false); }
+ if (val <= 0x77F) { RETURN (false); }
+ if (val <= 0x7a5) { RETURN (true); }
+ if (val <= 0x7af) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0x7B1) { RETURN (true); }
+ if (val == 0x7B1) { RETURN (true); }
#endif
- RETURN (false);
-
- case 0x09:
+ RETURN (false);
+
+ case 0x09:
#ifdef UNICODE_3_2
- if (val <= 0x904) { RETURN (false); }
+ if (val <= 0x904) { RETURN (false); }
#else
- if (val <= 0x903) { RETURN (false); }
+ if (val <= 0x903) { RETURN (false); }
#endif
- if (val <= 0x93B) { RETURN (true); }
- if (val == 0x93D) { RETURN (true); }
- if (val == 0x950) { RETURN (true); }
- if (val <= 0x957) { RETURN (false); }
- if (val <= 0x961) { RETURN (true); }
- if (val <= 0x984) { RETURN (false); }
- if (val <= 0x9BB) { RETURN (true); }
+ if (val <= 0x93B) { RETURN (true); }
+ if (val == 0x93D) { RETURN (true); }
+ if (val == 0x950) { RETURN (true); }
+ if (val <= 0x957) { RETURN (false); }
+ if (val <= 0x961) { RETURN (true); }
+ if (val <= 0x984) { RETURN (false); }
+ if (val <= 0x9BB) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val == 0x9BD) { RETURN (true); }
+ if (val == 0x9BD) { RETURN (true); }
#endif
- if (val <= 0x9DB) { RETURN (false); }
- if (val <= 0x9E1) { RETURN (true); }
- if (val <= 0x9EF) { RETURN (false); }
- if (val <= 0x9F1) { RETURN (true); }
- RETURN (false);
-
- case 0x0A:
- if (val <= 0xa04) { RETURN (false); }
- if (val <= 0xa3B) { RETURN (true); }
- if (val <= 0xa58) { RETURN (false); }
- if (val <= 0xa65) { RETURN (true); }
- if (val <= 0xa71) { RETURN (false); }
- if (val <= 0xa80) { RETURN (true); }
- if (val <= 0xa84) { RETURN (false); }
- if (val <= 0xaBB) { RETURN (true); }
- if (val == 0xaBD) { RETURN (true); }
- if (val <= 0xaCF) { RETURN (false); }
+ if (val <= 0x9DB) { RETURN (false); }
+ if (val <= 0x9E1) { RETURN (true); }
+ if (val <= 0x9EF) { RETURN (false); }
+ if (val <= 0x9F1) { RETURN (true); }
+ RETURN (false);
+
+ case 0x0A:
+ if (val <= 0xa04) { RETURN (false); }
+ if (val <= 0xa3B) { RETURN (true); }
+ if (val <= 0xa58) { RETURN (false); }
+ if (val <= 0xa65) { RETURN (true); }
+ if (val <= 0xa71) { RETURN (false); }
+ if (val <= 0xa80) { RETURN (true); }
+ if (val <= 0xa84) { RETURN (false); }
+ if (val <= 0xaBB) { RETURN (true); }
+ if (val == 0xaBD) { RETURN (true); }
+ if (val <= 0xaCF) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0xAE2) { RETURN (false); }
- if (val == 0xAE3) { RETURN (false); }
+ if (val == 0xAE2) { RETURN (false); }
+ if (val == 0xAE3) { RETURN (false); }
#endif
- if (val <= 0xaE5) { RETURN (true); }
- RETURN (false);
-
- case 0x0B:
- if (val <= 0xB04) { RETURN (false); }
- if (val <= 0xb3B) { RETURN (true); }
- if (val == 0xb3d) { RETURN (true); }
- if (val <= 0xb5B) { RETURN (false); }
- if (val <= 0xb65) { RETURN (true); }
+ if (val <= 0xaE5) { RETURN (true); }
+ RETURN (false);
+
+ case 0x0B:
+ if (val <= 0xB04) { RETURN (false); }
+ if (val <= 0xb3B) { RETURN (true); }
+ if (val == 0xb3d) { RETURN (true); }
+ if (val <= 0xb5B) { RETURN (false); }
+ if (val <= 0xb65) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val == 0xB71) { RETURN (true); }
- if (val == 0xB83) { RETURN (true); }
+ if (val == 0xB71) { RETURN (true); }
+ if (val == 0xB83) { RETURN (true); }
#endif
- if (val <= 0xb84) { RETURN (false); }
- if (val <= 0xbBB) { RETURN (true); }
- RETURN (false);
-
- case 0x0c:
- if (val <= 0xc04) { RETURN (false); }
- if (val <= 0xc3d) { RETURN (true); }
- if (val <= 0xc5f) { RETURN (false); }
- if (val <= 0xc65) { RETURN (true); }
- if (val <= 0xc84) { RETURN (false); }
+ if (val <= 0xb84) { RETURN (false); }
+ if (val <= 0xbBB) { RETURN (true); }
+ RETURN (false);
+
+ case 0x0c:
+ if (val <= 0xc04) { RETURN (false); }
+ if (val <= 0xc3d) { RETURN (true); }
+ if (val <= 0xc5f) { RETURN (false); }
+ if (val <= 0xc65) { RETURN (true); }
+ if (val <= 0xc84) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0xcbc) { RETURN (false); }
+ if (val == 0xcbc) { RETURN (false); }
#endif
- if (val <= 0xcbd) { RETURN (true); }
- if (val <= 0xcdc) { RETURN (false); }
- if (val <= 0xce5) { RETURN (true); }
- RETURN (false);
-
- case 0x0d:
- if (val <= 0xd04) { RETURN (false); }
- if (val <= 0xd3d) { RETURN (true); }
- if (val <= 0xd5f) { RETURN (false); }
- if (val <= 0xd65) { RETURN (true); }
- if (val <= 0xd84) { RETURN (false); }
- if (val <= 0xdc9) { RETURN (true); }
- RETURN (false);
-
- case 0x0E:
- if (val == 0xE31) { RETURN (false); }
- if (val <= 0xE33) { RETURN (true); }
- if (val <= 0xE3F) { RETURN (false); }
- if (val <= 0xE46) { RETURN (true); }
- if (val <= 0xE7f) { RETURN (false); }
- if (val <= 0xEb0) { RETURN (true); }
- if (val == 0xEb1) { RETURN (false); }
- if (val <= 0xEb3) { RETURN (true); }
- if (val <= 0xEbc) { RETURN (false); }
- if (val <= 0xEc7) { RETURN (true); }
- if (val <= 0xEdb) { RETURN (false); }
- RETURN (true);
-
- case 0x0F:
- if (val == 0xf00) { RETURN (true); }
- if (val <= 0xf3F) { RETURN (false); }
- if (val <= 0xf70) { RETURN (true); }
- if (val <= 0xf87) { RETURN (false); }
- if (val <= 0xf8f) { RETURN (true); }
- RETURN (false);
-
- case 0x10:
- if (val <= 0x102b) { RETURN (true); }
- if (val <= 0x104f) { RETURN (false); }
- if (val <= 0x1055) { RETURN (true); }
- if (val <= 0x109f) { RETURN (false); }
- if (val <= 0x10fa) { RETURN (true); }
- RETURN (false);
-
- case 0x11:
- case 0x12:
- RETURN (true);
-
- case 0x13:
- if (val <= 0x1360) { RETURN (true); }
- if (val <= 0x139f) { RETURN (false); }
- RETURN (true);
-
- case 0x14:
- case 0x15:
- RETURN (true);
-
- case 0x16:
- if (val == 0x166d) { RETURN (false); }
- if (val == 0x166e) { RETURN (false); }
- if (val == 0x1680) { RETURN (false); }
- if (val == 0x169b) { RETURN (false); }
- if (val == 0x169c) { RETURN (false); }
- if (val <= 0x16ea) { RETURN (true); }
- RETURN (false);
-
- case 0x17:
+ if (val <= 0xcbd) { RETURN (true); }
+ if (val <= 0xcdc) { RETURN (false); }
+ if (val <= 0xce5) { RETURN (true); }
+ RETURN (false);
+
+ case 0x0d:
+ if (val <= 0xd04) { RETURN (false); }
+ if (val <= 0xd3d) { RETURN (true); }
+ if (val <= 0xd5f) { RETURN (false); }
+ if (val <= 0xd65) { RETURN (true); }
+ if (val <= 0xd84) { RETURN (false); }
+ if (val <= 0xdc9) { RETURN (true); }
+ RETURN (false);
+
+ case 0x0E:
+ if (val == 0xE31) { RETURN (false); }
+ if (val <= 0xE33) { RETURN (true); }
+ if (val <= 0xE3F) { RETURN (false); }
+ if (val <= 0xE46) { RETURN (true); }
+ if (val <= 0xE7f) { RETURN (false); }
+ if (val <= 0xEb0) { RETURN (true); }
+ if (val == 0xEb1) { RETURN (false); }
+ if (val <= 0xEb3) { RETURN (true); }
+ if (val <= 0xEbc) { RETURN (false); }
+ if (val <= 0xEc7) { RETURN (true); }
+ if (val <= 0xEdb) { RETURN (false); }
+ RETURN (true);
+
+ case 0x0F:
+ if (val == 0xf00) { RETURN (true); }
+ if (val <= 0xf3F) { RETURN (false); }
+ if (val <= 0xf70) { RETURN (true); }
+ if (val <= 0xf87) { RETURN (false); }
+ if (val <= 0xf8f) { RETURN (true); }
+ RETURN (false);
+
+ case 0x10:
+ if (val <= 0x102b) { RETURN (true); }
+ if (val <= 0x104f) { RETURN (false); }
+ if (val <= 0x1055) { RETURN (true); }
+ if (val <= 0x109f) { RETURN (false); }
+ if (val <= 0x10fa) { RETURN (true); }
+ RETURN (false);
+
+ case 0x11:
+ case 0x12:
+ RETURN (true);
+
+ case 0x13:
+ if (val <= 0x1360) { RETURN (true); }
+ if (val <= 0x139f) { RETURN (false); }
+ RETURN (true);
+
+ case 0x14:
+ case 0x15:
+ RETURN (true);
+
+ case 0x16:
+ if (val == 0x166d) { RETURN (false); }
+ if (val == 0x166e) { RETURN (false); }
+ if (val == 0x1680) { RETURN (false); }
+ if (val == 0x169b) { RETURN (false); }
+ if (val == 0x169c) { RETURN (false); }
+ if (val <= 0x16ea) { RETURN (true); }
+ RETURN (false);
+
+ case 0x17:
#ifndef UNICODE_3_2
- if (val == 0x1712) { RETURN (false); }
- if (val == 0x1713) { RETURN (false); }
- if (val == 0x1714) { RETURN (false); }
- if (val == 0x1732) { RETURN (false); }
- if (val == 0x1733) { RETURN (false); }
- if (val == 0x1734) { RETURN (false); }
- if (val == 0x1735) { RETURN (false); }
- if (val == 0x1736) { RETURN (false); }
- if (val == 0x1752) { RETURN (false); }
- if (val == 0x1753) { RETURN (false); }
- if (val == 0x1772) { RETURN (false); }
- if (val == 0x1773) { RETURN (false); }
+ if (val == 0x1712) { RETURN (false); }
+ if (val == 0x1713) { RETURN (false); }
+ if (val == 0x1714) { RETURN (false); }
+ if (val == 0x1732) { RETURN (false); }
+ if (val == 0x1733) { RETURN (false); }
+ if (val == 0x1734) { RETURN (false); }
+ if (val == 0x1735) { RETURN (false); }
+ if (val == 0x1736) { RETURN (false); }
+ if (val == 0x1752) { RETURN (false); }
+ if (val == 0x1753) { RETURN (false); }
+ if (val == 0x1772) { RETURN (false); }
+ if (val == 0x1773) { RETURN (false); }
#endif
- if (val <= 0x17b3) { RETURN (true); }
+ if (val <= 0x17b3) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val == 0x17D7) { RETURN (true); }
- if (val == 0x17DC) { RETURN (true); }
+ if (val == 0x17D7) { RETURN (true); }
+ if (val == 0x17DC) { RETURN (true); }
#endif
- RETURN (false);
-
- case 0x18:
- if (val <= 0x181f) { RETURN (false); }
- if (val <= 0x18a8) { RETURN (true); }
- RETURN (false);
-
- case 0x19:
+ RETURN (false);
+
+ case 0x18:
+ if (val <= 0x181f) { RETURN (false); }
+ if (val <= 0x18a8) { RETURN (true); }
+ RETURN (false);
+
+ case 0x19:
#ifndef UNICODE_3_2
- if (val <= 0x191F) { RETURN (true); }
- if (val <= 0x194F) { RETURN (false); }
- if (val <= 0x197F) { RETURN (true); }
+ if (val <= 0x191F) { RETURN (true); }
+ if (val <= 0x194F) { RETURN (false); }
+ if (val <= 0x197F) { RETURN (true); }
#endif
- RETURN (false);
-
- case 0x1d:
- if (val == 0x1d00) { RETURN (true); }
- RETURN (false);
-
- case 0x1e:
- RETURN (true);
-
- case 0x1f:
- if (val <= 0x1fbc) { RETURN (true); }
- if (val == 0x1fbe) { RETURN (true); }
- if (val <= 0x1fc1) { RETURN (false); }
- if (val <= 0x1fcc) { RETURN (true); }
- if (val <= 0x1fcf) { RETURN (false); }
- if (val <= 0x1fdc) { RETURN (true); }
- if (val <= 0x1fdf) { RETURN (false); }
- if (val <= 0x1fec) { RETURN (true); }
- if (val <= 0x1ff1) { RETURN (false); }
- if (val <= 0x1ffc) { RETURN (true); }
- RETURN (false);
-
- case 0x20:
+ RETURN (false);
+
+ case 0x1d:
+ if (val <= 0x1d6B) { RETURN (true); }
+ RETURN (false);
+
+ case 0x1e:
+ RETURN (true);
+
+ case 0x1f:
+ if (val <= 0x1fbc) { RETURN (true); }
+ if (val == 0x1fbe) { RETURN (true); }
+ if (val <= 0x1fc1) { RETURN (false); }
+ if (val <= 0x1fcc) { RETURN (true); }
+ if (val <= 0x1fcf) { RETURN (false); }
+ if (val <= 0x1fdc) { RETURN (true); }
+ if (val <= 0x1fdf) { RETURN (false); }
+ if (val <= 0x1fec) { RETURN (true); }
+ if (val <= 0x1ff1) { RETURN (false); }
+ if (val <= 0x1ffc) { RETURN (true); }
+ RETURN (false);
+
+ case 0x20:
#ifndef UNICODE_3_2
- if (val == 0x2071) { RETURN (true); }
+ if (val == 0x2071) { RETURN (true); }
#endif
- if (val == 0x207f) { RETURN (true); }
- RETURN (false);
-
- case 0x21:
- if (val == 0x2102) { RETURN (true); }
- if (val == 0x2107) { RETURN (true); }
- if (val <= 0x2109) { RETURN (false); }
- if (val <= 0x2113) { RETURN (true); }
- if (val == 0x2115) { RETURN (true); }
- if (val <= 0x2118) { RETURN (false); }
- if (val <= 0x211d) { RETURN (true); }
- if (val <= 0x2123) { RETURN (false); }
- if (val == 0x2125) { RETURN (false); }
- if (val == 0x2127) { RETURN (false); }
- if (val == 0x2129) { RETURN (false); }
- if (val == 0x212E) { RETURN (false); }
- if (val == 0x2132) { RETURN (false); }
- if (val == 0x213A) { RETURN (false); }
+ if (val == 0x207f) { RETURN (true); }
+ RETURN (false);
+
+ case 0x21:
+ if (val == 0x2102) { RETURN (true); }
+ if (val == 0x2107) { RETURN (true); }
+ if (val <= 0x2109) { RETURN (false); }
+ if (val <= 0x2113) { RETURN (true); }
+ if (val == 0x2115) { RETURN (true); }
+ if (val <= 0x2118) { RETURN (false); }
+ if (val <= 0x211d) { RETURN (true); }
+ if (val <= 0x2123) { RETURN (false); }
+ if (val == 0x2125) { RETURN (false); }
+ if (val == 0x2127) { RETURN (false); }
+ if (val == 0x2129) { RETURN (false); }
+ if (val == 0x212E) { RETURN (false); }
+ if (val == 0x2132) { RETURN (false); }
+ if (val == 0x213A) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0x213B) { RETURN (false); }
- if (val <= 0x213F) { RETURN (true); }
- if (val <= 0x2144) { RETURN (false); }
- if (val == 0x214A) { RETURN (false); }
- if (val == 0x214B) { RETURN (false); }
+ if (val == 0x213B) { RETURN (false); }
+ if (val <= 0x213F) { RETURN (true); }
+ if (val <= 0x2144) { RETURN (false); }
+ if (val == 0x214A) { RETURN (false); }
+ if (val == 0x214B) { RETURN (false); }
#endif
- if (val <= 0x2152) { RETURN (true); }
- RETURN (false);
-
- case 0x30:
- if (val == 0x3005) { RETURN (true); }
- if (val == 0x3006) { RETURN (true); }
- if (val <= 0x3030) { RETURN (false); }
- if (val <= 0x3035) { RETURN (true); }
+ if (val <= 0x2152) { RETURN (true); }
+ RETURN (false);
+
+ case 0x30:
+ if (val == 0x3005) { RETURN (true); }
+ if (val == 0x3006) { RETURN (true); }
+ if (val <= 0x3030) { RETURN (false); }
+ if (val <= 0x3035) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val == 0x303B) { RETURN (true); }
- if (val == 0x303C) { RETURN (true); }
+ if (val == 0x303B) { RETURN (true); }
+ if (val == 0x303C) { RETURN (true); }
#endif
- if (val <= 0x3040) { RETURN (false); }
- if (val <= 0x3098) { RETURN (true); }
- if (val <= 0x309c) { RETURN (false); }
+ if (val <= 0x3040) { RETURN (false); }
+ if (val <= 0x3098) { RETURN (true); }
+ if (val <= 0x309c) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0x30A0) { RETURN (false); }
+ if (val == 0x30A0) { RETURN (false); }
#endif
- if (val == 0x30Fb) { RETURN (false); }
- RETURN ((true));
-
- case 0x31:
- if (val <= 0x318f) { RETURN (true); }
- if (val <= 0x319F) { RETURN (false); }
- RETURN ((true));
-
- case 0x34:
- RETURN ((true));
-
- case 0x4d:
- if (val <= 0x4DB4) { RETURN (false); }
+ if (val == 0x30Fb) { RETURN (false); }
+ RETURN ((true));
+
+ case 0x31:
+ if (val <= 0x318f) { RETURN (true); }
+ if (val <= 0x319F) { RETURN (false); }
+ RETURN ((true));
+
+ case 0x34:
+ RETURN ((true));
+
+ case 0x4d:
+ if (val <= 0x4DB4) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val <= 0x4DBF) { RETURN (true); }
- RETURN (false);
+ if (val <= 0x4DBF) { RETURN (true); }
+ RETURN (false);
#else
- RETURN (true);
+ RETURN (true);
#endif
- case 0x4e:
- RETURN ((true));
-
- case 0x9f:
- if (val <= 0x9fa4) { RETURN (false); }
- RETURN (true);
-
- case 0xA0:
- case 0xA1:
- case 0xA2:
- case 0xA3:
- RETURN (true);
-
- case 0xA4:
- if (val <= 0xa48f) { RETURN (true); }
- RETURN (false);
-
- case 0xA5:
- RETURN (true);
-
- case 0xAC:
- RETURN (true);
-
- case 0xD7:
- RETURN (true);
-
- case 0xF9:
- case 0xFA:
- RETURN (true);
-
- case 0xFB:
- if (val == 0xfb1e) { RETURN (false); }
- if (val == 0xfb29) { RETURN (false); }
- RETURN (true);
-
- case 0xFC:
- RETURN (true);
-
- case 0xFD:
- if (val <= 0xFD3d) { RETURN (true); }
- if (val <= 0xFD4F) { RETURN (false); }
+ case 0x4e:
+ RETURN ((true));
+
+ case 0x9f:
+ if (val <= 0x9fa4) { RETURN (false); }
+ RETURN (true);
+
+ case 0xA0:
+ case 0xA1:
+ case 0xA2:
+ case 0xA3:
+ RETURN (true);
+
+ case 0xA4:
+ if (val <= 0xa48f) { RETURN (true); }
+ RETURN (false);
+
+ case 0xA5:
+ RETURN (true);
+
+ case 0xAC:
+ RETURN (true);
+
+ case 0xD7:
+ RETURN (true);
+
+ case 0xF9:
+ case 0xFA:
+ RETURN (true);
+
+ case 0xFB:
+ if (val == 0xfb1e) { RETURN (false); }
+ if (val == 0xfb29) { RETURN (false); }
+ RETURN (true);
+
+ case 0xFC:
+ RETURN (true);
+
+ case 0xFD:
+ if (val <= 0xFD3d) { RETURN (true); }
+ if (val <= 0xFD4F) { RETURN (false); }
#ifndef UNICODE_3_2
- if (val == 0xFDFC) { RETURN (false); }
- if (val == 0xFDFD) { RETURN (false); }
+ if (val == 0xFDFC) { RETURN (false); }
+ if (val == 0xFDFD) { RETURN (false); }
#endif
- RETURN (true);
-
- case 0xFE:
+ RETURN (true);
+
+ case 0xFE:
#ifndef UNICODE_3_2
- if (val <= 0xFE0F) { RETURN (false); }
+ if (val <= 0xFE0F) { RETURN (false); }
#endif
- if (val <= 0xFE1f) { RETURN (true); }
- if (val <= 0xFE6F) { RETURN (false); }
- if (val <= 0xFEFE) { RETURN (true); }
- RETURN (false);
-
- case 0xFF:
- if (val <= 0xFF20) { RETURN (false); }
- if (val <= 0xFF3a) { RETURN (true); }
- if (val <= 0xFF40) { RETURN (false); }
- if (val <= 0xFF5a) { RETURN (true); }
- if (val <= 0xFF65) { RETURN (false); }
- if (val <= 0xFFdC) { RETURN (true); }
- RETURN (false);
-
- case 0x100:
+ if (val <= 0xFE1f) { RETURN (true); }
+ if (val <= 0xFE6F) { RETURN (false); }
+ if (val <= 0xFEFE) { RETURN (true); }
+ RETURN (false);
+
+ case 0xFF:
+ if (val <= 0xFF20) { RETURN (false); }
+ if (val <= 0xFF3a) { RETURN (true); }
+ if (val <= 0xFF40) { RETURN (false); }
+ if (val <= 0xFF5a) { RETURN (true); }
+ if (val <= 0xFF65) { RETURN (false); }
+ if (val <= 0xFFdC) { RETURN (true); }
+ RETURN (false);
+
+ case 0x100:
#ifndef UNICODE_3_2
- RETURN (true);
+ RETURN (true);
#else
- RETURN (false);
+ RETURN (false);
#endif
- case 0x103:
- if (val <= 0x1031f) { RETURN (true); }
- if (val <= 0x1032F) { RETURN (false); }
- if (val <= 0x10349) { RETURN (true); }
+ case 0x103:
+ if (val <= 0x1031f) { RETURN (true); }
+ if (val <= 0x1032F) { RETURN (false); }
+ if (val <= 0x10349) { RETURN (true); }
#ifndef UNICODE_3_2
- if (val <= 0x1037F) { RETURN (false); }
- if (val <= 0x1039E) { RETURN (true); }
+ if (val <= 0x1037F) { RETURN (false); }
+ if (val <= 0x1039E) { RETURN (true); }
#endif
- RETURN (false);
-
- case 0x104:
+ RETURN (false);
+
+ case 0x104:
#ifndef UNICODE_3_2
- if (val <= 0x1049F) { RETURN (true); }
- if (val <= 0x104aF) { RETURN (false); }
+ if (val <= 0x1049F) { RETURN (true); }
+ if (val <= 0x104aF) { RETURN (false); }
#endif
- RETURN (true);
-
- case 0x108:
+ RETURN (true);
+
+ case 0x108:
#ifndef UNICODE_3_2
- RETURN (true);
+ RETURN (true);
#else
- RETURN (false);
+ RETURN (false);
#endif
- case 0x1D4:
- case 0x1D5:
- RETURN (true);
-
- case 0x1D6:
- if (val == 0x1d6c1) { RETURN (false); }
- if (val == 0x1d6db) { RETURN (false); }
- if (val == 0x1d6fb) { RETURN (false); }
- RETURN (true);
+ case 0x1D4:
+ case 0x1D5:
+ RETURN (true);
+
+ case 0x1D6:
+ if (val == 0x1d6c1) { RETURN (false); }
+ if (val == 0x1d6db) { RETURN (false); }
+ if (val == 0x1d6fb) { RETURN (false); }
+ RETURN (true);
}
RETURN (false);
%}
--- a/Class.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Class.st Thu Jan 28 14:59:07 2016 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1662,7 +1664,7 @@
setClassFilename:aFilename
"set the classes filename.
This is a dangerous (low level) operation,
- since the comment and primitiveSpecs may no longer be accessable,
+ since the comment and primitiveSpecs may no longer be accessible,
if a wrong filename is set here."
|baseName|
@@ -5161,14 +5163,14 @@
"return my revision string; that one is extracted from the
classes #version method. Either this is a method returning that string,
or it's a comment-only method and the comment defines the version.
- If the receiver is unloaded, or the source is not accessable,
+ If the receiver is unloaded, or the source is not accessible,
or no such method exists, then nil is returned."
^ self revisionStringOfManager:nil
"
Smalltalk allClassesDo:[:cls |
- Transcript show:cls name; show:' -> '; showCR:cls revisionString
+ Transcript show:cls name; show:' -> '; showCR:cls revisionString
].
Number revisionString
@@ -5188,7 +5190,7 @@
"return my revision string; that one is extracted from the
classes #version method. Either this is a method returning that string,
or it's a comment-only method and the comment defines the version.
- If the receiver is unloaded, or the source is not accessable,
+ If the receiver is unloaded, or the source is not accessible,
or no such method exists, then nil is returned."
|owner versionMethod|
@@ -5197,13 +5199,13 @@
versionMethod := self findVersionMethodOfManager:aSourceCodeManagerOrNil.
versionMethod notNil ifTrue:[
- ^ versionMethod valueWithReceiver:(self theNonMetaclass) arguments:#()
+ ^ versionMethod valueWithReceiver:(self theNonMetaclass) arguments:#()
].
^ nil.
"
Smalltalk allClassesDo:[:cls |
- Transcript show:cls name; show:' -> '; showCR:cls revisionString
+ Transcript show:cls name; show:' -> '; showCR:cls revisionString
].
Number revisionString
--- a/ClassBuilder.st Tue Jan 26 14:56:53 2016 +0000
+++ b/ClassBuilder.st Thu Jan 28 14:59:07 2016 +0000
@@ -445,7 +445,7 @@
has to be taken, when changing an existing classes definition. In this
case, some or all of the methods and subclasses methods have to be
recompiled.
- Also, the old class(es) are still kept (but not accessable as a global),
+ Also, the old class(es) are still kept (but not accessible as a global),
to allow existing instances some life.
This might change in the future."
--- a/Context.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Context.st Thu Jan 28 14:59:07 2016 +0000
@@ -43,7 +43,7 @@
state of a method or block (i.e. its local variables, temporaries etc.)
Every message send adds a context to a chain, which can be traced back via
the sender field. The context of the currently active method is always
- accessable via the pseuodoVariable called 'thisContext'.
+ accessible via the pseuodoVariable called 'thisContext'.
The actual implementation uses the machines stack for this, building real
contexts on demand only, whenever a contexts is needed. Also, initially these are
allocated on the stack and only moved to the heap, when a context outlives its
@@ -107,58 +107,58 @@
[instance variables:]
- flags <SmallInteger> used by the VM; never touch.
- contains info about number of args,
- locals and temporaries.
-
- sender <Context> the 'calling / sending' context
- This is not directly accessable, since it may
- be a lazy context (i.e. an empty frame).
- The #sender method cares for this.
-
- home <Context> the context, where this block was
- created, or nil if its a method context
- There are also cheap blocks, which do
- not need a reference to the home context,
- for those, its nil too.
-
- receiver <Object> the receiver of this message
-
- selector <Symbol> the selector of this message
-
- searchClass <Class> the class, where the message lookup started
- (for super sends) or nil, for regular sends.
-
- lineNr <SmallInteger> the position where the context left off
- (kind of p-counter). Only the low 16bits
- are valid.
-
- retValTemp nil temporary - always nil, when you see the context
- (used in the VM as temporary)
-
- handle *noObject* used by the VM; not accessable, not an object
-
- method the corresponding method
-
- <indexed> arguments of the send followed by
- locals of the method/block followed by
- temporaries.
+ flags <SmallInteger> used by the VM; never touch.
+ contains info about number of args,
+ locals and temporaries.
+
+ sender <Context> the 'calling / sending' context
+ This is not directly accessible, since it may
+ be a lazy context (i.e. an empty frame).
+ The #sender method cares for this.
+
+ home <Context> the context, where this block was
+ created, or nil if its a method context
+ There are also cheap blocks, which do
+ not need a reference to the home context,
+ for those, its nil too.
+
+ receiver <Object> the receiver of this message
+
+ selector <Symbol> the selector of this message
+
+ searchClass <Class> the class, where the message lookup started
+ (for super sends) or nil, for regular sends.
+
+ lineNr <SmallInteger> the position where the context left off
+ (kind of p-counter). Only the low 16bits
+ are valid.
+
+ retValTemp nil temporary - always nil, when you see the context
+ (used in the VM as temporary)
+
+ handle *noObject* used by the VM; not accessible, not an object
+
+ method the corresponding method
+
+ <indexed> arguments of the send followed by
+ locals of the method/block followed by
+ temporaries.
[errors:]
- CannotReturnError raised when a block tries
- to return ('^') from a method context
- which itself has already returned
- (i.e. there is no place to return to)
+ CannotReturnError raised when a block tries
+ to return ('^') from a method context
+ which itself has already returned
+ (i.e. there is no place to return to)
WARNING: layout and size known by the compiler and runtime system - do not change.
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- Block Process Method
- ( contexts, stacks & unwinding : programming/contexts.html)
+ Block Process Method
+ ( contexts, stacks & unwinding : programming/contexts.html)
"
! !
--- a/Dictionary.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Dictionary.st Thu Jan 28 14:59:07 2016 +0000
@@ -89,16 +89,16 @@
examples
"
- [exBegin]
+ [exBegin]
|d|
d := Dictionary new.
d at:'1' put:'one'.
d at:2 put:'two'.
d at:2
- [exEnd]
-
- [exBegin]
+ [exEnd]
+
+ [exBegin]
|d|
d := Dictionary new.
@@ -106,24 +106,32 @@
d at:2 put:nil.
d.
d at:2
- [exEnd]
-
- [exBegin]
+ [exEnd]
+
+ [exBegin]
|d|
d := Dictionary new.
d at:'1' put:'one'.
d at:2 put:nil.
d includes:nil.
- [exEnd]
-
- [exBegin]
+ [exEnd]
+
+ [exBegin]
|d|
d := Dictionary new.
d at:'1' put:'one'.
d includes:nil.
- [exEnd]
+ [exEnd]
+ [exBegin]
+ |d1 d2|
+
+ d1 := Dictionary withKeys:#(a b c) andValues:#( 1 2 3).
+ d2 := Dictionary newFrom:d1.
+ d2.
+ [exEnd]
+
"
! !
@@ -218,11 +226,14 @@
newFrom:aCollectionOfAssociations
"return a new instance where associations are taken from the argument"
+ aCollectionOfAssociations isDictionary ifTrue:[
+ ^ self withAssociations:aCollectionOfAssociations associations
+ ].
^ self withAssociations:aCollectionOfAssociations
"
Dictionary newFrom:(Array with:#foo->#Foo
- with:#bar->#Bar)
+ with:#bar->#Bar)
"
! !
--- a/ExecutableFunction.st Tue Jan 26 14:56:53 2016 +0000
+++ b/ExecutableFunction.st Thu Jan 28 14:59:07 2016 +0000
@@ -53,7 +53,7 @@
[Instance variables:]
code <not_an_object> the function pointer to the machine code.
- Not accessable from smalltalk code.
+ Not accessible from smalltalk code.
(notice the '*' in the instVarNames definition)
--- a/False.st Tue Jan 26 14:56:53 2016 +0000
+++ b/False.st Thu Jan 28 14:59:07 2016 +0000
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libbasic' }"
+"{ NameSpace: Smalltalk }"
+
Boolean subclass:#False
instanceVariableNames:''
classVariableNames:''
@@ -56,6 +58,7 @@
! !
+
!False methodsFor:'conditional evaluation'!
and:aBlock
@@ -235,5 +238,6 @@
!False class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/False.st,v 1.28 2009-09-14 12:49:49 cg Exp $'
+ ^ '$Header$'
! !
+
--- a/FileStream.st Tue Jan 26 14:56:53 2016 +0000
+++ b/FileStream.st Thu Jan 28 14:59:07 2016 +0000
@@ -1940,7 +1940,7 @@
]
] on:OpenError do:[:ex|
"this happens, if after a restart,
- the file is no longer present or accessable ..."
+ the file is no longer present or accessible ..."
(self class name , ' [warning]: could not reopen file: ', pathName) errorPrintCR.
].
--- a/Filename.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Filename.st Thu Jan 28 14:59:07 2016 +0000
@@ -810,35 +810,35 @@
otherwise, '/tmp' is used. (at least on unix ...).
Notice: do not hardcode '/tmp' into your programs - things may be
- different on other operating systems. Also, the user may want to set the
- TMPDIR environment variable to have her temp files somewhere else."
+ different on other operating systems. Also, the user may want to set the
+ TMPDIR environment variable to have her temp files somewhere else."
|tempDir|
TempDirectory isNil ifTrue:[
- tempDir := self named:(self defaultTempDirectoryName pathName).
- tempDir exists ifFalse:[
- tempDir
- makeDirectory;
- addAccessRights:#(readUser readGroup readOthers
- writeUser writeGroup writeOthers
- executeUser executeGroup executeOthers
- removeOnlyByOwner).
- ].
- TempDirectory := DefaultTempDirectory := tempDir construct:'stx_tmp'.
+ tempDir := self named:(self defaultTempDirectoryName pathName).
+ tempDir exists ifFalse:[
+ tempDir
+ makeDirectory;
+ addAccessRights:#(readUser readGroup readOthers
+ writeUser writeGroup writeOthers
+ executeUser executeGroup executeOthers
+ removeOnlyByOwner).
+ ].
+ TempDirectory := DefaultTempDirectory := tempDir construct:'stx_tmp'.
].
"Make sure, that the TempDirectory exists - it might have been removed
by a cleanup (cron) job.
- Since it is shared between users, it must be accessable by all users."
+ Since it is shared between users, it must be accessible by all users."
TempDirectory exists ifFalse:[
- TempDirectory
- makeDirectory;
- addAccessRights:#(readUser readGroup readOthers
- writeUser writeGroup writeOthers
- executeUser executeGroup executeOthers
- removeOnlyByOwner).
+ TempDirectory
+ makeDirectory;
+ addAccessRights:#(readUser readGroup readOthers
+ writeUser writeGroup writeOthers
+ executeUser executeGroup executeOthers
+ removeOnlyByOwner).
].
^ TempDirectory
@@ -859,13 +859,13 @@
"set the default temporary directory.
This allows overwriting the automatically determined tmpDirectory
by a knowledgable stand alone startup program.
- Do not use elsewhere (and only if absolutely requried)"
+ Do not use elsewhere (and only if absolutely required)"
|temp|
aFilename isNil ifTrue:[
- TempDirectory := nil.
- ^ self.
+ TempDirectory := nil.
+ ^ self.
].
temp := aFilename asFilename.
@@ -2344,7 +2344,7 @@
The walk is breadth-first.
This excludes any entries for '.' or '..'.
Subdirectory files are included with a relative pathname.
- A proceedable exception is raised forn non-accessable directories.
+ A proceedable exception is raised forn non-accessible directories.
Warning: this may take a long time to execute (especially with deep and/or remote fileSystems)."
|fileNames dirNames p|
@@ -2352,27 +2352,27 @@
fileNames := OrderedCollection new.
dirNames := OrderedCollection new.
self directoryContentsDo:[:f | |t|
- t := self construct:f.
- t isDirectory ifTrue:[
- t isSymbolicLink ifFalse:[
- dirNames add:f
- ]
- ] ifFalse:[
- fileNames add:f
- ]
+ t := self construct:f.
+ t isDirectory ifTrue:[
+ t isSymbolicLink ifFalse:[
+ dirNames add:f
+ ]
+ ] ifFalse:[
+ fileNames add:f
+ ]
].
aPrefix size > 0 ifTrue:[
- p := aPrefix , self separator
+ p := aPrefix , self separator
] ifFalse:[
- p := ''
+ p := ''
].
fileNames do:[:aFile | aBlock value:(p , aFile)].
dirNames do:[:dN |
- aBlock value:(p , dN).
- (self construct:dN)
- recursiveDirectoryContentsDo:aBlock directoryPrefix:(p , dN)
+ aBlock value:(p , dN).
+ (self construct:dN)
+ recursiveDirectoryContentsDo:aBlock directoryPrefix:(p , dN)
].
"
--- a/Integer.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Integer.st Thu Jan 28 14:59:07 2016 +0000
@@ -4344,6 +4344,11 @@
(self \\ p) == 0 ifTrue:[ ^ false ].
].
+ PrimeNumberGenerator notNil ifTrue:[ "from exept:libcrypt"
+ "speed up a lot for large primes"
+ ^ PrimeNumberGenerator isPrime:self.
+ ].
+
(firstFewPrimes last+2) to:limit by:2 do:[:i |
(self \\ i) == 0 ifTrue:[ ^ false ].
].
@@ -4496,6 +4501,7 @@
"Created: / 09-01-2012 / 17:18:06 / cg"
! !
+
!Integer methodsFor:'special modulo arithmetic'!
add_32:anInteger
@@ -5148,21 +5154,30 @@
!Integer::ModuloNumber methodsFor:'arithmetic'!
-modulusOf:aNumber
+modulusOf:dividend
"compute the aNumber modulo myself.
The shortcut works only, if aNumber is < modulo * modulo
(When doing arithmethic modulo something).
Otherwise do it the long way"
- |e t cnt|
+ |e t cnt abs isNegative|
+
+ isNegative := dividend negative.
+ isNegative ifTrue:[
+ abs := dividend negated.
+ ] ifFalse:[
+ abs := dividend.
+ ].
+
+"/ self assert:aNumber < (modulus * modulus)
"throw off low nbits(modulus)"
- e := aNumber bitShift:shift.
+ e := abs bitShift:shift.
e := e * reciprocal.
e := e bitShift:shift.
e := e * modulus.
- e := aNumber - e.
+ e := abs - e.
"this subtract is done max 2 times"
cnt := 2.
@@ -5174,6 +5189,9 @@
].
cnt := cnt - 1.
].
+ isNegative ifTrue:[
+ ^ modulus - e.
+ ].
^ e.
"
--- a/LargeInteger.st Tue Jan 26 14:56:53 2016 +0000
+++ b/LargeInteger.st Thu Jan 28 14:59:07 2016 +0000
@@ -2775,22 +2775,22 @@
shift "{ Class: SmallInteger }" |
anInteger == 0 ifTrue:[
- ^ ZeroDivide raiseRequestWith:thisContext
+ ^ ZeroDivide raiseRequestWith:thisContext
].
self = anInteger ifTrue:[
- ^ Array with:1 with:0
+ ^ Array with:1 with:0
].
shift := self highBit - anInteger highBit.
dividend := self class digitBytes:digitByteArray copy. "/ self simpleDeepCopy sign:1.
shift < 0 ifTrue:[
- ^ Array with:0 with:dividend compressed.
+ ^ Array with:0 with:dividend compressed.
].
shift == 0 ifTrue:[
- divisor := self class digitBytes:(anInteger digitBytes copy). "/ anInteger simpleDeepCopy.
+ divisor := self class digitBytes:(anInteger digitBytes copy). "/ anInteger simpleDeepCopy.
] ifFalse:[
- divisor := anInteger bitShift:shift.
+ divisor := anInteger bitShift:shift.
].
quo := self class basicNew numberOfDigits:((shift // 8) + 1).
@@ -2798,14 +2798,14 @@
shift := shift + 1.
[shift > 0] whileTrue:[
- (dividend absLess:divisor) ifFalse:[
- digits bitSetAt:shift.
- (dividend absSubtract: divisor) ifFalse:[ "result == 0"
- ^ Array with:quo compressed with:dividend compressed
- ].
- ].
- shift := shift - 1.
- divisor div2.
+ (dividend absLess:divisor) ifFalse:[
+ digits bitSetAt:shift.
+ (dividend absSubtract: divisor) ifFalse:[ "result == 0"
+ ^ Array with:quo compressed with:0
+ ].
+ ].
+ shift := shift - 1.
+ divisor div2.
].
^ Array with:quo compressed with:dividend compressed
@@ -2814,6 +2814,7 @@
Time millisecondsToRun:[ 10000 timesRepeat:[ 16000000000 absDivMod:3000000000] ]
16000000000 absDivMod:4000000000
16000000000 absDivMod:3000000000
+ 160000000000000000000000 absDivMod:160000000000000000000000
"
"Modified: / 5.11.1996 / 18:40:24 / cg"
@@ -4100,34 +4101,34 @@
shift "{ Class: SmallInteger }" |
anInteger == 0 ifTrue:[
- ^ ZeroDivide raiseRequestWith:thisContext
+ ^ ZeroDivide raiseRequestWith:thisContext
].
self = anInteger ifTrue:[
- ^ 0
+ ^ 0
].
shift := self highBit - anInteger highBit.
dividend := self class digitBytes:digitByteArray copy. "/ self simpleDeepCopy sign:1.
shift < 0 ifTrue:[
- ^ dividend compressed.
+ ^ dividend compressed.
].
shift == 0 ifTrue:[
- divisor := LargeInteger digitBytes:(anInteger digitBytes copy). "/ anInteger simpleDeepCopy
+ divisor := LargeInteger digitBytes:(anInteger digitBytes copy). "/ anInteger simpleDeepCopy
] ifFalse:[
- divisor := anInteger bitShift:shift.
+ divisor := anInteger bitShift:shift.
].
shift := shift + 1.
[shift > 0] whileTrue:[
- (dividend absLess:divisor) ifFalse:[
- (dividend absSubtract: divisor) ifFalse:[ "result == 0"
- ^ dividend compressed
- ].
- ].
- shift := shift - 1.
- divisor div2.
+ (dividend absLess:divisor) ifFalse:[
+ (dividend absSubtract: divisor) ifFalse:[ "result == 0"
+ ^ 0
+ ].
+ ].
+ shift := shift - 1.
+ divisor div2.
].
^ dividend compressed
@@ -4137,6 +4138,7 @@
Time millisecondsToRun:[ 10000 timesRepeat:[ 16000000001 absDivMod:4000000001] ]
16000000000 absMod:4000000000
16000000000 absMod:3000000000
+ 16000000000000000000 absMod:16000000000000000000
"
"Modified: / 5.11.1996 / 18:40:24 / cg"
--- a/Metaclass.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Metaclass.st Thu Jan 28 14:59:07 2016 +0000
@@ -111,6 +111,8 @@
"Modified: 23.4.1996 / 15:59:44 / cg"
! !
+
+
!Metaclass methodsFor:'Compatibility-ST80'!
comment:aString
@@ -129,7 +131,6 @@
"Created: / 1.11.1997 / 13:16:45 / cg"
! !
-
!Metaclass methodsFor:'autoload check'!
isLoaded
@@ -301,23 +302,23 @@
!
name:newName inEnvironment:aNameSpaceOrOwningClass
- subclassOf:aClass
- instanceVariableNames:stringOfInstVarNames
- variable:variableBoolean
- words:wordsBoolean
- pointers:pointersBoolean
- classVariableNames:stringOfClassVarNames
- poolDictionaries:stringOfPoolNames
- category:categoryString
- comment:commentString
- changed:changed
- classInstanceVariableNames:stringOfClassInstVarNamesOrNil
+ subclassOf:aClass
+ instanceVariableNames:stringOfInstVarNames
+ variable:variableBoolean
+ words:wordsBoolean
+ pointers:pointersBoolean
+ classVariableNames:stringOfClassVarNames
+ poolDictionaries:stringOfPoolNames
+ category:categoryString
+ comment:commentString
+ changed:changed
+ classInstanceVariableNames:stringOfClassInstVarNamesOrNil
"this is the main workhorse for installing new classes - special care
has to be taken, when changing an existing classes definition. In this
case, some or all of the methods and subclasses methods have to be
recompiled.
- Also, the old class(es) are still kept (but not accessable as a global),
+ Also, the old class(es) are still kept (but not accessible as a global),
to allow existing instances some life.
This might change in the future.
"
@@ -325,18 +326,18 @@
builder := self newClassBuilder.
builder name:newName
- inEnvironment:aNameSpaceOrOwningClass
- subclassOf:aClass
- instanceVariableNames:stringOfInstVarNames
- variable:variableBoolean
- words:wordsBoolean
- pointers:pointersBoolean
- classVariableNames:stringOfClassVarNames
- poolDictionaries:stringOfPoolNames
- category:categoryString
- comment:commentString
- changed:changed
- classInstanceVariableNames:stringOfClassInstVarNamesOrNil.
+ inEnvironment:aNameSpaceOrOwningClass
+ subclassOf:aClass
+ instanceVariableNames:stringOfInstVarNames
+ variable:variableBoolean
+ words:wordsBoolean
+ pointers:pointersBoolean
+ classVariableNames:stringOfClassVarNames
+ poolDictionaries:stringOfPoolNames
+ category:categoryString
+ comment:commentString
+ changed:changed
+ classInstanceVariableNames:stringOfClassInstVarNamesOrNil.
^ builder buildClass.
!
--- a/OrderedDictionary.st Tue Jan 26 14:56:53 2016 +0000
+++ b/OrderedDictionary.st Thu Jan 28 14:59:07 2016 +0000
@@ -65,7 +65,7 @@
I am a subclass of Dictionary whose elements (associations) are ordered in a
similar fashion to OrderedCollection.
That is, while being filled via #at:put: messages (or similar Dictionary protocol),
- the order in which associations are added, is remembered and accessable via the #atIndex:
+ the order in which associations are added, is remembered and accessible via the #atIndex:
or #order messages.
I have one instance variable:
--- a/PeekableStream.st Tue Jan 26 14:56:53 2016 +0000
+++ b/PeekableStream.st Thu Jan 28 14:59:07 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
@@ -416,7 +414,7 @@
(in theory) create readers for any syntax.
"
- |aString sawExcla rslt done compiler|
+ |aString sawExcla rslt done compiler lastClass|
self skipSeparators.
self atEnd ifFalse:[
@@ -426,8 +424,7 @@
"/ handle empty chunks;
"/ this allows for Squeak code to be filedIn
"/
- [aString size == 0
- and:[self atEnd not]] whileTrue:[
+ [aString size == 0 and:[self atEnd not]] whileTrue:[
aString := self nextChunk.
].
aString size ~~ 0 ifTrue:[
@@ -441,6 +438,11 @@
sawExcla ifFalse:[
"/ class definition chunks, etc., which are simply evaluated
rslt := compiler evaluate:aString receiver:someone notifying:someone compile:false.
+ rslt isBehavior ifTrue:[
+ lastClass := rslt
+ ] ifFalse:[
+ lastClass := nil
+ ].
] ifTrue:[
"/ methodsFor chunks, etc., which generate a reader
(Smalltalk at:#Compiler) emptySourceNotificationSignal handle:[:ex |
@@ -469,12 +471,20 @@
done := (aString size == 0).
]
] ifFalse:[
- rslt := rslt
+ Class packageQuerySignal handle:[:ex |
+ lastClass notNil ifTrue:[
+ ex proceedWith:lastClass package
+ ] ifFalse:[
+ ex reject
+ ].
+ ] do:[
+ rslt := rslt
fileInFrom:self
notifying:someone
passChunk:passChunk
single:false
silent:beSilent
+ ].
]
]
]
--- a/Point.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Point.st Thu Jan 28 14:59:07 2016 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -44,20 +42,20 @@
an extent (of a rectangle, for example), in which case my x-coordinate
represents the width, and y-coordinate the height of something.
- The x and y coordinate are usually numbers.
+ The x and y coordinates are usually numbers.
[Instance variables:]
- x <Number> the x-coordinate of myself
- y <Number> the y-coordinate of myself
+ x <Number> the x-coordinate of myself
+ y <Number> the y-coordinate of myself
[author:]
- Claus Gittinger
+ Claus Gittinger
[see also:]
- Rectangle Polygon
- LayoutOrigin LayoutFrame AlignmentOrigin Layout
- View GraphicsContext
+ Rectangle Polygon
+ LayoutOrigin LayoutFrame AlignmentOrigin Layout
+ View GraphicsContext
"
! !
--- a/Smalltalk.st Tue Jan 26 14:56:53 2016 +0000
+++ b/Smalltalk.st Thu Jan 28 14:59:07 2016 +0000
@@ -5533,36 +5533,36 @@
dirName := dir physicalPathName. "take care of symbolic links"
(dirsConsulted includes:dirName) ifTrue:[
- ^ self
+ ^ self
].
(dir / 'NOPACKAGES') exists ifTrue:[
- ^ self.
+ ^ self.
].
(dir / 'NOSUBAUTOLOAD') exists ifTrue:[
- ^ self.
+ ^ self.
].
maxLevels == 0 ifTrue:[
- Transcript showCR:('Autoload: max directory nesting reached in %1' bindWith:dir pathName).
- ^ self
+ Transcript showCR:('Autoload: max directory nesting reached in %1' bindWith:dir pathName).
+ ^ self
].
dirsConsulted add:dirName.
noAutoloadHere := noAutoloadIn.
noAutoloadHere ifFalse:[
- (dir / 'NOAUTOLOAD') exists ifTrue:[
- noAutoloadHere := true.
- ].
+ (dir / 'NOAUTOLOAD') exists ifTrue:[
+ noAutoloadHere := true.
+ ].
] ifTrue:[
- (dir / 'AUTOLOAD') exists ifTrue:[
- noAutoloadHere := false.
- ].
+ (dir / 'AUTOLOAD') exists ifTrue:[
+ noAutoloadHere := false.
+ ].
].
showSplashInLevels >= 0 ifTrue:[
- self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...'
- bindWith:(dirName contractAtBeginningTo:35)).
+ self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...'
+ bindWith:(dirName contractAtBeginningTo:35)).
].
"/
@@ -5571,74 +5571,74 @@
"/
haveAbbrevDotSTC := false.
noAutoloadHere ifFalse:[
- [
- self installAutoloadedClassesFromAbbrevFile:(dir / 'abbrev.stc').
- haveAbbrevDotSTC := true.
- ] on:FileStream openErrorSignal
- do:[:ex|
- "ignore this file"
- ].
+ [
+ self installAutoloadedClassesFromAbbrevFile:(dir / 'abbrev.stc').
+ haveAbbrevDotSTC := true.
+ ] on:FileStream openErrorSignal
+ do:[:ex|
+ "ignore this file"
+ ].
].
[
- directoryContents := dir directoryContents.
+ directoryContents := dir directoryContents.
] on:FileStream openErrorSignal do:[:ex|
- "non-accessable directory: we are done"
- ^ self
+ "non-accessible directory: we are done"
+ ^ self
].
directoryContents := directoryContents select:[:fn | (fn startsWith:'.') not] as:Set.
directoryContents removeAllFoundIn:#(
- 'objbc' 'objvc' 'objmingw'
- 'doc'
- 'CVS'
- 'bitmaps'
- 'resources'
- 'source'
- 'not_delivered'
- 'not_ported'
- ).
+ 'objbc' 'objvc' 'objmingw'
+ 'doc'
+ 'CVS'
+ 'bitmaps'
+ 'resources'
+ 'source'
+ 'not_delivered'
+ 'not_ported'
+ ).
dir baseName = 'stx' ifTrue:[
- directoryContents removeAllFoundIn:#(
- 'configurations'
- 'include'
- 'rules'
- 'stc'
- 'support'
- ).
+ directoryContents removeAllFoundIn:#(
+ 'configurations'
+ 'include'
+ 'rules'
+ 'stc'
+ 'support'
+ ).
].
directoryContents do:[:eachFilenameString |
- |f|
-
- f := dir / eachFilenameString.
- f isDirectory ifTrue:[
- self
- recursiveInstallAutoloadedClassesFrom:f
- rememberIn:dirsConsulted
- maxLevels:maxLevels-1
- noAutoload:noAutoloadHere
- packageTop:packageTopPath
- showSplashInLevels:showSplashInLevels - 1.
- ] ifFalse:[
- (noAutoloadHere not and:[haveAbbrevDotSTC not]) ifTrue:[
- f suffix = 'st' ifTrue:[
- [
- self installAutoloadedClassFromSourceFile:f.
- f directory baseName = 'libbasic' ifTrue:[self halt].
- ] on:FileStream openErrorSignal do:[:ex|
- "ignore this file, but write a warning"
- Transcript showCR:('Autoload: cannot install %1. (%2)' bindWith:f pathName with:ex description).
- ].
- ]
- ].
- ]
+ |f|
+
+ f := dir / eachFilenameString.
+ f isDirectory ifTrue:[
+ self
+ recursiveInstallAutoloadedClassesFrom:f
+ rememberIn:dirsConsulted
+ maxLevels:maxLevels-1
+ noAutoload:noAutoloadHere
+ packageTop:packageTopPath
+ showSplashInLevels:showSplashInLevels - 1.
+ ] ifFalse:[
+ (noAutoloadHere not and:[haveAbbrevDotSTC not]) ifTrue:[
+ f suffix = 'st' ifTrue:[
+ [
+ self installAutoloadedClassFromSourceFile:f.
+ f directory baseName = 'libbasic' ifTrue:[self halt].
+ ] on:FileStream openErrorSignal do:[:ex|
+ "ignore this file, but write a warning"
+ Transcript showCR:('Autoload: cannot install %1. (%2)' bindWith:f pathName with:ex description).
+ ].
+ ]
+ ].
+ ]
].
showSplashInLevels >= 0 ifTrue:[
- self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...'
- bindWith:(dirName contractAtBeginningTo:35)).
+ self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...'
+ bindWith:(dirName contractAtBeginningTo:35)).
].
"
@@ -6990,28 +6990,29 @@
"search for a particular package; return its directory, or nil.
Stand alone applications might get nil, if there are only binaries installed."
- |checkForPackageDirectory module packageSubDirectory|
-
- module := aPackageID asPackageId module.
- packageSubDirectory := aPackageID asPackageId directory.
+ |packageId checkForPackageDirectory module packageSubDirectory|
+
+ packageId := aPackageID asPackageId.
+ module := packageId module.
+ packageSubDirectory := packageId directory.
checkForPackageDirectory :=
- [:moduleDir |
- |packageDir|
-
- moduleDir isDirectory ifTrue:[
- packageDir := moduleDir / packageSubDirectory.
- packageDir isDirectory ifTrue:[
- ^ packageDir
- ]
- ].
- ].
+ [:moduleDir |
+ |packageDir|
+
+ moduleDir isDirectory ifTrue:[
+ packageDir := moduleDir / packageSubDirectory.
+ packageDir isDirectory ifTrue:[
+ ^ packageDir
+ ]
+ ].
+ ].
self packagePath do:[:aPath |
- |moduleDir|
-
- moduleDir := aPath asFilename / module.
- checkForPackageDirectory value:moduleDir.
+ |moduleDir|
+
+ moduleDir := aPath asFilename / module.
+ checkForPackageDirectory value:moduleDir.
].
^ nil
@@ -7530,40 +7531,40 @@
maxLevels == 0 ifTrue:[
"/ 'Smalltalk [warning]: max directory nesting reached.' infoPrintCR.
- ^ self
+ ^ self
].
dir := aDirectory asFilename.
dir exists ifFalse:[^ self].
[
- abbrevStream := (dir / 'abbrev.stc') asFilename readStream.
- self readAbbreviationsFromStream:abbrevStream.
- abbrevStream close.
+ abbrevStream := (dir / 'abbrev.stc') asFilename readStream.
+ self readAbbreviationsFromStream:abbrevStream.
+ abbrevStream close.
] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
[
- directoryContents := dir directoryContents.
+ directoryContents := dir directoryContents.
] on:FileStream openErrorSignal do:[:ex|
- "non-accessable directory: we are done"
- ^ self
+ "non-accessible directory: we are done"
+ ^ self
].
directoryContents do:[:aFilename |
- |f|
-
- (#(
- 'doc'
- 'CVS'
- 'bitmaps'
- 'resources'
- 'source'
- ) includes:aFilename) ifFalse:[
- f := dir / aFilename.
- f isDirectory ifTrue:[
- self recursiveReadAllAbbreviationsFrom:f maxLevels:maxLevels-1
- ]
- ].
+ |f|
+
+ (#(
+ 'doc'
+ 'CVS'
+ 'bitmaps'
+ 'resources'
+ 'source'
+ ) includes:aFilename) ifFalse:[
+ f := dir / aFilename.
+ f isDirectory ifTrue:[
+ self recursiveReadAllAbbreviationsFrom:f maxLevels:maxLevels-1
+ ]
+ ].
].
!
--- a/mingwmake.bat Tue Jan 26 14:56:53 2016 +0000
+++ b/mingwmake.bat Thu Jan 28 14:59:07 2016 +0000
@@ -4,10 +4,7 @@
@REM do not edit - automatically generated from ProjectDefinition
@REM -------
@SET DEFINES=
-
-@pushd ..\rules
-@call find_mingw.bat
-@popd
+@call ..\rules\find_mingw.bat
make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*