Ejemplo n.º 1
0
void 
JB2Dict::JB2Codec::Decode::code_comment(GUTF8String &comment)
{
      int size=CodeNum(0, BIGPOSITIVE, dist_comment_length);
      comment.empty();
      char *combuf = comment.getbuf(size);
      for (int i=0; i<size; i++) 
        {
          combuf[i]=CodeNum(0, 255, dist_comment_byte);
        }
      comment.getbuf();
}
Ejemplo n.º 2
0
void
display(const GURL &url)
{
   DjVuDumpHelper helper;
   GP<ByteStream> ibs = ByteStream::create(url, "rb");
   GP<ByteStream> obs = helper.dump(ibs);
   GUTF8String str;
   size_t size = obs->size();
   char *buf = str.getbuf(obs->size());
   obs->seek(0);
   obs->readall(buf, size);
   GNativeString ns = str;
   fputs((const char*)ns, outputf);
}