CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Macros | |
#define | pDEBUG(x, ...) |
Functions | |
static void | c3_line_data_append (struct cm3_line *cline, uint8_t byte) |
static void | c3_line_delta_overflow_append (struct cm3_line *cline, unsigned value) |
static void | c3_line_delta_append (struct cm3_line *cline, unsigned offset, const uint8_t *pattern, size_t count) |
static int | c3_line_flush (FILE *outstream, struct cm3_line *cline) |
static void | c3_delta_loop (struct cm3_line *cline, unsigned rel_offset, unsigned count, const uint8_t *pattern) |
static void | c3_line_encode (struct cm3_line *cline, const struct dlist_entry *edit, const uint8_t *pattern) |
static int | hl_c3_page_encode (struct brother_doc *info) |
#define pDEBUG | ( | x, | |
... | |||
) |
|
static |
Append a single byte to the end of the line data buffer
[in,out] | cline | Line info |
[in] | byte | The byte to append to the end of the line data buffer |
|
static |
Add an overflow value to the line buffer
[in,out] | cline | Line info |
[in] | value | Overflow value |
An overflow value is a value which is larger then the first byte in the 'delta entry' can include. An overflow value is encoded into a sequence of bytes. A byte of 255 signals more bytes follows. The sequence terminates if a byte below 0xff is found.
E.g. value = 0 -> <0x00> value = 10 -> <0x0a> value = 255 -> <0xff> <0x00> value = 256 -> <0xff> <0x01> value = 512 -> <0xff> <0xff> <0x02>
This overflow value is used to form the 'offset' and 'count' values in the 'delta entries'
|
static |
Write one delta replacement entry
[in,out] | cline | Line info |
[in] | offset | Offset to the previous change in the line |
[in] | pattern | What data to append |
[in] | count | How many bytes to append (minimal 1, maximal 8) |
7654 3210 ^_^^^^_ offset ^^^_______ count (encoded here is count - 1)
The encoding is like the one in hl_c1030_repeat_edit_append(), only here are no overflows allowed for the 'count' component :)
|
static |
Flush the encoded line data to the printer
[in] | outstream | The stream to send the printer data to |
[in] | cline | Line info |
0 | on success |
-errno | if the data flushing to the printer has failed |
|
static |
Encode one non-matching 'edit'
[in,out] | cline | The line to encode the printer's wire data to |
[in] | rel_offset | Offset to the last write |
[in] | count | Count of bytes to write |
[in] | pattern | Start of the pattern to write |
|
static |
Encode all non-matching 'edits' in a line
[in,out] | cline | The line to encode the printer's wire data to |
[in] | edit | The start 'edit' in the line (can be NULL, but should not) |
[in] | pattern | Start of the pattern to write |
|
static |
Encode the full page according to the 1030 method
[in,out] | info | Job info |
0 | on success |
-errno | on failures |