Skip to content

Commit

Permalink
Merge pull request #6692 from WalterBright/fixwc2
Browse files Browse the repository at this point in the history
fix samples/wc2.d so it compiles
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
  • Loading branch information
dlang-bot committed Apr 13, 2017
2 parents e7220d3 + e9c53dd commit 353bc87
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions samples/wc2.d
@@ -1,5 +1,5 @@
import std.stdio;
import std.stream;
import std.file;

int main (string[] args)
{
Expand Down Expand Up @@ -52,13 +52,13 @@ int main (string[] args)
}
else
{
auto f = new BufferedFile(arg);
auto f = std.stdio.File(arg);
string buf;

while (!f.eof())
{
char c;
f.read(c);
f.readf("%c", &c);

if (c == '\n')
++l_cnt;
Expand Down Expand Up @@ -109,7 +109,8 @@ int main (string[] args)

writefln("--------------------------------------");

foreach (word1; dictionary.keys.sort)
import std.algorithm;
foreach (word1; dictionary.keys.sort())
{
writefln("%3s %s", dictionary[word1], word1);
}
Expand Down

0 comments on commit 353bc87

Please sign in to comment.