~ubuntu-branches/ubuntu/intrepid/onscripter/intrepid

« back to all changes in this revision

Viewing changes to DirectReader.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2008-02-12 20:22:19 UTC
  • mfrom: (0.1.2 lenny) (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212202219-jx4xdi0izczp0pcy
Tags: 20080121-0ubuntu1
* Fake-sync onscripter 0.0.20080121-1 from Debian unstable (LP: #187890).
  Drop the leading zeroes from the version due to different versioning in
  Debian and Ubuntu.
* debian/control:
  + Modify Maintainer value to match DebianMaintainerField spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 *  DirectReader.h - Reader from independent files
4
4
 *
5
 
 *  Copyright (c) 2001-2005 Ogapee. All rights reserved.
 
5
 *  Copyright (c) 2001-2006 Ogapee. All rights reserved.
6
6
 *
7
7
 *  ogapee@aqua.dti2.ne.jp
8
8
 *
27
27
#include "BaseReader.h"
28
28
#include <string.h>
29
29
 
30
 
#if defined(UTF8_FILESYSTEM) && !defined(MACOSX)
31
 
#include <iconv.h>
32
 
#endif
33
 
 
34
 
#define MAX_FILE_NAME_LENGTH 512
 
30
#define MAX_FILE_NAME_LENGTH 256
35
31
 
36
32
class DirectReader : public BaseReader
37
33
{
46
42
    int getNumFiles();
47
43
    void registerCompressionType( const char *ext, int type );
48
44
 
49
 
    struct FileInfo getFileByIndex( int index );
 
45
    struct FileInfo getFileByIndex( unsigned int index );
50
46
    size_t getFileLength( const char *file_name );
51
47
    size_t getFile( const char *file_name, unsigned char *buffer, int *location=NULL );
52
48
 
53
49
    static void convertFromSJISToEUC( char *buf );
54
 
 
 
50
    static void convertFromSJISToUTF8( char *dst_buf, char *src_buf, size_t src_len );
 
51
    
55
52
protected:
56
53
    char *file_full_path;
57
54
    char *file_sub_path;
58
55
    size_t file_path_len;
59
56
    char *capital_name;
60
57
    char *capital_name_tmp;
61
 
#if defined(UTF8_FILESYSTEM) && !defined(MACOSX)
62
 
    iconv_t iconv_cd;
63
 
#endif
64
58
 
65
59
    char *archive_path;
66
60
    unsigned char key_table[256];