Line | |
---|
1 | #ifndef NDIFF_H |
---|
2 | #define NDIFF_H |
---|
3 | |
---|
4 | /* |
---|
5 | o---------------------------------------------------------------------o |
---|
6 | | |
---|
7 | | Numdiff |
---|
8 | | |
---|
9 | | Copyright (c) 2012+ laurent.deniau@cern.ch |
---|
10 | | Gnu General Public License |
---|
11 | | |
---|
12 | o---------------------------------------------------------------------o |
---|
13 | |
---|
14 | Purpose: |
---|
15 | numerical diff of files |
---|
16 | provides the main numdiff loop |
---|
17 | |
---|
18 | o---------------------------------------------------------------------o |
---|
19 | */ |
---|
20 | |
---|
21 | #include <stdio.h> |
---|
22 | #include "types.h" |
---|
23 | |
---|
24 | // ----- types |
---|
25 | |
---|
26 | struct utest; |
---|
27 | struct ndiff; |
---|
28 | struct context; |
---|
29 | struct constraint; |
---|
30 | |
---|
31 | // ----- interface |
---|
32 | |
---|
33 | #define T struct ndiff |
---|
34 | |
---|
35 | T* ndiff_alloc (FILE *lhs, FILE *rhs, struct context*, int n_); |
---|
36 | void ndiff_clear (T*); |
---|
37 | void ndiff_free (T*); |
---|
38 | void ndiff_option (T*, const int *keep_, const int *blank_, const int *check_); |
---|
39 | |
---|
40 | // high level API |
---|
41 | void ndiff_loop (T*); |
---|
42 | |
---|
43 | // low level API |
---|
44 | int ndiff_skipLine (T*); |
---|
45 | int ndiff_readLine (T*); |
---|
46 | int ndiff_gotoLine (T*, const char *tag); |
---|
47 | int ndiff_fillLine (T*, const char *lhs, const char *rhs); |
---|
48 | |
---|
49 | void ndiff_diffLine (T*); |
---|
50 | int ndiff_nextNum (T*, const struct constraint*); // return 0 if no number is found |
---|
51 | int ndiff_testNum (T*, const struct constraint*); |
---|
52 | |
---|
53 | void ndiff_getInfo (const T*, int *row_, int *col_, int *cnt_, long *num_); |
---|
54 | int ndiff_feof (const T*, int both); |
---|
55 | int ndiff_isempty (const T*); |
---|
56 | |
---|
57 | #undef T |
---|
58 | |
---|
59 | // ----- testsuite |
---|
60 | |
---|
61 | #ifndef NTEST |
---|
62 | |
---|
63 | void ndiff_utest (struct utest*); |
---|
64 | |
---|
65 | #endif // NTEST |
---|
66 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.