[sanexx-commit] SF.net SVN: sanexx: [11]
Status: Pre-Alpha
Brought to you by:
paddy_hack
|
From: <pad...@us...> - 2006-03-06 11:29:39
|
Revision: 11 Author: paddy_hack Date: 2006-03-06 03:29:31 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=11&view=rev Log Message: ----------- r22@qed: olaf | 2006-03-04 13:57:28 +0900 Changed all char * variables to use string instead. We're using C++, after all. Narrowed the blanket using namespace std to a list of the bits that are really needed. Modified Paths: -------------- trunk/src/scanimage.cc Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:21 + 52428bda-890d-0410-88ad-be188b7e1831:/local:22 Modified: trunk/src/scanimage.cc =================================================================== --- trunk/src/scanimage.cc 2006-03-06 11:29:10 UTC (rev 10) +++ trunk/src/scanimage.cc 2006-03-06 11:29:31 UTC (rev 11) @@ -34,20 +34,22 @@ #include <boost/program_options.hpp> -using namespace std; namespace po = boost::program_options; +using std::string; +using std::cout; +using std::endl; -int display_version (const char *program_name); -int display_help (const char *program_name, +int display_version (const string& program_name); +int display_help (const string& program_name, const po::options_description& desc); -int list_devices (const char *program_name, +int list_devices (const string& program_name, const po::options_description& desc); int main (int argc, char *argv[]) { - const char *program_name = basename (strdup (argv[0])); + string program_name = basename (strdup (argv[0])); po::options_description common ("Common options"); common.add_options () @@ -80,7 +82,7 @@ int -display_version (const char *program_name) +display_version (const string& program_name) { cout << program_name << " (" PACKAGE ") " @@ -95,7 +97,7 @@ } int -display_help (const char *program_name, +display_help (const string& program_name, const po::options_description& desc) { cout << desc << endl; @@ -103,7 +105,7 @@ } int -list_devices (const char *program_name, +list_devices (const string& program_name, const po::options_description& desc) { using namespace sane; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |