mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Support for LIT output via the commandline tool any2lit (thanks to Marshall Vandegrift)
This commit is contained in:
commit
2d4b0c89b1
@ -21,7 +21,7 @@
|
|||||||
+ ((compressor)->input.size - (compressor)->input.offset))
|
+ ((compressor)->input.size - (compressor)->input.offset))
|
||||||
|
|
||||||
typedef struct buffer_t {
|
typedef struct buffer_t {
|
||||||
void *data;
|
char *data;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
} buffer_t;
|
} buffer_t;
|
||||||
@ -222,7 +222,7 @@ Compressor_init(Compressor *self, PyObject *args, PyObject *kwds)
|
|||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
Compressor_compress__(
|
Compressor_compress__(
|
||||||
Compressor *self, unsigned char *data, unsigned int inlen, int flush)
|
Compressor *self, char *data, unsigned int inlen, int flush)
|
||||||
{
|
{
|
||||||
buffer_t *residue = &self->residue;
|
buffer_t *residue = &self->residue;
|
||||||
buffer_t *input = &self->input;
|
buffer_t *input = &self->input;
|
||||||
@ -305,7 +305,7 @@ static PyObject *
|
|||||||
Compressor_compress(Compressor *self, PyObject *args, PyObject *kwds)
|
Compressor_compress(Compressor *self, PyObject *args, PyObject *kwds)
|
||||||
{
|
{
|
||||||
static char *kwlist[] = {"data", "flush", NULL};
|
static char *kwlist[] = {"data", "flush", NULL};
|
||||||
unsigned char *data = NULL;
|
char *data = NULL;
|
||||||
unsigned int inlen = 0;
|
unsigned int inlen = 0;
|
||||||
int flush = 0;
|
int flush = 0;
|
||||||
|
|
||||||
|
@ -23,7 +23,11 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#ifdef _MSC_VER
|
||||||
|
# include "msstdint.h"
|
||||||
|
#else /* _MSC_VER */
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif /* _MSC_VER */
|
||||||
#include <string.h> /* for memset on Linux */
|
#include <string.h> /* for memset on Linux */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user