~ubuntu-branches/ubuntu/wily/apvlv/wily

« back to all changes in this revision

Viewing changes to src/ApvlvFile.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Lukas Gaertner, Lukas Gaertner, Stefan Ritter
  • Date: 2010-12-23 15:28:02 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20101223152802-ll13lmtpxmylbiqz
Tags: 0.0.9.8-1
[Lukas Gaertner]
* Adopt package (Closes: #607320)

[Stefan Ritter]
* Add libdjvulibre-dev to build dependencies (Closes: #602010)
* Bump Standards-Version to 3.9.1
* Imported Upstream version 0.0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  ApvlvFile::ApvlvFile (const char *filename, bool check)
46
46
  {
47
47
    mIndex = NULL;
 
48
 
 
49
    mRawdata = NULL;
 
50
    mRawdataSize = 0;
48
51
  }
49
52
 
50
53
  ApvlvFile::~ApvlvFile ()
51
54
  {
 
55
    if (mRawdata != NULL)
 
56
      {
 
57
        delete[]mRawdata;
 
58
        mRawdata = NULL;
 
59
      }
52
60
  }
53
61
 
54
62
  ApvlvFile *ApvlvFile::newfile (const char *filename, bool check)
82
90
ApvlvPDF::ApvlvPDF (const char *filename, bool check):ApvlvFile (filename,
83
91
             check)
84
92
  {
85
 
    static gchar *mRawdata = NULL;
86
 
    static guint mRawdatasize = 0;
87
93
    gchar *wfilename;
88
94
 
89
95
    if (filename == NULL
107
113
      }
108
114
    filelen = sbuf.st_size;
109
115
 
110
 
    if (mRawdata != NULL && mRawdatasize < filelen)
 
116
    if (mRawdata != NULL && mRawdataSize < filelen)
111
117
      {
112
118
        delete[]mRawdata;
113
119
        mRawdata = NULL;
116
122
    if (mRawdata == NULL)
117
123
      {
118
124
        mRawdata = new char[filelen];
119
 
        mRawdatasize = filelen;
 
125
        mRawdataSize = filelen;
120
126
      }
121
127
 
122
128
    ifstream ifs (wfilename, ios::binary);