Esempio n. 1
0
/*@-globuse@*/
static int xzdFlush(void * cookie)
	/*@globals fileSystem @*/
	/*@modifies fileSystem @*/
{
    FD_t fd = c2f(cookie);
    return xzflush(xzdFileno(fd));
}
Esempio n. 2
0
int ts_fflush(ts_file_t *fp)
{
  TS_TRY(fp);
  int rv = -1;
  switch(fp->type) {
  case TS_FILE_STD: return(fflush(fp->fp.std));
  case TS_FILE_ZLB: 
    rv = gzflush(fp->fp.zlb, Z_SYNC_FLUSH);
    if(rv == Z_OK)
      return 0;
    else
      return EOF;
    break;
  case TS_FILE_XZ:  return (xzflush(fp->fp.xz));
  default:
    (void)ts_warn(stderr, "\n");
    goto fail;
  }
 fail:
  return(-1);
}