Changeset 778
- Timestamp:
- 07/02/08 17:10:14 (2 months ago)
- Files:
-
- branches/phobos-1.x/phobos/internal/adi.d (modified) (3 diffs)
- branches/phobos-1.x/phobos/internal/arraydouble.d (added)
- branches/phobos-1.x/phobos/internal/arrayfloat.d (added)
- branches/phobos-1.x/phobos/internal/arrayreal.d (added)
- branches/phobos-1.x/phobos/internal/gc/win32.mak (modified) (2 diffs)
- branches/phobos-1.x/phobos/std.ddoc (modified) (1 diff)
- branches/phobos-1.x/phobos/std/boxer.d (modified) (1 diff)
- branches/phobos-1.x/phobos/std/format.d (modified) (6 diffs)
- branches/phobos-1.x/phobos/std/stream.d (modified) (2 diffs)
- branches/phobos-1.x/phobos/std/traits.d (modified) (1 diff)
- branches/phobos-1.x/phobos/std/windows/iunknown.d (modified) (1 diff)
- branches/phobos-1.x/phobos/std/zip.d (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/phobos-1.x/phobos/internal/adi.d
r303 r778 463 463 /*************************************** 464 464 * Support for array equality test. 465 * Returns: 466 * 1 equal 467 * 0 not equal 465 468 */ 466 469 … … 491 494 } 492 495 return 1; // equal 496 } 497 498 extern (C) int _adEq2(Array a1, Array a2, TypeInfo ti) 499 { 500 //printf("_adEq2(a1.length = %d, a2.length = %d)\n", a1.length, a2.length); 501 if (a1.length != a2.length) 502 return 0; // not equal 503 if (!ti.equals(&a1, &a2)) 504 return 0; 505 return 1; 493 506 } 494 507 … … 583 596 return 0; 584 597 return (a1.length > a2.length) ? 1 : -1; 598 } 599 600 extern (C) int _adCmp2(Array a1, Array a2, TypeInfo ti) 601 { 602 //printf("_adCmp2(a1.length = %d, a2.length = %d)\n", a1.length, a2.length); 603 return ti.compare(&a1, &a2); 585 604 } 586 605 branches/phobos-1.x/phobos/internal/gc/win32.mak
r295 r778 3 3 4 4 #DMD=..\..\..\dmd 5 DMD= \dmd\bin\dmd5 DMD=dmd 6 6 7 7 #DFLAGS=-unittest -g -release … … 36 36 SRC= gc.d gcold.d gcx.d gcbits.d win32.d gclinux.d testgc.d win32.mak linux.mak 37 37 38 dmgc.lib : $(OBJS) win32.mak 39 del dmgc.lib 40 lib dmgc /c/noi +gc+gcold+gcx+gcbits+win32; 38 #dmgc.lib : $(OBJS) win32.mak 39 # del dmgc.lib 40 # lib dmgc /c/noi +gc+gcold+gcx+gcbits+win32; 41 42 dmgc.lib : gc.d gcold.obj gcx.d gcbits.d win32.d 43 $(DMD) $(DFLAGS) -I..\.. -lib -ofdmgc.lib gc.d gcold.obj gcx.d gcbits.d win32.d 41 44 42 45 gc.obj : gc.d branches/phobos-1.x/phobos/std.ddoc
r547 r778 188 188 RPAREN = ) 189 189 LPAREN = ( 190 BUGZILLA = $(LINK2 http://d.puremagic.com/issues/show_bug.cgi?id=$0, Bugzilla $0) 190 191 FOO=$0 191 192 branches/phobos-1.x/phobos/std/boxer.d
r311 r778 54 54 * License: 55 55 * Public Domain 56 * Bugs: 57 * $(UL 58 * $(LI $(BUGZILLA 309)) 59 * $(LI $(BUGZILLA 1968)) 60 * ) 56 61 * Macros: 57 62 * WIKI=Phobos/StdBoxer branches/phobos-1.x/phobos/std/format.d
r310 r778 78 78 } 79 79 80 this( char[]msg)80 this(string msg) 81 81 { 82 82 super("std.format " ~ msg); … … 503 503 int prepad = 0; 504 504 int postpad = 0; 505 int padding = field_width - (strlen(prefix) + s.length);505 int padding = field_width - (strlen(prefix) + toUCSindex(s, s.length)); 506 506 if (padding > 0) 507 507 { … … 867 867 case Mangle.Tchar: 868 868 LarrayChar: 869 s = va_arg!( char[])(argptr);869 s = va_arg!(string)(argptr); 870 870 goto Lputstr; 871 871 872 872 case Mangle.Twchar: 873 873 LarrayWchar: 874 wchar[] sw = va_arg!(w char[])(argptr);874 wchar[] sw = va_arg!(wstring)(argptr); 875 875 s = toUTF8(sw); 876 876 goto Lputstr; … … 878 878 case Mangle.Tdchar: 879 879 LarrayDchar: 880 dchar[] sd = va_arg!(d char[])(argptr);880 dchar[] sd = va_arg!(dstring)(argptr); 881 881 s = toUTF8(sd); 882 882 Lputstr: … … 1107 1107 { 1108 1108 case Mangle.Tchar: 1109 fmt = va_arg!( char[])(argptr);1109 fmt = va_arg!(string)(argptr); 1110 1110 break; 1111 1111 1112 1112 case Mangle.Twchar: 1113 wfmt = va_arg!(w char[])(argptr);1113 wfmt = va_arg!(wstring)(argptr); 1114 1114 fmt = toUTF8(wfmt); 1115 1115 break; 1116 1116 1117 1117 case Mangle.Tdchar: 1118 dfmt = va_arg!(d char[])(argptr);1118 dfmt = va_arg!(dstring)(argptr); 1119 1119 fmt = toUTF8(dfmt); 1120 1120 break; … … 1556 1556 r = std.string.format(">%14d<, ", 15, [1,2,3]); 1557 1557 assert(r == "> 15<, [1,2,3]"); 1558 1559 assert(std.string.format("%8s", "bar") == " bar"); 1560 assert(std.string.format("%8s", "b\u00e9ll\u00f4") == " b\u00e9ll\u00f4"); 1558 1561 } 1559 1562 branches/phobos-1.x/phobos/std/stream.d
r546 r778 2417 2417 em.position(0); 2418 2418 static ubyte[12] x3 = [1,2,3,4,5,6,7,8,9,10,11,12]; 2419 em.fixBO(x3 ,12);2419 em.fixBO(x3.ptr,12); 2420 2420 if (std.system.endian == Endian.LittleEndian) { 2421 2421 assert( x3[0] == 12 ); … … 2441 2441 assert( m.data[1] == 0x55 ); 2442 2442 em.position(0); 2443 em.fixBO(x3 ,12);2443 em.fixBO(x3.ptr,12); 2444 2444 if (std.system.endian == Endian.BigEndian) { 2445 2445 assert( x3[0] == 12 ); branches/phobos-1.x/phobos/std/traits.d
r295 r778 136 136 static if (is(typeof(T.length))) 137 137 { 138 static if (!is( typeof(T)== typeof(T.init)))138 static if (!is(T == typeof(T.init))) 139 139 { // abuses the fact that int[5].init == int 140 140 static if (is(T == typeof(T[0])[inst.length])) branches/phobos-1.x/phobos/std/windows/iunknown.d
r295 r778 3 3 4 4 private import std.c.windows.windows; 5 6 pragma(lib, "uuid.lib"); 5 7 6 8 alias int HRESULT; branches/phobos-1.x/phobos/std/zip.d
r295 r778 1 // Written in the D programming language. 1 2 2 3 /** … … 10 11 * $(LI Only supports compression modes 0 (no compression) and 8 (deflate).) 11 12 * $(LI Does not support encryption.) 13 * $(LI $(BUGZILLA 592)) 14 * $(LI $(BUGZILLA 1832)) 15 * $(LI $(BUGZILLA 2137)) 16 * $(LI $(BUGZILLA 2138)) 12 17 * ) 13 18 * … … 28 33 class ZipException : Exception 29 34 { 30 this( char[]msg)35 this(string msg) 31 36 { 32 37 super("ZipException: " ~ msg); … … 58 63 * name[]. Do not change without removing member from the directory first. 59 64 */ 60 char[]name;65 string name; 61 66 62 67 ubyte[] extra; /// Read/Write: extra data for this member. 63 char[]comment; /// Read/Write: comment associated with this member.68 string comment; /// Read/Write: comment associated with this member. 64 69 ubyte[] compressedData; /// Read Only: data of member in compressed form. 65 70 ubyte[] expandedData; /// Read/Write: data of member in uncompressed form. … … 98 103 uint numEntries; /// Read Only: number of ArchiveMembers in the directory. 99 104 uint totalEntries; /// Read Only: same as totalEntries. 100 char[]comment; /// Read/Write: the archive comment. Must be less than 65536 bytes in length.105 string comment; /// Read/Write: the archive comment. Must be less than 65536 bytes in length. 101 106 102 107 /** … … 112 117 * -------------------- 113 118 */ 114 ArchiveMember[ char[]] directory;119 ArchiveMember[string] directory; 115 120 116 121 debug (print) … … 317 322 if (i + 22 + endcommentlength > data.length) 318 323 continue; 319 comment = cast( char[])data[i + 22 .. i + 22 + endcommentlength];324 comment = cast(string)(data[i + 22 .. i + 22 + endcommentlength]); 320 325 endrecOffset = i; 321 326 break; … … 378 383 throw new ZipException("invalid directory entry 2"); 379 384 380 de.name = cast( char[])data[i .. i + namelen];385 de.name = cast(string)(data[i .. i + namelen]); 381 386 i += namelen; 382 387 de.extra = data[i .. i + extralen]; 383 388 i += extralen; 384 de.comment = cast( char[])data[i .. i + commentlen];389 de.comment = cast(string)(data[i .. i + commentlen]); 385 390 i += commentlen; 386 391
