Commit Graph

50 Commits

Author SHA1 Message Date
Solomon Peachy db0c7d8b99 all: Eliminate the multi-stage cmdline parsing.
Unfortunately this means we lose the '-B backend' method, but the
overall control flow is much, much simpler now.
2015-08-13 21:09:56 -04:00
Solomon Peachy de8a32424c all: Unified approach to extra_vid/pid/type
This required a modification to all attach() methods.

Also, fix canonselphy's parsing/attachment code.
2015-08-12 22:56:29 -04:00
Solomon Peachy 20f6d05b8a common: Rework the early cmdline argument parsing code to improve robustness
Also move fast_return out of individual backends and into common code.
2015-08-12 21:02:11 -04:00
Solomon Peachy 114202d7f5 shinko6145: Add a preliminary backend. Does NOT include library work. 2015-07-26 23:05:21 -04:00
Solomon Peachy 2181ae04b9 all: Clean up a small pile of warnings that clang-analyzer found. 2015-07-04 11:03:52 -04:00
Solomon Peachy 5fa84dc2b7 s6245: Add ability to set standby time. 2015-07-04 10:01:23 -04:00
Solomon Peachy 4489c1c0a5 misc: Clean up buffer overflows identified by cppcheck 2015-07-04 09:45:48 -04:00
Solomon Peachy 49f6d85c45 s6245/s2145: Don't abort in the face of some soft errors. 2015-07-02 23:55:22 -04:00
Solomon Peachy 8f1243de31 s2145: Get rid of early parse. 2015-07-02 22:43:43 -04:00
Solomon Peachy 992e551a02 all: Fix command like parsing when the argument has an option.
This was a longstanding bug.  Oops.
2015-06-30 21:33:02 -04:00
Solomon Peachy 24c3550feb all: Ensure all malloc() failures are caught and logged. 2015-06-23 20:48:52 -04:00
Solomon Peachy c8aa3c47da shinkos2145: Update backend with a complete list of all error codes. 2015-02-24 23:39:57 -05:00
Solomon Peachy 04d1bbff04 s2145: One more 1245 reference removed. 2015-02-19 21:33:06 -05:00
Solomon Peachy f7d2f6e764 s2145: Minor improvements:
* Don't issue a media query on every state machine loop
 * Upon receiving a printer error, just abort.
 * When waiting for a state change, don't run the state machine.
 * Consolidate error detection into the main status query
2015-02-08 19:50:19 -05:00
Solomon Peachy dc7ba45fe2 s1245: Create a new backend for the Shinko s1245.
Shinko S1245 uses a different command language as the other Shinko
models, so it's not going to share much commonality with the 2145
2015-02-08 12:11:16 -05:00
Solomon Peachy 91631651bc shinko2145: Make it work again.
1) early_parse returning bogus codes
 2) media query in main loop sending wrong command
 3) printer type in early_parse printed incorrectly
2015-02-01 13:32:36 -05:00
Solomon Peachy 7a7d14687b shinkos2145: Add info on the Brava 21 2015-01-21 19:40:39 -05:00
Solomon Peachy b731dc04f8 Update copyright notice. 2015-01-05 21:39:22 -05:00
Solomon Peachy 125a4ef832 misc: Fix up some return codes to respect CUPS_BACKEND_* 2014-12-17 07:33:51 -05:00
Solomon Peachy 8b4e68c231 S2145: Add an early_parse method, so we can figure out what printer type
a given job is meant for -- the s2145 and s1245 have to be handled

