~dannf/ubuntu/saucy/djvulibre/lp1224195

« back to all changes in this revision

Viewing changes to tools/djvudump.cpp

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2010-08-14 13:28:27 UTC
  • mfrom: (12.2.6 sid)
  • Revision ID: package-import@ubuntu.com-20100814132827-jg8yrnov177dl8ou
Tags: 3.5.22-9ubuntu1
* Merge from Debian unstable (LP: #462193), remaining change:
  + Fix thumb2 porting issues; we suspect that the mov found during code
    review is not an active code path; adding compile time error
    #ifdef __thumb__ to ensure that its really not used in Ubuntu;
    Thanks for Dave Martin for this patch (LP: #513725)
* Use autotools-dev to update config.* files to unclutter debdiffs.
* Change recommendation from mozilla-firefox to firefox (LP: #337508).

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
//C- | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
54
54
//C- +------------------------------------------------------------------
55
55
// 
56
 
// $Id: djvudump.cpp,v 1.8 2007/03/25 20:48:35 leonb Exp $
57
 
// $Name: release_3_5_22 $
 
56
// $Id: djvudump.cpp,v 1.9 2009/12/29 16:26:19 leonb Exp $
 
57
// $Name: debian_version_3_5_22-9 $
58
58
 
59
59
#ifdef HAVE_CONFIG_H
60
60
# include "config.h"
108
108
    @author
109
109
    L\'eon Bottou <leonb@research.att.com>
110
110
    @version
111
 
    #$Id: djvudump.cpp,v 1.8 2007/03/25 20:48:35 leonb Exp $# */
 
111
    #$Id: djvudump.cpp,v 1.9 2009/12/29 16:26:19 leonb Exp $# */
112
112
//@{
113
113
//@}
114
114
 
116
116
#include "ByteStream.h"
117
117
#include "GException.h"
118
118
#include "GOS.h"
 
119
#include "GString.h"
119
120
#include "GURL.h"
120
121
#include "DjVuMessage.h"
121
122
 
128
129
display(const GURL &url)
129
130
{
130
131
   DjVuDumpHelper helper;
131
 
   GP<ByteStream> ibs=ByteStream::create(url, "rb");
132
 
   GP<ByteStream> str_out;
133
 
   str_out=helper.dump(ibs);
134
 
   GP<ByteStream> obs=ByteStream::create("w");
135
 
   str_out->seek(0);
136
 
   obs->copy(*str_out);
 
132
   GP<ByteStream> ibs = ByteStream::create(url, "rb");
 
133
   GP<ByteStream> obs = helper.dump(ibs);
 
134
   GUTF8String str;
 
135
   size_t size = obs->size();
 
136
   char *buf = str.getbuf(obs->size());
 
137
   obs->seek(0);
 
138
   obs->readall(buf, size);
 
139
   GNativeString ns = str;
 
140
   fputs((const char*)ns, stdout);
137
141
}
138
142
 
 
143
 
139
144
void
140
145
usage()
141
146
{