~ubuntu-branches/ubuntu/precise/p7zip/precise-updates

« back to all changes in this revision

Viewing changes to CPP/7zip/Archive/Lzh/LzhItem.h

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2009-02-14 20:12:27 UTC
  • mfrom: (1.1.11 upstream) (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090214201227-go63qxm9ozfdma60
Tags: 4.65~dfsg.1-1
* New upstream release.
* Remove wx2.8 Build-Depends added by mistakes (7zG is not yet
  intended to be built).
* Use dh_clean without -k.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
  bool IsValidMethod() const  { return (Method[0] == '-' && Method[1] == 'l' && Method[4] == '-'); }
47
47
  bool IsLhMethod() const  {return (IsValidMethod() && Method[2] == 'h'); }
48
 
  bool IsDirectory() const {return (IsLhMethod() && Method[3] == 'd'); }
 
48
  bool IsDir() const {return (IsLhMethod() && Method[3] == 'd'); }
49
49
 
50
 
  bool IsCopyMethod() const 
 
50
  bool IsCopyMethod() const
51
51
  {
52
 
    return (IsLhMethod() && Method[3] == '0') || 
 
52
    return (IsLhMethod() && Method[3] == '0') ||
53
53
      (IsValidMethod() && Method[2] == 'z' && Method[3] == '4');
54
54
  }
55
55
  
56
 
  bool IsLh1GroupMethod() const 
 
56
  bool IsLh1GroupMethod() const
57
57
  {
58
58
    if (!IsLhMethod())
59
59
      return false;
65
65
    return false;
66
66
  }
67
67
  
68
 
  bool IsLh4GroupMethod() const 
 
68
  bool IsLh4GroupMethod() const
69
69
  {
70
70
    if (!IsLhMethod())
71
71
      return false;
80
80
    return false;
81
81
  }
82
82
  
83
 
  int GetNumDictBits() const 
 
83
  int GetNumDictBits() const
84
84
  {
85
85
    if (!IsLhMethod())
86
86
      return 0;
124
124
      return false;
125
125
    }
126
126
    const Byte *data = (const Byte *)(Extensions[index].Data);
127
 
    value = data[0] | 
128
 
        ((UInt32)data[1] << 8) | 
129
 
        ((UInt32)data[2] << 16) | 
 
127
    value = data[0] |
 
128
        ((UInt32)data[1] << 8) |
 
129
        ((UInt32)data[2] << 16) |
130
130
        ((UInt32)data[3] << 24);
131
131
    return true;
132
132
  }
150
150
  AString GetName() const
151
151
  {
152
152
    AString dirName = GetDirName();
153
 
    dirName.Replace((char)(unsigned char)0xFF, '\\');
 
153
    dirName.Replace((char)(unsigned char)0xFF, CHAR_PATH_SEPARATOR);
154
154
    if (!dirName.IsEmpty())
155
155
    {
156
156
      char c = dirName[dirName.Length() - 1];
157
 
      if (c != '\\')
158
 
        dirName += '\\';
 
157
      if (c != CHAR_PATH_SEPARATOR)
 
158
        dirName += CHAR_PATH_SEPARATOR;
159
159
    }
160
160
    return dirName + GetFileName();
161
161
  }