* frontend/scanimage.c, doc/scanimage.man: make -B (buffer-size)

selectable, and make long name consistent. (#309672 by Johannes Berg)
merge-requests/1/head
m. allan noah 2009-03-14 18:10:38 +00:00
rodzic f29d2ac068
commit 1636ba5334
3 zmienionych plików z 15 dodań i 9 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2009-03-13 m. allan noah <kitno455 a t gmail d o t com>
* frontend/scanimage.c, doc/scanimage.man: make -B (buffer-size)
selectable, and make long name consistent. (#309672 by Johannes Berg)
2009-03-13 m. allan noah <kitno455 a t gmail d o t com>
* tools/sane-desc.c: remove 8859-1 chars from string cleaner,
enforce only printable ASCII on output

Wyświetl plik

@ -28,7 +28,8 @@ scanimage \- scan an image
.RB [ \-T | \-\-test ]
.RB [ \-h | \-\-help ]
.RB [ \-v | \-\-verbose ]
.RB [ \-B | \-\-buffersize ]
.RB [ \-B | \-\-buffer-size
.RI [= size ]]
.RB [ \-V | \-\-version ]
.RI [ device\-specific\-options ]
.SH DESCRIPTION
@ -252,10 +253,8 @@ level.
The
.B \-B
or
.B \-\-buffersize
option changes the input buffersize that
.B scanimage
uses from default 32*1024 to 1024*1024 kbytes.
.B \-\-buffer-size
changes the input buffer size from 32KB to the number kB specified or 1M.
.PP
The
.B \-V

Wyświetl plik

@ -88,7 +88,7 @@ static struct option basic_options[] = {
{"progress", no_argument, NULL, 'p'},
{"test", no_argument, NULL, 'T'},
{"version", no_argument, NULL, 'V'},
{"buffer_size", no_argument, NULL, 'B'},
{"buffer-size", optional_argument, NULL, 'B'},
{"batch", optional_argument, NULL, 'b'},
{"batch-count", required_argument, NULL, OPTION_BATCH_COUNT},
{"batch-start", required_argument, NULL, OPTION_BATCH_START_AT},
@ -105,7 +105,7 @@ static struct option basic_options[] = {
#define OUTPUT_PNM 0
#define OUTPUT_TIFF 1
#define BASE_OPTSTRING "d:hi:Lf:nvBVTbp"
#define BASE_OPTSTRING "d:hi:Lf:B::nvVTbp"
#define STRIP_HEIGHT 256 /* # lines we increment image height */
static struct option *all_options;
@ -1718,7 +1718,10 @@ main (int argc, char **argv)
progress = 1;
break;
case 'B':
buffer_size = (1024 * 1024);
if (optarg)
buffer_size = 1024 * atoi(optarg);
else
buffer_size = (1024 * 1024);
break;
case 'T':
test = 1;
@ -1919,7 +1922,7 @@ Parameters are separated by a blank from single-character options (e.g.\n\
-T, --test test backend thoroughly\n\
-h, --help display this help message and exit\n\
-v, --verbose give even more status messages\n\
-B, --buffer-size change default input buffersize\n\
-B, --buffer-size=# change input buffer size (in kB, default 32)\n\
-V, --version print version information\n");
}