]> git.cworth.org Git - apitrace/blobdiff - scripts/tracediff2.py
Use wdiff by default.
[apitrace] / scripts / tracediff2.py
index cfa38d2d03ccbeb5d5ad8567210e8611635c6831..bba4ebead1e3f287ff00f54b7b3d04ab142a84f0 100755 (executable)
@@ -32,7 +32,7 @@ import subprocess
 import sys
 
 from unpickle import Unpickler
-from highlight import Highlighter
+from highlight import LessHighlighter
 
 
 ignoredFunctionNames = set([
@@ -238,20 +238,10 @@ def main():
     ref_calls = readtrace(args[0])
     src_calls = readtrace(args[1])
 
-    if sys.stdout.isatty():
-        less = subprocess.Popen(
-            args = ['less', '-FRXn'],
-            stdin = subprocess.PIPE
-        )
-        highlighter = Highlighter(less.stdin, True)
-    else:
-        highlighter = Highlighter(sys.stdout)
+    highlighter = LessHighlighter()
 
     differ = SDiffer(ref_calls, src_calls, highlighter)
     differ.diff()
-    less.stdin.close()
-
-    less.wait()
 
 
 if __name__ == '__main__':