Update of /cvsroot/boost/boost/tools/inspect
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23930/tools/inspect
Modified Files:
inspect.cpp license_check.cpp
Log Message:
Add a "-brief" mode to the text mode to reduce the length of output to fit
within the 75K email limits.
Index: inspect.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/inspect/inspect.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- inspect.cpp 18 Jul 2006 03:55:38 -0000 1.19
+++ inspect.cpp 24 Jul 2006 18:29:38 -0000 1.20
@@ -211,6 +211,11 @@
display_html, display_text
}
display_format = display_html;
+ enum display_mode_type
+ {
+ display_full, display_brief
+ }
+ display_mode = display_full;
// display_summary_helper
--------------------------------------------------//
@@ -292,12 +297,27 @@
{
if ( current.library != itr->library )
{
- std::cout << boost::format("\n|%1%|\n") % itr->library;
+ std::cout << boost::format(
+ display_full == display_mode ? "\n|%1%|\n" : "\n\n|%1%|"
+ ) % itr->library;
}
if ( current.library != itr->library
|| current.rel_path != itr->rel_path )
{
- std::cout << boost::format(" %1%:\n") % itr->rel_path;
+ if (display_full == display_mode)
+ {
+ std::cout << boost::format(" %1%:\n") % itr->rel_path;
+ }
+ else
+ {
+ path current_rel_path(current.rel_path);
+ path this_rel_path(itr->rel_path);
+ if (current_rel_path.branch_path() != this_rel_path.branch_path())
+ {
+ std::cout << boost::format("\n %1%/") %
this_rel_path.branch_path().string();
+ }
+ std::cout << boost::format("\n %1%:") % this_rel_path.leaf();
+ }
}
if ( current.library != itr->library
|| current.rel_path != itr->rel_path
@@ -309,7 +329,9 @@
{
m.replace(i,4,">");
}
- std::cout << boost::format(" %1%\n") % m;
+ std::cout << boost::format(
+ display_full == display_mode ? " %1%\n" : " %1%"
+ ) % m;
}
current.library = itr->library;
current.rel_path = itr->rel_path;
@@ -489,7 +511,7 @@
if ( argc > 1 && (std::strcmp( argv[1], "-help" ) == 0
|| std::strcmp( argv[1], "--help" ) == 0 ) )
{
- std::clog << "Usage: inspect [-cvs] [-text] [options...]\n"
+ std::clog << "Usage: inspect [-cvs] [-text] [-brief] [options...]\n"
"options:\n"
<< options();
return 1;
@@ -517,6 +539,12 @@
--argc; ++argv;
}
+ if ( argc > 1 && std::strcmp( argv[1], "-brief" ) == 0 )
+ {
+ display_mode = display_brief;
+ --argc; ++argv;
+ }
+
if ( argc > 1 && *argv[1] == '-' )
{
license_ck = false;
Index: license_check.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/inspect/license_check.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- license_check.cpp 18 Jul 2006 03:55:38 -0000 1.5
+++ license_check.cpp 24 Jul 2006 18:29:38 -0000 1.6
@@ -11,8 +11,11 @@
namespace
{
boost::regex license_regex(
- "Distributed(\\s+|\\s+#\\s*|\\s+//\\s*)"
- "under(\\s+|\\s+#\\s*|\\s+//\\s*)the(\\s+|\\s+#\\s*|\\s+//\\s*)"
+ //~ The next two lines change the regex so that it detects when the license
+ //~ doesn't follow the prefered statement. Disabled because it currently
+ //~ generates a large number of issues.
+ //~ "Distributed(\\s+|\\s+#\\s*|\\s+//\\s*)"
+ //~ "under(\\s+|\\s+#\\s*|\\s+//\\s*)the(\\s+|\\s+#\\s*|\\s+//\\s*)"
"boost(\\s+|\\s+#\\s*|\\s+//\\s*)software(\\s+|\\s+#\\s*|\\s+//\\s*)license",
boost::regbase::normal | boost::regbase::icase);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs