Fix ZenUtils compilation

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21242 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2009-06-10 15:14:32 +00:00
parent b149830021
commit 6c74a7db80
11 changed files with 717 additions and 3146 deletions

View file

@ -6,7 +6,7 @@ SUBDIRS(source libraries)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${zenutils_SOURCE_DIR}/libraries/beecrypt-4.1.2 ${zenutils_SOURCE_DIR}/libraries/beecrypt-4.1.2
${zenutils_SOURCE_DIR}/libraries/getpot-c++-1.1.17 ${zenutils_SOURCE_DIR}/libraries/getpot-c++-1.1.18
${zenutils_SOURCE_DIR}/libraries/pelib-0.9 ${zenutils_SOURCE_DIR}/libraries/pelib-0.9
${zenutils_SOURCE_DIR}/libraries/zlib123 ${zenutils_SOURCE_DIR}/libraries/zlib123
${zenutils_SOURCE_DIR}/source/shared ${zenutils_SOURCE_DIR}/source/shared

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// -*- c++ -*- // -*- c++ -*- vim: set syntax=cpp:
// GetPot Version $$Version$$ $$Date$$ // GetPot Version $$Version$$ $$Date$$
// //
// WEBSITE: http://getpot.sourceforge.net // WEBSITE: http://getpot.sourceforge.net
@ -23,7 +23,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA // USA
// //
// (C) 2001-2005 Frank R. Schaefer <fschaef@users.sf.net> // (C) 2001-2007 Frank R. Schaefer <fschaef@users.sf.net>
//========================================================================== //==========================================================================
#ifndef __include_guard_GETPOT_H__ #ifndef __include_guard_GETPOT_H__
@ -43,6 +43,7 @@ extern "C" {
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <assert.h> #include <assert.h>
#include <string.h>
} }
#include <cmath> #include <cmath>
#include <string> #include <string>
@ -636,13 +637,16 @@ GetPot::__skip_whitespace(std::istream& istr)
} }
// -- look if characters match the comment starter string // -- look if characters match the comment starter string
const std::istream::pos_type Pos = istr.tellg();
unsigned i=0; unsigned i=0;
for(; i<_comment_start.length() ; ++i) { for(; i<_comment_start.length() ; ++i) {
if( tmp != _comment_start[i] ) { if( tmp != _comment_start[i] ) {
istr.seekg(Pos); // NOTE: Due to a 'strange behavior' in Microsoft's streaming lib we do
// a series of unget()s instead a quick seek. See
// http://sourceforge.net/tracker/index.php?func=detail&aid=1545239&group_id=31994&atid=403915
// for a detailed discussion.
// -- one step more backwards, since 'tmp' already at non-whitespace // -- one step more backwards, since 'tmp' already at non-whitespace
istr.unget(); do istr.unget(); while( i-- != 0 );
return; return;
} }
tmp = istr.get(); tmp = istr.get();
@ -776,7 +780,7 @@ GetPot::__process_section_label(const std::string& Section,
while( i < sname.length() ) { while( i < sname.length() ) {
if( sname[i] == '/' ) { if( sname[i] == '/' ) {
section_stack.push_back(sname.substr(0,i)); section_stack.push_back(sname.substr(0,i));
if( i+1 < sname.length()-1 ) if( i+1 < sname.length() )
sname = sname.substr(i+1); sname = sname.substr(i+1);
i = 0; i = 0;
} }
@ -974,6 +978,8 @@ GetPot::next(const double& Default)
inline const std::string inline const std::string
GetPot::next(const char* Default) GetPot::next(const char* Default)
{ {
using namespace std;
if( search_failed_f ) return Default; if( search_failed_f ) return Default;
cursor++; cursor++;
@ -2391,6 +2397,8 @@ GetPot::variable::get_element(unsigned Idx) const
inline void inline void
GetPot::variable::take(const char* Value, const char* FieldSeparator) GetPot::variable::take(const char* Value, const char* FieldSeparator)
{ {
using namespace std;
original = std::string(Value); original = std::string(Value);
// separate string by white space delimiters using 'strtok' // separate string by white space delimiters using 'strtok'
@ -2430,4 +2438,3 @@ GetPot::variable::operator=(const GetPot::variable& That)
#endif // __include_guard_GETPOT_H__ #endif // __include_guard_GETPOT_H__

View file

@ -501,4 +501,3 @@ necessary. Here is a sample; alter the names:
That's all there is to it! That's all there is to it!

View file

@ -47,4 +47,3 @@ Enjoy !
Juli 2005, Juli 2005,
Frank R. Schaefer Frank R. Schaefer

View file

@ -14,6 +14,7 @@
#define PEHEADER_H #define PEHEADER_H
#include "PeLibAux.h" #include "PeLibAux.h"
#include <string.h>
namespace PeLib namespace PeLib
{ {

View file

@ -18,7 +18,7 @@
#include <iostream> #include <iostream>
#include <ctime> #include <ctime>
#include <getpot/getpot.hpp> #include <getpot/GetPot>
#include <utils.h> #include <utils.h>
#include <firmware.h> #include <firmware.h>

View file

@ -18,7 +18,7 @@
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <getpot/getpot.hpp> #include <getpot/GetPot>
#include <file.h> #include <file.h>
#include <firmware.h> #include <firmware.h>
#include <utils.h> #include <utils.h>

View file

@ -19,7 +19,7 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <ctime> #include <ctime>
#include <getpot/getpot.hpp> #include <getpot/GetPot>
#include <file.h> #include <file.h>
#include <updater.h> #include <updater.h>
#include <utils.h> #include <utils.h>

View file

@ -19,7 +19,7 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <cstdio> #include <cstdio>
#include <getpot/getpot.hpp> #include <getpot/GetPot>
#include <file.h> #include <file.h>
#include <updater.h> #include <updater.h>
#include <utils.h> #include <utils.h>

View file

@ -17,7 +17,7 @@
*/ */
#include <iostream> #include <iostream>
#include <getpot/getpot.hpp> #include <getpot/GetPot>
#include <cenc.h> #include <cenc.h>
#include <crypt.h> #include <crypt.h>
#include <file.h> #include <file.h>