Lines Matching defs:buf
166 static char buf[32];
172 strcpy(buf, "front page");
176 strcpy(buf, "back page");
182 sprintf(buf, "front section %d", n);
188 sprintf(buf, "back section %d", n);
192 strcpy(buf, "front page barcode");
196 strcpy(buf, "back page barcode");
202 sprintf(buf, "front barcode section %d", n);
208 sprintf(buf, "back barcode section %d", n);
212 strcpy(buf, "front page patchcode");
216 strcpy(buf, "back page patchcode");
222 sprintf(buf, "front patchcode section %d", n);
228 sprintf(buf, "back patchcode section %d", n);
232 strcpy(buf, "front page icon");
236 strcpy(buf, "back page icon");
240 strcpy(buf, "transmit bar/patch codes");
244 strcpy(buf, "unknown");
247 return buf;
487 struct barcode_data buf;
488 size_t buf_size = sizeof(buf);
498 memset (&buf, 0, sizeof(buf));
499 status = sanei_scsi_cmd (s->fd, &cmd, sizeof (cmd), &buf, &buf_size);
507 buf.barcodedata[sizeof(buf.barcodedata)-1] = '\0';
510 x = MIN((int) _2btol(buf.posxb), (int) _2btol(buf.posxa));
511 y = MIN((int) _2btol(buf.posyb), (int) _2btol(buf.posyd));
512 w = MAX((int) _2btol(buf.posxd), (int) _2btol(buf.posxd)) - x;
513 l = MAX((int) _2btol(buf.posya), (int) _2btol(buf.posyc)) - y;
538 print_barcodetype((int) _2btol(buf.barcodetype)),
539 (int) _2btol(buf.statusflag));
541 print_orientation((int) _2btol(buf.barcodeorientation)));
543 (int) _2btol(buf.posxb), (int) _2btol(buf.posyb));
545 (int) _2btol(buf.posxd), (int) _2btol(buf.posyd));
547 (int) _2btol(buf.posxa), (int) _2btol(buf.posya));
549 (int) _2btol(buf.posxc), (int) _2btol(buf.posyc));
553 (int) _2btol(buf.barcodesearchtime),
554 (int) buf.barcodelen);
556 buf.barcodedata);
570 struct icon_data buf;
571 size_t buf_size = sizeof(buf);
579 memset (&buf, 0, sizeof(buf));
581 status = sanei_scsi_cmd (s->fd, &cmd, sizeof (cmd), &buf, &buf_size);
584 s->iconwidth = _4btol(buf.iconwidth);
585 s->iconlength = _4btol(buf.iconlength);
588 _4btol(buf.windowwidth),
589 _4btol(buf.windowlength));
591 _4btol(buf.iconwidth),
592 _4btol(buf.iconlength),
593 _4btol(buf.iconwidthbytes));
595 buf.bitordering,
596 _4btol(buf.icondatalen));
604 read_barfile (BH_Scanner *s, void *buf, size_t *buf_size)
615 if ((nread = fread(buf, 1, *buf_size, s->barf)) < *buf_size)
648 read_data (BH_Scanner *s, void *buf, size_t *buf_size)
657 status = read_barfile(s, buf, buf_size);
666 status = sanei_scsi_cmd (s->fd, &cmd, sizeof (cmd), buf, buf_size);
954 inquiry (int fd, void *buf, size_t *buf_size, SANE_Byte evpd, SANE_Byte page_code)
966 status = sanei_scsi_cmd (fd, cmd, sizeof (cmd), buf, buf_size);
1372 char buf[255+1], *x, *y, *w, *l, *f, *ep;
1387 if (strlen(val) > sizeof(buf) - 1)
1395 strcpy(buf, val);
1398 w = strtok(buf, seps);
1501 char buf[255+1], *section;
1506 if (strlen(val) > sizeof(buf) - 1)
1513 strcpy(buf, val);
1515 section = strtok(buf, ",");
1537 if (section > buf + strlen(val)) break;
3749 sane_read (SANE_Handle handle, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *len)
3777 status = read_data (s, buf, &nread);