~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/pgp-compress.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
27
 * SUCH DAMAGE.
28
28
 *
29
 
 * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-compress.c,v 1.7 2007/11/15 21:14:31 momjian Exp $
 
29
 * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-compress.c,v 1.8 2009/06/11 14:48:52 momjian Exp $
30
30
 */
31
31
 
32
32
#include "postgres.h"
69
69
}
70
70
 
71
71
static int
72
 
compress_init(PushFilter * next, void *init_arg, void **priv_p)
 
72
compress_init(PushFilter *next, void *init_arg, void **priv_p)
73
73
{
74
74
        int                     res;
75
75
        struct ZipStat *st;
107
107
 
108
108
/* cant handle zero-len incoming data, but shouldnt */
109
109
static int
110
 
compress_process(PushFilter * next, void *priv, const uint8 *data, int len)
 
110
compress_process(PushFilter *next, void *priv, const uint8 *data, int len)
111
111
{
112
112
        int                     res,
113
113
                                n_out;
140
140
}
141
141
 
142
142
static int
143
 
compress_flush(PushFilter * next, void *priv)
 
143
compress_flush(PushFilter *next, void *priv)
144
144
{
145
145
        int                     res,
146
146
                                zres,
185
185
};
186
186
 
187
187
int
188
 
pgp_compress_filter(PushFilter ** res, PGP_Context * ctx, PushFilter * dst)
 
188
pgp_compress_filter(PushFilter **res, PGP_Context *ctx, PushFilter *dst)
189
189
{
190
190
        return pushf_create(res, &compress_filter, ctx, dst);
191
191
}
204
204
};
205
205
 
206
206
static int
207
 
decompress_init(void **priv_p, void *arg, PullFilter * src)
 
207
decompress_init(void **priv_p, void *arg, PullFilter *src)
208
208
{
209
209
        PGP_Context *ctx = arg;
210
210
        struct DecomprData *dec;
237
237
}
238
238
 
239
239
static int
240
 
decompress_read(void *priv, PullFilter * src, int len,
 
240
decompress_read(void *priv, PullFilter *src, int len,
241
241
                                uint8 **data_p, uint8 *buf, int buflen)
242
242
{
243
243
        int                     res;
308
308
};
309
309
 
310
310
int
311
 
pgp_decompress_filter(PullFilter ** res, PGP_Context * ctx, PullFilter * src)
 
311
pgp_decompress_filter(PullFilter **res, PGP_Context *ctx, PullFilter *src)
312
312
{
313
313
        return pullf_create(res, &decompress_filter, ctx, src);
314
314
}
315
315
#else                                                   /* !HAVE_ZLIB */
316
316
 
317
317
int
318
 
pgp_compress_filter(PushFilter ** res, PGP_Context * ctx, PushFilter * dst)
 
318
pgp_compress_filter(PushFilter **res, PGP_Context *ctx, PushFilter *dst)
319
319
{
320
320
        return PXE_PGP_UNSUPPORTED_COMPR;
321
321
}
322
322
 
323
323
int
324
 
pgp_decompress_filter(PullFilter ** res, PGP_Context * ctx, PullFilter * src)
 
324
pgp_decompress_filter(PullFilter **res, PGP_Context *ctx, PullFilter *src)
325
325
{
326
326
        return PXE_PGP_UNSUPPORTED_COMPR;
327
327
}