CBMC
jdiff_main.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: JDIFF Main Module
4
5
Author: Peter Schrammel
6
7
\*******************************************************************/
8
11
12
#include "
jdiff_parse_options.h
"
13
14
#ifdef _MSC_VER
15
# include <
util/unicode.h
>
16
#endif
17
18
#ifdef IREP_HASH_STATS
19
#include <iostream>
20
#endif
21
22
#ifdef IREP_HASH_STATS
23
extern
unsigned
long
long
irep_hash_cnt;
24
extern
unsigned
long
long
irep_cmp_cnt;
25
extern
unsigned
long
long
irep_cmp_ne_cnt;
26
#endif
27
28
#ifdef _MSC_VER
29
int
wmain(
int
argc,
const
wchar_t
**argv_wide)
30
{
31
auto
vec =
narrow_argv
(argc, argv_wide);
32
auto
narrow
=
to_c_str_array
(std::begin(vec), std::end(vec));
33
auto
argv =
narrow
.data();
34
#else
35
int
main
(
int
argc,
const
char
**argv)
36
{
37
#endif
38
jdiff_parse_optionst
parse_options(argc, argv);
39
40
int
res = parse_options.
main
();
41
42
#ifdef IREP_HASH_STATS
43
std::cout <<
"IREP_HASH_CNT="
<< irep_hash_cnt <<
'\n'
;
44
std::cout <<
"IREP_CMP_CNT="
<< irep_cmp_cnt <<
'\n'
;
45
std::cout <<
"IREP_CMP_NE_CNT="
<< irep_cmp_ne_cnt <<
'\n'
;
46
#endif
47
48
return
res;
49
}
jdiff_parse_optionst
Definition:
jdiff_parse_options.h:40
parse_options_baset::main
virtual int main()
Definition:
parse_options.cpp:75
main
int main(int argc, const char **argv)
Definition:
jdiff_main.cpp:35
jdiff_parse_options.h
JDIFF Command Line Option Processing.
narrow
output_type narrow(input_type input)
Run-time checked narrowing cast.
Definition:
narrow.h:34
narrow_argv
std::vector< std::string > narrow_argv(int argc, const wchar_t **argv_wide)
Definition:
unicode.cpp:149
unicode.h
to_c_str_array
std::vector< const char * > to_c_str_array(It b, It e)
Definition:
unicode.h:66
jbmc
src
jdiff
jdiff_main.cpp
Generated by
1.9.1