~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/azio.h

  • Committer: Brian Aker
  • Date: 2010-02-24 00:19:06 UTC
  • mto: (1273.13.98 build)
  • mto: This revision was merged to the branch mainline in revision 1309.
  • Revision ID: brian@gaz-20100224001906-zuykji0jmbtx07al
Added binary to ignore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
34
34
*/
35
35
 
36
 
#ifndef __AZIO_H__
37
 
#define __AZIO_H__
 
36
#ifndef PLUGIN_ARCHIVE_AZIO_H
 
37
#define PLUGIN_ARCHIVE_AZIO_H
38
38
 
39
39
/* We currently allow this on all platforms */
40
40
#define AZIO_AIO
41
41
 
42
 
#include <drizzled/global.h>
43
42
#include <drizzled/common.h>
44
 
#include <mysys/my_sys.h>
 
43
#include "drizzled/internal/my_sys.h"
45
44
 
46
45
#include <zlib.h>
47
46
 
243
242
  z_stream stream;
244
243
  int      z_err;   /* error code for last stream operation */
245
244
  int      z_eof;   /* set if end of input file */
246
 
  File     file;   /* .gz file */
 
245
  int     file;   /* .gz file */
247
246
  Byte     *inbuf;  /* input buffer */
248
247
  Byte     buffer1[AZ_BUFSIZE_READ];  /* input buffer */
249
248
  Byte     buffer2[AZ_BUFSIZE_READ];  /* input buffer */
298
297
   can be checked to distinguish the two cases (if errno is zero, the
299
298
   zlib error is Z_MEM_ERROR).  */
300
299
 
301
 
int azdopen(azio_stream *s,File fd, int Flags);
 
300
int azdopen(azio_stream *s,int fd, int Flags);
302
301
/*
303
302
     azdopen() associates a azio_stream with the file descriptor fd.  File
304
303
   descriptors are obtained from calls like open, dup, creat, pipe or
311
310
   the (de)compression state.
312
311
*/
313
312
 
314
 
 
315
 
unsigned int azread_internal( azio_stream *s, voidp buf, unsigned int len, int *error);
316
 
/*
317
 
   This function is legacy, do not use.
318
 
 
319
 
     Reads the given number of uncompressed bytes from the compressed file.
320
 
   If the input file was not in gzip format, gzread copies the given number
321
 
   of bytes into the buffer.
322
 
     gzread returns the number of uncompressed bytes actually read (0 for
323
 
   end of file, -1 for error). */
324
 
 
325
313
extern int azflush(azio_stream *file, int flush);
326
314
/*
327
315
     Flushes all pending output into the compressed file. The parameter
370
358
size_t azwrite_row(azio_stream *s, void *buf, unsigned int len);
371
359
size_t azread_row(azio_stream *s, int *error);
372
360
 
373
 
extern int azwrite_frm (azio_stream *s, char *blob, unsigned int length);
 
361
extern int azwrite_frm (azio_stream *s, const char *blob, unsigned int length);
374
362
extern int azread_frm (azio_stream *s, char *blob);
375
 
extern int azwrite_comment (azio_stream *s, char *blob, unsigned int length);
 
363
extern int azwrite_comment (azio_stream *s, const char *blob, unsigned int length);
376
364
extern int azread_comment (azio_stream *s, char *blob);
377
365
 
378
366
#ifdef  __cplusplus
379
367
}
380
368
#endif
381
369
 
382
 
#endif /* AZIO_H */
 
370
#endif /* PLUGIN_ARCHIVE_AZIO_H */