~ubuntu-branches/debian/jessie/sane-backends/jessie

« back to all changes in this revision

Viewing changes to backend/kvs1025.c

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2013-07-04 17:41:47 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130704174147-tl5tzd8bwvmctka2
Tags: 1.0.23-1
* QA upload.
* New upstream release.
* This package has been orphaned. Set maintainer to the Debian QA Group.
* Bump compat level to 9 (was 5) and require debhelper >= 9.
* debian/control:
  - sane-utils: Inherit Section: graphics from source package sane-backends.
  - Remove versioned dependencies. They are trivially satisfied.
* Drop the following patches. They are merged upstream now.
  - fix_v4l_build.patch
  - hurd_path_max_fix.patch
  - sane_desc_udev+acl.patch
  - scanimage_man_batch_start.patch
  - udev_usb_suspend.patch
  - xerox_mfp_add_scx_4623fw.patch
  - xerox_mfp_fix_usb_device.patch
* Drop disable_rpath.patch because the RPATH is already removed by chrpath
  in debian/rules.
* Rebase and refresh all other patches against the new upstream relase.
* debian/rules:
  - Simplify debian/rules by using dh sequencer.
  - Build with --parallel and with autotools_dev.
  - Enable all hardening build flags.
  - Install umax_pp with sane-utils.install.
* Build-Depend on libtiff5-dev. Thanks to Michael Terry for the patch.
  (Closes: #681079)
* Build-Depend on libusb-1.0-0-dev and enable libusb1.0 support in
  debian/rules. Thanks to Martin Pitt for the report and Whoopie for the
  patch. (Closes: #687137)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
   Copyright (C) 2008, Panasonic Russia Ltd.
3
 
   Copyright (C) 2010, m. allan noah
 
3
   Copyright (C) 2010-2011, m. allan noah
4
4
*/
5
5
/* sane - Scanner Access Now Easy.
6
6
   Panasonic KV-S1020C / KV-S1025C USB scanners.
282
282
        {
283
283
          if (dev->current_side == SIDE_FRONT)
284
284
            {
 
285
              /* back image data already read, so just return */
285
286
              dev->current_side = SIDE_BACK;
286
 
              /* return; image data already read */
287
 
              DBG (DBG_proc, "sane_start: exit\n");
288
 
 
289
 
              return SANE_STATUS_GOOD;
 
287
              DBG (DBG_proc, "sane_start: duplex back\n");
 
288
              status = SANE_STATUS_GOOD;
 
289
              goto cleanup;
290
290
            }
291
291
          else
292
292
            {
326
326
      if (status)
327
327
        return status;
328
328
    }
 
329
 
 
330
  /* software based enhancement functions from sanei_magic */
 
331
  /* these will modify the image, and adjust the params */
 
332
  /* at this point, we are only looking at the front image */
 
333
  /* of simplex or duplex data, back side has already exited */
 
334
  /* so, we do both sides now, if required */
 
335
  if (dev->val[OPT_SWDESKEW].w){
 
336
    buffer_deskew(dev,SIDE_FRONT);
 
337
  }
 
338
  if (dev->val[OPT_SWCROP].w){
 
339
    buffer_crop(dev,SIDE_FRONT);
 
340
  }
 
341
  if (dev->val[OPT_SWDESPECK].w){
 
342
    buffer_despeck(dev,SIDE_FRONT);
 
343
  }
 
344
  if (dev->val[OPT_SWDEROTATE].w || dev->val[OPT_ROTATE].w){
 
345
    buffer_rotate(dev,SIDE_FRONT);
 
346
  }
 
347
 
 
348
  if (IS_DUPLEX (dev)){
 
349
    if (dev->val[OPT_SWDESKEW].w){
 
350
      buffer_deskew(dev,SIDE_BACK);
 
351
    }
 
352
    if (dev->val[OPT_SWCROP].w){
 
353
      buffer_crop(dev,SIDE_BACK);
 
354
    }
 
355
    if (dev->val[OPT_SWDESPECK].w){
 
356
      buffer_despeck(dev,SIDE_BACK);
 
357
    }
 
358
    if (dev->val[OPT_SWDEROTATE].w || dev->val[OPT_ROTATE].w){
 
359
      buffer_rotate(dev,SIDE_BACK);
 
360
    }
 
361
  }
 
362
 
 
363
  cleanup:
 
364
 
 
365
  /* check if we need to skip this page */
 
366
  if (dev->val[OPT_SWSKIP].w && buffer_isblank(dev,dev->current_side)){
 
367
    DBG (DBG_proc, "sane_start: blank page, recurse\n");
 
368
    return sane_start(handle);
 
369
  }
 
370
 
329
371
  DBG (DBG_proc, "sane_start: exit\n");
330
372
  return status;
331
373
}