sanexx-commit Mailing List for sane++
Status: Pre-Alpha
Brought to you by:
paddy_hack
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
(6) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <pad...@us...> - 2006-03-12 09:24:33
|
Revision: 15 Author: paddy_hack Date: 2006-03-12 01:24:16 -0800 (Sun, 12 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=15&view=rev Log Message: ----------- r30@qed: olaf | 2006-03-12 17:05:36 +0900 Added a test for a device-name option and required it to display the device specific options when combined with --help. Implemented with still experimental API in the only frontend we provide. The library has been hacked up to support that API and pass the test. Modified Paths: -------------- trunk/include/sane++ trunk/lib/sane++.cc trunk/src/scanimage.cc trunk/tests/frontend-cli-options Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:29 + 52428bda-890d-0410-88ad-be188b7e1831:/local:30 Modified: trunk/include/sane++ =================================================================== --- trunk/include/sane++ 2006-03-12 09:24:03 UTC (rev 14) +++ trunk/include/sane++ 2006-03-12 09:24:16 UTC (rev 15) @@ -31,6 +31,7 @@ namespace sane { +using std::endl; using std::list; using std::ostream; using std::string; @@ -41,7 +42,17 @@ class device { public: + device (const string& device_name = string ()); + ~device (void); + class info; + class option; + + list<option> get_options (void); + +private: + SANE_Handle _handle; + list<option> _option; }; list<device::info> get_devices (void); @@ -64,6 +75,23 @@ ostream& operator<< (ostream& os, const device::info& dev_info); +class device::option +{ +public: + class descriptor; + + const descriptor& description () const; + +private: + SANE_Int _index; + const SANE_Option_Descriptor *_descriptor; + + option (SANE_Int i, const SANE_Option_Descriptor *sod = NULL); + + friend list<option> device::get_options (void); + friend ostream& operator<< (ostream& os, const device::option& dev_opt); +}; + } // namespace sane #endif /* !included_sanexx */ Modified: trunk/lib/sane++.cc =================================================================== --- trunk/lib/sane++.cc 2006-03-12 09:24:03 UTC (rev 14) +++ trunk/lib/sane++.cc 2006-03-12 09:24:16 UTC (rev 15) @@ -61,6 +61,47 @@ } +device::device (const string& device_name) + : _handle (NULL) +{ + SANE_Status s = sane_open (device_name.c_str (), &_handle); + + if (SANE_STATUS_GOOD != s) + throw; // something appropriate +} + +device::~device (void) +{ + sane_close (_handle); + _handle = NULL; +} + + +list<device::option> +device::get_options (void) +{ + if (_option.empty ()) { // lazy initialisation + SANE_Int count = 0; + SANE_Status s = sane_control_option (_handle, 0, + SANE_ACTION_GET_VALUE, + &count, NULL); + + if (SANE_STATUS_GOOD != s) + throw; + + for (SANE_Int i = 0; i < count; ++i) + { + const SANE_Option_Descriptor *sod = NULL; + sod = sane_get_option_descriptor (_handle, i); + + _option.push_back (device::option (i, sod)); + } + } + + return _option; +} + + string device::info::name () const { @@ -99,4 +140,27 @@ << dev_info.type (); } + +device::option::option (SANE_Int index, + const SANE_Option_Descriptor *descriptor) + : _index (index), _descriptor (descriptor) +{ +} + +ostream& +operator<< (ostream& os, const device::option& dev_opt) +{ + const SANE_Option_Descriptor *sod = dev_opt._descriptor; + + if (SANE_TYPE_GROUP == sod->type) { + os << " " << sod->title << ":"; + } else { + os << " --" << sod->name + << endl + << " " << sod->desc; + } + + return os; +} + } // namespace sane Modified: trunk/src/scanimage.cc =================================================================== --- trunk/src/scanimage.cc 2006-03-12 09:24:03 UTC (rev 14) +++ trunk/src/scanimage.cc 2006-03-12 09:24:16 UTC (rev 15) @@ -28,7 +28,7 @@ #include <cstdlib> #include <cstring> -#include <libgen.h> +#include <libgen.h> /* for a POSIX basename() */ #include <iostream> #include <boost/program_options.hpp> @@ -42,7 +42,8 @@ int display_version (const string& program_name); int display_help (const string& program_name, - const po::options_description& visible); + const po::options_description& visible, + const string& device_name = string ()); int list_devices (const string& program_name, const po::options_description& options); @@ -59,6 +60,8 @@ "display this help message and exit") ("list-devices", "display a list of available devices") + ("device-name", po::value<string> (), + "set the name of the device to use") ; po::variables_map vm; @@ -70,7 +73,13 @@ } if (vm.count ("help")) { - return display_help (program_name, visible); + string device_name; + + if (vm.count ("device-name")) { + device_name = vm["device-name"].as<string> (); + } + + return display_help (program_name, visible, device_name); } if (vm.count ("list-devices")) { @@ -98,14 +107,40 @@ int display_help (const string& program_name, - const po::options_description& visible) + const po::options_description& visible, + const string& device_name) { cout << "Usage: " << program_name << " [OPTION]..." << endl << "Acquire image data from a raster imaging device." << endl << "Image data is written to standard output." << endl << endl - << visible - << endl + << visible; + + if (!device_name.empty ()) { + cout << endl + << "Device Options (" << device_name << "):" << endl; + + using namespace sane; + + init (); + device *dev = new device (device_name); + // the new/delete is to work around a + // segfault with calling exit () when + // there are still instances around + + list<device::option> dev_opt_list = dev->get_options (); + list<device::option>::const_iterator opt = dev_opt_list.begin (); + + for (++opt; // skip number of options supported + opt != dev_opt_list.end (); ++opt) { + cout << *opt << endl; + } + + delete dev; + exit (); + } + + cout << endl << "Report bugs to <" PACKAGE_BUGREPORT << ">." << endl; return EXIT_SUCCESS; Modified: trunk/tests/frontend-cli-options =================================================================== --- trunk/tests/frontend-cli-options 2006-03-12 09:24:03 UTC (rev 14) +++ trunk/tests/frontend-cli-options 2006-03-12 09:24:16 UTC (rev 15) @@ -41,7 +41,8 @@ } test_documented_options scanimage++ \ - list-devices + list-devices \ + device-name sane_env scanimage++ --version > $test_prog.out 2>/dev/null @@ -59,3 +60,13 @@ ${srcdir}/sane-conf/test.conf` actual=`$AWK 'BEGIN {t = 0} {++t} END {print t}' $test_prog.out` test x"$expect" = x"$actual" + + +device=test:0 +sane_env scanimage++ --help --device-name $device > $test_prog.out 2>/dev/null +grep -ie "device options ($device):" $test_prog.out + +expect=`sane_env scanimage --help --device-name $device \ + | grep -ie "test options:"` +actual=`grep -ie "test options:" $test_prog.out` +test x"$expect" = x"$actual" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-03-12 09:24:10
|
Revision: 14 Author: paddy_hack Date: 2006-03-12 01:24:03 -0800 (Sun, 12 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=14&view=rev Log Message: ----------- r29@qed: olaf | 2006-03-12 14:48:10 +0900 Unstubbed the disclaimer in display_version(). Improved the output in display_help(). Renamed variable for better code readability. Zapped the short option alternative for --help until we get a better idea of what options will be available. Modified Paths: -------------- trunk/src/scanimage.cc Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:28 + 52428bda-890d-0410-88ad-be188b7e1831:/local:29 Modified: trunk/src/scanimage.cc =================================================================== --- trunk/src/scanimage.cc 2006-03-12 09:23:48 UTC (rev 13) +++ trunk/src/scanimage.cc 2006-03-12 09:24:03 UTC (rev 14) @@ -42,27 +42,27 @@ int display_version (const string& program_name); int display_help (const string& program_name, - const po::options_description& desc); + const po::options_description& visible); int list_devices (const string& program_name, - const po::options_description& desc); + const po::options_description& options); int main (int argc, char *argv[]) { string program_name = basename (strdup (argv[0])); - po::options_description common ("Common options"); - common.add_options () + po::options_description visible ("Program Options"); + visible.add_options () ("version", "display version information and exit") - ("help,h", + ("help", "display this help message and exit") ("list-devices", "display a list of available devices") ; po::variables_map vm; - po::store (po::parse_command_line (argc, argv, common), vm); + po::store (po::parse_command_line (argc, argv, visible), vm); po::notify (vm); if (vm.count ("version")) { @@ -70,11 +70,11 @@ } if (vm.count ("help")) { - return display_help (program_name, common); + return display_help (program_name, visible); } if (vm.count ("list-devices")) { - return list_devices (program_name, common); + return list_devices (program_name, visible); } return EXIT_SUCCESS; @@ -84,29 +84,36 @@ int display_version (const string& program_name) { - cout << program_name - << " (" PACKAGE ") " - << PACKAGE_VERSION - << endl + cout << program_name << " (" PACKAGE ") " << PACKAGE_VERSION << endl << "Written by Olaf Meeuwissen." << endl << endl << "Copyright (C) 2006 Olaf Meeuwissen" << endl - << "DISCLAIMER GOES HERE" << endl; + << ("This is free software; see the source for copying conditions.\n" + "There is NO warranty; not even for MERCHANTABILITY or FITNESS\n" + "FOR A PARTICULAR PURPOSE.") + << endl; return EXIT_SUCCESS; } int display_help (const string& program_name, - const po::options_description& desc) + const po::options_description& visible) { - cout << desc << endl; + cout << "Usage: " << program_name << " [OPTION]..." << endl + << "Acquire image data from a raster imaging device." << endl + << "Image data is written to standard output." << endl + << endl + << visible + << endl + << "Report bugs to <" PACKAGE_BUGREPORT << ">." << endl; + return EXIT_SUCCESS; } int list_devices (const string& program_name, - const po::options_description& desc) + const po::options_description& options) { using namespace sane; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-03-12 09:23:56
|
Revision: 13 Author: paddy_hack Date: 2006-03-12 01:23:48 -0800 (Sun, 12 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=13&view=rev Log Message: ----------- r28@qed: olaf | 2006-03-12 14:45:14 +0900 Added two very minor content checks for the help and version options. Marked the $actual and $expect variables as strings just in case they have spaces in them. It prevents test failure caused by syntax error conditions in the test command. Modified Paths: -------------- trunk/tests/frontend-cli-options Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:23 + 52428bda-890d-0410-88ad-be188b7e1831:/local:28 Modified: trunk/tests/frontend-cli-options =================================================================== --- trunk/tests/frontend-cli-options 2006-03-06 11:29:46 UTC (rev 12) +++ trunk/tests/frontend-cli-options 2006-03-12 09:23:48 UTC (rev 13) @@ -44,9 +44,18 @@ list-devices +sane_env scanimage++ --version > $test_prog.out 2>/dev/null +actual=`grep -ie "no warranty" $test_prog.out` +test x != x"$actual" + +sane_env scanimage++ --help > $test_prog.out 2>/dev/null +actual=`grep -ie usage $test_prog.out` +test x != x"$actual" + + sane_env scanimage++ --list-devices > $test_prog.out 2>/dev/null expect=`$AWK '/^number_of_devices/ {print $2}' \ ${srcdir}/sane-conf/test.conf` actual=`$AWK 'BEGIN {t = 0} {++t} END {print t}' $test_prog.out` -test x$expect = x$actual +test x"$expect" = x"$actual" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-03-06 11:29:57
|
Revision: 12 Author: paddy_hack Date: 2006-03-06 03:29:46 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=12&view=rev Log Message: ----------- r23@qed: olaf | 2006-03-04 17:38:04 +0900 Moved the device::info class definition out of device for clarity. Dumped individual member variables in favour of a reference to the SANE_Device * to avoid memory wastage. Adjusted accessors to make them return copies of the fields instead of constant references. Modified Paths: -------------- trunk/include/sane++ trunk/lib/sane++.cc Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:22 + 52428bda-890d-0410-88ad-be188b7e1831:/local:23 Modified: trunk/include/sane++ =================================================================== --- trunk/include/sane++ 2006-03-06 11:29:31 UTC (rev 11) +++ trunk/include/sane++ 2006-03-06 11:29:46 UTC (rev 12) @@ -35,34 +35,35 @@ using std::ostream; using std::string; +void init (void); +void exit (void); + class device { public: - class info - { - public: - info (const SANE_Device *dev_info); + class info; +}; - const string& name () const; - const string& vendor () const; - const string& model () const; - const string& type () const; +list<device::info> get_devices (void); - private: - string _name; - string _vendor; - string _model; - string _type; - }; -}; +class device::info +{ +public: + string name () const; + string vendor () const; + string model () const; + string type () const; -void init (void); -void exit (void); +private: + const SANE_Device *_dev_info; -list<device::info> get_devices (void); + info (const SANE_Device *dev_info); -ostream& operator<< (ostream& os, const device::info& i); + friend list<device::info> get_devices (void); +}; +ostream& operator<< (ostream& os, const device::info& dev_info); + } // namespace sane #endif /* !included_sanexx */ Modified: trunk/lib/sane++.cc =================================================================== --- trunk/lib/sane++.cc 2006-03-06 11:29:31 UTC (rev 11) +++ trunk/lib/sane++.cc 2006-03-06 11:29:46 UTC (rev 12) @@ -61,45 +61,42 @@ } - device::info::info (const SANE_Device *dev_info) - : _name (dev_info->name), - _vendor (dev_info->vendor), - _model (dev_info->model), - _type (dev_info->type) -{ -} - -const string& +string device::info::name () const { - return _name; + return _dev_info->name; } -const string& +string device::info::vendor () const { - return _vendor; + return _dev_info->vendor; } -const string& +string device::info::model () const { - return _model; + return _dev_info->model; } -const string& +string device::info::type () const { - return _type; + return _dev_info->type; } +device::info::info (const SANE_Device *dev_info) + : _dev_info (dev_info) +{ +} + ostream& -operator<< (ostream& os, const device::info& i) +operator<< (ostream& os, const device::info& dev_info) { - return os << i.name () - << i.vendor () - << i.model () - << i.type (); + return os << dev_info.name () + << dev_info.vendor () + << dev_info.model () + << dev_info.type (); } } // namespace sane This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
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. |
|
From: <pad...@us...> - 2006-03-06 11:29:24
|
Revision: 10 Author: paddy_hack Date: 2006-03-06 03:29:10 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=10&view=rev Log Message: ----------- r21@qed: olaf | 2006-03-04 13:46:48 +0900 Implemented a minimal set of SANE API functions to pass the new test, which requires a list of devices. The implementation does not do the error handling it should yet. Modified Paths: -------------- trunk/include/sane++ trunk/lib/sane++.cc trunk/src/scanimage.cc Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:20 + 52428bda-890d-0410-88ad-be188b7e1831:/local:21 Modified: trunk/include/sane++ =================================================================== --- trunk/include/sane++ 2006-03-06 11:28:50 UTC (rev 9) +++ trunk/include/sane++ 2006-03-06 11:29:10 UTC (rev 10) @@ -25,4 +25,44 @@ #include <sane/sane.h> +#include <list> +#include <ostream> +#include <string> + +namespace sane +{ +using std::list; +using std::ostream; +using std::string; + +class device +{ +public: + class info + { + public: + info (const SANE_Device *dev_info); + + const string& name () const; + const string& vendor () const; + const string& model () const; + const string& type () const; + + private: + string _name; + string _vendor; + string _model; + string _type; + }; +}; + +void init (void); +void exit (void); + +list<device::info> get_devices (void); + +ostream& operator<< (ostream& os, const device::info& i); + +} // namespace sane + #endif /* !included_sanexx */ Modified: trunk/lib/sane++.cc =================================================================== --- trunk/lib/sane++.cc 2006-03-06 11:28:50 UTC (rev 9) +++ trunk/lib/sane++.cc 2006-03-06 11:29:10 UTC (rev 10) @@ -21,3 +21,85 @@ #include <sane++> + +#include <cstdlib> + +namespace sane +{ + +void +init (void) +{ + sane_init (NULL, NULL); +} + +void +exit (void) +{ + return sane_exit (); +} + +list<device::info> +get_devices (void) +{ + list<device::info> result; + + const SANE_Device **device_list = NULL; + SANE_Status s = sane_get_devices (&device_list, true); + + if (SANE_STATUS_GOOD != s) + return result; // or throw something appropriate + + const SANE_Device **device = device_list; + while (device && *device) + { + result.push_back (device::info (*device)); + ++device; + } + + return result; +} + + + device::info::info (const SANE_Device *dev_info) + : _name (dev_info->name), + _vendor (dev_info->vendor), + _model (dev_info->model), + _type (dev_info->type) +{ +} + +const string& +device::info::name () const +{ + return _name; +} + +const string& +device::info::vendor () const +{ + return _vendor; +} + +const string& +device::info::model () const +{ + return _model; +} + +const string& +device::info::type () const +{ + return _type; +} + +ostream& +operator<< (ostream& os, const device::info& i) +{ + return os << i.name () + << i.vendor () + << i.model () + << i.type (); +} + +} // namespace sane Modified: trunk/src/scanimage.cc =================================================================== --- trunk/src/scanimage.cc 2006-03-06 11:28:50 UTC (rev 9) +++ trunk/src/scanimage.cc 2006-03-06 11:29:10 UTC (rev 10) @@ -38,11 +38,12 @@ namespace po = boost::program_options; +int display_version (const char *program_name); int display_help (const char *program_name, const po::options_description& desc); -int display_version (const char *program_name); +int list_devices (const char *program_name, + const po::options_description& desc); - int main (int argc, char *argv[]) { @@ -50,22 +51,28 @@ po::options_description common ("Common options"); common.add_options () + ("version", + "display version information and exit") ("help,h", "display this help message and exit") - ("version", - "display version information and exit") + ("list-devices", + "display a list of available devices") ; po::variables_map vm; po::store (po::parse_command_line (argc, argv, common), vm); po::notify (vm); + if (vm.count ("version")) { + return display_version (program_name); + } + if (vm.count ("help")) { return display_help (program_name, common); } - if (vm.count ("version")) { - return display_version (program_name); + if (vm.count ("list-devices")) { + return list_devices (program_name, common); } return EXIT_SUCCESS; @@ -73,14 +80,6 @@ int -display_help (const char *program_name, - const po::options_description& desc) -{ - cout << desc << endl; - return EXIT_SUCCESS; -} - -int display_version (const char *program_name) { cout << program_name @@ -94,3 +93,31 @@ return EXIT_SUCCESS; } + +int +display_help (const char *program_name, + const po::options_description& desc) +{ + cout << desc << endl; + return EXIT_SUCCESS; +} + +int +list_devices (const char *program_name, + const po::options_description& desc) +{ + using namespace sane; + + init (); + + list<device::info> dev_info_list = get_devices (); + list<device::info>::const_iterator dev_info = dev_info_list.begin (); + + for (; dev_info != dev_info_list.end (); ++dev_info) { + cout << *dev_info << endl; + } + + exit (); + + return EXIT_SUCCESS; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-03-06 11:29:08
|
Revision: 9 Author: paddy_hack Date: 2006-03-06 03:28:50 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=9&view=rev Log Message: ----------- r20@qed: olaf | 2006-03-04 13:37:57 +0900 Added the first test that requires SANE API usage. To ease consistent testing in a well-defined setup, the sane_env shell function has been added together with custom configuration files in tests/sane-conf/. A common variable for the test program name has been added and should be used to create files that hold intermediate test results and debugging statements. Unless debugging, all files matching $test_prog.* will be cleaned up at test end. Modified Paths: -------------- trunk/tests/Makefile.am trunk/tests/frontend-cli-options trunk/tests/functions Added Paths: ----------- trunk/tests/sane-conf/ trunk/tests/sane-conf/dll.conf trunk/tests/sane-conf/test.conf Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:11 + 52428bda-890d-0410-88ad-be188b7e1831:/local:20 Modified: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am 2006-03-01 13:37:16 UTC (rev 8) +++ trunk/tests/Makefile.am 2006-03-06 11:28:50 UTC (rev 9) @@ -29,4 +29,6 @@ EXTRA_DIST = \ functions \ + sane-conf/dll.conf \ + sane-conf/test.conf \ $(TESTS) Modified: trunk/tests/frontend-cli-options =================================================================== --- trunk/tests/frontend-cli-options 2006-03-01 13:37:16 UTC (rev 8) +++ trunk/tests/frontend-cli-options 2006-03-06 11:28:50 UTC (rev 9) @@ -31,8 +31,8 @@ shift for opt in \ + version \ help \ - version \ $@ \ ; do $program --help 2>/dev/null \ @@ -40,4 +40,13 @@ done } -test_documented_options scanimage++ +test_documented_options scanimage++ \ + list-devices + + +sane_env scanimage++ --list-devices > $test_prog.out 2>/dev/null + +expect=`$AWK '/^number_of_devices/ {print $2}' \ + ${srcdir}/sane-conf/test.conf` +actual=`$AWK 'BEGIN {t = 0} {++t} END {print t}' $test_prog.out` +test x$expect = x$actual Modified: trunk/tests/functions =================================================================== --- trunk/tests/functions 2006-03-01 13:37:16 UTC (rev 8) +++ trunk/tests/functions 2006-03-06 11:28:50 UTC (rev 9) @@ -20,11 +20,25 @@ # Boston, MA 02110-1301 USA +AWK=awk # temporary kludge + +test_prog=`echo $0 | sed 's,.*/,,'` + debug_mode () { test x$SANEXX_TEST_DEBUG != x } -debug_mode && set -x # trace command invocation +if `debug_mode`; then + set -x # trace command invocation +else + trap "rm -f $test_prog.*" 0 1 2 15 + # clean up temporary test droppings +fi +sane_env () +{ + SANE_CONFIG_DIR=${srcdir}/sane-conf "$@" +} + set -e # bomb at the first error Added: trunk/tests/sane-conf/dll.conf =================================================================== --- trunk/tests/sane-conf/dll.conf (rev 0) +++ trunk/tests/sane-conf/dll.conf 2006-03-06 11:28:50 UTC (rev 9) @@ -0,0 +1,23 @@ +# dll.conf -- a SANE dll backend configuration for testing purposes +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +test Added: trunk/tests/sane-conf/test.conf =================================================================== --- trunk/tests/sane-conf/test.conf (rev 0) +++ trunk/tests/sane-conf/test.conf 2006-03-06 11:28:50 UTC (rev 9) @@ -0,0 +1,25 @@ +# dll.conf -- a SANE test backend configuration for testing purposes +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +# Number of devices provided by the backend. +# +number_of_devices 5 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-03-01 13:37:32
|
Revision: 8 Author: paddy_hack Date: 2006-03-01 05:37:16 -0800 (Wed, 01 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=8&view=rev Log Message: ----------- Added build results and side effects to be ignored. These things most definitely should not be put under revision control. Property Changed: ---------------- trunk/lib/ trunk/src/ Property changes on: trunk/lib ___________________________________________________________________ Name: svn:ignore - .deps Makefile.in Makefile + .deps .libs Makefile.in Makefile Property changes on: trunk/src ___________________________________________________________________ Name: svn:ignore - .deps Makefile.in Makefile + .deps .libs Makefile.in Makefile scanimage++ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-03-01 13:32:21
|
Revision: 7 Author: paddy_hack Date: 2006-03-01 05:32:09 -0800 (Wed, 01 Mar 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=7&view=rev Log Message: ----------- Made clear what files do not belong in the repository. For the most part these are derived directly from files that _are_ under revision control and updated via ./configure or make. Some of the files will be pulled in as a result of running utils/bootstrap. Property Changed: ---------------- trunk/ trunk/lib/ trunk/src/ trunk/tests/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore + COPYING INSTALL Makefile.in Makefile aclocal.m4 autom4te.cache config.* configure depcomp install-sh libtool ltmain.sh missing stamp-h* Property changes on: trunk/lib ___________________________________________________________________ Name: svn:ignore + .deps Makefile.in Makefile Property changes on: trunk/src ___________________________________________________________________ Name: svn:ignore + .deps Makefile.in Makefile Property changes on: trunk/tests ___________________________________________________________________ Name: svn:ignore + Makefile.in Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-02-25 14:55:31
|
Revision: 6 Author: paddy_hack Date: 2006-02-25 06:55:19 -0800 (Sat, 25 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=6&view=rev Log Message: ----------- r11@qed: olaf | 2006-02-25 23:52:32 +0900 Added common command-line options to pass the first test. Modified Paths: -------------- trunk/src/Makefile.am trunk/src/scanimage.cc Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:10 + 52428bda-890d-0410-88ad-be188b7e1831:/local:11 Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2006-02-25 14:55:01 UTC (rev 5) +++ trunk/src/Makefile.am 2006-02-25 14:55:19 UTC (rev 6) @@ -28,7 +28,8 @@ scanimage___CPPFLAGS = \ -I$(top_srcdir)/include scanimage___LDFLAGS = \ - $(SANEXX_LIBS) + $(SANEXX_LIBS) \ + -lboost_program_options scanimage___SOURCES = \ scanimage.cc Modified: trunk/src/scanimage.cc =================================================================== --- trunk/src/scanimage.cc 2006-02-25 14:55:01 UTC (rev 5) +++ trunk/src/scanimage.cc 2006-02-25 14:55:19 UTC (rev 6) @@ -27,10 +27,70 @@ #include <sane++> #include <cstdlib> +#include <cstring> +#include <libgen.h> +#include <iostream> +#include <boost/program_options.hpp> + +using namespace std; +namespace po = boost::program_options; + + +int display_help (const char *program_name, + const po::options_description& desc); +int display_version (const char *program_name); + + int main (int argc, char *argv[]) { + const char *program_name = basename (strdup (argv[0])); + + po::options_description common ("Common options"); + common.add_options () + ("help,h", + "display this help message and exit") + ("version", + "display version information and exit") + ; + + po::variables_map vm; + po::store (po::parse_command_line (argc, argv, common), vm); + po::notify (vm); + + if (vm.count ("help")) { + return display_help (program_name, common); + } + + if (vm.count ("version")) { + return display_version (program_name); + } + return EXIT_SUCCESS; } + + +int +display_help (const char *program_name, + const po::options_description& desc) +{ + cout << desc << endl; + return EXIT_SUCCESS; +} + +int +display_version (const char *program_name) +{ + cout << program_name + << " (" PACKAGE ") " + << PACKAGE_VERSION + << endl + << "Written by Olaf Meeuwissen." << endl + << endl + << "Copyright (C) 2006 Olaf Meeuwissen" << endl + << "DISCLAIMER GOES HERE" << endl; + + return EXIT_SUCCESS; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-02-25 14:55:14
|
Revision: 5 Author: paddy_hack Date: 2006-02-25 06:55:01 -0800 (Sat, 25 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=5&view=rev Log Message: ----------- r10@qed: olaf | 2006-02-25 23:49:36 +0900 Integrated the "use-case" tests in the build infra-structure and added a first simple test. Modified Paths: -------------- trunk/Makefile.am trunk/configure.ac Added Paths: ----------- trunk/tests/Makefile.am trunk/tests/frontend-cli-options trunk/tests/functions Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:9 + 52428bda-890d-0410-88ad-be188b7e1831:/local:10 Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2006-02-25 14:54:49 UTC (rev 4) +++ trunk/Makefile.am 2006-02-25 14:55:01 UTC (rev 5) @@ -24,7 +24,8 @@ SUBDIRS = \ lib \ - src + src \ + tests include_HEADERS = \ include/sane++ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2006-02-25 14:54:49 UTC (rev 4) +++ trunk/configure.ac 2006-02-25 14:55:01 UTC (rev 5) @@ -70,6 +70,7 @@ Makefile \ lib/Makefile \ src/Makefile \ + tests/Makefile \ ]) AC_OUTPUT Added: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am (rev 0) +++ trunk/tests/Makefile.am 2006-02-25 14:55:01 UTC (rev 5) @@ -0,0 +1,32 @@ +## Makefile.am -- an automake template for a Makefile.in file +## Copyright (C) 2006 Olaf Meeuwissen +## +## This file is part of the 'sane++' package. +## This package is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License or, at +## your option, any later version. +## +## This package is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +## FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +## See the GNU General Public License for more details. +## +## You should have received a verbatim copy of the GNU General Public +## License along with this package; if not, write to: +## +## Free Software Foundation +## 51 Franklin Street, 5th Floor +## Boston, MA 02110-1301 USA +## +## Process this file with automake to produce a Makefile.in file. + + +TESTS = \ + frontend-cli-options + +$(TESTS): functions + +EXTRA_DIST = \ + functions \ + $(TESTS) Added: trunk/tests/frontend-cli-options =================================================================== --- trunk/tests/frontend-cli-options (rev 0) +++ trunk/tests/frontend-cli-options 2006-02-25 14:55:01 UTC (rev 5) @@ -0,0 +1,43 @@ +#! /bin/sh +# frontend-cli-options -- checks for presence of command-line options +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +source ${srcdir}/functions + +PATH=../src:$PATH + +test_documented_options () +{ + program=$1 + shift + + for opt in \ + help \ + version \ + $@ \ + ; do + $program --help 2>/dev/null \ + | grep -we --$opt 2>&1 >/dev/null + done +} + +test_documented_options scanimage++ Property changes on: trunk/tests/frontend-cli-options ___________________________________________________________________ Name: svn:executable + * Added: trunk/tests/functions =================================================================== --- trunk/tests/functions (rev 0) +++ trunk/tests/functions 2006-02-25 14:55:01 UTC (rev 5) @@ -0,0 +1,30 @@ +# functions -- to ease writing tests -*- sh -*- +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +debug_mode () +{ + test x$SANEXX_TEST_DEBUG != x +} + +debug_mode && set -x # trace command invocation + +set -e # bomb at the first error This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-02-25 14:54:55
|
Revision: 4 Author: paddy_hack Date: 2006-02-25 06:54:49 -0800 (Sat, 25 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=4&view=rev Log Message: ----------- r9@qed: olaf | 2006-02-25 23:46:55 +0900 Document the fact that this project strives to follow a test-driven approach and where it keeps its "use-case" tests. Modified Paths: -------------- trunk/README Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:8 + 52428bda-890d-0410-88ad-be188b7e1831:/local:9 Modified: trunk/README =================================================================== --- trunk/README 2006-02-25 14:54:36 UTC (rev 3) +++ trunk/README 2006-02-25 14:54:49 UTC (rev 4) @@ -25,4 +25,20 @@ Refer to the 'INSTALL' file for generic installation instructions. +DEVELOPMENT STYLE + + sane++ aims to stick to a test-driven development style. As long as + all the tests pass, the sources should be in a releasable state. Of + course, this means that you need to write a test first and only then + start coding to make that test pass. + + The most important tests are the "use-case" tests. Such tests check + "end-user functionality", like usability of a sane++ frontend with a + regular SANE backend, some real life scenarios in which a user tries + to set an option that is not supported by the device. Such use-case + tests are collected in the 'tests/' directory and are run as part of + the 'check' target. That is, running `make check` will execute each + and every use-case test. + + -- Olaf Meeuwissen <pad...@us...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-02-25 14:54:44
|
Revision: 3 Author: paddy_hack Date: 2006-02-25 06:54:36 -0800 (Sat, 25 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=3&view=rev Log Message: ----------- r8@qed: olaf | 2006-02-25 23:13:01 +0900 Clarified purpose of NEWS file. Modified Paths: -------------- trunk/NEWS Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:6 + 52428bda-890d-0410-88ad-be188b7e1831:/local:8 Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2006-02-25 04:43:37 UTC (rev 2) +++ trunk/NEWS 2006-02-25 14:54:36 UTC (rev 3) @@ -0,0 +1 @@ +NEWS -- an overview of user-visible changes with each release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-02-25 04:43:58
|
Revision: 2 Author: paddy_hack Date: 2006-02-24 20:43:37 -0800 (Fri, 24 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=2&view=rev Log Message: ----------- r6@qed: olaf | 2006-02-25 13:42:11 +0900 Seeded a GNU standards compliant package with a bare minimum of source files. The utils/bootstrap utility may be used to bootstrap clean svn checkouts. The scanimage++ program and sane++ library are just stubs. Added Paths: ----------- trunk/AUTHORS trunk/ChangeLog trunk/Makefile.am trunk/NEWS trunk/README trunk/configure.ac trunk/include/ trunk/include/sane++ trunk/lib/Makefile.am trunk/lib/sane++.cc trunk/src/Makefile.am trunk/src/scanimage.cc trunk/utils/bootstrap Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge - 52428bda-890d-0410-88ad-be188b7e1831:/local:3 + 52428bda-890d-0410-88ad-be188b7e1831:/local:6 Added: trunk/AUTHORS =================================================================== --- trunk/AUTHORS (rev 0) +++ trunk/AUTHORS 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,4 @@ +AUTHORS -- a list of who contributed what + +Olaf Meeuwissen <pad...@us...> + - all _original_ sources unless mentioned otherwise below Added: trunk/ChangeLog =================================================================== Added: trunk/Makefile.am =================================================================== --- trunk/Makefile.am (rev 0) +++ trunk/Makefile.am 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,33 @@ +## Makefile.am -- an automake template for a Makefile.in file +## Copyright (C) 2006 Olaf Meeuwissen +## +## This file is part of the 'sane++' package. +## This package is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License or, at +## your option, any later version. +## +## This package is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +## FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +## See the GNU General Public License for more details. +## +## You should have received a verbatim copy of the GNU General Public +## License along with this package; if not, write to: +## +## Free Software Foundation +## 51 Franklin Street, 5th Floor +## Boston, MA 02110-1301 USA +## +## Process this file with automake to produce a Makefile.in file. + + +SUBDIRS = \ + lib \ + src + +include_HEADERS = \ + include/sane++ + +EXTRA_DIST = \ + utils/bootstrap Added: trunk/NEWS =================================================================== Added: trunk/README =================================================================== --- trunk/README (rev 0) +++ trunk/README 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,28 @@ + + sane++ + + +Copyright (C) 2006 Olaf Meeuwissen + + + ABSTRACT + + The sane++ package aims to provide an object-oriented (OO) wrapper + around the SANE API, for frontend as well as backend implementers, + and demonstrates its feasibility/functionality with several sample + programs. + + + LICENSING + + All _original_ sources are covered by the terms of the GNU General + Public License. A copy of the GNU General Public License, the GPL + for short, can be found in the 'COPYING' file. + + +INSTALLATION + + Refer to the 'INSTALL' file for generic installation instructions. + + + -- Olaf Meeuwissen <pad...@us...> Added: trunk/configure.ac =================================================================== --- trunk/configure.ac (rev 0) +++ trunk/configure.ac 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,75 @@ +dnl configure.ac -- an -*- autoconf -*- template for configure +dnl Copyright (C) 2006 Olaf Meeuwissen +dnl +dnl This file is part of the 'sane++' package. +dnl This package is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License or, at +dnl your option, any later version. +dnl +dnl This package is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +dnl FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +dnl See the GNU General Public License for more details. +dnl +dnl You should have received a verbatim copy of the GNU General Public +dnl License along with this package; if not, write to: +dnl +dnl Free Software Foundation +dnl 51 Franklin Street, 5th Floor +dnl Boston, MA 02110-1301 USA +dnl +dnl Process this file with autoconf to produce a configure script. + + +dnl preamble + +AC_PREREQ(2.59) +AC_INIT([sane++], + [0.0.0], + [san...@li...], + [sane++]) + +AM_INIT_AUTOMAKE([1.9 gnu]) + +AC_CONFIG_SRCDIR([src/scanimage.cc]) +AC_CONFIG_HEADER([config.h]) + + +dnl checks for programs + +AC_PROG_CXX +AC_PROG_LIBTOOL +#AC_PROG_RANLIB dnl obsoleted by AC_PROG_LIBTOOL + +AC_CHECK_PROGS([SANE_CONFIG], [sane-config]) +if test x"$SANE_CONFIG" = x; then + AC_MSG_ERROR([$PACKAGE requires sane-config]) +fi + + +dnl checks for libraries + +AC_SUBST(SANE_LIBADD, [`$SANE_CONFIG --libs`]) +AC_SUBST(SANE_CFLAGS, [`$SANE_CONFIG --cflags`]) +AC_SUBST(SANE_LDFLAGS, [`$SANE_CONFIG --ldflags`]) + + +dnl checks for header files + + +dnl checks for typedefs, structures, and compiler characteristics + + +dnl checks for library functions + + +dnl appendix + +AC_CONFIG_FILES([\ + Makefile \ + lib/Makefile \ + src/Makefile \ + ]) + +AC_OUTPUT Added: trunk/include/sane++ =================================================================== --- trunk/include/sane++ (rev 0) +++ trunk/include/sane++ 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,28 @@ +// sane++ -- an object-oriented -*- C++ -*- SANE wrapper +// Copyright (C) 2006 Olaf Meeuwissen +// +// This file is part of the 'sane++' package. +// This package is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License or, at +// your option, any later version. +// +// This package is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +// FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +// See the GNU General Public License for more details. +// +// You should have received a verbatim copy of the GNU General Public +// License along with this package; if not, write to: +// +// Free Software Foundation +// 51 Franklin Street, 5th Floor +// Boston, MA 02110-1301 USA + + +#ifndef included_sanexx +#define included_sanexx + +#include <sane/sane.h> + +#endif /* !included_sanexx */ Property changes on: trunk/include/sane++ ___________________________________________________________________ Name: svn:mime-type + text/cpp Added: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am (rev 0) +++ trunk/lib/Makefile.am 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,42 @@ +## Makefile.am -- an automake template for a Makefile.in file +## Copyright (C) 2006 Olaf Meeuwissen +## +## This file is part of the 'sane++' package. +## This package is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License or, at +## your option, any later version. +## +## This package is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +## FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +## See the GNU General Public License for more details. +## +## You should have received a verbatim copy of the GNU General Public +## License along with this package; if not, write to: +## +## Free Software Foundation +## 51 Franklin Street, 5th Floor +## Boston, MA 02110-1301 USA +## +## Process this file with automake to produce a Makefile.in file. + + +lib_LTLIBRARIES = libsane++.la + +## See `info '(libtool)Updating version info'` for details on when +## and how to change these. + +CURRENT = 0 +REVISION = 0 +AGE = 0 + +libsane___la_CPPFLAGS = \ + -I$(top_srcdir)/include +libsane___la_LDFLAGS = \ + -version-info $(CURRENT):$(REVISION):$(AGE) \ + $(SANE_LDFLAGS) +libsane___la_LIBADD = \ + $(SANE_LIBADD) +libsane___la_SOURCES = \ + sane++.cc Added: trunk/lib/sane++.cc =================================================================== --- trunk/lib/sane++.cc (rev 0) +++ trunk/lib/sane++.cc 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,23 @@ +// sane++.cc -- an object-oriented -*- C++ -*- SANE wrapper +// Copyright (C) 2006 Olaf Meeuwissen +// +// This file is part of the 'sane++' package. +// This package is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License or, at +// your option, any later version. +// +// This package is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +// FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +// See the GNU General Public License for more details. +// +// You should have received a verbatim copy of the GNU General Public +// License along with this package; if not, write to: +// +// Free Software Foundation +// 51 Franklin Street, 5th Floor +// Boston, MA 02110-1301 USA + + +#include <sane++> Added: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am (rev 0) +++ trunk/src/Makefile.am 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,37 @@ +## Makefile.am -- an automake template for a Makefile.in file +## Copyright (C) 2006 Olaf Meeuwissen +## +## This file is part of the 'sane++' package. +## This package is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License or, at +## your option, any later version. +## +## This package is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +## FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +## See the GNU General Public License for more details. +## +## You should have received a verbatim copy of the GNU General Public +## License along with this package; if not, write to: +## +## Free Software Foundation +## 51 Franklin Street, 5th Floor +## Boston, MA 02110-1301 USA +## +## Process this file with automake to produce a Makefile.in file. + + +bin_PROGRAMS = \ + scanimage++ + +scanimage___CPPFLAGS = \ + -I$(top_srcdir)/include +scanimage___LDFLAGS = \ + $(SANEXX_LIBS) +scanimage___SOURCES = \ + scanimage.cc + +SANEXX_LIBS = \ + -L../lib -lsane++ \ + $(SANE_LDFLAGS) $(SANE_LIBADD) Added: trunk/src/scanimage.cc =================================================================== --- trunk/src/scanimage.cc (rev 0) +++ trunk/src/scanimage.cc 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,36 @@ +// scanimage.cc -- a C++ version of the SANE scanimage(1) frontend +// Copyright (C) 2006 Olaf Meeuwissen +// +// This file is part of the 'sane++' package. +// This package is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License or, at +// your option, any later version. +// +// This package is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +// FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +// See the GNU General Public License for more details. +// +// You should have received a verbatim copy of the GNU General Public +// License along with this package; if not, write to: +// +// Free Software Foundation +// 51 Franklin Street, 5th Floor +// Boston, MA 02110-1301 USA + + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <sane++> + +#include <cstdlib> + + +int +main (int argc, char *argv[]) +{ + return EXIT_SUCCESS; +} Added: trunk/utils/bootstrap =================================================================== --- trunk/utils/bootstrap (rev 0) +++ trunk/utils/bootstrap 2006-02-25 04:43:37 UTC (rev 2) @@ -0,0 +1,24 @@ +#! /bin/sh +# bootstrap -- initial checkout to a state where you can ./configure +# Copyright (C) 2006 Olaf Meeuwissen +# +# This file is part of the 'sane++' package. +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License or, at +# your option, any later version. +# +# This package is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS +# FOR A PARTICULAR PURPOSE or MERCHANTABILITY. +# See the GNU General Public License for more details. +# +# You should have received a verbatim copy of the GNU General Public +# License along with this package; if not, write to: +# +# Free Software Foundation +# 51 Franklin Street, 5th Floor +# Boston, MA 02110-1301 USA + + +autoreconf -i $@ Property changes on: trunk/utils/bootstrap ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <pad...@us...> - 2006-02-24 13:27:13
|
Revision: 1 Author: paddy_hack Date: 2006-02-24 05:26:52 -0800 (Fri, 24 Feb 2006) ViewCVS: http://svn.sourceforge.net/sanexx/?rev=1&view=rev Log Message: ----------- r3@qed: olaf | 2006-02-24 22:16:52 +0900 Set up repository layout. All main development should happen on the trunk and exploratory or highly experimental stuff should be done on a branch. Of course, we archive releases and may do some bug-fixing for them if necessary. Added Paths: ----------- branches/ releases/ trunk/ trunk/doc/ trunk/lib/ trunk/src/ trunk/tests/ trunk/utils/ Property Changed: ---------------- / Property changes on: ___________________________________________________________________ Name: svk:merge + 52428bda-890d-0410-88ad-be188b7e1831:/local:3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |