diff --git a/libretroshare/src/grouter/p3grouter.h b/libretroshare/src/grouter/p3grouter.h index 1626da7d7..8c6fbab5c 100644 --- a/libretroshare/src/grouter/p3grouter.h +++ b/libretroshare/src/grouter/p3grouter.h @@ -225,20 +225,13 @@ private: void handleLowLevelTransactionAckItem(RsGRouterTransactionAcknItem*) ; static Sha1CheckSum computeDataItemHash(RsGRouterGenericDataItem *data_item); -#ifdef __APPLE__ -public: -#endif - class nullstream: public std::ostream {}; std::ostream& grouter_debug() const { - static nullstream null ; - + static std::ostream null(0); return _debug_enabled?(std::cerr):null; } -#ifdef __APPLE__ -private: -#endif + void routePendingObjects() ; void handleTunnels() ; void autoWash() ; @@ -364,5 +357,3 @@ private: uint64_t _random_salt ; }; - -template p3GRouter::nullstream& operator<<(p3GRouter::nullstream& ns,const T&) { return ns ; } diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index d064dabf9..dce5a3c97 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -366,11 +366,7 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck #ifdef LOCALNET_TESTING >> parameter('R',"restrict-port" ,portRestrictions ,"port1-port2","Apply port restriction" ,false) #endif -#ifdef __APPLE__ >> help('h',"help","Display this Help") ; -#else - >> help() ; -#endif as.defaultErrorHandling(true) ; diff --git a/libretroshare/src/util/argstream.h b/libretroshare/src/util/argstream.h index 83fb30f0a..325d76fd5 100644 --- a/libretroshare/src/util/argstream.h +++ b/libretroshare/src/util/argstream.h @@ -140,16 +140,11 @@ namespace protected: inline OptionHolder(char s, const char* l, - const char* desc); -#ifdef __APPLE__ + const char* desc); friend OptionHolder help(char s, const char* l, const char* desc); -#else - friend OptionHolder help(char s='h', - const char* l="help", - const char* desc="Display this help"); -#endif + private: std::string shortName_; std::string longName_; diff --git a/retroshare-gui/src/gui/elastic/graphwidget.cpp b/retroshare-gui/src/gui/elastic/graphwidget.cpp index 571cdc828..dd32051da 100644 --- a/retroshare-gui/src/gui/elastic/graphwidget.cpp +++ b/retroshare-gui/src/gui/elastic/graphwidget.cpp @@ -259,7 +259,7 @@ void GraphWidget::keyPressEvent(QKeyEvent *event) } } -static void convolveWithGaussian(double *forceMap,int S,int /*s*/) +static void convolveWithGaussian(double *forceMap,unsigned int S,int /*s*/) { static double *bf = NULL ; @@ -267,8 +267,8 @@ static void convolveWithGaussian(double *forceMap,int S,int /*s*/) { bf = new double[S*S*2] ; - for(int i=0;i"; //out << trow(tcol("-"ARG_HELP) + // tcol(tr("Displays this usage message and exits."))); - out << trow(tcol("-"ARG_RESET) + + out << trow(tcol("-" ARG_RESET) + tcol(tr("Resets ALL stored RetroShare settings."))); - out << trow(tcol("-"ARG_DATADIR" <dir>") + + out << trow(tcol("-" ARG_DATADIR" <dir>") + tcol(tr("Sets the directory RetroShare uses for data files."))); - out << trow(tcol("-"ARG_LOGFILE" <file>") + + out << trow(tcol("-" ARG_LOGFILE" <file>") + tcol(tr("Sets the name and location of RetroShare's logfile."))); - out << trow(tcol("-"ARG_LOGLEVEL" <level>") + + out << trow(tcol("-" ARG_LOGLEVEL" <level>") + tcol(tr("Sets the verbosity of RetroShare's logging.") + "
[" + Log::logLevels().join("|") +"]")); - out << trow(tcol("-"ARG_GUISTYLE" <style>") + + out << trow(tcol("-" ARG_GUISTYLE" <style>") + tcol(tr("Sets RetroShare's interface style.") + "
[" + QStyleFactory::keys().join("|") + "]")); - out << trow(tcol("-"ARG_GUISTYLESHEET" <stylesheet>") + + out << trow(tcol("-" ARG_GUISTYLESHEET" <stylesheet>") + tcol(tr("Sets RetroShare's interface stylesheets."))); - out << trow(tcol("-"ARG_LANGUAGE" <language>") + + out << trow(tcol("-" ARG_LANGUAGE" <language>") + tcol(tr("Sets RetroShare's language.") + "
[" + LanguageSupport::languageCodes().join("|") + "]")); out << ""; diff --git a/retroshare-nogui/src/retroshare.cc b/retroshare-nogui/src/retroshare.cc index 59a1bf1b4..7ad45b0eb 100644 --- a/retroshare-nogui/src/retroshare.cc +++ b/retroshare-nogui/src/retroshare.cc @@ -85,12 +85,9 @@ int main(int argc, char **argv) args >> parameter("docroot", docroot, "path", "Serve static files from this path.", false); // unfinished //args >> parameter("http-listen", listenAddress, "ipv6 address", "Listen only on the specified address.", false); - args >> option("http-allow-all", allowAllIps, "allow connections from all IP adresses (default= localhost only)"); -#ifdef __APPLE__ + args >> option("http-allow-all", allowAllIps, "allow connections from all IP adresses (default= localhost only)"); args >> help('h',"help","Display this Help"); -#else - args >> help(); -#endif + if (args.helpRequested()) { std::cerr << args.usage() << std::endl;