Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
7c4cde7f
Commit
7c4cde7f
authored
Dec 13, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified code a little and fixed a compiler error.
parent
fb2992f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
htmlify.cpp
tools/htmlify/htmlify.cpp
+17
-18
No files found.
tools/htmlify/htmlify.cpp
View file @
7c4cde7f
...
...
@@ -18,9 +18,8 @@ using namespace dlib;
typedef
cpp_pretty_printer
::
kernel_1a
cprinter
;
typedef
cpp_pretty_printer
::
kernel_2a
bprinter
;
typedef
cmd_line_parser
<
char
>::
check_1a_c
clp
;
typedef
dlib
::
map
<
string
,
string
>::
kernel_1a
map_string_to_string
;
typedef
set
<
string
>::
kernel_1a
set_of_string
;
typedef
dlib
::
set
<
string
>::
kernel_1a
set_of_string
;
typedef
queue
<
file
>::
kernel_1a
queue_of_files
;
typedef
queue
<
directory
>::
kernel_1a
queue_of_dirs
;
...
...
@@ -92,7 +91,7 @@ int main(int argc, char** argv)
string
file
;
try
{
c
lp
parser
;
c
ommand_line_parser
parser
;
parser
.
add_option
(
"b"
,
"Pretty print in black and white. The default is to pretty print in color."
);
parser
.
add_option
(
"n"
,
"Number lines."
);
parser
.
add_option
(
"h"
,
"Displays this information."
);
...
...
@@ -137,20 +136,20 @@ int main(int argc, char** argv)
const
char
*
to_xml_sub_ops
[]
=
{
"t"
};
parser
.
check_sub_options
(
"to-xml"
,
to_xml_sub_ops
);
const
c
lp
::
option_type
&
b_opt
=
parser
.
option
(
"b"
);
const
c
lp
::
option_type
&
n_opt
=
parser
.
option
(
"n"
);
const
c
lp
::
option_type
&
h_opt
=
parser
.
option
(
"h"
);
const
c
lp
::
option_type
&
index_opt
=
parser
.
option
(
"index"
);
const
c
lp
::
option_type
&
v_opt
=
parser
.
option
(
"v"
);
const
c
lp
::
option_type
&
o_opt
=
parser
.
option
(
"o"
);
const
c
lp
::
option_type
&
man_opt
=
parser
.
option
(
"man"
);
const
c
lp
::
option_type
&
f_opt
=
parser
.
option
(
"f"
);
const
c
lp
::
option_type
&
cat_opt
=
parser
.
option
(
"cat"
);
const
c
lp
::
option_type
&
i_opt
=
parser
.
option
(
"i"
);
const
c
lp
::
option_type
&
flatten_opt
=
parser
.
option
(
"flatten"
);
const
c
lp
::
option_type
&
depth_opt
=
parser
.
option
(
"depth"
);
const
c
lp
::
option_type
&
title_opt
=
parser
.
option
(
"title"
);
const
c
lp
::
option_type
&
to_xml_opt
=
parser
.
option
(
"to-xml"
);
const
c
ommand_line_parser
::
option_type
&
b_opt
=
parser
.
option
(
"b"
);
const
c
ommand_line_parser
::
option_type
&
n_opt
=
parser
.
option
(
"n"
);
const
c
ommand_line_parser
::
option_type
&
h_opt
=
parser
.
option
(
"h"
);
const
c
ommand_line_parser
::
option_type
&
index_opt
=
parser
.
option
(
"index"
);
const
c
ommand_line_parser
::
option_type
&
v_opt
=
parser
.
option
(
"v"
);
const
c
ommand_line_parser
::
option_type
&
o_opt
=
parser
.
option
(
"o"
);
const
c
ommand_line_parser
::
option_type
&
man_opt
=
parser
.
option
(
"man"
);
const
c
ommand_line_parser
::
option_type
&
f_opt
=
parser
.
option
(
"f"
);
const
c
ommand_line_parser
::
option_type
&
cat_opt
=
parser
.
option
(
"cat"
);
const
c
ommand_line_parser
::
option_type
&
i_opt
=
parser
.
option
(
"i"
);
const
c
ommand_line_parser
::
option_type
&
flatten_opt
=
parser
.
option
(
"flatten"
);
const
c
ommand_line_parser
::
option_type
&
depth_opt
=
parser
.
option
(
"depth"
);
const
c
ommand_line_parser
::
option_type
&
title_opt
=
parser
.
option
(
"title"
);
const
c
ommand_line_parser
::
option_type
&
to_xml_opt
=
parser
.
option
(
"to-xml"
);
string
filter
=
"cpp h c"
;
...
...
@@ -178,7 +177,7 @@ int main(int argc, char** argv)
{
cout
<<
"This program pretty prints C or C++ source code to HTML.
\n
"
;
cout
<<
"Usage: htmlify [options] [file]...
\n
"
;
parser
.
print_options
(
cout
);
parser
.
print_options
();
cout
<<
"
\n\n
"
;
no_run
=
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment