Boost logo

Boost-Commit :

From: bdawes_at_[hidden]
Date: 2008-06-29 07:06:17


Author: bemandawes
Date: 2008-06-29 07:06:16 EDT (Sun, 29 Jun 2008)
New Revision: 46843
URL: http://svn.boost.org/trac/boost/changeset/46843

Log:
Rename long_name_check files to path_name_check to better reflect actual behavior
Added:
   trunk/tools/inspect/path_name_check.cpp
      - copied unchanged from r46806, /trunk/tools/inspect/long_name_check.cpp
   trunk/tools/inspect/path_name_check.hpp
      - copied unchanged from r46806, /trunk/tools/inspect/long_name_check.hpp
Removed:
   trunk/tools/inspect/long_name_check.cpp
   trunk/tools/inspect/long_name_check.hpp

Deleted: trunk/tools/inspect/long_name_check.cpp
==============================================================================
--- trunk/tools/inspect/long_name_check.cpp 2008-06-29 07:06:16 EDT (Sun, 29 Jun 2008)
+++ (empty file)
@@ -1,110 +0,0 @@
-// long_name_check implementation ------------------------------------------//
-
-// Copyright Beman Dawes 2002.
-// Copyright Gennaro Prota 2006.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include "long_name_check.hpp"
-
-#include "boost/filesystem/operations.hpp"
-#include "boost/lexical_cast.hpp"
-
-#include <locale>
-#include <algorithm>
-
-namespace { namespace aux {
-
-bool starts_with_nonalnum( path const & p )
-{
- const string & x = p.string();
- assert(!x.empty());
-
- const string::value_type first = x[0];
-
- return !std::isalnum( first, std::locale::classic() )
- && first != '_'
- && x != ".cvsignore"
- && x != ".svn"
- ;
-}
-
-}}
-
-
-namespace boost
-{
- namespace inspect
- {
- const char file_name_check::limits::name[] = "ISO 9660:1999 Level 3";
-
- file_name_check::file_name_check() : m_name_errors(0) {}
-
- void file_name_check::inspect(
- const string & library_name,
- const path & full_path )
- {
- std::string const leaf( full_path.leaf() );
-
- if ( *leaf.rbegin() == '.' )
- {
- ++m_name_errors;
- error( library_name, full_path, string(name())
- + " filename ends with the dot character ('.')" );
- }
-
- path const relative_path(
- relative_to( full_path, filesystem::initial_path() )
- , &filesystem::no_check );
-
-
- // checks on the directory name --------------------------- //
-
- if( aux::starts_with_nonalnum( path(leaf)) )
- {
- ++m_name_errors;
- error( library_name, full_path, string(name())
- + " leading character of \""
- + leaf + "\""
- + " is not alphanumeric" );
- }
-
- const unsigned max_relative_path = 207; // ISO 9660:1999 sets this limit
- const string generic_root( "boost_X_XX_X/" );
- if ( relative_path.string().size() >
- ( max_relative_path - generic_root.size() ) )
- {
- ++m_name_errors;
- error( library_name, full_path,
- string(name())
- + " file path will exceed "
- + boost::lexical_cast<string>(max_relative_path)
- + " characters in a directory tree with a root of the form "
- + generic_root + ", and this exceeds ISO 9660:1999 limit of 207" )
- ;
- }
-
- if (relative_path.leaf() != ".cvsignore" && relative_path.leaf() != ".svn")
- {
- try
- {
- path const check_portability( relative_path.string(), &filesystem::portable_name );
- }
- catch ( filesystem::filesystem_error const& )
- {
- ++m_name_errors;
- error( library_name, full_path, string(name()) + " nonportable path" );
- }
- }
- }
-
- file_name_check::~file_name_check()
- {
- std::cout << " " << m_name_errors << " " << desc() << line_break();
- }
-
-
- } // namespace inspect
-} // namespace boost

Deleted: trunk/tools/inspect/long_name_check.hpp
==============================================================================
--- trunk/tools/inspect/long_name_check.hpp 2008-06-29 07:06:16 EDT (Sun, 29 Jun 2008)
+++ (empty file)
@@ -1,57 +0,0 @@
-// long_name_check header --------------------------------------------------//
-// (main class renamed to: file_name_check) - gps
-
-// Copyright Beman Dawes 2002.
-// Copyright Gennaro Prota 2006.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_FILE_NAME_CHECK_HPP
-#define BOOST_FILE_NAME_CHECK_HPP
-
-#include "inspector.hpp"
-
-namespace boost
-{
- namespace inspect
- {
- class file_name_check : public inspector
- {
- long m_name_errors;
-
- // ISO 9660 Level 3
- //
- struct iso_9660_limits
- {
- static const char name[];
- };
-
- public:
-
- typedef iso_9660_limits limits;
-
- file_name_check();
- virtual ~file_name_check();
-
- virtual const char * name() const { return "*N*"; }
- virtual const char * desc() const { return "file/directory names issues"; }
-
- virtual void inspect(
- const string & library_name,
- const path & full_path );
-
- virtual void inspect(
- const string &, // "filesystem"
- const path &, // "c:/foo/boost/filesystem/path.hpp"
- const string &)
- { /* empty */ }
-
-
-
- };
- }
-}
-
-#endif // BOOST_FILE_NAME_CHECK_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk