diff -uNr dmd-0.112/dmd/html/d/changelog.html dmd-0.113/dmd/html/d/changelog.html --- dmd-0.112/dmd/html/d/changelog.html 2005-01-27 01:03:32.000000000 +0100 +++ dmd-0.113/dmd/html/d/changelog.html 2005-02-13 10:34:24.000000000 +0100 @@ -24,6 +24,7 @@
+

+ What's New for + D 0.113 +

+ +Feb 12, 2005 +

+ +

New/Changed Features

+ + +

Bugs Fixed

+ + +

What's New for D 0.112 diff -uNr dmd-0.112/dmd/html/d/comparison.html dmd-0.113/dmd/html/d/comparison.html --- dmd-0.112/dmd/html/d/comparison.html 2004-11-08 00:58:00.000000000 +0100 +++ dmd-0.113/dmd/html/d/comparison.html 2005-02-08 12:19:06.000000000 +0100 @@ -1,7 +1,7 @@ -Copyright (c) 1999-2004 by Digital Mars, All Rights Reserved

+Copyright (c) 1999-2005 by Digital Mars, All Rights Reserved

diff -uNr dmd-0.112/dmd/html/d/ctod.html dmd-0.113/dmd/html/d/ctod.html --- dmd-0.112/dmd/html/d/ctod.html 2004-09-16 10:10:50.000000000 +0200 +++ dmd-0.113/dmd/html/d/ctod.html 2005-02-09 22:00:18.000000000 +0100 @@ -153,7 +153,7 @@ unsigned long long => ulong float => float double => double - long double => extended + long double => real _Imaginary long double => imaginary _Complex long double => complex diff -uNr dmd-0.112/dmd/html/d/htomodule.html dmd-0.113/dmd/html/d/htomodule.html --- dmd-0.112/dmd/html/d/htomodule.html 2004-09-01 10:15:04.000000000 +0200 +++ dmd-0.113/dmd/html/d/htomodule.html 2005-02-11 00:43:48.000000000 +0100 @@ -10,7 +10,7 @@ [Search] [D] -
Last update Sep 4, 2003 +
Last update Feb 10, 2005


Converting C .h Files to D Modules

@@ -28,13 +28,14 @@

Preprocessor

.h files can sometimes be a bewildering morass of layers of - macros, #include files, #ifdef's, etc. D doesn't support - a text preprocessor, so the first step is to remove the need for + macros, #include files, #ifdef's, etc. D doesn't + include a text preprocessor like the C preprocessor, + so the first step is to remove the need for it by taking the preprocessed output. For DMC (the Digital Mars C/C++ compiler), the command:
-	dmc -c program.h -e -l
+	dmc -c program.h -e -l
 	
will create a file program.lst which is the source file after @@ -104,7 +105,8 @@

NULL

- Or ((void*)0) should be replaced with null. + NULL and ((void*)0) should be replaced + with null.

Numeric Literals

@@ -219,6 +221,40 @@ void foo(int* p, char* q); +

Extern Global C Variables

+ + Whenever a global variable is declared in D, it is also defined. + But if it's also defined by the C object file being linked in, + there will be a multiple definition error. To fix this problem, + the idea is to declare the variable in a D module, but not link + in that module. For example, given a C header file named + foo.h: + + +
+	struct Foo { };
+	struct Foo bar;
+	
+
+ + It can be replaced with two D modules, foo.d: + +
+	struct Foo { }
+	import fooextern;
+	
+ + and fooextern.d: + +
+	Foo bar;
+	
+ + The foo.obj file is linked in, and fooextern.obj + is not. While this is not the most elegant looking method, it does + work, and since it is pretty rare in C libraries to use global + variables in its interface, it isn't an issue in practice. +

Typedef

alias is the D equivalent to the C typedef: @@ -376,7 +412,8 @@ and compiled with a C compiler that supports __fastcall and linked in, or compile the above, disassemble it with obj2asm - and insert it in a D myfoo shim with inline assembler. + and insert it in a D myfoo shim with + inline assembler.

Feedback and Comments

@@ -385,7 +422,7 @@ target="_top" title="Wiki 4 D">feedback and comments regarding this page. -
Copyright (c) 2003 by Digital Mars, All Rights Reserved

+


Copyright (c) 2003-2005 by Digital Mars, All Rights Reserved

diff -uNr dmd-0.112/dmd/html/d/interface.html dmd-0.113/dmd/html/d/interface.html --- dmd-0.112/dmd/html/d/interface.html 2004-09-01 10:13:22.000000000 +0200 +++ dmd-0.113/dmd/html/d/interface.html 2005-02-10 10:22:28.000000000 +0100 @@ -1,7 +1,7 @@ +

These equivalents hold for most 32 bit C compilers. The C standard does not pin down the sizes of the types, so some care is needed. @@ -290,10 +337,14 @@ } - Astute readers will notice that the printf format string literal + The printf format string literal in the example doesn't end with \0. This is because string literals, when they are not part of an initializer to a larger data structure, have a \0 character helpfully stored after the end of them. +

+ + An improved D function for formatted output is + std.stdio.writef().

Structs and Unions

@@ -326,7 +377,7 @@ target="_top" title="Wiki 4 D">feedback and comments regarding this page. -
Copyright (c) 1999-2002 by Digital Mars, All Rights Reserved +
Copyright (c) 1999-2005 by Digital Mars, All Rights Reserved diff -uNr dmd-0.112/dmd/html/d/lex.html dmd-0.113/dmd/html/d/lex.html --- dmd-0.112/dmd/html/d/lex.html 2005-01-19 18:29:14.000000000 +0100 +++ dmd-0.113/dmd/html/d/lex.html 2005-02-09 22:00:10.000000000 +0100 @@ -658,7 +658,7 @@ Floats can be followed by one f, F, l or L suffix. The f or F suffix means it is a - float, and l or L means it is an extended. + float, and l or L means it is an real.

If a floating literal is followed by i or I, then it is an diff -uNr dmd-0.112/dmd/html/d/phobos.html dmd-0.113/dmd/html/d/phobos.html --- dmd-0.112/dmd/html/d/phobos.html 2005-01-18 01:39:00.000000000 +0100 +++ dmd-0.113/dmd/html/d/phobos.html 2005-02-07 18:11:12.000000000 +0100 @@ -1,7 +1,7 @@