diff --git a/darkice/trunk/ChangeLog b/darkice/trunk/ChangeLog index 3059b3f..e0a036f 100644 --- a/darkice/trunk/ChangeLog +++ b/darkice/trunk/ChangeLog @@ -3,7 +3,7 @@ DarkIce 0.7 o added support for FreeBSD thanks to Robin P. Blanchard, o added support for resampling mp3 streams - + o DarkIce config file now may contain spaces and tabs as white space 18-09-2001: DarkIce 0.6 released diff --git a/darkice/trunk/TODO b/darkice/trunk/TODO index 6bf45fe..9ffa099 100644 --- a/darkice/trunk/TODO +++ b/darkice/trunk/TODO @@ -7,4 +7,5 @@ o libtoolize ? o revisit real-time scheduling and one-thread-per-connection o look into performance o create proper error-reporting module -o enable TABs in the config file +o configure options to enable / disable lame / ogg support and to + specify their location diff --git a/darkice/trunk/man/darkice.cfg.5 b/darkice/trunk/man/darkice.cfg.5 index af50415..a4187dd 100644 --- a/darkice/trunk/man/darkice.cfg.5 +++ b/darkice/trunk/man/darkice.cfg.5 @@ -1,10 +1,10 @@ -.TH darkice.cfg 5 "September 18, 2001" "DarkIce" "DarkIce live audio streamer" +.TH darkice.cfg 5 "October 19, 2001" "DarkIce" "DarkIce live audio streamer" .SH NAME darkice.cfg \- configuration file for darkice .SH DESCRIPTION .PP The configuration file consists of sections, with key = value pairs -separated with spaces (not tabs) inside each secion: +separated with spaces and/or tabs inside each secion: .nf [section1] diff --git a/darkice/trunk/src/Config.cpp b/darkice/trunk/src/Config.cpp index 32351bb..a60d433 100644 --- a/darkice/trunk/src/Config.cpp +++ b/darkice/trunk/src/Config.cpp @@ -58,6 +58,12 @@ static const char fileid[] = "$Id$"; #define LINE_SIZE 256 +/*------------------------------------------------------------------------------ + * string containing all white space characters + *----------------------------------------------------------------------------*/ +#define WHITE_SPACE_STR " \t" + + /* =============================================== local function prototypes */ @@ -99,11 +105,11 @@ Config :: addLine ( const char * line ) throw ( Exception ) str.erase( ix); } /* eat up all white space from the front */ - if ( (ix = str.find_first_not_of( ' ')) != str.npos ) { + if ( (ix = str.find_first_not_of( WHITE_SPACE_STR)) != str.npos ) { str.erase( 0, ix); } /* eat up all white space from the end */ - if ( (ix = str.find_last_not_of( ' ')) != str.npos ) { + if ( (ix = str.find_last_not_of( WHITE_SPACE_STR)) != str.npos ) { str.erase( ix + 1); } @@ -164,6 +170,9 @@ Config :: read ( istream & is ) throw ( Exception ) $Source$ $Log$ + Revision 1.6 2001/10/19 09:20:09 darkeye + config file now may contain tabs also as white space + Revision 1.5 2001/09/09 11:26:43 darkeye full line comments skipped earlier: commens allowed before the first secion diff --git a/darkice/trunk/src/ConfigSection.cpp b/darkice/trunk/src/ConfigSection.cpp index 5290952..28effd6 100644 --- a/darkice/trunk/src/ConfigSection.cpp +++ b/darkice/trunk/src/ConfigSection.cpp @@ -52,6 +52,12 @@ static const char fileid[] = "$Id$"; +/*------------------------------------------------------------------------------ + * string containing all white space characters + *----------------------------------------------------------------------------*/ +#define WHITE_SPACE_STR " \t" + + /* =============================================== local function prototypes */ @@ -133,11 +139,11 @@ ConfigSection :: addLine ( const char * line ) throw ( Exception ) str.erase( ix); } /* eat up all white space from the front */ - if ( (ix = str.find_first_not_of( ' ')) != str.npos ) { + if ( (ix = str.find_first_not_of( WHITE_SPACE_STR)) != str.npos ) { str.erase( 0, ix); } /* eat up all white space from the end */ - if ( (ix = str.find_last_not_of( ' ')) != str.npos ) { + if ( (ix = str.find_last_not_of( WHITE_SPACE_STR)) != str.npos ) { str.erase( ix + 1); } if ( !str.length() ) { @@ -153,11 +159,11 @@ ConfigSection :: addLine ( const char * line ) throw ( Exception ) std::string value( str, ix + 1); /* eat up all white space from the front of value */ - if ( (ix = value.find_first_not_of( ' ')) != value.npos ) { + if ( (ix = value.find_first_not_of( WHITE_SPACE_STR)) != value.npos ) { value.erase( 0, ix); } /* eat up all white space from the end of key */ - if ( (ix = key.find_last_not_of( ' ')) != key.npos ) { + if ( (ix = key.find_last_not_of( WHITE_SPACE_STR)) != key.npos ) { key.erase( ix + 1); } @@ -171,6 +177,9 @@ ConfigSection :: addLine ( const char * line ) throw ( Exception ) $Source$ $Log$ + Revision 1.7 2001/10/19 09:20:09 darkeye + config file now may contain tabs also as white space + Revision 1.6 2001/09/09 11:26:43 darkeye full line comments skipped earlier: commens allowed before the first secion