www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD Samples

reply Andrej Mitrovic <andrej.mitrovich notmyemail.com> writes:
I've fixed up some of the modules from the DMD2 samples directory (on Windows).
I've reindented them all to make them consistent, except dhry.d which I can't
seem to fix, or otherwise my editor insists that it's using 1-space tabs for
some reason.

I've removed calls to printf & scanf and swapped with write(ln)'s in most
cases, replaced some for loops with foreach, etc. I've also fixed the shell
script. I've copied the wordcount code from the DMD website, because it was
much newer than the one in the samples directory (wc2.d module, and I hope its
ok that I copied it). There's another wordcount module named "wc.d", and it
appears it counts a few words less than wc2.d. I dunno why.

Btw, did you know the d2html module, which parses a d file and makes an html
file, couldn't parse itself? :) It had problems with the hash and backslash
character. It's fixed now.

There were also some .def and .kwd files missing, which I've recreated.

I haven't fixed these:

They seem to be network-related, and I wouldn't know the first thing about
fixing these. Sorry!

I probably missed the chance to make the modules use the most out of new D2
features, but I really just wanted to make these modules compile.

I haven't tempered with any license or author names in the files. Here's the
sample directory in a zip file:


The new build batch file is build.bat, and the shell script will invoke
clean.bat which gets rid of *.obj, *.res and other leftovers after compilation
(I couldn't figure out a way to call "del *.obj" in the shell script). The
invocations have been fixed as well, so it correctly finds shell.exe & dmd.exe
in the relative paths.
Aug 30 2010
parent Walter Bright <newshound2 digitalmars.com> writes:
Andrej Mitrovic wrote:
 I've fixed up some of the modules from the DMD2 samples directory (on Windows).

Aug 30 2010