Merge branch 'master' of ssh://nicols-guest@git.debian.org/git/sane/sane-backends

merge-requests/1/head
Nicolas Martin 2009-09-05 23:53:10 +02:00
commit 30f72c4b57
1 zmienionych plików z 14 dodań i 13 usunięć

Wyświetl plik

@ -391,7 +391,6 @@ e2_network_discovery(void)
char *ip, *query = "EPSONP\x00\xff\x00\x00\x00\x00\x00\x00\x00"; char *ip, *query = "EPSONP\x00\xff\x00\x00\x00\x00\x00\x00\x00";
unsigned char buf[76]; unsigned char buf[76];
char name[18];
struct timeval to; struct timeval to;
@ -419,11 +418,8 @@ e2_network_discovery(void)
DBG(5, " response from %s\n", ip); DBG(5, " response from %s\n", ip);
/* minimal check, protocol unknown */ /* minimal check, protocol unknown */
if (strncmp((char *) buf, "EPSON", 5) == 0) { if (strncmp((char *) buf, "EPSON", 5) == 0)
strcpy(name, "net:"); attach_one_net(ip);
strcat(name, ip);
attach_one_net(name);
}
} }
} }
fcntl(fd, F_SETFL, save_flags); fcntl(fd, F_SETFL, save_flags);
@ -788,8 +784,13 @@ attach_one_usb(const char *dev)
static SANE_Status static SANE_Status
attach_one_net(const char *dev) attach_one_net(const char *dev)
{ {
char name[18];
DBG(7, "%s: dev = %s\n", __func__, dev); DBG(7, "%s: dev = %s\n", __func__, dev);
return attach(dev, SANE_EPSON_NET);
strcpy(name, "net:");
strcat(name, dev);
return attach(name, SANE_EPSON_NET);
} }
static SANE_Status static SANE_Status
@ -2089,13 +2090,13 @@ sane_get_parameters(SANE_Handle handle, SANE_Parameters *params)
max_x = max_y = 0; max_x = max_y = 0;
/* XXX check this */ s->params.pixels_per_line =
s->params.pixels_per_line = ((SANE_UNFIX(s->val[OPT_BR_X].w - s->val[OPT_TL_X].w)
(SANE_UNFIX(s->val[OPT_BR_X].w - / MM_PER_INCH) * dpi) + 0.5;
s->val[OPT_TL_X].w) / (MM_PER_INCH * dpi)) + 0.5;
s->params.lines = s->params.lines =
(SANE_UNFIX(s->val[OPT_BR_Y].w - ((SANE_UNFIX(s->val[OPT_BR_Y].w - s->val[OPT_TL_Y].w)
s->val[OPT_TL_Y].w) / (MM_PER_INCH * dpi)) + 0.5; / MM_PER_INCH) * dpi) + 0.5;
/* /*
* Make sure that the number of lines is correct for color shuffling: * Make sure that the number of lines is correct for color shuffling: