[sane-devel] [PATCH v4 5/5] add optional argument '-b' to let saned bind an address

2015-10-11 Thread Matteo Croce
--- frontend/saned.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index f74b8fa..d33b031 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -249,6 +249,7 @@ static int num_handles; static int debug; static int run

[sane-devel] [PATCH v4 4/5] getopt support

2015-10-11 Thread Matteo Croce
add support for getopt_long, adjust help message --- frontend/saned.c | 75 +--- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index 8eff6c7..f74b8fa 100644 --- a/frontend/saned.c +++ b/fronte

[sane-devel] [PATCH v4 3/5] add usage()

2015-10-11 Thread Matteo Croce
move help text in a separate function --- frontend/saned.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index ab36397..8eff6c7 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -3253,6 +3253,11 @@ run_inetd (char *sock)

[sane-devel] [PATCH v4 2/5] saned: parse inetd args in main()

2015-10-11 Thread Matteo Croce
move argument parsing logic from run_inetd() to main() --- frontend/saned.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index e717ed2..ab36397 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -3172,7 +3172,7

[sane-devel] [PATCH v4 1/5] saned: parse standalone args in main()

2015-10-11 Thread Matteo Croce
move argument parsing logic from run_standalone() to main() --- frontend/saned.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index 108512d..e717ed2 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -2923,7 +2923

Re: [sane-devel] [PATCH 1/3] saned: parse standalone args in main()

2015-09-27 Thread Matteo Croce
2015-09-23 4:18 GMT+02:00 Olaf Meeuwissen : > Hi Matteo, > > Matteo Croce writes: > >> move argument parsing logic from run_standalone() to main() > > This patch and the other two in thise series look fine. I'll keep them > in the queue for the first release aft

[sane-devel] [PATCH 3/3] add usage()

2015-09-20 Thread Matteo Croce
move help text in a separate function --- frontend/saned.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index ab36397..93da1ff 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -3253,6 +3253,11 @@ run_inetd (char *sock)

[sane-devel] [PATCH 2/3] saned: parse inetd args in main()

2015-09-20 Thread Matteo Croce
move argument parsing logic from run_inetd() to main() --- frontend/saned.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index e717ed2..ab36397 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -3172,7 +3172,7

[sane-devel] [PATCH 1/3] saned: parse standalone args in main()

2015-09-20 Thread Matteo Croce
move argument parsing logic from run_standalone() to main() --- frontend/saned.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index 108512d..e717ed2 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -2923,7 +2923

[sane-devel] [PATCH v4 2/2] add JPEG support to scanimage

2015-09-18 Thread Matteo Croce
--- fix 1 bit scans colors doc/scanimage.man| 4 +- frontend/Makefile.am | 2 +- frontend/scanimage.c | 118 +-- 3 files changed, 118 insertions(+), 6 deletions(-) diff --git a/doc/scanimage.man b/doc/scanimage.man index 387e962..480d51e 10

[sane-devel] [PATCH v4 1/2] add PNG format to scanimage

2015-09-18 Thread Matteo Croce
--- fix 1 bit scans colors acinclude.m4 | 13 + configure.in | 1 + doc/scanimage.man| 4 +- frontend/Makefile.am | 2 +- frontend/scanimage.c | 149 +++ 5 files changed, 155 insertions(+), 14 deletions(-) diff --git

Re: [sane-devel] [PATCH v3 2/2] add JPEG support to scanimage

2015-09-17 Thread Matteo Croce
$fmt that would be easier to implement of format and extension would match. I will change it, no problem -- Matteo Croce OpenWrt Developer ___ __ | |.-.-.-.| | | |..| |_ | - || _ | -__| || | | || _|

Re: [sane-devel] [PATCH v3 1/2] add PNG format to scanimage

2015-09-17 Thread Matteo Croce
bian.org/html/doc008.html#s3.2 > > for why. My guess as to this odd behaviour is to align the pixel values > to the way PNM defines them. > > Can you fix this? Weird, I will fix it now that I can reproduce it wit

[sane-devel] [PATCH v3 2/2] add option to bind address

2015-09-15 Thread Matteo Croce
add optional argument '-b' to let saned bind a specific address --- doc/saned.man| 13 ++--- frontend/saned.c | 17 - 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/doc/saned.man b/doc/saned.man index 0264c01..6a09d42 100644 --- a/doc/saned.man +++ b/do

[sane-devel] [PATCH v3 1/2] use getopt

2015-09-15 Thread Matteo Croce
Implement command line parsing using getopt, replace the help string with a nicer one. --- NEWS | 7 + doc/saned.man| 15 + frontend/saned.c | 94 +++- 3 files changed, 66 insertions(+), 50 deletions(-) diff --git a/

Re: [sane-devel] [PATCH 1/2] use getopt()

2015-09-14 Thread Matteo Croce
2015-09-14 13:19 GMT+02:00 Olaf Meeuwissen : > Matteo Croce writes: > >> 2015-09-13 7:18 GMT+02:00 Olaf Meeuwissen : >>> Matteo Croce writes: >>> >>> [snip] >>> Code's usage: [ -a [ username ] | -d [ n ] | -s [ n ] ] | -h >>>

[sane-devel] [PATCH v3 2/2] add JPEG support to scanimage