(As an aside, the early_parse stuff is only really relevant if you're
using the backend in a standalone mode with multiple printers of the
same backend hooked up...)
2014-11-15 08:32:47 -05:00
Solomon Peachy 02f84569db Fix build bug. 2014-10-20 18:17:29 -04:00
Solomon Peachy d66663cfdc s2145: Documentation updates. 2014-10-19 23:38:23 -04:00
Solomon Peachy 5e2071d0ae s2145: Work on the s6245 and 6145. 2014-10-19 09:10:10 -04:00
Solomon Peachy 895b723ae5 s2145: Add initial support for the S1245 model.
With any luck, it'll acutally work.
2014-10-18 20:13:08 -04:00
Solomon Peachy e9981107b7 s2145: We know the s1245 USB VID/PID.
Now whether or not it acutally *works*...
2014-10-18 13:29:14 -04:00
Solomon Peachy e9958c39d8 s2145: use CUPS_BACKEND_* 2014-04-20 11:53:46 -04:00
Solomon Peachy 7edb9f1c67 s2145: Check print job against printer supported type, and abort
cleanly if the wrong media is loaded.
2014-04-20 10:28:29 -04:00
Solomon Peachy 1faa032ea6 backends: Revamp cmdline args so you can specify multiple backend args at once. 2014-02-11 22:45:14 -05:00
Solomon Peachy 825b82ef61 shinkos2145: fast return needed tweaking. 2014-02-11 21:45:47 -05:00
Solomon Peachy 5f8780cc3c More cppcheck-driven fixes. Mainly a bunch of memory leaks. 2014-02-11 20:11:33 -05:00
Solomon Peachy 8578561d38 shinkos2145: Fix return code for button enable/disable cmd.
Not that this seems to do anything.  Strange.
2014-02-10 23:00:00 -05:00
Solomon Peachy d7db0bbdbe Massive overhaul of command line handling.
Completely untested with real printers.

That happens tonight!  :)
2014-02-10 20:10:36 -05:00
Solomon Peachy 34e3b64fc4 all: Get rid of the now-obsolete 'multipage_capable' flag. 2014-01-30 21:37:07 -05:00
Solomon Peachy 6c335ea1e4 Update copyright notice; it's 2014 now! 2014-01-23 16:07:25 -05:00
Solomon Peachy 6acc8b553c backends: say "## copies remaining" to differentiate between pages. 2014-01-22 09:10:34 -05:00
Solomon Peachy 4aa050f695 backends: Fix a double-free error in all backends.
Since we always call read_parse() we always free the data buffers.  Make
sure we set them to NULL or we will try to double-free them when we
terminate normally.
2014-01-21 20:34:00 -05:00
Solomon Peachy 2eb20f90f4 backends: A 0-length read when doing our inital header load is
and EOF, so treat it as such and don't error out.
2014-01-20 19:41:52 -05:00
Solomon Peachy d7d60b7191 backends: Enhance to add multipage capabilities.
DNP ds40/ds80 and Sony UP-DR150/200 backends do NOT support this yet.

Next up is to commit the core.
2014-01-17 22:54:25 -05:00
Solomon Peachy 817b6b04fc all: Handle short reads when loading in initial printjob header. 2014-01-13 18:30:30 -05:00
Solomon Peachy 1888254860 all: Move to using the common read_data() instead of direct libusb functions. 2013-12-21 22:55:33 -05:00
Solomon Peachy 875ebd2d76 all: Silence nearly all DEBUG outputs unless DYESUB_DEBUG is set in the
2013-12-21 22:15:18 -05:00
Solomon Peachy 5d58950293 shinko_s2145: Whitespace. 2013-12-17 08:30:37 -05:00
Solomon Peachy 3d434dc96e misc: open() with O_CREAT requires a MODE argument. 2013-11-25 09:09:29 -05:00
Solomon Peachy be8eec4f2d common: Return better CUPS error codes, and document them. 2013-09-30 15:15:28 +01:00
Solomon Peachy 294018b7ed s2145: Log when fast return is active. 2013-09-30 13:30:19 +01:00
Solomon Peachy 140f9ecf42 s2145: Enable a 'fast return' mode
This terminates the backend as soon as the printer acks the print job,
allowing the use of both printer bufers.
2013-09-30 13:07:35 +01:00
Solomon Peachy 7a7bdf9fab all: Update URL to the public git repo. 2013-08-20 20:10:21 -04:00
Solomon Peachy 1deb5ca1b3 s2145: Clean up calling conventions of s2145_do_cmd()
Instead of passing dev, endp_up, endp_down, just pass the ctx that has
everything in it already.
2013-08-20 20:02:10 -04:00
Solomon Peachy b81f6735ac s2145: Minor documentation cleanups. 2013-08-08 08:53:48 -04:00
Solomon Peachy 36404817e7 common: Rename everything consistently. 2013-07-27 07:34:36 -04:00
Renamed from shinko_s2145_print.c (Browse further)