Commit graph

276 commits

Author SHA1 Message Date
Solomon Peachy fa41b973a0 misc: Update copyright year in a few places I'd missed 2023-03-19 21:33:55 -04:00
Solomon Peachy 68f79125a9 docs: Update copyright year for files modified (so far) in 2022 2022-09-29 14:28:16 -04:00
Solomon Peachy 8af7aadde3 common: Fix crash with libusb 1.0.25
Original patch by Ben Berg, but reworked to apply to master code
2022-03-18 10:52:16 -04:00
Solomon Peachy d7e3672fa6 common: 'FAST_RETURN=0' can now be used to disable fast_return mode. 2021-10-28 16:16:23 -04:00
Solomon Peachy e203ec1d0b common: Fix the "offline-report" state logging 2021-10-12 08:51:12 -04:00
Solomon Peachy 29c90dc0df various: Update copyright year 2021-09-30 22:02:33 -04:00
Solomon Peachy a396200bce all: make "fast_return" only affect the final print in a job.
That way we can take advantage of printer pipelining within a job
even when fast_return is turned off.

This refactoring was also necessary for further changes in how
fast_return will work.
2021-09-30 13:55:27 -04:00
Solomon Peachy e32c652d64 common: custom ATTRs aren't supported by CUPS, use PPD attributes instead.
StpUsbBackend, StpUsbVid, StpUsbPid, StpUsbBus, StpUsbPort

plus

  StpMediaID##, StpMediaName##

We can use STATE: reasons or
 ATTR:printer-alert="code=XXX,severity=YYY"
 ATTR:printer-alert-description="textual explanation"
   code=jam,coverOpen,subunitMissing/Full/etc,and so forth...
   severity=warning,critical,other
2021-09-29 23:30:45 -04:00
Solomon Peachy 3d6ff53559 common: Rework usage of connecting-to-device & add offline-report
The former is logged as soon as we start probing, and cleared once
we've found the printer we care about.  The latter is only set
if we fail to find matching printer, and cleared otherwise
2021-09-29 22:56:44 -04:00
Solomon Peachy 1a1e1c7dfb common: report the usb vid, pid, bus, and port as CUPS attributes
ATTR:org.gutenprint.usb.backend=%s
	ATTR:org.gutenprint.usb.vid=%04x
	ATTR:org.gutenprint.usb.vid=%04x
        ATTR:org.gutenprint.usb.bus=%03d
        ATTR:org.gutenprint.usb.port=%03d
2021-09-29 18:12:46 -04:00
Solomon Peachy 80d8222551 common: Log the bus/port number when we're probing things 2021-09-27 19:57:58 -04:00
Solomon Peachy 6c85215ac7 common: Be more explicit when in CUPS command mode 2021-09-26 22:53:28 -04:00
Solomon Peachy 50819d9f0a common: key off of CONTENT_TYPE to determine if we're a command or not 2021-09-26 22:34:49 -04:00
Solomon Peachy ccec9973eb common: when debug output is requested, disable quiet mode 2021-08-04 17:37:28 -04:00
Solomon Peachy 316710ca63 Add backend for the kodak 8800/9810
* COMPLETELY UNTESTED *

To-Do:

 * Did I menton testing?
 * cmdline tools to query/dump:
   * media
   * counters
   * error log
   * fw versions
 * Query major status (eg idle, printing, etc)
 * Detect errors at runtime (eg cover open, ribbon not loaded, etc)
2021-08-04 17:18:01 -04:00
Solomon Peachy 9871160a45 fix build under mingw 2021-07-12 19:50:15 -04:00
Solomon Peachy 42806398b3 mitsud90: Rework panorama handling code.
* Expect single-image job from gutenprint
 * Split job into separate overlapping panels
 * Create a job for each panel
 * Nuke original parsed job

Still (major) TODO:  processing overlapping regions!
2021-07-11 22:19:57 -04:00
Solomon Peachy 1ce5a85d82 common: Change backend->read_parse() API to allow returning multiple jobs
Handle up to MAX_JOBS_FROM_READ_PARSE (== 3)
2021-07-11 21:28:28 -04:00
Solomon Peachy 5cbceb686c common: Dump received data if *received len* is under 4K.
(not the buffer size!)
2021-05-14 06:29:29 -04:00
Solomon Peachy 2bc38801f4 Don't emit processing library info in STATS_ONLY mode. 2021-05-05 21:14:59 -04:00
Solomon Peachy f9cbd6ee74 README updates:
* Consistent naming for supported/unsupported lists
 * Move Mitsu CP30 to supported list
 * Naming fixes for Mitsu CP30 / CP9xxx / CP3800 series
 * Remove HiTi P110 from list entirely
 * Don't query Manuf/Model strings for old URI scemes
2021-04-28 23:11:45 -04:00
Solomon Peachy 85b778893e common: Slightly more robust Manufacturer/Model/Serial parsing
* Better comments
 * Get rid of dead code paths
 * Skip Manuf/Model query when using new-style URIs
 * If IEEE1284 produces bogus ID, fall back to USB descriptor
 * If both produce bogus ID, always report.
