Diffstat (limited to 'noncore/apps/opie-reader/Aportis.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Aportis.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/Aportis.cpp b/noncore/apps/opie-reader/Aportis.cpp index 1327ff8..b4988da 100644 --- a/noncore/apps/opie-reader/Aportis.cpp +++ b/noncore/apps/opie-reader/Aportis.cpp | |||
@@ -69,49 +69,49 @@ CList<Bkmk>* Aportis::getbkmklist() | |||
69 | char name[17]; | 69 | char name[17]; |
70 | name[16] = '\0'; | 70 | name[16] = '\0'; |
71 | fseek(fin,dwPos,SEEK_SET); | 71 | fseek(fin,dwPos,SEEK_SET); |
72 | fread(name,1,16,fin); | 72 | fread(name,1,16,fin); |
73 | unsigned long lcn; | 73 | unsigned long lcn; |
74 | fread(&lcn,sizeof(lcn),1,fin); | 74 | fread(&lcn,sizeof(lcn),1,fin); |
75 | lcn = SwapLong(lcn); | 75 | lcn = SwapLong(lcn); |
76 | #ifdef _UNICODE | 76 | #ifdef _UNICODE |
77 | tchar tname[17]; | 77 | tchar tname[17]; |
78 | memset(tname, 0, sizeof(tname)); | 78 | memset(tname, 0, sizeof(tname)); |
79 | for (int i = 0; name[i] != 0; i++) | 79 | for (int i = 0; name[i] != 0; i++) |
80 | { | 80 | { |
81 | tname[i] = name[i]; | 81 | tname[i] = name[i]; |
82 | } | 82 | } |
83 | t->push_back(Bkmk(tname, NULL, lcn)); | 83 | t->push_back(Bkmk(tname, NULL, lcn)); |
84 | #else | 84 | #else |
85 | t->push_back(Bkmk(name,lcn)); | 85 | t->push_back(Bkmk(name,lcn)); |
86 | #endif | 86 | #endif |
87 | } | 87 | } |
88 | } | 88 | } |
89 | fseek(fin, cur, SEEK_SET); | 89 | fseek(fin, cur, SEEK_SET); |
90 | return t; | 90 | return t; |
91 | } | 91 | } |
92 | 92 | ||
93 | int Aportis::openfile(const char *src) | 93 | int Aportis::OpenFile(const char *src) |
94 | { | 94 | { |
95 | // printf("In openfile\n"); | 95 | // printf("In openfile\n"); |
96 | int ret = 0; | 96 | int ret = 0; |
97 | 97 | ||
98 | if (!Cpdb::openfile(src)) return -1; | 98 | if (!Cpdb::openfile(src)) return -1; |
99 | 99 | ||
100 | if (head.creator != 0x64414552 // 'dAER' | 100 | if (head.creator != 0x64414552 // 'dAER' |
101 | || head.type != 0x74584554) // 'tXET') | 101 | || head.type != 0x74584554) // 'tXET') |
102 | { | 102 | { |
103 | 103 | ||
104 | if (memcmp(&head.creator, "PPrs", 4) == 0 && memcmp(&head.type, "PNRd", 4) == 0) | 104 | if (memcmp(&head.creator, "PPrs", 4) == 0 && memcmp(&head.type, "PNRd", 4) == 0) |
105 | { | 105 | { |
106 | peanutfile = true; | 106 | peanutfile = true; |
107 | } | 107 | } |
108 | else | 108 | else |
109 | { | 109 | { |
110 | return -2; | 110 | return -2; |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | nRecs2 = nRecs = SwapWord(head.recordList.numRecords) - 1; | 114 | nRecs2 = nRecs = SwapWord(head.recordList.numRecords) - 1; |
115 | fseek(fin,0,SEEK_END); | 115 | fseek(fin,0,SEEK_END); |
116 | dwLen = ftell(fin); | 116 | dwLen = ftell(fin); |
117 | 117 | ||