2015-09-13 Thread Matteo Croce
--- exit with error immediately if JPEG support is not compiled in upscale for 1 bit depth scans to 8 bit gray doc/scanimage.man| 4 +- frontend/Makefile.am | 2 +- frontend/scanimage.c | 118 +-- 3 files changed, 118 insertions(+), 6 deleti

[sane-devel] [PATCH v3 1/2] add PNG format to scanimage

2015-09-13 Thread Matteo Croce
--- exit with error immediately if PNG support is not compiled in acinclude.m4 | 13 + configure.in | 1 + doc/scanimage.man| 4 +- frontend/Makefile.am | 2 +- frontend/scanimage.c | 143 +++ 5 files changed, 149 inse

Re: [sane-devel] [PATCH 1/2] use getopt()

2015-09-13 Thread Matteo Croce
2015-09-13 7:18 GMT+02:00 Olaf Meeuwissen : > Matteo Croce writes: > >> Sorry about that, I'll fix in a new version, also what do you think >> about a nicer help string like: >> "Usage: %s [-a username] [-d n] [-s n] [-h]\n" > > Your suggestion ma

Re: [sane-devel] [PATCH 1/2] add PNG format to scanimage

2015-09-13 Thread Matteo Croce
2015-09-13 11:15 GMT+02:00 Olaf Meeuwissen : > Matteo Croce writes: > >> 2015-09-12 9:13 GMT+02:00 Olaf Meeuwissen : >>> Hi Matteo, >>> >>> Thanks for taking the trouble to add optional PNG and JPEG output >>> support! >>> >>> I

[sane-devel] [PATCH v2 2/2] add JPEG support to scanimage

2015-09-12 Thread Matteo Croce
--- write help and manpage doc/scanimage.man| 4 +- frontend/Makefile.am | 2 +- frontend/scanimage.c | 103 +-- 3 files changed, 103 insertions(+), 6 deletions(-) diff --git a/doc/scanimage.man b/doc/scanimage.man index 387e962..480d51e 100

[sane-devel] [PATCH v2 1/2] add PNG format to scanimage

2015-09-12 Thread Matteo Croce
--- write help and manpage acinclude.m4 | 13 + configure.in | 1 + doc/scanimage.man| 4 +- frontend/Makefile.am | 2 +- frontend/scanimage.c | 143 ++- 5 files changed, 148 insertions(+), 15 deletions(-) diff --git

Re: [sane-devel] [PATCH 1/2] add PNG format to scanimage

2015-09-12 Thread Matteo Croce
formats. right, will do in v2 > Hope this helps, > -- > Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27 > Support Free Software Support the Free Software Foundation > https://my.fs

[sane-devel] [PATCH v2 2/2] add option to bind address

2015-09-12 Thread Matteo Croce
add optional argument '-b' to let saned bind a specific address --- also bind the address if AF_INDEP add man and help documentation doc/saned.man| 29 - frontend/saned.c | 17 - 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/doc/sa

[sane-devel] [PATCH v2 1/2] use getopt

2015-09-12 Thread Matteo Croce
Implement command line parsing using getopt, replace the help string with a nicer one. --- set proper return value with invalid arguments make arguments to -a -d and -s optional frontend/saned.c | 90 ++-- 1 file changed, 48 insertions(+), 42 del

Re: [sane-devel] [PATCH 2/2] add option to bind address

2015-09-12 Thread Matteo Croce
e message as well as the saned manual page. > > Could you fix that? > > Matteo Croce writes: > >> [snip] >> @@ -3288,6 +3289,9 @@ main (int argc, char *argv[]) >>run_mode = SANED_RUN_DEBUG; >>debug = atoi(optarg); >>break; >&g

Re: [sane-devel] [PATCH 1/2] use getopt()

2015-09-12 Thread Matteo Croce
ed the ball a bit is in the command-line option error > handling. The original code outputs a usage message when it finds the > help option as well as when it encounters anything unexpected. It also > returns a suitable exit value whereas your code does not. > > Could you fix

[sane-devel] [PATCH 1/2] add PNG format to scanimage

2015-09-10 Thread Matteo Croce
--- acinclude.m4 | 13 + configure.in | 1 + frontend/Makefile.am | 2 +- frontend/scanimage.c | 137 +++ 4 files changed, 143 insertions(+), 10 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index a8f1b7c..41a2ea4 10

[sane-devel] [PATCH 2/2] add JPEG support to scanimage

2015-09-10 Thread Matteo Croce
--- frontend/Makefile.am | 2 +- frontend/scanimage.c | 96 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/frontend/Makefile.am b/frontend/Makefile.am index 5adf22a..23061b3 100644 --- a/frontend/Makefile.am +++ b/frontend/Makef

[sane-devel] [PATCH] add PNG format to scanimage

2015-09-10 Thread Matteo Croce
--- acinclude.m4 | 13 + configure.in | 1 + frontend/Makefile.am | 2 +- frontend/scanimage.c | 137 +++ 4 files changed, 143 insertions(+), 10 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index a8f1b7c..41a2ea4 10

[sane-devel] [PATCH 1/2] use getopt()

2015-09-09 Thread Matteo Croce
--- frontend/saned.c | 80 +++- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index 108512d..f1f 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -2923,7 +2923,7 @@ do_bindings (int

[sane-devel] [PATCH 2/2] add option to bind address

2015-09-09 Thread Matteo Croce
--- frontend/saned.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/saned.c b/frontend/saned.c index f1f..edd8673 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -247,6 +247,7 @@ static int num_handles; static int debug; static int run_mode; sta