Created
August 11, 2011 00:41
-
-
Save CyberShadow/1138658 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio, std.string, std.exception; | |
void main(string[] args) | |
{ | |
enforce(args.length==3, "Two files please"); | |
auto f1 = File(args[1]), f2 = File(args[2]); | |
while (!f1.eof() && !f2.eof()) | |
{ | |
auto l1 = f1.readln(), l2 = f2.readln(); | |
if (dstrip(l1) != dstrip(l2)) | |
writef("> %s< %s---\n", l1, l2); | |
} | |
} | |
string dstrip(string s) | |
{ | |
s = strip(s); | |
if (s.indexOf("//")>=0) | |
s = strip(s[0..s.indexOf("//")]); | |
return s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment