forked from leea/diff-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiffErr.h
42 lines (37 loc) · 921 Bytes
/
DiffErr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright (c) 2012 Allen Lee
*/
#include <cstdio>
#include <iostream>
#ifdef DEBUG
#define debugOut std::cout
#else
#define debugOut if (false) std::cout
#endif
template <typename _RandomAccessSequence1Ty,
typename _RandomAccessSequence2Ty>
void dprintMatrix(_RandomAccessSequence1Ty Orig,
_RandomAccessSequence2Ty New) {
#ifdef DEBUG_MATRIX
printf(" ");
for (unsigned int x = 0; x < New.size(); ++x)
printf ("%2c ", New[x]);
printf ("\n");
for (unsigned int y = 0; y < Orig.size(); ++y){
printf ("%2c ", Orig[y]);
for (unsigned int x = 0; x < New.size(); ++x)
printf(" . ");
printf ("\n");
}
#else
#ifdef DEBUG
printf("New: ");
for (unsigned int x = 0; x < New.size(); ++x)
printf ("%c", New[x]);
printf ("\nOrig: ");
for (unsigned int y = 0; y < Orig.size(); ++y)
printf ("%c", Orig[y]);
printf ("\n");
#endif
#endif
}