Update DustMite

Commits:
* 9abec53 dustmite: Use std.digest.md
* 135b7d5 dsplit: Parse directives (#-lines)
This commit is contained in:
Martin Nowak 2013-10-11 19:37:47 +02:00
parent e184f13a45
commit 3c1f0c8027
2 changed files with 7 additions and 8 deletions

View file

@ -259,9 +259,9 @@ Entity[] parseD(string s)
{
// Here be dragons.
enum MAX_SPLITTER_LEVELS = 5;
enum MAX_SPLITTER_LEVELS = 6;
struct DSplitter { char open, close, sep; }
static const DSplitter[MAX_SPLITTER_LEVELS] splitters = [{'{','}',';'}, {'(',')'}, {'[',']'}, {sep:','}, {sep:' '}];
static const DSplitter[MAX_SPLITTER_LEVELS] splitters = [{'#','\n'}, {'{','}',';'}, {'(',')'}, {'[',']'}, {sep:','}, {sep:' '}];
Entity[][MAX_SPLITTER_LEVELS] splitterQueue;

View file

@ -855,22 +855,21 @@ version(HAVE_AE)
}
else
{
import std.md5;
import std.digest.md;
alias ubyte[16] HASH;
HASH hash(Reduction reduction)
{
ubyte[16] digest;
MD5_CTX context;
MD5 context;
context.start();
auto writer = cast(void delegate(string))&context.update;
auto writer = cast(void delegate(string))&context.put;
dump(root, reduction, writer, writer);
context.finish(digest);
return digest;
return context.finish();
}
alias digestToString formatHash;
alias toHexString formatHash;
}
bool[HASH] cache;