source: trunk/poppler/mypoppler/poppler/StdinCachedFile.cc @ 461

Last change on this file since 461 was 461, checked in by Silvan Scherrer, 11 years ago

poppler update to 0.14.2

File size: 894 bytes
RevLine 
[461]1//========================================================================
2//
3// StdinCachedFile.cc
4//
5// This file is licensed under the GPLv2 or later
6//
7// Copyright 2010 Hib Eris <hib@hiberis.nl>
8// Copyright 2010 Albert Astals Cid <aacid@kde.org>
9//
10//========================================================================
11
12#include <config.h>
13
14#include "StdinCachedFile.h"
15
16#include <stdio.h>
17
18size_t StdinCacheLoader::init(GooString *dummy, CachedFile *cachedFile)
19{
20  size_t read, size = 0;
21  char buf[CachedFileChunkSize];
22
23  CachedFileWriter writer = CachedFileWriter (cachedFile, NULL);
24  do {
25    read = fread(buf, 1, CachedFileChunkSize, stdin);
26    (writer.write) (buf, CachedFileChunkSize);
27    size += read;
28  }
29  while (read == CachedFileChunkSize);
30
31  return size;
32}
33
34int StdinCacheLoader::load(const GooVector<ByteRange> &ranges, CachedFileWriter *writer)
35{
36  return 0;
37}
38
Note: See TracBrowser for help on using the repository browser.