2021-04-28 22:33:29 -04:00
Solomon Peachy 9c8a521de5 common: It's okay to do a marker query for TEST_MODE_NOPRINT 2021-02-23 07:43:18 -05:00
Solomon Peachy d8c4f6d717 misc: Bump copyright year on some files updated in 2021 2021-02-07 23:56:37 -05:00
Solomon Peachy 20667338d6 common: Ditch URI_PREFIX, instead keying everything of the executable name 2021-02-07 11:30:38 -05:00
Solomon Peachy cd21dea6a1 common: DYESUB_BACKEND now checked as well as BACKEND envvar 2021-02-07 11:29:56 -05:00
Solomon Peachy c78d92ba39 common: OLD_URI wasn't being respected for older gutenprint versions. 2021-02-07 11:28:40 -05:00
Solomon Peachy 8a4fd56c13 Update shaftnet.org URLS from http -> https
Update copyright year as appropriate
2021-01-23 10:47:01 -05:00
Solomon Peachy cfe0fd8004 common: the 'dyesub_backend' structure is now const everywhere. 2020-10-05 22:27:08 -04:00
Solomon Peachy 8847037a32 common: Clean up some variable names in the probe functions.
No functional change.
2020-08-13 21:36:41 -04:00
Solomon Peachy 322ad8d7b7 common: Introduce a common USB connection object, and use it! 2020-08-12 20:04:54 -04:00
Solomon Peachy 27181eda63 common: un-hardcode 'stderr' as the logging stream
It's now a global variable that's initialized to stderr
(This is prep work for eventual support of printing applications)
2020-08-11 12:48:38 -04:00
Solomon Peachy f79500986f misc: Shut up a large pile of compile warnings with pedantic compilers 2020-03-24 18:23:00 -04:00
Solomon Peachy 0a9c45bd25 misc: Fix an error that pops up with very pedantic compiles. 2020-03-24 17:48:52 -04:00
Solomon Peachy 618343d85a common: Now works under Windows!
* Run-time error message for missing generic usb driver
  * Update readme to document what steps are needed
2020-03-18 14:05:04 -04:00
Solomon Peachy 913af03b57 misc: Update copyright year in the program output.
(File headers were correct, but interactive use was wrong..)
2020-03-03 18:48:33 -05:00
Solomon Peachy 4c5e93811e misc: Fix a small pile of static analysis problems 2020-03-03 00:16:05 -05:00
Solomon Peachy 494a188f1a common: Allow CORRTABLE_PATH to be overrided at runtime. 2020-02-16 16:20:47 -05:00
Solomon Peachy 81b78aa17c common: Fix probing when you don't specify a unique model.
(whoops!)
2020-02-11 21:33:58 -05:00
Solomon Peachy 4666ecaf94 common: Log the page parse after we increment the page number 2020-02-11 16:53:29 -05:00
Solomon Peachy 697486b467 All: Leave the "prefix" list for family or backwards-compatible names only.
...use the name in the DEVICE entry for backend matches!
2020-01-30 22:08:55 -05:00
Solomon Peachy 3eb2903def common: Backend name can now restrict printers we match against.
BACKEND=dnpds40  ./dyesub_backend -s

     will return the results for the first printer in the family

  BACKEND=dnp-ds620 ./dyesub_backend -s

     will return the results for the first printer of this specific type

(This doesn't work universally; most notably for models that share
 the same VID/PID)
2020-01-30 19:53:48 -05:00
Solomon Peachy a42576e326 misc: Clean up some of the problems compiling for Windows with mingw
Major remaining tasks:

  * Forcing Non-blocking I/O
  * dynamic library loading (eg dlopen or ltdl)
  * Final linking
2020-01-25 07:15:02 -05:00
Solomon Peachy dba0189792 common: Move the "Parsed page" message earlier. 2020-01-21 22:46:31 -05:00
Solomon Peachy 1b8553a710 Common: Log successful job combinings. 2020-01-21 22:19:36 -05:00
Solomon Peachy 552a3f030a common: Tweak the page number displayed when printing. 2020-01-21 22:16:50 -05:00
Solomon Peachy a111a2559d Common: Major rejiggering of print job combining
* Decision logic for combining jobs is global, with a per-backend
   combine_job() call for the nitty-gritty
 * Job combining code now handles multipage jobs as well as
   multiple copies of a given page
 * Will attempt to batch multipage jobs
 * Automatically invoked every time a job is appended to a joblist
 * Only used by DNP and Mitsu D70 backends (so far)
2020-01-21 21:48:57 -05:00
Solomon Peachy 626a49f05d Misc: Update address for FSF.
Also fix the copyright year for a few files.
2020-01-17 16:50:56 -05:00
Solomon Peachy af4fde17e0 common: Fix packed_bcd_to_uint32() computation. 2020-01-16 08:04:05 -05:00
Solomon Peachy 77b7b12202 misc: version bumps 2019-12-13 19:07:13 -05:00