Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 926323
Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +6 lines)
Line  Link Here
0
-- a/loki_patch/loki_xdelta.c
0
++ b/loki_patch/loki_xdelta.c
Lines 179-184 struct _XdFileHandle Link Here
179
  guint    narrow_high;
179
  guint    narrow_high;
180
  guint    current_pos;
180
  guint    current_pos;
181
  FILE*    in;
181
  FILE*    in;
182
  gzFile   zin;
182
  gboolean (* in_read) (XdFileHandle* handle, void* buf, gint nbyte);
183
  gboolean (* in_read) (XdFileHandle* handle, void* buf, gint nbyte);
183
  gboolean (* in_close) (XdFileHandle* handle);
184
  gboolean (* in_close) (XdFileHandle* handle);
184
  gboolean in_compressed;
185
  gboolean in_compressed;
Lines 520-526 xd_gzwrite (XdFileHandle* fh, const void* buf, gint nbyte) Link Here
520
static gboolean
521
static gboolean
521
xd_gzread (XdFileHandle* fh, void* buf, gint nbyte)
522
xd_gzread (XdFileHandle* fh, void* buf, gint nbyte)
522
{
523
{
523
  return gzread (fh->in, buf, nbyte) == nbyte;
524
  return gzread (fh->zin, buf, nbyte) == nbyte;
524
}
525
}
525
526
526
static gboolean
527
static gboolean
Lines 532-538 xd_gzclose (XdFileHandle* fh) Link Here
532
static gboolean
533
static gboolean
533
xd_gzrclose (XdFileHandle* fh)
534
xd_gzrclose (XdFileHandle* fh)
534
{
535
{
535
  return gzclose (fh->in) == Z_OK;
536
  return gzclose (fh->zin) == Z_OK;
536
}
537
}
537
538
538
static void
539
static void
Lines 1022-1034 xd_handle_narrow (XdFileHandle* fh, guint low, guint high, gboolean compressed) Link Here
1022
	}
1023
	}
1023
1024
1024
      g_assert (fh->fd >= 0);
1025
      g_assert (fh->fd >= 0);
1025
      fh->in = gzdopen (dup (fh->fd), "rb");
1026
      fh->zin = gzdopen (dup (fh->fd), "rb");
1026
      fh->in_read =  &xd_gzread;
1027
      fh->in_read =  &xd_gzread;
1027
      fh->in_close = &xd_gzrclose;
1028
      fh->in_close = &xd_gzrclose;
1028
      fh->in_compressed = TRUE;
1029
      fh->in_compressed = TRUE;
1029
      fh->current_pos = 0;
1030
      fh->current_pos = 0;
1030
1031
1031
      if (! fh->in)
1032
      if (! fh->zin)
1032
	{
1033
	{
1033
	  xd_error ("gzdopen failed: %s\n", g_strerror (errno));
1034
	  xd_error ("gzdopen failed: %s\n", g_strerror (errno));
1034
	  return -1;
1035
	  return -1;

Return to bug 926323