~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/archive/azio.c

  • Committer: Brian Aker
  • Date: 2008-10-06 05:57:49 UTC
  • Revision ID: brian@tangent.org-20081006055749-svg700gciuqi0zu1
Remove all of uchar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
static int const az_magic[3] = {0xfe, 0x03, 0x01}; /* az magic header */
22
22
 
23
 
/* gzip flag uchar */
 
23
/* gzip flag unsigned char */
24
24
#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
25
25
#define HEAD_CRC     0x02 /* bit 1 set: header CRC present */
26
26
#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
258
258
  }
259
259
  else if (s->mode == 'w') 
260
260
  {
261
 
    uchar buffer[AZHEADER_SIZE + AZMETA_BUFFER_SIZE];
 
261
    unsigned char buffer[AZHEADER_SIZE + AZMETA_BUFFER_SIZE];
262
262
    pread(s->file, buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0);
263
263
    read_header(s, buffer);
264
264
    s->pos= (size_t)my_seek(s->file, 0, MY_SEEK_END, MYF(0));
318
318
  *(ptr + AZ_DIRTY_POS)= (unsigned char)s->dirty; /* Start of Data Block Index Block */
319
319
 
320
320
  /* Always begin at the begining, and end there as well */
321
 
  pwrite(s->file, (uchar*) buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0);
 
321
  pwrite(s->file, (unsigned char*) buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0);
322
322
}
323
323
 
324
324
/* ===========================================================================
367
367
  if (len < 2) {
368
368
    if (len) s->inbuf[0] = s->stream.next_in[0];
369
369
    errno = 0;
370
 
    len = (uInt)pread(s->file, (uchar *)s->inbuf + len, AZ_BUFSIZE_READ >> len, s->pos);
 
370
    len = (uInt)pread(s->file, (unsigned char *)s->inbuf + len, AZ_BUFSIZE_READ >> len, s->pos);
371
371
    s->pos+= len;
372
372
    if (len == (uInt)-1) s->z_err = Z_ERRNO;
373
373
    s->stream.avail_in += len;
623
623
    {
624
624
 
625
625
      s->stream.next_out = s->outbuf;
626
 
      if (pwrite(s->file, (uchar *)s->outbuf, AZ_BUFSIZE_WRITE, s->pos) != AZ_BUFSIZE_WRITE) 
 
626
      if (pwrite(s->file, (unsigned char *)s->outbuf, AZ_BUFSIZE_WRITE, s->pos) != AZ_BUFSIZE_WRITE) 
627
627
      {
628
628
        s->z_err = Z_ERRNO;
629
629
        break;
664
664
 
665
665
    if (len != 0) 
666
666
    {
667
 
      if ((uInt)pwrite(s->file, (uchar *)s->outbuf, len, s->pos) != len) 
 
667
      if ((uInt)pwrite(s->file, (unsigned char *)s->outbuf, len, s->pos) != len) 
668
668
      {
669
669
        s->z_err = Z_ERRNO;
670
670
        assert(0);
730
730
  if (s->mode == 'r') 
731
731
  {
732
732
    unsigned char buffer[AZHEADER_SIZE + AZMETA_BUFFER_SIZE];
733
 
    pread(s->file, (uchar*) buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0);
 
733
    pread(s->file, (unsigned char*) buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0);
734
734
    read_header(s, buffer); /* skip the .az header */
735
735
    azrewind(s);
736
736
 
888
888
void putLong (azio_stream *s, uLong x)
889
889
{
890
890
  int n;
891
 
  uchar buffer[1];
 
891
  unsigned char buffer[1];
892
892
 
893
893
  for (n = 0; n < 4; n++) 
894
894
  {
974
974
  s->frm_length= length;
975
975
  s->start+= length;
976
976
 
977
 
  pwrite(s->file, (uchar*) blob, s->frm_length, s->frm_start_pos);
 
977
  pwrite(s->file, (unsigned char*) blob, s->frm_length, s->frm_start_pos);
978
978
 
979
979
  write_header(s);
980
980
  s->pos= (size_t)my_seek(s->file, 0, MY_SEEK_END, MYF(0));
984
984
 
985
985
int azread_frm(azio_stream *s, char *blob)
986
986
{
987
 
  pread(s->file, (uchar*) blob, s->frm_length, s->frm_start_pos);
 
987
  pread(s->file, (unsigned char*) blob, s->frm_length, s->frm_start_pos);
988
988
 
989
989
  return 0;
990
990
}
1005
1005
  s->comment_length= length;
1006
1006
  s->start+= length;
1007
1007
 
1008
 
  pwrite(s->file, (uchar*) blob, s->comment_length, s->comment_start_pos);
 
1008
  pwrite(s->file, (unsigned char*) blob, s->comment_length, s->comment_start_pos);
1009
1009
 
1010
1010
  write_header(s);
1011
1011
  s->pos= (size_t)my_seek(s->file, 0, MY_SEEK_END, MYF(0));
1015
1015
 
1016
1016
int azread_comment(azio_stream *s, char *blob)
1017
1017
{
1018
 
  pread(s->file, (uchar*) blob, s->comment_length, s->comment_start_pos);
 
1018
  pread(s->file, (unsigned char*) blob, s->comment_length, s->comment_start_pos);
1019
1019
 
1020
1020
  return 0;
1021
1021
}
1069
1069
#ifdef AZIO_AIO
1070
1070
use_pread:
1071
1071
#endif
1072
 
    s->stream.avail_in = (uInt)pread(s->file, (uchar *)s->inbuf,
 
1072
    s->stream.avail_in = (uInt)pread(s->file, (unsigned char *)s->inbuf,
1073
1073
                                     AZ_BUFSIZE_READ, s->pos);
1074
1074
    s->pos+= s->stream.avail_in;
1075
1075
  }