~ubuntu-branches/ubuntu/precise/python-lzma/precise

« back to all changes in this revision

Viewing changes to liblzma_util.h

  • Committer: Bazaar Package Importer
  • Author(s): Richard Darst
  • Date: 2010-04-19 14:16:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100419141648-qwz3nm7shemqp37n
Tags: 0.5.3-1
* New upstream version
* Upgrade to 3.0 (quilt) just to be able to use .orig.tar.bz2
* Bump standards-version to 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef LIBLZMA_UTIL_H
2
 
#define LIBLZMA_UTIL_H 1
3
 
 
4
 
#include "liblzma.h"
5
 
#include "liblzma_fileobj.h"
6
 
 
7
 
#if BUFSIZ <= 1024
8
 
#define SMALLCHUNK 8192
9
 
#else
10
 
#define SMALLCHUNK BUFSIZ
11
 
#endif
12
 
 
13
 
#if SIZEOF_INT < 4
14
 
#define BIGCHUNK  (512 * 32)
15
 
#else
16
 
#define BIGCHUNK  (512 * 1024)
17
 
#endif
18
 
 
19
 
/* Bits in f_newlinetypes */
20
 
#define NEWLINE_UNKNOWN 0       /* No newline seen, yet */
21
 
#define NEWLINE_CR 1            /* \r newline seen */
22
 
#define NEWLINE_LF 2            /* \n newline seen */
23
 
#define NEWLINE_CRLF 4          /* \r\n newline seen */
24
 
 
25
 
extern PyObject *LZMAError;
26
 
 
27
 
bool Util_CatchLZMAError(lzma_ret lzuerror, lzma_stream *lzus, bool encoding);
28
 
 
29
 
size_t Util_NewBufferSize(size_t currentsize);
30
 
 
31
 
PyObject *Util_GetLine(LZMAFileObject *f, int n);
32
 
 
33
 
size_t Util_UnivNewlineRead(lzma_ret *lzuerror, lzma_FILE *stream,
34
 
                char* buf, size_t n, LZMAFileObject *f);
35
 
 
36
 
void Util_DropReadAhead(LZMAFileObject *f);
37
 
 
38
 
int Util_ReadAhead(LZMAFileObject *f, int bufsize);
39
 
 
40
 
PyStringObject *Util_ReadAheadGetLineSkip(LZMAFileObject *f, int skip, int bufsize);
41
 
 
42
 
#endif /* LIBLZMA_UTIL_H */