summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-24 21:00:03 (UTC)
committer zautrix <zautrix>2005-01-24 21:00:03 (UTC)
commit60733d98dff3ff5f8e95c514af258498aa7aa014 (patch) (unidiff)
tree751d6533a51790da2afa49c870ff2342d6e3b0bf
parentbb33b559609356149ae51cb50c081b3e82aecafb (diff)
downloadkdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.zip
kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.tar.gz
kdepimpi-60733d98dff3ff5f8e95c514af258498aa7aa014.tar.bz2
memory leak fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kmicromail/libetpan/mh/mailmh.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 42b36f1..5864ce4 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,797 +1,797 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.20 ************ 3********** VERSION 1.9.20 ************
4 4
5KO/Pi: 5KO/Pi:
6Added for the "dislplay one day" agenda mode 6Added for the "dislplay one day" agenda mode
7info in the caption and in the day lables: 7info in the caption and in the day lables:
8Now it is displayed, if the selected day is from "day before yesterday" 8Now it is displayed, if the selected day is from "day before yesterday"
9to "day after tomorrow". 9to "day after tomorrow".
10Made it possible to delete a Todo, which has sub-todos. 10Made it possible to delete a Todo, which has sub-todos.
11Fixed two small problems in the todo view. 11Fixed two small problems in the todo view.
12Added missing German translation for filter edit and print dialog. 12Added missing German translation for filter edit and print dialog.
13Made search dialog closeable by cancel key. 13Made search dialog closeable by cancel key.
14 14
15Made it possible to select in the date picker the (ligt grey ) 15Made it possible to select in the date picker the (ligt grey )
16dates of the prev./next month with the mouse. 16dates of the prev./next month with the mouse.
17 17
18OM/Pi: 18OM/Pi:
19"Delete mail" icon in main window now deletes all selected mails. 19"Delete mail" icon in main window now deletes all selected mails.
20Fixed the problem, that the state flag of imap mails was ignored. 20Fixed the problem, that the state flag of imap mails was ignored.
21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
22to indecate that they are already seen. 22to indecate that they are already seen.
23Fixed the problem that the body of some mails was not displayed in the 23Fixed the problem that the body of some mails was not displayed in the
24mail viewer when fetching them from the imap server directly to read them. 24mail viewer when fetching them from the imap server directly to read them.
25Made it (configurable) possible to show the "To:" field in the list view. 25Made it (configurable) possible to show the "To:" field in the list view.
26Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 26Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
27Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 27Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
28local storage folder (specified in account setiings) of the account of the mail. 28local storage folder (specified in account settings) of the account of the mail.
29 29Removed some memory leaks in OM/Pi.
30 30
31 31
32********** VERSION 1.9.19 ************ 32********** VERSION 1.9.19 ************
33 33
34Added a lot of missing translations to KA/Pi, 34Added a lot of missing translations to KA/Pi,
35Added some missing translations to KO/Pi and OM/Pi. 35Added some missing translations to KO/Pi and OM/Pi.
36 36
37Fixed some minor problems in KA/Pi + KO/Pi. 37Fixed some minor problems in KA/Pi + KO/Pi.
38 38
39Fixed a crash when closing PwM/Pi. 39Fixed a crash when closing PwM/Pi.
40Added German translation for PwM/Pi. 40Added German translation for PwM/Pi.
41 41
42Made view change and Month View update faster in KO/Pi. 42Made view change and Month View update faster in KO/Pi.
43 43
44 44
45********** VERSION 1.9.18 ************ 45********** VERSION 1.9.18 ************
46 46
47FYI: The VERSION 1.9.17 was a testing release only. 47FYI: The VERSION 1.9.17 was a testing release only.
48Please read the changelog of VERSION 1.9.17 as well. 48Please read the changelog of VERSION 1.9.17 as well.
49 49
50Cleaned up the syncing config dialog. 50Cleaned up the syncing config dialog.
51Added sync config options for date range for events. 51Added sync config options for date range for events.
52Added sync config options for filters on incoming data. 52Added sync config options for filters on incoming data.
53Added sync config options for filters on outgoing data. 53Added sync config options for filters on outgoing data.
54Please read the updated SyncHowTo about the new filter settings. 54Please read the updated SyncHowTo about the new filter settings.
55These filter settings make it now possible to sync with shared 55These filter settings make it now possible to sync with shared
56calendars without writing back private or confidential data 56calendars without writing back private or confidential data
57(via the outgoing filters). 57(via the outgoing filters).
58To sync only with particular parts of a shared calendar, 58To sync only with particular parts of a shared calendar,
59the incoming filter settings can be used. 59the incoming filter settings can be used.
60An example can be found in the SyncHowTo. 60An example can be found in the SyncHowTo.
61Same for shared addressbooks. 61Same for shared addressbooks.
62 62
63Added a setting for the global kdepim data storage. 63Added a setting for the global kdepim data storage.
64Usually the data is stored in (yourhomedir/kdepim). 64Usually the data is stored in (yourhomedir/kdepim).
65Now you can set in the Global config dialog TAB, subTAB "Data storage path" 65Now you can set in the Global config dialog TAB, subTAB "Data storage path"
66a directory where all the kdepim data is stored. 66a directory where all the kdepim data is stored.
67That makes it easy to save all kdepim data on a SD card on the Z, for example. 67That makes it easy to save all kdepim data on a SD card on the Z, for example.
68 68
69KO/Pi: 69KO/Pi:
70The timeedit input has a pulldown list for times. 70The timeedit input has a pulldown list for times.
71If opened, this pulldown list should now has the right time highlighted. 71If opened, this pulldown list should now has the right time highlighted.
72Added the possibility to exclude events/todos/journals in a filter. 72Added the possibility to exclude events/todos/journals in a filter.
73You should exclude journals, if you do not want them to sync with a public calendar. 73You should exclude journals, if you do not want them to sync with a public calendar.
74 74
75KA/Pi: 75KA/Pi:
76Added the possibility to in/exclude public/private/confidential contacts to a filter. 76Added the possibility to in/exclude public/private/confidential contacts to a filter.
77If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 77If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
78Added printing of card view and details view on desktop. 78Added printing of card view and details view on desktop.
79Printing of list view is not working... 79Printing of list view is not working...
80Added button for removing pictures in contact editor. 80Added button for removing pictures in contact editor.
81Parsing data fix of KA/Pi version 1.9.17. 81Parsing data fix of KA/Pi version 1.9.17.
82Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 82Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
83Fixed some syncing merging problems. 83Fixed some syncing merging problems.
84 84
85 85
86********** VERSION 1.9.17 ************ 86********** VERSION 1.9.17 ************
87 87
88KO/Pi: 88KO/Pi:
89Fixed that tooltips were not updated after moving an item in agenda view. 89Fixed that tooltips were not updated after moving an item in agenda view.
90Fixed a bug in sorting start date for recurring events in list view. 90Fixed a bug in sorting start date for recurring events in list view.
91Changed the left button in todo viewer from "Agenda" to "Set completed". 91Changed the left button in todo viewer from "Agenda" to "Set completed".
92This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 92This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
93Added more info in the todo viewer: Startdate, parent/sub todos. 93Added more info in the todo viewer: Startdate, parent/sub todos.
94 94
95 95
96KA/Pi: 96KA/Pi:
97All fields search does now actually search all the (possible) fields, 97All fields search does now actually search all the (possible) fields,
98not only those listed in the contact list. 98not only those listed in the contact list.
99Made is possible to inline a picture in a vcard on the Z. 99Made is possible to inline a picture in a vcard on the Z.
100This was only possible on the desktop, now is it possible on the Z as well. 100This was only possible on the desktop, now is it possible on the Z as well.
101Fixed of missing save settings after filter configuration. 101Fixed of missing save settings after filter configuration.
102Made saving of addressbook much faster. 102Made saving of addressbook much faster.
103Fixed extension widget layout problem. 103Fixed extension widget layout problem.
104Fixed saving of default formatted name settings. 104Fixed saving of default formatted name settings.
105Fixed formatted name handling in edit dialog. 105Fixed formatted name handling in edit dialog.
106Added an option for changing formatted names of many contacts 106Added an option for changing formatted names of many contacts
107(menu: File - Change - Set formatted name). 107(menu: File - Change - Set formatted name).
108 108
109QWhatsThis was not working on the Z ( only black rectangle was shown). 109QWhatsThis was not working on the Z ( only black rectangle was shown).
110This is Fixed. 110This is Fixed.
111 111
112KDE-Sync: 112KDE-Sync:
113Now readonly KDE resources are synced as well. 113Now readonly KDE resources are synced as well.
114(They are not changed in KDE itself, of course). 114(They are not changed in KDE itself, of course).
115 115
116 116
117 117
118********** VERSION 1.9.16 ************ 118********** VERSION 1.9.16 ************
119 119
120KO/Pi: 120KO/Pi:
121Fixed search dialog size on Z 6000 (480x640 display). 121Fixed search dialog size on Z 6000 (480x640 display).
122Added setting to hide/show time in agenda items. 122Added setting to hide/show time in agenda items.
123Added setting to hide not running todos in todo view. 123Added setting to hide not running todos in todo view.
124Added columns for start date/time in todo view. 124Added columns for start date/time in todo view.
125Replaced the solid half-hour lines in agenda view by dot lines. 125Replaced the solid half-hour lines in agenda view by dot lines.
126Added possibility of printing the What's Next View on the desktop 126Added possibility of printing the What's Next View on the desktop
127(i.e. Windows and Linux). 127(i.e. Windows and Linux).
128Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 128Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
129Added tooltips in month view.(Tooltips only available on desktop) 129Added tooltips in month view.(Tooltips only available on desktop)
130 130
131Fixed a strange problem in KO/Pi alarm applet. 131Fixed a strange problem in KO/Pi alarm applet.
132Did not find the actual problem, 132Did not find the actual problem,
133such that now Qtopia reboots again if deinstalling the alarm applet. 133such that now Qtopia reboots again if deinstalling the alarm applet.
134But the alarm applet should work again. 134But the alarm applet should work again.
135 135
136KA/Pi: 136KA/Pi:
137Fixed the problem, that internal pictures were not saved. 137Fixed the problem, that internal pictures were not saved.
138 138
139Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 139Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
140 140
141Fixed some minor problems. (Like word wrap in help text windows). 141Fixed some minor problems. (Like word wrap in help text windows).
142 142
143Fixed a compiling problem in microkde/kresources. 143Fixed a compiling problem in microkde/kresources.
144 144
145KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 145KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
146This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 146This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
147such that now syncing KO/Pi with Sharp DTM should work on the 147such that now syncing KO/Pi with Sharp DTM should work on the
148Zaurus C 3000 model. 148Zaurus C 3000 model.
149 149
150********** VERSION 1.9.15 ************ 150********** VERSION 1.9.15 ************
151 151
152Usebilty enhancements in KO/Pi: 152Usebilty enhancements in KO/Pi:
153When clicking on the date in a month view cell, the day view is shown. 153When clicking on the date in a month view cell, the day view is shown.
154Old behaviour was, that the "new event" dialog popped up. 154Old behaviour was, that the "new event" dialog popped up.
155 155
156Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 156Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
157That means, you can restore the latest 157That means, you can restore the latest
158event/todo/journal you have deleted. 158event/todo/journal you have deleted.
159A journal is deleted, if you clear all the text of the journal. 159A journal is deleted, if you clear all the text of the journal.
160 160
161Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 161Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
162 162
163KA/Pi starting in 480x640 resolution: 163KA/Pi starting in 480x640 resolution:
164Hide the filter action in toolbar 164Hide the filter action in toolbar
165and added icons for undo/delete/redo in toolbar. 165and added icons for undo/delete/redo in toolbar.
166 166
167Change in OM/Pi ViewMail dialog: 167Change in OM/Pi ViewMail dialog:
168When clicking on the "delete" icon the mail is deleted after confirmation as usual. 168When clicking on the "delete" icon the mail is deleted after confirmation as usual.
169But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 169But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
170 170
171Fixed a crash when deleting mail-accounts in OM/Pi. 171Fixed a crash when deleting mail-accounts in OM/Pi.
172 172
173 173
174********** VERSION 1.9.14 ************ 174********** VERSION 1.9.14 ************
175 175
176Fixed some problems with the dialog sizes when switching 176Fixed some problems with the dialog sizes when switching
177portrait/landscape mode on 640x480 PDA display. 177portrait/landscape mode on 640x480 PDA display.
178 178
179Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 179Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
180 180
181Fixed an ugly bug in KOpieMail: 181Fixed an ugly bug in KOpieMail:
182KOpieMail was not able to write files (mails) to MSDOS file system, 182KOpieMail was not able to write files (mails) to MSDOS file system,
183like on an usual preformatted SD card. That should work now. 183like on an usual preformatted SD card. That should work now.
184To save your mail data on the Sd card do the following: 184To save your mail data on the Sd card do the following:
185Create a dir on the SD card: 185Create a dir on the SD card:
186mkdir /mnt/card/localmail 186mkdir /mnt/card/localmail
187Go to your home dir: 187Go to your home dir:
188cd 188cd
189Go to kopiemail data storage dir: 189Go to kopiemail data storage dir:
190cd kdepim/apps/kopiemail 190cd kdepim/apps/kopiemail
191Create a symlink to the SD card: 191Create a symlink to the SD card:
192ls -s /mnt/card/localmail 192ls -s /mnt/card/localmail
193Now KOpieMail will store all mails on the SD card. 193Now KOpieMail will store all mails on the SD card.
194 194
195KO/Pi Monthview: 195KO/Pi Monthview:
196Now "Go to Today" selects the current month from day 1-end, 196Now "Go to Today" selects the current month from day 1-end,
197not the current date + some days. 197not the current date + some days.
198I.e. "Go to Today" shows now always 198I.e. "Go to Today" shows now always
199the current month with first day of month in the first row. 199the current month with first day of month in the first row.
200 200
201Added missing German translation. 201Added missing German translation.
202 202
203Fixed icons of executeable on Wintendo. 203Fixed icons of executeable on Wintendo.
204 204
205Added a "Show next Mail" button to the OM/Pi 205Added a "Show next Mail" button to the OM/Pi
206mail viewer such that the mail below the current mail 206mail viewer such that the mail below the current mail
207in the mail list view of the current folder 207in the mail list view of the current folder
208can be read with a single click. 208can be read with a single click.
209 209
210 210
211********** VERSION 1.9.13 ************ 211********** VERSION 1.9.13 ************
212 212
213Fixed nasty PwM/Pi file reading bug, when 213Fixed nasty PwM/Pi file reading bug, when
214the used hash algo of file is different then the global 214the used hash algo of file is different then the global
215hash algo. 215hash algo.
216 216
217Added KA/Pi support for opie mailit mailapplication. 217Added KA/Pi support for opie mailit mailapplication.
218 218
219Fixed some bugs in OM/Pi. 219Fixed some bugs in OM/Pi.
220Now character conversion tables are available for the Zaurus 220Now character conversion tables are available for the Zaurus
221to make OM/Pi working properly. 221to make OM/Pi working properly.
222To get the character conversion in OM/Pi working, please download 222To get the character conversion in OM/Pi working, please download
223at the sourceforge project site the package 223at the sourceforge project site the package
224sr-character-conversion_SharpROM_arm.ipk.zip 224sr-character-conversion_SharpROM_arm.ipk.zip
225(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 225(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
226from the section "general files for KDE/Pim" 226from the section "general files for KDE/Pim"
227Instructions how to install this package are in a ReadMe in this file. 227Instructions how to install this package are in a ReadMe in this file.
228 228
229 229
230Fixed the orientation change problem in KA/Pi when switching 230Fixed the orientation change problem in KA/Pi when switching
231portrait/landscape mode. 231portrait/landscape mode.
232 232
233French translation available for KA/Pi and OM/Pi. 233French translation available for KA/Pi and OM/Pi.
234 234
235Fixed some problems with categories in KO/Pi in DTM sync. 235Fixed some problems with categories in KO/Pi in DTM sync.
236 236
237Added selection dialog for export to phone in KA/Pi. 237Added selection dialog for export to phone in KA/Pi.
238 238
239If in KO/Pi is an attendee selected to add to a meeting and this 239If in KO/Pi is an attendee selected to add to a meeting and this
240attendee is already in the list of attendees, this person is not added 240attendee is already in the list of attendees, this person is not added
241again. 241again.
242 242
243Some menu cleanup in KA/Pi. 243Some menu cleanup in KA/Pi.
244 244
245********** VERSION 1.9.12 ************ 245********** VERSION 1.9.12 ************
246 246
247Fix for the bug in KO/Pi What's Next view of version 1.9.11. 247Fix for the bug in KO/Pi What's Next view of version 1.9.11.
248 248
249Bugfix: Licence file is now shown again. 249Bugfix: Licence file is now shown again.
250 250
251OM/Pi now supports Unicode (utf8 charset). 251OM/Pi now supports Unicode (utf8 charset).
252Fixed some bugs in OM/Pi. 252Fixed some bugs in OM/Pi.
253 253
254KA/Pi has more German translation. 254KA/Pi has more German translation.
255 255
256 256
257********** VERSION 1.9.11 ************ 257********** VERSION 1.9.11 ************
258 258
259Fixed several problems in PWM/Pi, like 259Fixed several problems in PWM/Pi, like
260asking the user, if unsaved changed are pending 260asking the user, if unsaved changed are pending
261when closing the app. 261when closing the app.
262And PwM/Pi handles now different texts for the 262And PwM/Pi handles now different texts for the
263fields Description, Username, Password, configurable per category. 263fields Description, Username, Password, configurable per category.
264 264
265Fixed a crash in KO/Pi , when importing/loading vcs files 265Fixed a crash in KO/Pi , when importing/loading vcs files
266which have an entry with an attendee with state: 266which have an entry with an attendee with state:
267NEEDS ACTION 267NEEDS ACTION
268 268
269Fixed some problems in the German translation of OM/Pi, 269Fixed some problems in the German translation of OM/Pi,
270which makes some dialogs not fitting on the screen 270which makes some dialogs not fitting on the screen
271of the Z 5500. 271of the Z 5500.
272 272
273Fixed Qtopia crash, when disabling/deinstalling 273Fixed Qtopia crash, when disabling/deinstalling
274KO/Pi alarm applet. 274KO/Pi alarm applet.
275 275
276Implemented direct KDE<->KA/Pi sync for KA/Pi running 276Implemented direct KDE<->KA/Pi sync for KA/Pi running
277on Linux desktop. 277on Linux desktop.
278 278
279Added feature "remove sync info" to sync menu. 279Added feature "remove sync info" to sync menu.
280 280
281Tweaked the KO/Pi What's next view a bit, added 281Tweaked the KO/Pi What's next view a bit, added
282setting to hide events that are done. 282setting to hide events that are done.
283 283
284Disabled "beam receive enabled" on startup to 284Disabled "beam receive enabled" on startup to
285avoid problems if Fastload is enabled. 285avoid problems if Fastload is enabled.
286Please set "beam receive enabled", 286Please set "beam receive enabled",
287if you want to receive data via IR. 287if you want to receive data via IR.
288 288
289Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 289Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
290on Linux desktop. 290on Linux desktop.
291 291
292Made in KA/Pi scrolling possible, if details view is selected. 292Made in KA/Pi scrolling possible, if details view is selected.
293(The keyboard focus is set automatically to the search line) 293(The keyboard focus is set automatically to the search line)
294 294
295Fixed a bug in DMT sync, that a new entry in DTM was added 295Fixed a bug in DMT sync, that a new entry in DTM was added
296on every sync to Kx/Pi. 296on every sync to Kx/Pi.
297 297
298Fixed missing writing of KA/Pi categories to DMT entries when syncing. 298Fixed missing writing of KA/Pi categories to DMT entries when syncing.
299 299
300Fixed a bug in DMT sync with todos created in KO/Pi containing 300Fixed a bug in DMT sync with todos created in KO/Pi containing
301non-latin1 characters. 301non-latin1 characters.
302 302
303Rearranged package contents of Sharp-ipks and made all 303Rearranged package contents of Sharp-ipks and made all
304packages installable on SD again. 304packages installable on SD again.
305 305
306Fixed the writing of addressbook data in DTM sync. 306Fixed the writing of addressbook data in DTM sync.
307Empty fields in KA/Pi were not removed. 307Empty fields in KA/Pi were not removed.
308 308
309Added better category handling in KA/Pi: 309Added better category handling in KA/Pi:
310Added item 310Added item
311Edit Categories and 311Edit Categories and
312Manage new categories 312Manage new categories
313to the settings menu. 313to the settings menu.
314Possible to configure a view to display categories. 314Possible to configure a view to display categories.
315 315
316Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 316Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
317 317
318Fixed displaying of "free" days and time in KO Monthview and Agendaview. 318Fixed displaying of "free" days and time in KO Monthview and Agendaview.
319 319
320... and many other bugfixes. 320... and many other bugfixes.
321 321
322********** VERSION 1.9.10 ************ 322********** VERSION 1.9.10 ************
323 323
324Many internal small bugfixes. 324Many internal small bugfixes.
325And fix of the "big" bug in KO/Pi, 325And fix of the "big" bug in KO/Pi,
326that after Syncing the appointments had an offset by several hours. 326that after Syncing the appointments had an offset by several hours.
327That was a problem with the internal timezone setting, 327That was a problem with the internal timezone setting,
328introduced by the changed timezone configuration settings. 328introduced by the changed timezone configuration settings.
329 329
330German translation for OM/Pi is now available. 330German translation for OM/Pi is now available.
331 331
332 332
333********** VERSION 1.9.9 ************ 333********** VERSION 1.9.9 ************
334 334
335KDE-Pim/Pi has a new Member! 335KDE-Pim/Pi has a new Member!
336It is called PWM/Pi (Passwordmanager/platform-independent) 336It is called PWM/Pi (Passwordmanager/platform-independent)
337and it is available for the Zaurus. 337and it is available for the Zaurus.
338It is planned, that it will be available later for Windows. 338It is planned, that it will be available later for Windows.
339(And for Linux, of course). 339(And for Linux, of course).
340It is a port of the Passwordmanager of KDE. 340It is a port of the Passwordmanager of KDE.
341It will need the MicroKDElibs to run. 341It will need the MicroKDElibs to run.
342 342
343Made loading of addressbooks in KA/Pi up to 7 times faster! 343Made loading of addressbooks in KA/Pi up to 7 times faster!
344The bigger your addressbook file, the more starting speed 344The bigger your addressbook file, the more starting speed
345will you gain. (relatively) 345will you gain. (relatively)
346 346
347The Qtopia addressbook connector is now platform independend 347The Qtopia addressbook connector is now platform independend
348as well and should work on any platform for importing/exporting 348as well and should work on any platform for importing/exporting
349Qtopia and Opie XML files. 349Qtopia and Opie XML files.
350 350
351Added a +30min feature to the timezone settings to make 351Added a +30min feature to the timezone settings to make
352KDE-Pim/Pi useable in Australia and other parts on the 352KDE-Pim/Pi useable in Australia and other parts on the
353world with strange timezones ;-) 353world with strange timezones ;-)
354 354
355German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 355German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
356 356
357It is now possible to disable the 357It is now possible to disable the
358"receive data via infrared" feature, such that syncing with 358"receive data via infrared" feature, such that syncing with
359Outlook is now possible again with Kx/Pi runing. 359Outlook is now possible again with Kx/Pi runing.
360Please disable it, before syncing Sharp DTM with Outlook. 360Please disable it, before syncing Sharp DTM with Outlook.
361For your convenience, the "receive data via infrared" feature 361For your convenience, the "receive data via infrared" feature
362is disabled automatically, if you sync Kx/Pi with DTM. 362is disabled automatically, if you sync Kx/Pi with DTM.
363You have to enable it again manually after syncing. 363You have to enable it again manually after syncing.
364Enabling this feature makes it impossible to start the 364Enabling this feature makes it impossible to start the
365Sharp DTM apps. If this feature is enabled, you will only get the 365Sharp DTM apps. If this feature is enabled, you will only get the
366alarm notification from KO/Pi and not from the Sharp calendar. 366alarm notification from KO/Pi and not from the Sharp calendar.
367This is very useful if you sync KO/Pi with Sharp DTM, 367This is very useful if you sync KO/Pi with Sharp DTM,
368because after syncing you usually would get notified about 368because after syncing you usually would get notified about
369an alarm by KO/Pi and the Sharp Calendar. 369an alarm by KO/Pi and the Sharp Calendar.
370 370
371Together with the Linux desktop version of KO/Pi 371Together with the Linux desktop version of KO/Pi
372it is now possible to sync KO/Pi on the Zaurus 372it is now possible to sync KO/Pi on the Zaurus
373with the complete KDE-desktop (3.3 or later) 373with the complete KDE-desktop (3.3 or later)
374calendar data easily. 374calendar data easily.
375That makes it possible to sync the Z with one 375That makes it possible to sync the Z with one
376click of a mouse with the KDE-Desktop. 376click of a mouse with the KDE-Desktop.
377This feature it available for all Zaurus platforms KO/Pi 377This feature it available for all Zaurus platforms KO/Pi
378is running on. 378is running on.
379The only thing needed is a running KO/Pi on Linux and 379The only thing needed is a running KO/Pi on Linux and
380a compiled version of the small 380a compiled version of the small
381KDE-Pim/Pi<->KDE-Desktop access command line program, 381KDE-Pim/Pi<->KDE-Desktop access command line program,
382which is in the KDE-Pim/Pi sources available. 382which is in the KDE-Pim/Pi sources available.
383 383
384The "KDE-desktop" syncing feature for KA/Pi will follow 384The "KDE-desktop" syncing feature for KA/Pi will follow
385in the next releases. 385in the next releases.
386 386
387Fixed the vcard export bug, which had the version 1.9.8. 387Fixed the vcard export bug, which had the version 1.9.8.
388 388
389Added missing GERMAN translation to KO/Pi. 389Added missing GERMAN translation to KO/Pi.
390Hi PsionX, could you add the missing french translation?Thx! 390Hi PsionX, could you add the missing french translation?Thx!
391 391
392Translation files for KA/Pi are available as well. 392Translation files for KA/Pi are available as well.
393GERMAN translation will be available in the next release. 393GERMAN translation will be available in the next release.
394PsionX ( yres, you again ;-) ), could you start translating 394PsionX ( yres, you again ;-) ), could you start translating
395KA/Pi? Thx! 395KA/Pi? Thx!
396 396
397You can download the version 1.9.9 at 397You can download the version 1.9.9 at
398 398
399http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 399http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
400 400
401Note: 401Note:
402To run the mail program OM/Pi you need libopenssl. 402To run the mail program OM/Pi you need libopenssl.
403A link to a download loaction is available at 403A link to a download loaction is available at
404ZSI at www.killefiz.de 404ZSI at www.killefiz.de
405 405
406 406
407********** VERSION 1.9.8 ************ 407********** VERSION 1.9.8 ************
408 408
409Fixed character decoding in OM/Pi. 409Fixed character decoding in OM/Pi.
410(e.g. German "Umlaute" were not displayed properly.) 410(e.g. German "Umlaute" were not displayed properly.)
411 411
412Made is possible to reparent todos in KO/Pi. 412Made is possible to reparent todos in KO/Pi.
413Use contextmenu or keys (look at Help-Keys + Colors) for that. 413Use contextmenu or keys (look at Help-Keys + Colors) for that.
414 414
415Added the missing Sync-Howto and WhatsNew to the packages. 415Added the missing Sync-Howto and WhatsNew to the packages.
416 416
417KO/Pi on Linux desktop can now sync with KDE desktop. 417KO/Pi on Linux desktop can now sync with KDE desktop.
418That means: When using KO/Pi on Linux desktop for syncing with 418That means: When using KO/Pi on Linux desktop for syncing with
419KDE desktop and the Zaurus, the Zaurus can be synced now 419KDE desktop and the Zaurus, the Zaurus can be synced now
420with all KDE-Calendar resources, not only with one local file. 420with all KDE-Calendar resources, not only with one local file.
421(That makes it possible to sync the Zaurus with the 421(That makes it possible to sync the Zaurus with the
422calendar data on a Kolab server) 422calendar data on a Kolab server)
423 423
424KA/Pi syncing with KDE desktop will be available in the next version. 424KA/Pi syncing with KDE desktop will be available in the next version.
425 425
426 426
427********** VERSION 1.9.7 ************ 427********** VERSION 1.9.7 ************
428 428
429KO/Pi - KA/Pi on Windows: 429KO/Pi - KA/Pi on Windows:
430Now a directory can be defined by the user, where the 430Now a directory can be defined by the user, where the
431application/config data should be saved. 431application/config data should be saved.
432 Define your desired path in the evironment variable 432 Define your desired path in the evironment variable
433 MICROKDEHOME 433 MICROKDEHOME
434 before starting KO/Pi or KA/Pi. 434 before starting KO/Pi or KA/Pi.
435 435
436An easy Kx/Pi to Kx/Pi syncing is now possible 436An easy Kx/Pi to Kx/Pi syncing is now possible
437(it is called Pi-Sync) via network. 437(it is called Pi-Sync) via network.
438Please look at the Sync Howto. 438Please look at the Sync Howto.
439 439
440Exporting of calendar data and contacts to mobile phones is now possible. 440Exporting of calendar data and contacts to mobile phones is now possible.
441The SyncHowto is updated with information howto 441The SyncHowto is updated with information howto
442access/sync mobile phones. 442access/sync mobile phones.
443Please look at the Sync Howto. 443Please look at the Sync Howto.
444 444
445Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 445Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
446Please disable Fastload for the original contact/calendar applications 446Please disable Fastload for the original contact/calendar applications
447and close them. 447and close them.
448KO/Pi and KA/Pi must be running in order to receive the data. 448KO/Pi and KA/Pi must be running in order to receive the data.
449(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 449(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
450 450
451In the KA/Pi details view are now the preferred tel. numbers displayed on top 451In the KA/Pi details view are now the preferred tel. numbers displayed on top
452of the other data ( emails/tel.numbers/addresses) 452of the other data ( emails/tel.numbers/addresses)
453 453
454Fixed some syncing problems in KA/Pi. 454Fixed some syncing problems in KA/Pi.
455 455
456Added font settings for the KA/Pi details view. 456Added font settings for the KA/Pi details view.
457Added fields "children's name" and "gender" to KA/Pi. 457Added fields "children's name" and "gender" to KA/Pi.
458 458
459Made searching in KA/Pi better: 459Made searching in KA/Pi better:
460Now the first item in a view is selected after a search automatically and 460Now the first item in a view is selected after a search automatically and
461the views can be scrolled up/down when the search input field has the keyboard focus. 461the views can be scrolled up/down when the search input field has the keyboard focus.
462 462
463And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 463And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
464 464
465 465
466********** VERSION 1.9.6 ************ 466********** VERSION 1.9.6 ************
467 467
468Changes in the external application communication on the Zaurus 468Changes in the external application communication on the Zaurus
469in order to use less RAM when the apps are running. 469in order to use less RAM when the apps are running.
470First syncing of addressbooks (KA/Pi) is possible. 470First syncing of addressbooks (KA/Pi) is possible.
471 471
472 472
473********** VERSION 1.9.5a ************ 473********** VERSION 1.9.5a ************
474 474
475Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 475Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
476Fixed some small bugs. 476Fixed some small bugs.
477KA/Pi shows now the birthday in summary view. 477KA/Pi shows now the birthday in summary view.
478Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 478Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
479for displaying dates. 479for displaying dates.
480 480
481 481
482********** VERSION 1.9.5 ************ 482********** VERSION 1.9.5 ************
483 483
484There is still no Addressbook syncing! 484There is still no Addressbook syncing!
485 485
486New in 1.9.5: 486New in 1.9.5:
487 487
488Many bugfixes. 488Many bugfixes.
489Better searching in KA/Pi. 489Better searching in KA/Pi.
490You can configure in KA/Pi if you want to search only after 490You can configure in KA/Pi if you want to search only after
491<return> key pressed. 491<return> key pressed.
492 492
493Better mail downloading in OM/Pi. 493Better mail downloading in OM/Pi.
494 494
495First experimental alpha version of sync of KO/Pi with mobile phones. 495First experimental alpha version of sync of KO/Pi with mobile phones.
496See gammu documentation for supported phones. 496See gammu documentation for supported phones.
497You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. 497You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp.
498Quick hint how to use: 498Quick hint how to use:
499NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 499NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
500Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 500Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
501Create syncprofile - mobile device 501Create syncprofile - mobile device
502Remove entry for model. (Leave empty ). 502Remove entry for model. (Leave empty ).
503Enable infrared on Zaurus and your Phone. 503Enable infrared on Zaurus and your Phone.
504Sync. 504Sync.
505To get a more detailed log, start kopi from konsole. 505To get a more detailed log, start kopi from konsole.
506 506
507********** VERSION 1.9.4 ************ 507********** VERSION 1.9.4 ************
508 508
509This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 509This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
510 510
511WARNING: 511WARNING:
512PLEASE BACKUP ALL YOUR DATA! 512PLEASE BACKUP ALL YOUR DATA!
513We have changed a lot and maybe there are some unknown problems. 513We have changed a lot and maybe there are some unknown problems.
514 514
515SYNC HANDLING HAS CHANGED! 515SYNC HANDLING HAS CHANGED!
516Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 516Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
517(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 517(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
518 518
519You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 519You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
520If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. 520If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well.
521 521
522As programs are available: 522As programs are available:
523KO/Pi (korganizer ipk) - a calendar program. 523KO/Pi (korganizer ipk) - a calendar program.
524KA/Pi (kaddressbook ipk ) - an addressbook 524KA/Pi (kaddressbook ipk ) - an addressbook
525OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 525OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
526 526
527An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 527An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
528(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 528(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
529 529
530All the applications are installed in a "Pim" TAB. 530All the applications are installed in a "Pim" TAB.
531If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk 531If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk
532 532
533All the application are integrated. 533All the application are integrated.
534Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. 534Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail.
535 535
536HINT: 536HINT:
537If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 537If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
538 538
539What's new? 539What's new?
540 540
541SYNC HANDLING HAS CHANGED! 541SYNC HANDLING HAS CHANGED!
542Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 542Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
543(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 543(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
544 544
545New in OM/Pi: 545New in OM/Pi:
546When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. 546When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails.
547 547
548New in KO/Pi: 548New in KO/Pi:
549French is now available for KO/Pi. 549French is now available for KO/Pi.
550Choose menu:Actions - Configure:TAB locale 550Choose menu:Actions - Configure:TAB locale
551Syncing has changed. 551Syncing has changed.
552Phone sync available soon. 552Phone sync available soon.
553Not much changes, I cannot remember them ... 553Not much changes, I cannot remember them ...
554 554
555New in KA/Pi: 555New in KA/Pi:
556Beaming possible. 556Beaming possible.
557Sharp DTM readonly access possible( create a new DTM resource ); 557Sharp DTM readonly access possible( create a new DTM resource );
558Better searching possible. 558Better searching possible.
559Search is performed only after pressing the return key. 559Search is performed only after pressing the return key.
560Use wildcard * to specify parts of a name. 560Use wildcard * to specify parts of a name.
561 561
562Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . 562Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * .
563 563
564A big improvement is the new management of the contact access. 564A big improvement is the new management of the contact access.
565In version 1.9.3, every application was using their own addressbook access data. 565In version 1.9.3, every application was using their own addressbook access data.
566That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 566That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
567That was wasting of memory, if you had several hundreds of contacts. 567That was wasting of memory, if you had several hundreds of contacts.
568 568
569Now only KA/Pi accesses the addressbook. 569Now only KA/Pi accesses the addressbook.
570If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. 570If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them.
571If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 571If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
572That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 572That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
573 573
574New in the KO/Pi alarm applet: 574New in the KO/Pi alarm applet:
575Configure your own timer popup menu! 575Configure your own timer popup menu!
576(Text and minutes for timer countdown) 576(Text and minutes for timer countdown)
577Just edit the file 577Just edit the file
578(yourhomedir)/.kopialarmtimerrc 578(yourhomedir)/.kopialarmtimerrc
579and start/stop a timer to get a new menu with the data of this file. 579and start/stop a timer to get a new menu with the data of this file.
580 580
581********** VERSION 1.9.3 ************ 581********** VERSION 1.9.3 ************
5821) 5821)
583Now KO/Pi on Windows imports directly the calendar data of 583Now KO/Pi on Windows imports directly the calendar data of
584an installed Outlook. Should work with OL version >= 2000. 584an installed Outlook. Should work with OL version >= 2000.
585 585
586********** VERSION 1.9.2 ************ 586********** VERSION 1.9.2 ************
5871) 5871)
588KDE-Pim/Pi has got a new member: 588KDE-Pim/Pi has got a new member:
589KmicroMail (KM/Pi) is a mail program, 589KmicroMail (KM/Pi) is a mail program,
590which can handle IMAP and POP mail access. 590which can handle IMAP and POP mail access.
591It is based on Opie-Mail v3. 591It is based on Opie-Mail v3.
592All dependencies to the Opie libraries ar removed, 592All dependencies to the Opie libraries ar removed,
593such that no additional Opie lib is needed. 593such that no additional Opie lib is needed.
594It is already integrated in KO/Pi and KA/Pi. 594It is already integrated in KO/Pi and KA/Pi.
595It it now available for the Zaurus,probably it 595It it now available for the Zaurus,probably it
596will be available for other platforms later. 596will be available for other platforms later.
597Hint: 597Hint:
598Create your own contact (name + email) 598Create your own contact (name + email)
599in KA/Pi, select this contact and choose menu: 599in KA/Pi, select this contact and choose menu:
600Settings - Set Who Am I. 600Settings - Set Who Am I.
601Now the settings of this contact are used as 601Now the settings of this contact are used as
602the sender data in KM/Pi. 602the sender data in KM/Pi.
6032) 6032)
604KDE-Pim/Pi is split up in five different 604KDE-Pim/Pi is split up in five different
605packages now precompiled for Sharp Zaurus: 605packages now precompiled for Sharp Zaurus:
606--kmicrokdelibs_1.9.2_arm.ipk 606--kmicrokdelibs_1.9.2_arm.ipk
607The libs are needed for any 607The libs are needed for any
608of the following programs: 608of the following programs:
609--kaddressbook_1.9.2_arm.ipk 609--kaddressbook_1.9.2_arm.ipk
610--kmicromail_1.9.2_arm.ipk 610--kmicromail_1.9.2_arm.ipk
611--korganizer_1.9.2_arm.ipk 611--korganizer_1.9.2_arm.ipk
612Independ from that, there is the alarm applet 612Independ from that, there is the alarm applet
613available for KO/Pi, which also offers 613available for KO/Pi, which also offers
614quick access for a new mail or 614quick access for a new mail or
615showing the addressbook.: 615showing the addressbook.:
616--korganizer-alarm_1.9.2_arm.ipk 616--korganizer-alarm_1.9.2_arm.ipk
617Independend means, that the alarm applet 617Independend means, that the alarm applet
618does not need any of the libs or programs above to run. 618does not need any of the libs or programs above to run.
619But it would be quite useless without these programs. 619But it would be quite useless without these programs.
620NOTE: 620NOTE:
621If you get a 621If you get a
622"This application depends on other programs" 622"This application depends on other programs"
623during installation of 623during installation of
624--kmicrokdelibs_1.9.2_arm.ipk 624--kmicrokdelibs_1.9.2_arm.ipk
625you probably do not have to care about that. 625you probably do not have to care about that.
626kmicrokdelibs_1.9.2 will come with some 626kmicrokdelibs_1.9.2 will come with some
627resource plugins, which needs additional libraries. 627resource plugins, which needs additional libraries.
628(E.g. libopie1, if you want to use the 628(E.g. libopie1, if you want to use the
629opie resource connector in KA/Pi). 629opie resource connector in KA/Pi).
630If you do not have this libraries installed, 630If you do not have this libraries installed,
631you simply cannot use the resource. 631you simply cannot use the resource.
632To make it clear: 632To make it clear:
633If the libraries are missing, the applications 633If the libraries are missing, the applications
634using kmicrokdelibs will start, 634using kmicrokdelibs will start,
635because the resources are plugins. 635because the resources are plugins.
6363) 6363)
637KO/Pi and friends are now installable on SD-Card! 637KO/Pi and friends are now installable on SD-Card!
638It is recommended to install all libs and apps 638It is recommended to install all libs and apps
639on the SD card or all in the internal storage. 639on the SD card or all in the internal storage.
640There may be problems, if this is mixed. 640There may be problems, if this is mixed.
6414) 6414)
642Fixed two bugs in the alarm notification on Windows. 642Fixed two bugs in the alarm notification on Windows.
6435) 6435)
644Great improvement! 644Great improvement!
645KO/Pi uses now the latest version of libical. 645KO/Pi uses now the latest version of libical.
646Libical is the library which actually reads 646Libical is the library which actually reads
647the calendar files and extract the data from it. 647the calendar files and extract the data from it.
648With the old version, there were problems 648With the old version, there were problems
649(crashes or program hangs) when licical did read 649(crashes or program hangs) when licical did read
650files, which were not stored from KO/Pi. 650files, which were not stored from KO/Pi.
651I do not know, if the new libical works perfect, 651I do not know, if the new libical works perfect,
652but actually it works much better than 652but actually it works much better than
653the old version. 653the old version.
654There are no problems with compatibility with 654There are no problems with compatibility with
655old calendar files of KO/Pi, of course! 655old calendar files of KO/Pi, of course!
6566) 6566)
657New in KA/Pi: 657New in KA/Pi:
658Opie addressbook resource connector available! 658Opie addressbook resource connector available!
659You will need libopie1 and the opie addressbook, 659You will need libopie1 and the opie addressbook,
660of course. 660of course.
661With the Opie addressbook resource connector, 661With the Opie addressbook resource connector,
662you can access the Opie addressbook readonly in KA/Pi. 662you can access the Opie addressbook readonly in KA/Pi.
663If you want to edit or import the data into KA/Pi, 663If you want to edit or import the data into KA/Pi,
664do this: 664do this:
665a) Create an Opie resource. 665a) Create an Opie resource.
666 (Menu: Settings-Configure Resources). 666 (Menu: Settings-Configure Resources).
667After configuration and restarting KA/Pi you should see 667After configuration and restarting KA/Pi you should see
668the Opie contacts in KA/Pi. 668the Opie contacts in KA/Pi.
669b) Select some or all Opie contacts. 669b) Select some or all Opie contacts.
670(NOTE: +++++ 670(NOTE: +++++
671To know exactly, what contacts are Opie contacts, 671To know exactly, what contacts are Opie contacts,
672do this: Choose menu: 672do this: Choose menu:
673View-Modify View - TAB Fields. 673View-Modify View - TAB Fields.
674Select in the above list "Resource" and click 674Select in the above list "Resource" and click
675down arrow to add it to the "Selected fields". 675down arrow to add it to the "Selected fields".
676Click OK. 676Click OK.
677Now you have a new column "Resource" in your list, 677Now you have a new column "Resource" in your list,
678where you can see, what an Opie resource is. 678where you can see, what an Opie resource is.
679++++ NOTE end.) 679++++ NOTE end.)
680Ok, we do have now some Opie contacts seleted. 680Ok, we do have now some Opie contacts seleted.
681(Use SHIFT or CTRL key in order to multiple select). 681(Use SHIFT or CTRL key in order to multiple select).
682c) Choose menu: Edit-Copy. 682c) Choose menu: Edit-Copy.
683d) Choose menu: Edit-Paste. 683d) Choose menu: Edit-Paste.
684e) Select the resource, you want to add the contacts to. 684e) Select the resource, you want to add the contacts to.
685Congrats! Now you have read/write access to the copied 685Congrats! Now you have read/write access to the copied
686opie contacts as "real" KA/Pi contacts. 686opie contacts as "real" KA/Pi contacts.
687 687
688 688
689********** VERSION 1.9.1 ************ 689********** VERSION 1.9.1 ************
6901) 6901)
691 +++ IMPORTANT 1 +++ 691 +++ IMPORTANT 1 +++
692 692
693The storing place of the default calendar 693The storing place of the default calendar
694file has changed! 694file has changed!
695The default calendar file was 695The default calendar file was
696Applications/korganizer/mycalendar.ics 696Applications/korganizer/mycalendar.ics
697on Zaurus and 697on Zaurus and
698(yourHomeDir)/korganizer/mycalendar.ics 698(yourHomeDir)/korganizer/mycalendar.ics
699on Windows/Linux desktop. Now it is 699on Windows/Linux desktop. Now it is
700(yourHomeDir)/kdepim/korganizer/mycalendar.ics 700(yourHomeDir)/kdepim/korganizer/mycalendar.ics
701on Zaurus, Windows and Linux. 701on Zaurus, Windows and Linux.
702To load the old file, choose menu 702To load the old file, choose menu
703File-Load calendar backup. 703File-Load calendar backup.
704(It should be loaded automatically 704(It should be loaded automatically
705at startup with a warning message displayed). 705at startup with a warning message displayed).
706The place of the configuration file has changed too. 706The place of the configuration file has changed too.
707If you want to use your old KO/Pi config, 707If you want to use your old KO/Pi config,
708copy it to 708copy it to
709(yourHomeDir)/kdepim/config/korganizerrc 709(yourHomeDir)/kdepim/config/korganizerrc
710Please read VERSION 1.9.0 - topic 3) as well! 710Please read VERSION 1.9.0 - topic 3) as well!
711 711
712 +++ IMPORTANT 2 +++ 712 +++ IMPORTANT 2 +++
713 713
714Because of the new paths, you will need 714Because of the new paths, you will need
715a new version of the KO/Pi alarm applet 715a new version of the KO/Pi alarm applet
716for Zaurus. 716for Zaurus.
717Use version >= 1.9.1 717Use version >= 1.9.1
718 718
7192) 7192)
720Now the QWhat'sThis Icon works for items 720Now the QWhat'sThis Icon works for items
721in the month view as well. 721in the month view as well.
722(See VERSION 1.7.8 Topic 1) ). 722(See VERSION 1.7.8 Topic 1) ).
7233) 7233)
724You can import birtsdays/anniversaries 724You can import birtsdays/anniversaries
725from KA/Pi into KO/Pi. 725from KA/Pi into KO/Pi.
726Choose menu File-Import birthdays. 726Choose menu File-Import birthdays.
727If you import twice, already imported items 727If you import twice, already imported items
728will not be imported again, if they 728will not be imported again, if they
729have not been changed in KO/Pi. 729have not been changed in KO/Pi.
7304) 7304)
731When syncing with sharp DTM, now a progress 731When syncing with sharp DTM, now a progress
732is shown, when the data is written back. 732is shown, when the data is written back.
733If there is much data in KO/Pi and no data 733If there is much data in KO/Pi and no data
734in DTM, that can take a long time. 734in DTM, that can take a long time.
735(But only for the first time ). 735(But only for the first time ).
7365) 7365)
737In the search dialog, you can search 737In the search dialog, you can search
738now for the name/email of an attendee 738now for the name/email of an attendee
739of an event/todo. 739of an event/todo.
740To get more space for displaying 740To get more space for displaying
741search results, the buttons 741search results, the buttons
742for "search" and "close" on the 742for "search" and "close" on the
743bottom are removed in the PDA version. 743bottom are removed in the PDA version.
744You have to click OK in the top right 744You have to click OK in the top right
745corner to do a search. 745corner to do a search.
7466) 7466)
747Now it is possible to disable the displaying 747Now it is possible to disable the displaying
748of todo items in the Allday part of the Agenda. 748of todo items in the Allday part of the Agenda.
749Choose Menu Action-Configure, 749Choose Menu Action-Configure,
750TAB Todo View, checkbox 750TAB Todo View, checkbox
751"Allday Agenda view shows todos" 751"Allday Agenda view shows todos"
7527) 7527)
753If FastLoad is enabled, now the settings and the 753If FastLoad is enabled, now the settings and the
754calendar data are saved, when KO/Pi is closed. 754calendar data are saved, when KO/Pi is closed.
755(If no Fastload is enabled, KO/Pi saves 755(If no Fastload is enabled, KO/Pi saves
756the data as well, of course) 756the data as well, of course)
7578) 7578)
758The Agenda View has a minimize-splitter now, 758The Agenda View has a minimize-splitter now,
759such that the height of the allday part can be 759such that the height of the allday part can be
760changed quickly. 760changed quickly.
761 761
762********** VERSION 1.9.0 ************ 762********** VERSION 1.9.0 ************
7631) 7631)
764KO/Pi is now merged with the new microKDE from KA/Pi. 764KO/Pi is now merged with the new microKDE from KA/Pi.
765KO/Pi accesses now KA/Pi as the addressbook. 765KO/Pi accesses now KA/Pi as the addressbook.
766The other ddressbook-plugins are not working any longer. 766The other ddressbook-plugins are not working any longer.
767(It is planned, that later KA/Pi itself uses these plugins) 767(It is planned, that later KA/Pi itself uses these plugins)
768New versions of KO/Pi are only available 768New versions of KO/Pi are only available
769together with KA/Pi as the KDE-Pim/Pi package. 769together with KA/Pi as the KDE-Pim/Pi package.
7702) 7702)
771If you click on an attendee of a meeting in the 771If you click on an attendee of a meeting in the
772event viewer, a detailed summary of the 772event viewer, a detailed summary of the
773attendee is shown. 773attendee is shown.
7743) 7743)
775The place of the configuration file has changed. 775The place of the configuration file has changed.
776If you want to use your old KO/Pi config, copy 776If you want to use your old KO/Pi config, copy
777Applications/korganizer/config_korganizerrc 777Applications/korganizer/config_korganizerrc
778to 778to
779Applications/korganizer/config/korganizerrc 779Applications/korganizer/config/korganizerrc
780 780
781********** VERSION 1.7.8 ************ 781********** VERSION 1.7.8 ************
7821) 7821)
783Now the QWhat'sThis ist working. 783Now the QWhat'sThis ist working.
784Enable the QWhat'sThis icon in the toolbar. 784Enable the QWhat'sThis icon in the toolbar.
785(You have to restart to reload the changed toolbar config). 785(You have to restart to reload the changed toolbar config).
786Now click on the QWhat'sThis Icon 786Now click on the QWhat'sThis Icon
787in the top right corner of KO/Pi. 787in the top right corner of KO/Pi.
788Then click on an item in the Agenda View: 788Then click on an item in the Agenda View:
789You will get a detailed display of the items content. 789You will get a detailed display of the items content.
7902) 7902)
791Some other very minor changes. 791Some other very minor changes.
792But I have forgotten the details ... 792But I have forgotten the details ...
793For that reason I start this log here: 793For that reason I start this log here:
794To document my changes, when I am doing it. 794To document my changes, when I am doing it.
795 795
796********** VERSION 1.7.7 ************ 796********** VERSION 1.7.7 ************
797Stable Version of KO/Pi 797Stable Version of KO/Pi
diff --git a/kmicromail/libetpan/mh/mailmh.c b/kmicromail/libetpan/mh/mailmh.c
index 1087ce1..2d1f26d 100644
--- a/kmicromail/libetpan/mh/mailmh.c
+++ b/kmicromail/libetpan/mh/mailmh.c
@@ -1,990 +1,993 @@
1/* 1/*
2 * libEtPan! -- a mail stuff library 2 * libEtPan! -- a mail stuff library
3 * 3 *
4 * Copyright (C) 2001, 2002 - DINH Viet Hoa 4 * Copyright (C) 2001, 2002 - DINH Viet Hoa
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the libEtPan! project nor the names of its 15 * 3. Neither the name of the libEtPan! project nor the names of its
16 * contributors may be used to endorse or promote products derived 16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission. 17 * from this software without specific prior written permission.
18 * 18 *
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * $Id$ 33 * $Id$
34 */ 34 */
35 35
36#include "mailmh.h" 36#include "mailmh.h"
37 37
38/* 38/*
39perfs : 39perfs :
40 40
41/net/home/dinh/Mail/inbox/sylpheed 686 41/net/home/dinh/Mail/inbox/sylpheed 686
42 42
432724 /net/home/dinh/Mail/inbox/sylpheed 432724 /net/home/dinh/Mail/inbox/sylpheed
44 44
45bart:~/LibEtPan/libetpan/tests> time ./mhtest >/dev/null 45bart:~/LibEtPan/libetpan/tests> time ./mhtest >/dev/null
46 46
47real 0m0.385s 47real 0m0.385s
48user 0m0.270s 48user 0m0.270s
49sys 0m0.110s 49sys 0m0.110s
50 50
51*/ 51*/
52 52
53#include <dirent.h> 53#include <dirent.h>
54#include <sys/stat.h> 54#include <sys/stat.h>
55#include <errno.h> 55#include <errno.h>
56#include <unistd.h> 56#include <unistd.h>
57#include <sys/mman.h> 57#include <sys/mman.h>
58#include <fcntl.h> 58#include <fcntl.h>
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62
63#include "libetpan-config.h" 63#include "libetpan-config.h"
64 64
65struct mailmh * mailmh_new(const char * foldername) 65struct mailmh * mailmh_new(const char * foldername)
66{ 66{
67 struct mailmh * f; 67 struct mailmh * f;
68 68
69 f = malloc(sizeof(*f)); 69 f = malloc(sizeof(*f));
70 if (f == NULL) 70 if (f == NULL)
71 return NULL; 71 return NULL;
72 72
73 f->mh_main = mailmh_folder_new(NULL, foldername); 73 f->mh_main = mailmh_folder_new(NULL, foldername);
74 if (f->mh_main == NULL) { 74 if (f->mh_main == NULL) {
75 free(f); 75 free(f);
76 return NULL; 76 return NULL;
77 } 77 }
78 78
79 return f; 79 return f;
80} 80}
81 81
82void mailmh_free(struct mailmh * f) 82void mailmh_free(struct mailmh * f)
83{ 83{
84 mailmh_folder_free(f->mh_main); 84 mailmh_folder_free(f->mh_main);
85 free(f); 85 free(f);
86} 86}
87 87
88 88
89 89
90struct mailmh_msg_info * mailmh_msg_info_new(uint32_t index, size_t size, 90struct mailmh_msg_info * mailmh_msg_info_new(uint32_t index, size_t size,
91 time_t mtime) 91 time_t mtime)
92{ 92{
93 struct mailmh_msg_info * msg_info; 93 struct mailmh_msg_info * msg_info;
94 94
95 msg_info = malloc(sizeof(* msg_info)); 95 msg_info = malloc(sizeof(* msg_info));
96 if (msg_info == NULL) 96 if (msg_info == NULL)
97 return NULL; 97 return NULL;
98 msg_info->msg_index = index; 98 msg_info->msg_index = index;
99 msg_info->msg_size = size; 99 msg_info->msg_size = size;
100 msg_info->msg_mtime = mtime; 100 msg_info->msg_mtime = mtime;
101 101
102 msg_info->msg_array_index = 0; 102 msg_info->msg_array_index = 0;
103 103
104 return msg_info; 104 return msg_info;
105} 105}
106 106
107void mailmh_msg_info_free(struct mailmh_msg_info * msg_info) 107void mailmh_msg_info_free(struct mailmh_msg_info * msg_info)
108{ 108{
109 free(msg_info); 109 free(msg_info);
110} 110}
111 111
112struct mailmh_folder * mailmh_folder_new(struct mailmh_folder * parent, 112struct mailmh_folder * mailmh_folder_new(struct mailmh_folder * parent,
113 const char * name) 113 const char * name)
114{ 114{
115 char * filename; 115 char * filename;
116 char * parent_filename; 116 char * parent_filename;
117 117
118 struct mailmh_folder * folder; 118 struct mailmh_folder * folder;
119 119
120 folder = malloc(sizeof(* folder)); 120 folder = malloc(sizeof(* folder));
121 if (folder == NULL) 121 if (folder == NULL)
122 goto err; 122 goto err;
123 123
124 if (parent == NULL) { 124 if (parent == NULL) {
125 filename = strdup(name); 125 filename = strdup(name);
126 if (filename == NULL) 126 if (filename == NULL)
127 goto free_folder; 127 goto free_folder;
128 } 128 }
129 else { 129 else {
130 parent_filename = parent->fl_filename; 130 parent_filename = parent->fl_filename;
131 filename = malloc(strlen(parent_filename) + strlen(name) + 2); 131 filename = malloc(strlen(parent_filename) + strlen(name) + 2);
132 if (filename == NULL) 132 if (filename == NULL)
133 goto free_folder; 133 goto free_folder;
134 134
135 strcpy(filename, parent_filename); 135 strcpy(filename, parent_filename);
136 strcat(filename, MAIL_DIR_SEPARATOR_S); 136 strcat(filename, MAIL_DIR_SEPARATOR_S);
137 strcat(filename, name); 137 strcat(filename, name);
138 } 138 }
139 139
140 folder->fl_filename = filename; 140 folder->fl_filename = filename;
141 141
142 folder->fl_name = strdup(name); 142 folder->fl_name = strdup(name);
143 if (folder->fl_name == NULL) 143 if (folder->fl_name == NULL)
144 goto free_filename; 144 goto free_filename;
145 145
146 folder->fl_msgs_tab = carray_new(128); 146 folder->fl_msgs_tab = carray_new(128);
147 if (folder->fl_msgs_tab == NULL) 147 if (folder->fl_msgs_tab == NULL)
148 goto free_name; 148 goto free_name;
149 149
150#if 0 150#if 0
151 folder->fl_msgs_hash = cinthash_new(128); 151 folder->fl_msgs_hash = cinthash_new(128);
152 if (folder->fl_msgs_hash == NULL) 152 if (folder->fl_msgs_hash == NULL)
153 goto free_msgs_tab; 153 goto free_msgs_tab;
154#endif 154#endif
155 folder->fl_msgs_hash = chash_new(CHASH_DEFAULTSIZE, CHASH_COPYKEY); 155 folder->fl_msgs_hash = chash_new(CHASH_DEFAULTSIZE, CHASH_COPYKEY);
156 if (folder->fl_msgs_hash == NULL) 156 if (folder->fl_msgs_hash == NULL)
157 goto free_msgs_tab; 157 goto free_msgs_tab;
158 158
159 folder->fl_subfolders_tab = carray_new(128); 159 folder->fl_subfolders_tab = carray_new(128);
160 if (folder->fl_subfolders_tab == NULL) 160 if (folder->fl_subfolders_tab == NULL)
161 goto free_msgs_hash; 161 goto free_msgs_hash;
162 162
163 folder->fl_subfolders_hash = chash_new(128, CHASH_COPYNONE); 163 folder->fl_subfolders_hash = chash_new(128, CHASH_COPYNONE);
164 if (folder->fl_subfolders_hash == NULL) 164 if (folder->fl_subfolders_hash == NULL)
165 goto free_subfolders_tab; 165 goto free_subfolders_tab;
166 166
167 folder->fl_mtime = 0; 167 folder->fl_mtime = 0;
168 folder->fl_parent = parent; 168 folder->fl_parent = parent;
169 folder->fl_max_index = 0; 169 folder->fl_max_index = 0;
170 170
171 return folder; 171 return folder;
172 172
173 free_subfolders_tab: 173 free_subfolders_tab:
174 carray_free(folder->fl_subfolders_tab); 174 carray_free(folder->fl_subfolders_tab);
175 free_msgs_hash: 175 free_msgs_hash:
176#if 0 176#if 0
177 cinthash_free(folder->fl_msgs_hash); 177 cinthash_free(folder->fl_msgs_hash);
178#endif 178#endif
179 chash_free(folder->fl_msgs_hash); 179 chash_free(folder->fl_msgs_hash);
180 free_msgs_tab: 180 free_msgs_tab:
181 carray_free(folder->fl_msgs_tab); 181 carray_free(folder->fl_msgs_tab);
182 free_name: 182 free_name:
183 free(folder->fl_name); 183 free(folder->fl_name);
184 free_filename: 184 free_filename:
185 free(folder->fl_filename); 185 free(folder->fl_filename);
186 free_folder: 186 free_folder:
187 free(folder); 187 free(folder);
188 err: 188 err:
189 return NULL; 189 return NULL;
190} 190}
191 191
192void mailmh_folder_free(struct mailmh_folder * folder) 192void mailmh_folder_free(struct mailmh_folder * folder)
193{ 193{
194 unsigned int i; 194 unsigned int i;
195 195
196 for(i = 0 ; i < carray_count(folder->fl_subfolders_tab) ; i++) { 196 for(i = 0 ; i < carray_count(folder->fl_subfolders_tab) ; i++) {
197 struct mailmh_folder * subfolder; 197 struct mailmh_folder * subfolder;
198 198
199 subfolder = carray_get(folder->fl_subfolders_tab, i); 199 subfolder = carray_get(folder->fl_subfolders_tab, i);
200 if (subfolder != NULL) 200 if (subfolder != NULL)
201 mailmh_folder_free(subfolder); 201 mailmh_folder_free(subfolder);
202 } 202 }
203 carray_free(folder->fl_subfolders_tab); 203 carray_free(folder->fl_subfolders_tab);
204 chash_free(folder->fl_subfolders_hash); 204 chash_free(folder->fl_subfolders_hash);
205 205
206 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i++) { 206 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i++) {
207 struct mailmh_msg_info * msg_info; 207 struct mailmh_msg_info * msg_info;
208 208
209 msg_info = carray_get(folder->fl_msgs_tab, i); 209 msg_info = carray_get(folder->fl_msgs_tab, i);
210 if (msg_info != NULL) 210 if (msg_info != NULL)
211 mailmh_msg_info_free(msg_info); 211 mailmh_msg_info_free(msg_info);
212 } 212 }
213 carray_free(folder->fl_msgs_tab); 213 carray_free(folder->fl_msgs_tab);
214 chash_free(folder->fl_msgs_hash); 214 chash_free(folder->fl_msgs_hash);
215#if 0 215#if 0
216 cinthash_free(folder->fl_msgs_hash); 216 cinthash_free(folder->fl_msgs_hash);
217#endif 217#endif
218 218
219 free(folder->fl_filename); 219 free(folder->fl_filename);
220 free(folder->fl_name); 220 free(folder->fl_name);
221 221
222 free(folder); 222 free(folder);
223} 223}
224 224
225struct mailmh_folder * mailmh_folder_find(struct mailmh_folder * root, 225struct mailmh_folder * mailmh_folder_find(struct mailmh_folder * root,
226 const char * filename) 226 const char * filename)
227{ 227{
228 int r; 228 int r;
229 char pathname[PATH_MAX]; 229 char pathname[PATH_MAX];
230 char * p; 230 char * p;
231 chashdatum key; 231 chashdatum key;
232 chashdatum data; 232 chashdatum data;
233 struct mailmh_folder * folder; 233 struct mailmh_folder * folder;
234 char * start; 234 char * start;
235 235
236 if (strcmp(root->fl_filename, filename) == 0) 236 if (strcmp(root->fl_filename, filename) == 0)
237 return root; 237 return root;
238 238
239#if 0 239#if 0
240 r = mailmh_folder_update(root); 240 r = mailmh_folder_update(root);
241 if (r != MAILMH_NO_ERROR) 241 if (r != MAILMH_NO_ERROR)
242 return NULL; 242 return NULL;
243#endif 243#endif
244 244
245#if 0 245#if 0
246 for(i = 0 ; i < root->fl_subfolders_tab->len ; i++) { 246 for(i = 0 ; i < root->fl_subfolders_tab->len ; i++) {
247 struct mailmh_folder * subfolder; 247 struct mailmh_folder * subfolder;
248 248
249 subfolder = carray_get(root->fl_subfolders_tab, i); 249 subfolder = carray_get(root->fl_subfolders_tab, i);
250 if (subfolder != NULL) 250 if (subfolder != NULL)
251 if (strncmp(subfolder->fl_filename, filename, 251 if (strncmp(subfolder->fl_filename, filename,
252 strlen(subfolder->fl_filename)) == 0) 252 strlen(subfolder->fl_filename)) == 0)
253 return mailmh_folder_find(subfolder, filename); 253 return mailmh_folder_find(subfolder, filename);
254 } 254 }
255#endif 255#endif
256 strncpy(pathname, filename, PATH_MAX); 256 strncpy(pathname, filename, PATH_MAX);
257 pathname[PATH_MAX - 1] = 0; 257 pathname[PATH_MAX - 1] = 0;
258 start = pathname + strlen(root->fl_filename) + 1; 258 start = pathname + strlen(root->fl_filename) + 1;
259 259
260 p = strchr(start, MAIL_DIR_SEPARATOR); 260 p = strchr(start, MAIL_DIR_SEPARATOR);
261 if (p != NULL) { 261 if (p != NULL) {
262 * p = 0; 262 * p = 0;
263 263
264 root = mailmh_folder_find(root, pathname); 264 root = mailmh_folder_find(root, pathname);
265 if (root != NULL) { 265 if (root != NULL) {
266 folder = mailmh_folder_find(root, filename); 266 folder = mailmh_folder_find(root, filename);
267 if (folder == NULL) 267 if (folder == NULL)
268 return NULL; 268 return NULL;
269 return folder; 269 return folder;
270 } 270 }
271 271
272 return NULL; 272 return NULL;
273 } 273 }
274 else { 274 else {
275 key.data = pathname; 275 key.data = pathname;
276 key.len = strlen(pathname); 276 key.len = strlen(pathname);
277 r = chash_get(root->fl_subfolders_hash, &key, &data); 277 r = chash_get(root->fl_subfolders_hash, &key, &data);
278 if (r < 0) 278 if (r < 0)
279 return NULL; 279 return NULL;
280 280
281 return data.data; 281 return data.data;
282 } 282 }
283} 283}
284 284
285int mailmh_folder_update(struct mailmh_folder * folder) 285int mailmh_folder_update(struct mailmh_folder * folder)
286{ 286{
287 DIR * d; 287 DIR * d;
288 struct dirent * ent; 288 struct dirent * ent;
289 struct stat buf; 289 struct stat buf;
290 char * mh_seq; 290 char * mh_seq;
291 char filename[PATH_MAX]; 291 char filename[PATH_MAX];
292 int res; 292 int res;
293 int r; 293 int r;
294 uint32_t max_index; 294 uint32_t max_index;
295#if 0 295#if 0
296 int add_folder; 296 int add_folder;
297#endif 297#endif
298 unsigned int i; 298 unsigned int i;
299 299
300 if (stat(folder->fl_filename, &buf) == -1) { 300 if (stat(folder->fl_filename, &buf) == -1) {
301 res = MAILMH_ERROR_FOLDER; 301 res = MAILMH_ERROR_FOLDER;
302 goto err; 302 goto err;
303 } 303 }
304 304
305 if (folder->fl_mtime == buf.st_mtime) { 305 if (folder->fl_mtime == buf.st_mtime) {
306 res = MAILMH_NO_ERROR; 306 res = MAILMH_NO_ERROR;
307 goto err; 307 goto err;
308 } 308 }
309 309
310 folder->fl_mtime = buf.st_mtime; 310 folder->fl_mtime = buf.st_mtime;
311 311
312 d = opendir(folder->fl_filename); 312 d = opendir(folder->fl_filename);
313 if (d == NULL) { 313 if (d == NULL) {
314 res = MAILMH_ERROR_FOLDER; 314 res = MAILMH_ERROR_FOLDER;
315 goto err; 315 goto err;
316 } 316 }
317 317
318 max_index = 0; 318 max_index = 0;
319 319
320#if 0 320#if 0
321 if (folder->fl_subfolders_tab->len == 0) 321 if (folder->fl_subfolders_tab->len == 0)
322 add_folder = 1; 322 add_folder = 1;
323 else 323 else
324 add_folder = 0; 324 add_folder = 0;
325#endif 325#endif
326 326
327 /* clear the message list */ 327 /* clear the message list */
328 328
329 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i ++) { 329 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i ++) {
330 struct mailmh_msg_info * msg_info; 330 struct mailmh_msg_info * msg_info;
331 chashdatum key; 331 chashdatum key;
332 332
333 msg_info = carray_get(folder->fl_msgs_tab, i); 333 msg_info = carray_get(folder->fl_msgs_tab, i);
334 if (msg_info == NULL) 334 if (msg_info == NULL)
335 continue; 335 continue;
336 336
337#if 0 337#if 0
338 cinthash_remove(folder->fl_msgs_hash, msg_info->msg_index); 338 cinthash_remove(folder->fl_msgs_hash, msg_info->msg_index);
339#endif 339#endif
340 key.data = &msg_info->msg_index; 340 key.data = &msg_info->msg_index;
341 key.len = sizeof(msg_info->msg_index); 341 key.len = sizeof(msg_info->msg_index);
342 chash_delete(folder->fl_msgs_hash, &key, NULL); 342 chash_delete(folder->fl_msgs_hash, &key, NULL);
343 343
344 mailmh_msg_info_free(msg_info); 344 mailmh_msg_info_free(msg_info);
345 } 345 }
346 346
347 carray_set_size(folder->fl_msgs_tab, 0); 347 carray_set_size(folder->fl_msgs_tab, 0);
348 348
349 do { 349 do {
350 uint32_t index; 350 uint32_t index;
351 351
352 ent = readdir(d); 352 ent = readdir(d);
353 353
354 if (ent != NULL) { 354 if (ent != NULL) {
355 355
356 snprintf(filename, PATH_MAX, 356 snprintf(filename, PATH_MAX,
357 "%s%c%s", folder->fl_filename, MAIL_DIR_SEPARATOR, ent->d_name); 357 "%s%c%s", folder->fl_filename, MAIL_DIR_SEPARATOR, ent->d_name);
358 358
359 if (stat(filename, &buf) == -1) 359 if (stat(filename, &buf) == -1)
360 continue; 360 continue;
361 361
362 if (S_ISREG(buf.st_mode)) { 362 if (S_ISREG(buf.st_mode)) {
363 index = strtoul(ent->d_name, NULL, 10); 363 index = strtoul(ent->d_name, NULL, 10);
364 if (index != 0) { 364 if (index != 0) {
365 struct mailmh_msg_info * msg_info; 365 struct mailmh_msg_info * msg_info;
366 unsigned int array_index; 366 unsigned int array_index;
367 chashdatum key; 367 chashdatum key;
368 chashdatum data; 368 chashdatum data;
369 369
370 msg_info = mailmh_msg_info_new(index, buf.st_size, buf.st_mtime); 370 msg_info = mailmh_msg_info_new(index, buf.st_size, buf.st_mtime);
371 if (msg_info == NULL) { 371 if (msg_info == NULL) {
372 res = MAILMH_ERROR_MEMORY; 372 res = MAILMH_ERROR_MEMORY;
373 goto closedir; 373 goto closedir;
374 } 374 }
375 375
376 r = carray_add(folder->fl_msgs_tab, msg_info, &array_index); 376 r = carray_add(folder->fl_msgs_tab, msg_info, &array_index);
377 if (r < 0) { 377 if (r < 0) {
378 mailmh_msg_info_free(msg_info); 378 mailmh_msg_info_free(msg_info);
379 res = MAILMH_ERROR_MEMORY; 379 res = MAILMH_ERROR_MEMORY;
380 goto closedir; 380 goto closedir;
381 } 381 }
382 msg_info->msg_array_index = array_index; 382 msg_info->msg_array_index = array_index;
383 383
384 if (index > max_index) 384 if (index > max_index)
385 max_index = index; 385 max_index = index;
386 386
387#if 0 387#if 0
388 r = cinthash_add(folder->fl_msgs_hash, msg_info->msg_index, msg_info); 388 r = cinthash_add(folder->fl_msgs_hash, msg_info->msg_index, msg_info);
389#endif 389#endif
390 key.data = &msg_info->msg_index; 390 key.data = &msg_info->msg_index;
391 key.len = sizeof(msg_info->msg_index); 391 key.len = sizeof(msg_info->msg_index);
392 data.data = msg_info; 392 data.data = msg_info;
393 data.len = 0; 393 data.len = 0;
394 394
395 r = chash_set(folder->fl_msgs_hash, &key, &data, NULL); 395 r = chash_set(folder->fl_msgs_hash, &key, &data, NULL);
396 if (r < 0) { 396 if (r < 0) {
397 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index); 397 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index);
398 mailmh_msg_info_free(msg_info); 398 mailmh_msg_info_free(msg_info);
399 res = MAILMH_ERROR_MEMORY; 399 res = MAILMH_ERROR_MEMORY;
400 goto closedir; 400 goto closedir;
401 } 401 }
402 //LR memory leak? added next line 402 //LR memory leak? added next line
403 //mailmh_msg_info_free(msg_info); 403 //mailmh_msg_info_free(msg_info);
404 //it seems so that it should be freed later, 404 //it seems so that it should be freed later,
405 // but it is not in every case 405 // but it is not in every case
406 //PENDING fixme in ompi somewhere 406 //PENDING fixme in ompi somewhere
407 } 407 }
408 } 408 }
409 else if (S_ISDIR(buf.st_mode)) { 409 else if (S_ISDIR(buf.st_mode)) {
410 struct mailmh_folder * subfolder; 410 struct mailmh_folder * subfolder;
411 unsigned int array_index; 411 unsigned int array_index;
412 chashdatum key; 412 chashdatum key;
413 chashdatum data; 413 chashdatum data;
414 414
415 if (ent->d_name[0] == '.') { 415 if (ent->d_name[0] == '.') {
416 if (ent->d_name[1] == 0) 416 if (ent->d_name[1] == 0)
417 continue; 417 continue;
418 if ((ent->d_name[1] == '.') && (ent->d_name[2] == 0)) 418 if ((ent->d_name[1] == '.') && (ent->d_name[2] == 0))
419 continue; 419 continue;
420 } 420 }
421 421
422 key.data = ent->d_name; 422 key.data = ent->d_name;
423 key.len = strlen(ent->d_name); 423 key.len = strlen(ent->d_name);
424 r = chash_get(folder->fl_subfolders_hash, &key, &data); 424 r = chash_get(folder->fl_subfolders_hash, &key, &data);
425 if (r < 0) { 425 if (r < 0) {
426 subfolder = mailmh_folder_new(folder, ent->d_name); 426 subfolder = mailmh_folder_new(folder, ent->d_name);
427 if (subfolder == NULL) { 427 if (subfolder == NULL) {
428 res = MAILMH_ERROR_MEMORY; 428 res = MAILMH_ERROR_MEMORY;
429 goto closedir; 429 goto closedir;
430 } 430 }
431 431
432 r = carray_add(folder->fl_subfolders_tab, subfolder, &array_index); 432 r = carray_add(folder->fl_subfolders_tab, subfolder, &array_index);
433 if (r < 0) { 433 if (r < 0) {
434 mailmh_folder_free(subfolder); 434 mailmh_folder_free(subfolder);
435 res = MAILMH_ERROR_MEMORY; 435 res = MAILMH_ERROR_MEMORY;
436 goto closedir; 436 goto closedir;
437 } 437 }
438 subfolder->fl_array_index = array_index; 438 subfolder->fl_array_index = array_index;
439 439
440 key.data = subfolder->fl_filename; 440 key.data = subfolder->fl_filename;
441 key.len = strlen(subfolder->fl_filename); 441 key.len = strlen(subfolder->fl_filename);
442 data.data = subfolder; 442 data.data = subfolder;
443 data.len = 0; 443 data.len = 0;
444 r = chash_set(folder->fl_subfolders_hash, &key, &data, NULL); 444 r = chash_set(folder->fl_subfolders_hash, &key, &data, NULL);
445 if (r < 0) { 445 if (r < 0) {
446 carray_delete_fast(folder->fl_subfolders_tab, subfolder->fl_array_index); 446 carray_delete_fast(folder->fl_subfolders_tab, subfolder->fl_array_index);
447 mailmh_folder_free(subfolder); 447 mailmh_folder_free(subfolder);
448 res = MAILMH_ERROR_MEMORY; 448 res = MAILMH_ERROR_MEMORY;
449 goto closedir; 449 goto closedir;
450 } 450 }
451 } 451 }
452 } 452 }
453 } 453 }
454 } 454 }
455 while (ent != NULL); 455 while (ent != NULL);
456 456
457 folder->fl_max_index = max_index; 457 folder->fl_max_index = max_index;
458 458
459 mh_seq = malloc(strlen(folder->fl_filename) + 2 + sizeof(".mh_sequences")); 459 mh_seq = malloc(strlen(folder->fl_filename) + 2 + sizeof(".mh_sequences"));
460 if (mh_seq == NULL) { 460 if (mh_seq == NULL) {
461 res = MAILMH_ERROR_MEMORY; 461 res = MAILMH_ERROR_MEMORY;
462 goto closedir; 462 goto closedir;
463 } 463 }
464 strcpy(mh_seq, folder->fl_filename); 464 strcpy(mh_seq, folder->fl_filename);
465 strcat(mh_seq, MAIL_DIR_SEPARATOR_S); 465 strcat(mh_seq, MAIL_DIR_SEPARATOR_S);
466 strcat(mh_seq, ".mh_sequences"); 466 strcat(mh_seq, ".mh_sequences");
467 467
468 if (stat(mh_seq, &buf) == -1) { 468 if (stat(mh_seq, &buf) == -1) {
469 int fd; 469 int fd;
470 470
471 fd = creat(mh_seq, S_IRUSR | S_IWUSR); 471 fd = creat(mh_seq, S_IRUSR | S_IWUSR);
472 if (fd != -1) 472 if (fd != -1)
473 close(fd); 473 close(fd);
474 } 474 }
475 free(mh_seq); 475 free(mh_seq);
476 476
477 closedir(d); 477 closedir(d);
478 478
479 return MAILMH_NO_ERROR; 479 return MAILMH_NO_ERROR;
480 480
481 closedir: 481 closedir:
482 closedir(d); 482 closedir(d);
483 err: 483 err:
484 return res; 484 return res;
485} 485}
486 486
487int mailmh_folder_add_subfolder(struct mailmh_folder * parent, 487int mailmh_folder_add_subfolder(struct mailmh_folder * parent,
488 const char * name) 488 const char * name)
489{ 489{
490 char * foldername; 490 char * foldername;
491 int r; 491 int r;
492 struct mailmh_folder * folder; 492 struct mailmh_folder * folder;
493 unsigned int array_index; 493 unsigned int array_index;
494 chashdatum key; 494 chashdatum key;
495 chashdatum data; 495 chashdatum data;
496 496
497 foldername = malloc(strlen(parent->fl_filename) + strlen(name) + 2); 497 foldername = malloc(strlen(parent->fl_filename) + strlen(name) + 2);
498 if (foldername == NULL) 498 if (foldername == NULL)
499 return MAILMH_ERROR_MEMORY; 499 return MAILMH_ERROR_MEMORY;
500 strcpy(foldername, parent->fl_filename); 500 strcpy(foldername, parent->fl_filename);
501 strcat(foldername, MAIL_DIR_SEPARATOR_S); 501 strcat(foldername, MAIL_DIR_SEPARATOR_S);
502 strcat(foldername, name); 502 strcat(foldername, name);
503 503
504 r = mkdir(foldername, 0700); 504 r = mkdir(foldername, 0700);
505 free(foldername); 505 free(foldername);
506 506
507 if (r < 0) 507 if (r < 0)
508 return MAILMH_ERROR_FOLDER; 508 return MAILMH_ERROR_FOLDER;
509 509
510 folder = mailmh_folder_new(parent, name); 510 folder = mailmh_folder_new(parent, name);
511 if (folder == NULL) 511 if (folder == NULL)
512 return MAILMH_ERROR_MEMORY; 512 return MAILMH_ERROR_MEMORY;
513 513
514 r = carray_add(parent->fl_subfolders_tab, folder, &array_index); 514 r = carray_add(parent->fl_subfolders_tab, folder, &array_index);
515 if (r < 0) { 515 if (r < 0) {
516 mailmh_folder_free(folder); 516 mailmh_folder_free(folder);
517 return MAILMH_ERROR_MEMORY; 517 return MAILMH_ERROR_MEMORY;
518 } 518 }
519 folder->fl_array_index = array_index; 519 folder->fl_array_index = array_index;
520 520
521 key.data = folder->fl_filename; 521 key.data = folder->fl_filename;
522 key.len = strlen(folder->fl_filename); 522 key.len = strlen(folder->fl_filename);
523 data.data = folder; 523 data.data = folder;
524 data.len = 0; 524 data.len = 0;
525 525
526 r = chash_set(parent->fl_subfolders_hash, &key, &data, NULL); 526 r = chash_set(parent->fl_subfolders_hash, &key, &data, NULL);
527 if (r < 0) { 527 if (r < 0) {
528 carray_delete_fast(folder->fl_subfolders_tab, folder->fl_array_index); 528 carray_delete_fast(folder->fl_subfolders_tab, folder->fl_array_index);
529 mailmh_folder_free(folder); 529 mailmh_folder_free(folder);
530 return MAILMH_ERROR_MEMORY; 530 return MAILMH_ERROR_MEMORY;
531 } 531 }
532 532
533 return MAILMH_NO_ERROR; 533 return MAILMH_NO_ERROR;
534} 534}
535 535
536int mailmh_folder_remove_subfolder(struct mailmh_folder * folder) 536int mailmh_folder_remove_subfolder(struct mailmh_folder * folder)
537{ 537{
538 struct mailmh_folder * parent; 538 struct mailmh_folder * parent;
539 chashdatum key; 539 chashdatum key;
540 chashdatum data; 540 chashdatum data;
541 int r; 541 int r;
542 542
543 parent = folder->fl_parent; 543 parent = folder->fl_parent;
544 544
545 key.data = folder->fl_filename; 545 key.data = folder->fl_filename;
546 key.len = strlen(folder->fl_filename); 546 key.len = strlen(folder->fl_filename);
547 547
548 r = chash_get(parent->fl_subfolders_hash, &key, &data); 548 r = chash_get(parent->fl_subfolders_hash, &key, &data);
549 if (r < 0) 549 if (r < 0)
550 return MAILMH_ERROR_FOLDER; 550 return MAILMH_ERROR_FOLDER;
551 551
552 chash_delete(parent->fl_subfolders_hash, &key, NULL); 552 chash_delete(parent->fl_subfolders_hash, &key, NULL);
553 carray_delete_fast(parent->fl_subfolders_tab, folder->fl_array_index); 553 carray_delete_fast(parent->fl_subfolders_tab, folder->fl_array_index);
554 554
555 mailmh_folder_free(folder); 555 mailmh_folder_free(folder);
556 556
557 return MAILMH_NO_ERROR; 557 return MAILMH_NO_ERROR;
558 558
559} 559}
560 560
561int mailmh_folder_rename_subfolder(struct mailmh_folder * src_folder, 561int mailmh_folder_rename_subfolder(struct mailmh_folder * src_folder,
562 struct mailmh_folder * dst_folder, 562 struct mailmh_folder * dst_folder,
563 const char * new_name) 563 const char * new_name)
564{ 564{
565 int r; 565 int r;
566 struct mailmh_folder * folder; 566 struct mailmh_folder * folder;
567 struct mailmh_folder * parent; 567 struct mailmh_folder * parent;
568 char * new_foldername; 568 char * new_foldername;
569 569
570 parent = src_folder->fl_parent; 570 parent = src_folder->fl_parent;
571 if (parent == NULL) 571 if (parent == NULL)
572 return MAILMH_ERROR_RENAME; 572 return MAILMH_ERROR_RENAME;
573 573
574 new_foldername = malloc(strlen(dst_folder->fl_filename) + 2 + strlen(new_name)); 574 new_foldername = malloc(strlen(dst_folder->fl_filename) + 2 + strlen(new_name));
575 if (new_foldername == NULL) 575 if (new_foldername == NULL)
576 return MAILMH_ERROR_MEMORY; 576 return MAILMH_ERROR_MEMORY;
577 577
578 strcpy(new_foldername, dst_folder->fl_filename); 578 strcpy(new_foldername, dst_folder->fl_filename);
579 strcat(new_foldername, MAIL_DIR_SEPARATOR_S); 579 strcat(new_foldername, MAIL_DIR_SEPARATOR_S);
580 strcat(new_foldername, new_name); 580 strcat(new_foldername, new_name);
581 581
582 r = rename(src_folder->fl_filename, new_foldername); 582 r = rename(src_folder->fl_filename, new_foldername);
583 free(new_foldername); 583 free(new_foldername);
584 if (r < 0) 584 if (r < 0)
585 return MAILMH_ERROR_RENAME; 585 return MAILMH_ERROR_RENAME;
586 586
587 r = mailmh_folder_remove_subfolder(src_folder); 587 r = mailmh_folder_remove_subfolder(src_folder);
588 if (r != MAILMH_NO_ERROR) 588 if (r != MAILMH_NO_ERROR)
589 return r; 589 return r;
590 590
591 folder = mailmh_folder_new(dst_folder, new_name); 591 folder = mailmh_folder_new(dst_folder, new_name);
592 if (folder == NULL) 592 if (folder == NULL)
593 return MAILMH_ERROR_MEMORY; 593 return MAILMH_ERROR_MEMORY;
594 594
595 r = carray_add(parent->fl_subfolders_tab, folder, NULL); 595 r = carray_add(parent->fl_subfolders_tab, folder, NULL);
596 if (r < 0) { 596 if (r < 0) {
597 mailmh_folder_free(folder); 597 mailmh_folder_free(folder);
598 return MAILMH_ERROR_MEMORY; 598 return MAILMH_ERROR_MEMORY;
599 } 599 }
600 600
601 return MAILMH_NO_ERROR; 601 return MAILMH_NO_ERROR;
602} 602}
603 603
604#define MAX_TRY_ALLOC 32 604#define MAX_TRY_ALLOC 32
605 605
606/* initial file MUST be in the same directory */ 606/* initial file MUST be in the same directory */
607 607
608static int mailmh_folder_alloc_msg(struct mailmh_folder * folder, 608static int mailmh_folder_alloc_msg(struct mailmh_folder * folder,
609 char * filename, uint32_t * result) 609 char * filename, uint32_t * result)
610{ 610{
611 uint32_t max; 611 uint32_t max;
612 uint32_t k; 612 uint32_t k;
613 char * new_filename; 613 char * new_filename;
614 size_t len; 614 size_t len;
615 struct stat f_stat; 615 struct stat f_stat;
616 616
617 len = strlen(folder->fl_filename) + 20; 617 len = strlen(folder->fl_filename) + 20;
618 new_filename = malloc(len); 618 new_filename = malloc(len);
619 if (new_filename == NULL) 619 if (new_filename == NULL)
620 return MAILMH_ERROR_MEMORY; 620 return MAILMH_ERROR_MEMORY;
621 621
622 max = folder->fl_max_index + 1; 622 max = folder->fl_max_index + 1;
623 623
624 //fprintf(stderr,"mailmh_folder_alloc_msg filename: %s \n", filename); 624 //fprintf(stderr,"mailmh_folder_alloc_msg filename: %s \n", filename);
625 k = 0; 625 k = 0;
626 while (k < MAX_TRY_ALLOC) { 626 while (k < MAX_TRY_ALLOC) {
627 snprintf(new_filename, len, "%s%c%lu", folder->fl_filename, 627 snprintf(new_filename, len, "%s%c%lu", folder->fl_filename,
628 MAIL_DIR_SEPARATOR, (unsigned long) (max + k)); 628 MAIL_DIR_SEPARATOR, (unsigned long) (max + k));
629 //fprintf(stderr,"mailmh_folder_alloc_msg new_filename: %s \n", new_filename); 629 //fprintf(stderr,"mailmh_folder_alloc_msg new_filename: %s \n", new_filename);
630 if ( stat( new_filename, &f_stat ) == -1 ) { 630 if ( stat( new_filename, &f_stat ) == -1 ) {
631 // if (link(filename, new_filename) == 0) { 631 // if (link(filename, new_filename) == 0) {
632 int r; 632 int r;
633 //fprintf(stderr,"filename found \n"); 633 //fprintf(stderr,"filename found \n");
634 //unlink(filename); 634 //unlink(filename);
635 rename (filename,new_filename ); 635 rename (filename,new_filename );
636 free(new_filename); 636 free(new_filename);
637 637
638 if (k > MAX_TRY_ALLOC / 2) { 638 if (k > MAX_TRY_ALLOC / 2) {
639 r = mailmh_folder_update(folder); 639 r = mailmh_folder_update(folder);
640 /* ignore errors */ 640 /* ignore errors */
641 } 641 }
642 642
643 * result = max + k; 643 * result = max + k;
644 644
645 folder->fl_max_index = max + k; 645 folder->fl_max_index = max + k;
646 646
647 return MAILMH_NO_ERROR; 647 return MAILMH_NO_ERROR;
648 } 648 }
649 else if (errno == EXDEV) { 649 else if (errno == EXDEV) {
650 free(filename); 650 free(filename);
651 return MAILMH_ERROR_FOLDER; 651 return MAILMH_ERROR_FOLDER;
652 } 652 }
653 k ++; 653 k ++;
654 } 654 }
655 655
656 free(new_filename); 656 free(new_filename);
657 657
658 return MAILMH_ERROR_FOLDER; 658 return MAILMH_ERROR_FOLDER;
659} 659}
660 660
661int mailmh_folder_get_message_filename(struct mailmh_folder * folder, 661int mailmh_folder_get_message_filename(struct mailmh_folder * folder,
662 uint32_t index, char ** result) 662 uint32_t index, char ** result)
663{ 663{
664 char * filename; 664 char * filename;
665 int len; 665 int len;
666 666
667#if 0 667#if 0
668 r = mailmh_folder_update(folder); 668 r = mailmh_folder_update(folder);
669 if (r != MAILMH_NO_ERROR) 669 if (r != MAILMH_NO_ERROR)
670 return r; 670 return r;
671#endif 671#endif
672 672
673 len = strlen(folder->fl_filename) + 20; 673 len = strlen(folder->fl_filename) + 20;
674 filename = malloc(len); 674 filename = malloc(len);
675 if (filename == NULL) 675 if (filename == NULL)
676 return MAILMH_ERROR_MEMORY; 676 return MAILMH_ERROR_MEMORY;
677 677
678 snprintf(filename, len, "%s%c%lu", folder->fl_filename, MAIL_DIR_SEPARATOR, 678 snprintf(filename, len, "%s%c%lu", folder->fl_filename, MAIL_DIR_SEPARATOR,
679 (unsigned long) index); 679 (unsigned long) index);
680 680
681 * result = filename; 681 * result = filename;
682 682
683 return MAILMH_NO_ERROR;; 683 return MAILMH_NO_ERROR;;
684} 684}
685 685
686 686
687int mailmh_folder_get_message_fd(struct mailmh_folder * folder, 687int mailmh_folder_get_message_fd(struct mailmh_folder * folder,
688 uint32_t index, int flags, int * result) 688 uint32_t index, int flags, int * result)
689{ 689{
690 char * filename; 690 char * filename;
691 int fd; 691 int fd;
692 int r; 692 int r;
693 693
694#if 0 694#if 0
695 r = mailmh_folder_update(folder); 695 r = mailmh_folder_update(folder);
696 if (r != MAILMH_NO_ERROR) 696 if (r != MAILMH_NO_ERROR)
697 return r; 697 return r;
698#endif 698#endif
699 699
700 r = mailmh_folder_get_message_filename(folder, index, &filename); 700 r = mailmh_folder_get_message_filename(folder, index, &filename);
701 if (r != MAILMH_NO_ERROR) 701 if (r != MAILMH_NO_ERROR)
702 return r; 702 return r;
703 703
704 fd = open(filename, flags); 704 fd = open(filename, flags);
705 free(filename); 705 free(filename);
706 if (fd == -1) 706 if (fd == -1)
707 return MAILMH_ERROR_MSG_NOT_FOUND; 707 return MAILMH_ERROR_MSG_NOT_FOUND;
708 708
709 * result = fd; 709 * result = fd;
710 710
711 return MAILMH_NO_ERROR; 711 return MAILMH_NO_ERROR;
712} 712}
713 713
714int mailmh_folder_get_message_size(struct mailmh_folder * folder, 714int mailmh_folder_get_message_size(struct mailmh_folder * folder,
715 uint32_t index, size_t * result) 715 uint32_t index, size_t * result)
716{ 716{
717 int r; 717 int r;
718 char * filename; 718 char * filename;
719 struct stat buf; 719 struct stat buf;
720 720
721 r = mailmh_folder_get_message_filename(folder, index, &filename); 721 r = mailmh_folder_get_message_filename(folder, index, &filename);
722 if (r != MAILMH_NO_ERROR) 722 if (r != MAILMH_NO_ERROR)
723 return r; 723 return r;
724 724
725 r = stat(filename, &buf); 725 r = stat(filename, &buf);
726 free(filename); 726 free(filename);
727 if (r < 0) 727 if (r < 0)
728 return MAILMH_ERROR_FILE; 728 return MAILMH_ERROR_FILE;
729 729
730 * result = buf.st_size; 730 * result = buf.st_size;
731 731
732 return MAILMH_NO_ERROR; 732 return MAILMH_NO_ERROR;
733} 733}
734 734
735int mailmh_folder_add_message_uid(struct mailmh_folder * folder, 735int mailmh_folder_add_message_uid(struct mailmh_folder * folder,
736 const char * message, size_t size, 736 const char * message, size_t size,
737 uint32_t * pindex) 737 uint32_t * pindex)
738{ 738{
739 char * tmpname; 739 char * tmpname;
740 int fd; 740 int fd;
741 size_t namesize; 741 size_t namesize;
742 size_t left; 742 size_t left;
743 ssize_t res; 743 ssize_t res;
744 struct mailmh_msg_info * msg_info; 744 struct mailmh_msg_info * msg_info;
745 uint32_t index; 745 uint32_t index;
746 int error; 746 int error;
747 int r; 747 int r;
748 unsigned int array_index; 748 unsigned int array_index;
749 struct stat buf; 749 struct stat buf;
750 chashdatum key; 750 chashdatum key;
751 chashdatum data; 751 chashdatum data;
752 752
753#if 0 753#if 0
754 r = mailmh_folder_update(folder); 754 r = mailmh_folder_update(folder);
755 if (r != MAILMH_NO_ERROR) { 755 if (r != MAILMH_NO_ERROR) {
756 error = r; 756 error = r;
757 goto err; 757 goto err;
758 } 758 }
759#endif 759#endif
760 760
761 namesize = strlen(folder->fl_filename) + 20; 761 namesize = strlen(folder->fl_filename) + 20;
762 tmpname = malloc(namesize); 762 tmpname = malloc(namesize);
763 snprintf(tmpname, namesize, "%s%ctmpXXXXXX", 763 snprintf(tmpname, namesize, "%s%ctmpXXXXXX",
764 folder->fl_filename, MAIL_DIR_SEPARATOR); 764 folder->fl_filename, MAIL_DIR_SEPARATOR);
765 fd = mkstemp(tmpname); 765 fd = mkstemp(tmpname);
766 if (fd < 0) { 766 if (fd < 0) {
767 error = MAILMH_ERROR_FILE; 767 error = MAILMH_ERROR_FILE;
768 goto free; 768 goto free;
769 } 769 }
770 770
771 left = size; 771 left = size;
772 while (left > 0) { 772 while (left > 0) {
773 res = write(fd, message, left); 773 res = write(fd, message, left);
774 if (res == -1) { 774 if (res == -1) {
775 close(fd); 775 close(fd);
776 error = MAILMH_ERROR_FILE; 776 error = MAILMH_ERROR_FILE;
777 goto free; 777 goto free;
778 } 778 }
779 779
780 left -= res; 780 left -= res;
781 } 781 }
782 close(fd); 782 close(fd);
783 783
784 r = stat(tmpname, &buf); 784 r = stat(tmpname, &buf);
785 if (r < 0) { 785 if (r < 0) {
786 error = MAILMH_ERROR_FILE; 786 error = MAILMH_ERROR_FILE;
787 goto free; 787 goto free;
788 } 788 }
789 789
790 r = mailmh_folder_alloc_msg(folder, tmpname, &index); 790 r = mailmh_folder_alloc_msg(folder, tmpname, &index);
791 if (r != MAILMH_NO_ERROR) { 791 if (r != MAILMH_NO_ERROR) {
792 unlink(tmpname); 792 unlink(tmpname);
793 error = MAILMH_ERROR_COULD_NOT_ALLOC_MSG; 793 error = MAILMH_ERROR_COULD_NOT_ALLOC_MSG;
794 goto free; 794 goto free;
795 } 795 }
796 free(tmpname); 796 free(tmpname);
797 797
798 msg_info = mailmh_msg_info_new(index, size, buf.st_mtime); 798 msg_info = mailmh_msg_info_new(index, size, buf.st_mtime);
799 if (msg_info == NULL) { 799 if (msg_info == NULL) {
800 mailmh_folder_remove_message(folder, index); 800 mailmh_folder_remove_message(folder, index);
801 error = MAILMH_ERROR_MEMORY; 801 error = MAILMH_ERROR_MEMORY;
802 goto err; 802 goto err;
803 } 803 }
804 804
805 r = carray_add(folder->fl_msgs_tab, msg_info, &array_index); 805 r = carray_add(folder->fl_msgs_tab, msg_info, &array_index);
806 if (r < 0) { 806 if (r < 0) {
807 mailmh_folder_remove_message(folder, index); 807 mailmh_folder_remove_message(folder, index);
808 mailmh_msg_info_free(msg_info); 808 mailmh_msg_info_free(msg_info);
809 error = MAILMH_ERROR_MEMORY; 809 error = MAILMH_ERROR_MEMORY;
810 goto err; 810 goto err;
811 } 811 }
812 msg_info->msg_array_index = array_index; 812 msg_info->msg_array_index = array_index;
813 813
814#if 0 814#if 0
815 r = cinthash_add(folder->fl_msgs_hash, index, msg_info); 815 r = cinthash_add(folder->fl_msgs_hash, index, msg_info);
816#endif 816#endif
817 key.data = &index; 817 key.data = &index;
818 key.len = sizeof(index); 818 key.len = sizeof(index);
819 data.data = msg_info; 819 data.data = msg_info;
820 data.len = 0; 820 data.len = 0;
821 821
822 if (pindex != NULL) 822 if (pindex != NULL)
823 * pindex = index; 823 * pindex = index;
824 824
825 r = chash_set(folder->fl_msgs_hash, &key, &data, NULL); 825 r = chash_set(folder->fl_msgs_hash, &key, &data, NULL);
826 if (r < 0) { 826 if (r < 0) {
827 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index); 827 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index);
828 mailmh_msg_info_free(msg_info); 828 mailmh_msg_info_free(msg_info);
829 error = MAILMH_ERROR_MEMORY; 829 error = MAILMH_ERROR_MEMORY;
830 goto err; 830 goto err;
831 } 831 }
832 832
833 return MAILMH_NO_ERROR; 833 return MAILMH_NO_ERROR;
834 834
835 free: 835 free:
836 free(tmpname); 836 free(tmpname);
837 err: 837 err:
838 return error; 838 return error;
839} 839}
840 840
841int mailmh_folder_add_message(struct mailmh_folder * folder, 841int mailmh_folder_add_message(struct mailmh_folder * folder,
842 const char * message, size_t size) 842 const char * message, size_t size)
843{ 843{
844 return mailmh_folder_add_message_uid(folder, message, size, NULL); 844 return mailmh_folder_add_message_uid(folder, message, size, NULL);
845} 845}
846 846
847int mailmh_folder_add_message_file_uid(struct mailmh_folder * folder, 847int mailmh_folder_add_message_file_uid(struct mailmh_folder * folder,
848 int fd, uint32_t * pindex) 848 int fd, uint32_t * pindex)
849{ 849{
850 char * message; 850 char * message;
851 struct stat buf; 851 struct stat buf;
852 int r; 852 int r;
853 853
854#if 0 854#if 0
855 r = mailmh_folder_update(folder); 855 r = mailmh_folder_update(folder);
856 if (r != MAILMH_NO_ERROR) 856 if (r != MAILMH_NO_ERROR)
857 return r; 857 return r;
858#endif 858#endif
859 859
860 if (fstat(fd, &buf) == -1) 860 if (fstat(fd, &buf) == -1)
861 return MAILMH_ERROR_FILE; 861 return MAILMH_ERROR_FILE;
862 862
863 message = mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 863 message = mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
864 if (message == MAP_FAILED) 864 if (message == MAP_FAILED)
865 return MAILMH_ERROR_FILE; 865 return MAILMH_ERROR_FILE;
866 866
867 r = mailmh_folder_add_message_uid(folder, message, buf.st_size, pindex); 867 r = mailmh_folder_add_message_uid(folder, message, buf.st_size, pindex);
868 868
869 munmap(message, buf.st_size); 869 munmap(message, buf.st_size);
870 870
871 return r; 871 return r;
872} 872}
873 873
874int mailmh_folder_add_message_file(struct mailmh_folder * folder, 874int mailmh_folder_add_message_file(struct mailmh_folder * folder,
875 int fd) 875 int fd)
876{ 876{
877 return mailmh_folder_add_message_file_uid(folder, fd, NULL); 877 return mailmh_folder_add_message_file_uid(folder, fd, NULL);
878} 878}
879 879
880int mailmh_folder_remove_message(struct mailmh_folder * folder, 880int mailmh_folder_remove_message(struct mailmh_folder * folder,
881 uint32_t index) 881 uint32_t index)
882{ 882{
883 char * filename; 883 char * filename;
884 struct mailmh_msg_info * msg_info; 884 struct mailmh_msg_info * msg_info;
885 int res; 885 int res;
886 int r; 886 int r;
887 chashdatum key; 887 chashdatum key;
888 chashdatum data; 888 chashdatum data;
889 889
890#if 0 890#if 0
891 r = mailmh_folder_update(folder); 891 r = mailmh_folder_update(folder);
892 if (r != MAILMH_NO_ERROR) { 892 if (r != MAILMH_NO_ERROR) {
893 res = r; 893 res = r;
894 goto err; 894 goto err;
895 } 895 }
896#endif 896#endif
897 897
898 r = mailmh_folder_get_message_filename(folder, index, &filename); 898 r = mailmh_folder_get_message_filename(folder, index, &filename);
899 if (filename == NULL) { 899 if (filename == NULL) {
900 res = r; 900 res = r;
901 goto err; 901 goto err;
902 } 902 }
903 903
904 if (unlink(filename) == -1) { 904 if (unlink(filename) == -1) {
905 res = MAILMH_ERROR_FILE; 905 res = MAILMH_ERROR_FILE;
906 goto free; 906 goto free;
907 } 907 }
908 908
909 key.data = &index; 909 key.data = &index;
910 key.len = sizeof(index); 910 key.len = sizeof(index);
911 r = chash_get(folder->fl_msgs_hash, &key, &data); 911 r = chash_get(folder->fl_msgs_hash, &key, &data);
912#if 0 912#if 0
913 msg_info = cinthash_find(folder->fl_msgs_hash, index); 913 msg_info = cinthash_find(folder->fl_msgs_hash, index);
914#endif 914#endif
915 if (r == 0) { 915 if (r == 0) {
916 msg_info = data.data; 916 msg_info = data.data;
917 917
918 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index); 918 carray_delete_fast(folder->fl_msgs_tab, msg_info->msg_array_index);
919#if 0 919#if 0
920 cinthash_remove(folder->fl_msgs_hash, index); 920 cinthash_remove(folder->fl_msgs_hash, index);
921#endif 921#endif
922 chash_delete(folder->fl_msgs_hash, &key, NULL); 922 chash_delete(folder->fl_msgs_hash, &key, NULL);
923 } 923 }
924 // LR
925 mailmh_msg_info_free( msg_info );
926 free(filename);
924 927
925 return MAILMH_NO_ERROR; 928 return MAILMH_NO_ERROR;
926 929
927 free: 930 free:
928 free(filename); 931 free(filename);
929 err: 932 err:
930 return res; 933 return res;
931} 934}
932 935
933 936
934int mailmh_folder_move_message(struct mailmh_folder * dest_folder, 937int mailmh_folder_move_message(struct mailmh_folder * dest_folder,
935 struct mailmh_folder * src_folder, 938 struct mailmh_folder * src_folder,
936 uint32_t index) 939 uint32_t index)
937{ 940{
938 int fd; 941 int fd;
939 char * filename; 942 char * filename;
940 int r; 943 int r;
941 944
942#if 0 945#if 0
943 r = mailmh_folder_update(dest_folder); 946 r = mailmh_folder_update(dest_folder);
944 if (r != MAILMH_NO_ERROR) 947 if (r != MAILMH_NO_ERROR)
945 return r; 948 return r;
946 r = mailmh_folder_update(src_folder); 949 r = mailmh_folder_update(src_folder);
947 if (r != MAILMH_NO_ERROR) 950 if (r != MAILMH_NO_ERROR)
948 return r; 951 return r;
949#endif 952#endif
950 953
951 /* move on the same filesystem */ 954 /* move on the same filesystem */
952 r = mailmh_folder_get_message_filename(src_folder, index, &filename); 955 r = mailmh_folder_get_message_filename(src_folder, index, &filename);
953 if (r != MAILMH_NO_ERROR) 956 if (r != MAILMH_NO_ERROR)
954 return r; 957 return r;
955 958
956 r = mailmh_folder_alloc_msg(dest_folder, filename, &index); 959 r = mailmh_folder_alloc_msg(dest_folder, filename, &index);
957 free(filename); 960 free(filename);
958 if (r == MAILMH_NO_ERROR) 961 if (r == MAILMH_NO_ERROR)
959 return MAILMH_NO_ERROR; 962 return MAILMH_NO_ERROR;
960 963
961 /* move on the different filesystems */ 964 /* move on the different filesystems */
962 r = mailmh_folder_get_message_fd(src_folder, index, O_RDONLY, &fd); 965 r = mailmh_folder_get_message_fd(src_folder, index, O_RDONLY, &fd);
963 if (r != MAILMH_NO_ERROR) 966 if (r != MAILMH_NO_ERROR)
964 return r; 967 return r;
965 968
966 r = mailmh_folder_add_message_file(dest_folder, fd); 969 r = mailmh_folder_add_message_file(dest_folder, fd);
967 if (r != MAILMH_NO_ERROR) { 970 if (r != MAILMH_NO_ERROR) {
968 close(fd); 971 close(fd);
969 return r; 972 return r;
970 } 973 }
971 974
972 close(fd); 975 close(fd);
973 976
974 r = mailmh_folder_remove_message(src_folder, index); 977 r = mailmh_folder_remove_message(src_folder, index);
975 978
976 return MAILMH_NO_ERROR; 979 return MAILMH_NO_ERROR;
977} 980}
978 981
979unsigned int mailmh_folder_get_message_number(struct mailmh_folder * folder) 982unsigned int mailmh_folder_get_message_number(struct mailmh_folder * folder)
980{ 983{
981 unsigned int i; 984 unsigned int i;
982 unsigned int count; 985 unsigned int count;
983 986
984 count = 0; 987 count = 0;
985 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i ++) 988 for(i = 0 ; i < carray_count(folder->fl_msgs_tab) ; i ++)
986 if (carray_get(folder->fl_msgs_tab, i) != NULL) 989 if (carray_get(folder->fl_msgs_tab, i) != NULL)
987 count ++; 990 count ++;
988 991
989 return count; 992 return count;
990} 993}