This commit is contained in:
Nikolai Pretzell
2002-05-02 11:36:16 +00:00
parent c7f1736aae
commit a10c46e83c
7 changed files with 41 additions and 25 deletions

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: html_kit.cxx,v $ * $RCSfile: html_kit.cxx,v $
* *
* $Revision: 1.1.1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: np $ $Date: 2002-03-08 14:45:23 $ * last change: $Author: np $ $Date: 2002-05-02 12:36:16 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -65,6 +65,7 @@
// NOT FULLY DEFINED SERVICES // NOT FULLY DEFINED SERVICES
#include <stdio.h>
#include <ary/cpp/c_slntry.hxx> #include <ary/cpp/c_slntry.hxx>
#include "hdimpl.hxx" #include "hdimpl.hxx"

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: cmd_run.cxx,v $ * $RCSfile: cmd_run.cxx,v $
* *
* $Revision: 1.1.1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: np $ $Date: 2002-03-08 14:45:27 $ * last change: $Author: np $ $Date: 2002-05-02 12:36:16 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -66,6 +66,7 @@
// NOT FULLY DEFINED SERVICES // NOT FULLY DEFINED SERVICES
#include <cosv/x.hxx> #include <cosv/x.hxx>
#include <cosv/ploc.hxx>
#include <ary/ary.hxx> #include <ary/ary.hxx>
#include <ary/ary.hxx> #include <ary/ary.hxx>
#include <ary/cpp/c_rwgate.hxx> #include <ary/cpp/c_rwgate.hxx>
@@ -346,7 +347,7 @@ CommandRunner::GatherFiles( FileCollector_Ifc & o_rFiles,
i_rProject.aRootDirectory.Get( aDir ); i_rProject.aRootDirectory.Get( aDir );
uintt nProjectDir_AddPosition = uintt nProjectDir_AddPosition =
(strcmp(aDir.c_str(),".\\") == 0) ( strcmp(aDir.c_str(),".\\") == 0 OR strcmp(aDir.c_str(),"./") == 0 )
? 0 ? 0
: uintt( aDir.tellp() ); : uintt( aDir.tellp() );
@@ -457,7 +458,7 @@ Recursive_PutOutNamespace( csi::uidl::Display & o_rDisplay,
{ {
static StreamStr sPath(512); static StreamStr sPath(512);
sPath.seekp(0); sPath.seekp(0);
i_rNamespace.GetFullName( sPath, "\\"); i_rNamespace.GetFullName( sPath, csv::ploc::Delimiter() );
o_rDisplay.InitModule( i_rNamespace.Name(), o_rDisplay.InitModule( i_rNamespace.Name(),
sPath.c_str(), sPath.c_str(),
i_rNamespace.Depth() ); i_rNamespace.Depth() );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: cx_c_sub.cxx,v $ * $RCSfile: cx_c_sub.cxx,v $
* *
* $Revision: 1.1.1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: np $ $Date: 2002-03-08 14:45:29 $ * last change: $Author: np $ $Date: 2002-05-02 12:36:16 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -65,6 +65,7 @@
// NOT FULLY DECLARED SERVICES // NOT FULLY DECLARED SERVICES
#include <ctype.h>
#include "c_dealer.hxx" #include "c_dealer.hxx"
#include <tokens/parseinc.hxx> #include <tokens/parseinc.hxx>
#include <x_parse.hxx> #include <x_parse.hxx>

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: ploc_dir.hxx,v $ * $RCSfile: ploc_dir.hxx,v $
* *
* $Revision: 1.1.1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: np $ $Date: 2002-03-08 14:25:39 $ * last change: $Author: np $ $Date: 2002-05-02 12:35:10 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -109,7 +109,7 @@ class Directory : public Persistent
// OPERATIONS // OPERATIONS
bool PhysicalCreate( bool PhysicalCreate(
bool i_bCreateParentsIfNecessary = true ); bool i_bCreateParentsIfNecessary = true ) const;
// INQUIRY // INQUIRY
void GetContainedDirectories( void GetContainedDirectories(
@@ -133,7 +133,7 @@ class Directory : public Persistent
true, if parent(!) directory exists or could be created. true, if parent(!) directory exists or could be created.
false, if this is a root directory. false, if this is a root directory.
*/ */
bool Check_Parent(); bool Check_Parent() const;
bool PhysicalCreate_Dir( bool PhysicalCreate_Dir(
const char * i_sStr ) const; const char * i_sStr ) const;
// DATA // DATA

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: std_outp.cxx,v $ * $RCSfile: std_outp.cxx,v $
* *
* $Revision: 1.1.1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: np $ $Date: 2002-03-08 14:25:39 $ * last change: $Author: np $ $Date: 2002-05-02 12:35:10 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -63,6 +63,8 @@
#include <cosv/std_outp.hxx> #include <cosv/std_outp.hxx>
// NOT FULLY DECLARED SERVICES // NOT FULLY DECLARED SERVICES
#include <stdlib.h>
namespace csv namespace csv
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: ploc_dir.cxx,v $ * $RCSfile: ploc_dir.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: np $ $Date: 2002-03-22 10:28:16 $ * last change: $Author: np $ $Date: 2002-05-02 12:35:10 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -126,7 +126,7 @@ Directory::operator-=( uintt i_nLevels )
} }
bool bool
Directory::PhysicalCreate( bool i_bCreateParentsIfNecessary ) Directory::PhysicalCreate( bool i_bCreateParentsIfNecessary ) const
{ {
bool ret = PhysicalCreate_Dir( StrPath() ); bool ret = PhysicalCreate_Dir( StrPath() );
if ( ret OR NOT i_bCreateParentsIfNecessary ) if ( ret OR NOT i_bCreateParentsIfNecessary )
@@ -139,7 +139,7 @@ Directory::PhysicalCreate( bool i_bCreateParentsIfNecessary )
} }
bool bool
Directory::Check_Parent() Directory::Check_Parent() const
{ {
// There is no parent of root directories: // There is no parent of root directories:
if ( aPath.DirChain().Size() == 0 ) if ( aPath.DirChain().Size() == 0 )
@@ -147,7 +147,7 @@ Directory::Check_Parent()
// Become my own parent: // Become my own parent:
String sLastToken = aPath.DirChain().Back(); String sLastToken = aPath.DirChain().Back();
operator-=(1); const_cast< Directory* >(this)->operator-=(1);
// Begin behaving as parent: // Begin behaving as parent:
bool ret = Exists(); bool ret = Exists();
@@ -160,7 +160,7 @@ Directory::Check_Parent()
// End behaving as parent. // End behaving as parent.
// Become myself again: // Become myself again:
operator+=(sLastToken); const_cast< Directory* >(this)->operator+=(sLastToken);
return ret; return ret;
} }
@@ -267,13 +267,21 @@ Directory::PhysicalCreate_Dir( const char * i_sStr ) const
void void
Directory::GetContainedDirectories( StringVector & o_rResult ) const Directory::GetContainedDirectories( StringVector & o_rResult ) const
{ {
StreamStr sNew(240);
sNew << aPath;
StreamStr::size_type
nStartFilename = sNew.tellp();
DIR * pDir = opendir( StrPath() ); DIR * pDir = opendir( StrPath() );
dirent * pEntry = 0; dirent * pEntry = 0;
struct stat aEntryStatus; struct stat aEntryStatus;
while ( (pEntry = readdir(pDir)) != 0 ) while ( (pEntry = readdir(pDir)) != 0 )
{ {
stat(pEntry->d_name, &aEntryStatus); sNew.seekp(nStartFilename);
sNew << pEntry->d_name;
stat(sNew.c_str(), &aEntryStatus);
if ( (aEntryStatus.st_mode & S_IFDIR) == S_IFDIR if ( (aEntryStatus.st_mode & S_IFDIR) == S_IFDIR
AND *pEntry->d_name != '.' ) AND *pEntry->d_name != '.' )
{ {
@@ -304,7 +312,10 @@ Directory::GetContainedFiles( StringVector & o_rResult,
while ( (pEntry = readdir(pDir)) != 0 ) while ( (pEntry = readdir(pDir)) != 0 )
{ {
stat(pEntry->d_name, &aEntryStatus); sNew.seekp(nStartFilename);
sNew << pEntry->d_name;
stat(sNew.c_str(), &aEntryStatus);
if ( (aEntryStatus.st_mode & S_IFDIR) == S_IFDIR ) if ( (aEntryStatus.st_mode & S_IFDIR) == S_IFDIR )
continue; // Don't gather directories. continue; // Don't gather directories.

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: plocroot.cxx,v $ * $RCSfile: plocroot.cxx,v $
* *
* $Revision: 1.1.1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: np $ $Date: 2002-03-08 14:25:40 $ * last change: $Author: np $ $Date: 2002-05-02 12:35:10 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -64,7 +64,7 @@
// NOT FULLY DECLARED SERVICES // NOT FULLY DECLARED SERVICES
// #include <cosv/bstream.hxx> // #include <cosv/bstream.hxx>
// #include <ctype.h> #include <ctype.h>
namespace csv namespace csv