annotate lspst.c @ 1:43e8802f08c5 debian libpst_0_5_1

imported from debian 0.5.1
author carl
date Thu, 23 Dec 2004 11:17:37 -0800
parents
children a818f3c2e589
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
1 /***
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
2 * lspst.c
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
3 * Part of the LibPST project
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
4 * Author: Joe Nahmias <joe@nahmias.net>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
5 * Based on readpst.c by by David Smith <dave.s@earthcorp.com>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
6 *
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
7 */
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
8
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
9 // header file includes {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
10 #include <stdio.h>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
11 #include <stdlib.h>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
12 #include <time.h>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
13 #include <string.h>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
14 #include <ctype.h>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
15 #include <errno.h>
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
16
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
17 #include "libpst.h"
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
18 #include "define.h"
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
19 #include "timeconv.h"
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
20 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
21 // struct file_ll {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
22 struct file_ll {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
23 char *name;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
24 char *dname;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
25 FILE * output;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
26 int32_t stored_count;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
27 int32_t email_count;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
28 int32_t skip_count;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
29 int32_t type;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
30 struct file_ll *next;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
31 };
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
32 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
33 // Function Declarations {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
34 void canonicalize_filename(char *fname);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
35 int chr_count(char *str, char x);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
36 void debug_print(char *fmt, ...);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
37 char *rfc2426_escape(char *str);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
38 char *rfc2445_datetime_format(FILETIME *ft);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
39 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
40 #define DEBUG_MAIN(x) debug_print x;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
41 // int main(int argc, char** argv) {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
42 int main(int argc, char** argv) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
43
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
44 // declarations {{{2
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
45 pst_item *item = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
46 pst_file pstfile;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
47 pst_desc_ll *d_ptr;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
48 char *temp = NULL; //temporary char pointer
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
49 int skip_child = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
50 struct file_ll *f, *head;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
51 // }}}2
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
52
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
53 if (argc <= 1)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
54 DIE(("Missing PST filename.\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
55
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
56 // Open PST file
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
57 if ( pst_open(&pstfile, argv[1], "r") )
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
58 DIE(("Error opening File\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
59 // Load PST index
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
60 if ( pst_load_index(&pstfile) )
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
61 DIE(("Index Error\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
62 pst_load_extended_attributes(&pstfile);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
63
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
64 d_ptr = pstfile.d_head; // first record is main record
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
65 if ((item = _pst_parse_item(&pstfile, d_ptr)) == NULL || item->message_store == NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
66 DIE(("main: Could not get root record\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
67 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
68
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
69 // default the file_as to the same as the main filename if it doesn't exist
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
70 if (item->file_as == NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
71 if ((temp = strrchr(argv[1], '/')) == NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
72 if ((temp = strrchr(argv[1], '\\')) == NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
73 temp = argv[1];
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
74 else
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
75 temp++; // get past the "\\"
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
76 else
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
77 temp++; // get past the "/"
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
78 item->file_as = (char*)xmalloc(strlen(temp)+1);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
79 strcpy(item->file_as, temp);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
80 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
81 fprintf(stderr, "item->file_as = '%s'.\n", item->file_as);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
82
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
83 // setup head file_ll
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
84 head = (struct file_ll*) malloc(sizeof(struct file_ll));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
85 memset(head, 0, sizeof(struct file_ll));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
86 head->email_count = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
87 head->skip_count = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
88 head->next = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
89 head->name = "mbox";
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
90 head->dname = (char*) malloc(strlen(item->file_as)+1);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
91 strcpy(head->dname, item->file_as);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
92 head->type = item->type;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
93 DEBUG_MAIN(("head @ %p: name = '%s', dname = '%s', next = %p.\n", head, head->name, head->dname, head->next));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
94
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
95 if ((d_ptr = pst_getTopOfFolders(&pstfile, item)) == NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
96 DIE(("Top of folders record not found. Cannot continue\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
97 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
98 DEBUG_MAIN(("d_ptr(TOF) = %p.\n", d_ptr));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
99
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
100 if (item){
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
101 _pst_freeItem(item);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
102 item = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
103 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
104
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
105 d_ptr = d_ptr->child; // do the children of TOPF
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
106 DEBUG_MAIN(("d_ptr(TOF->child) = %p.\n", d_ptr));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
107
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
108 DEBUG_MAIN(("main: About to do email stuff\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
109 while (d_ptr != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
110 // Process d_ptr {{{2
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
111 DEBUG_MAIN(("main: New item record, d_ptr = %p.\n", d_ptr));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
112 if (d_ptr->desc == NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
113 DEBUG_WARN(("main: ERROR ?? item's desc record is NULL\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
114 f->skip_count++;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
115 goto check_parent;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
116 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
117 DEBUG_MAIN(("main: Desc Email ID %x [d_ptr->id = %x]\n", d_ptr->desc->id, d_ptr->id));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
118
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
119 item = _pst_parse_item(&pstfile, d_ptr);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
120 DEBUG_MAIN(("main: About to process item @ %p.\n", item));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
121 if (item != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
122
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
123 // there should only be one message_store, and we have already
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
124 // done it
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
125 if (item->message_store != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
126 DIE(("ERROR(main): A second message_store has been found.\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
127 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
128
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
129 if (item->folder != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
130 // Process Folder item {{{3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
131 // if this is a folder, we want to recurse into it
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
132 printf("Folder");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
133 if (item->file_as != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
134 printf("\t%s/", item->file_as);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
135 printf("\n");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
136
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
137 DEBUG_MAIN(("main: I think I may try to go into folder \"%s\"\n", item->file_as));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
138 f = (struct file_ll*) malloc(sizeof(struct file_ll));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
139 memset(f, 0, sizeof(struct file_ll));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
140 f->next = head;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
141 f->email_count = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
142 f->type = item->type;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
143 f->stored_count = item->folder->email_count;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
144 head = f;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
145 f->name = "mbox";
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
146 f->dname = (char*) xmalloc(strlen(item->file_as)+1);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
147 strcpy(f->dname, item->file_as);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
148
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
149 DEBUG_MAIN(("main: f->name = %s\nitem->folder_name = %s\n", f->name, item->file_as));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
150 canonicalize_filename(f->name);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
151
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
152 if (d_ptr->child != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
153 d_ptr = d_ptr->child;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
154 skip_child = 1;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
155 } else {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
156 DEBUG_MAIN(("main: Folder has NO children. Creating directory, and closing again\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
157 // printf("\tNo items to process in folder \"%s\", should have been %i\n", f->dname, f->stored_count);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
158 head = f->next;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
159 if (f->output != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
160 fclose(f->output);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
161 free(f->dname);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
162 free(f->name);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
163 free(f);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
164
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
165 f = head;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
166 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
167 _pst_freeItem(item);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
168 item = NULL; // just for the odd situations!
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
169 goto check_parent;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
170 // }}}3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
171 } else if (item->contact != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
172 // Process Contact item {{{3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
173 if (f->type != PST_TYPE_CONTACT) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
174 DEBUG_MAIN(("main: I have a contact, but the folder isn't a contacts folder. "
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
175 "Will process anyway\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
176 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
177 if (item->type != PST_TYPE_CONTACT) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
178 DEBUG_MAIN(("main: I have an item that has contact info, but doesn't say that"
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
179 " it is a contact. Type is \"%s\"\n", item->ascii_type));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
180 DEBUG_MAIN(("main: Processing anyway\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
181 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
182
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
183 printf("Contact");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
184 if (item->contact->fullname != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
185 printf("\t%s", rfc2426_escape(item->contact->fullname));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
186 printf("\n");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
187 // }}}3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
188 } else if (item->email != NULL &&
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
189 (item->type == PST_TYPE_NOTE || item->type == PST_TYPE_REPORT)) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
190 // Process Email item {{{3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
191 printf("Email");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
192 if (item->email->outlook_sender_name != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
193 printf("\tFrom: %s", item->email->outlook_sender_name);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
194 if (item->email->subject->subj != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
195 printf("\tSubject: %s", item->email->subject->subj);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
196 printf("\n");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
197 // }}}3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
198 } else if (item->type == PST_TYPE_JOURNAL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
199 // Process Journal item {{{3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
200 if (f->type != PST_TYPE_JOURNAL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
201 DEBUG_MAIN(("main: I have a journal entry, but folder isn't specified as a journal type. Processing...\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
202 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
203
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
204 printf("Journal\t%s\n", rfc2426_escape(item->email->subject->subj));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
205 // }}}3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
206 } else if (item->type == PST_TYPE_APPOINTMENT) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
207 // Process Calendar Appointment item {{{3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
208 // deal with Calendar appointments
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
209
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
210 DEBUG_MAIN(("main: Processing Appointment Entry\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
211 if (f->type != PST_TYPE_APPOINTMENT) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
212 DEBUG_MAIN(("main: I have an appointment, but folder isn't specified as an appointment type. Processing...\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
213 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
214
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
215 printf("Appointment");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
216 if (item->email != NULL && item->email->subject != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
217 printf("\tSUMMARY: %s", rfc2426_escape(item->email->subject->subj));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
218 if (item->appointment != NULL && item->appointment->start != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
219 printf("\tSTART: %s", rfc2445_datetime_format(item->appointment->start));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
220 printf("\n");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
221
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
222 // }}}3
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
223 } else {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
224 f->skip_count++;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
225 DEBUG_MAIN(("main: Unknown item type. %i. Ascii1=\"%s\"\n", \
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
226 item->type, item->ascii_type));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
227 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
228 } else {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
229 f->skip_count++;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
230 DEBUG_MAIN(("main: A NULL item was seen\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
231 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
232
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
233 check_parent:
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
234 // _pst_freeItem(item);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
235 while (!skip_child && d_ptr->next == NULL && d_ptr->parent != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
236 DEBUG_MAIN(("main: Going to Parent\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
237 head = f->next;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
238 if (f->output != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
239 fclose(f->output);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
240 DEBUG_MAIN(("main: Email Count for folder %s is %i\n", f->dname, f->email_count));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
241 /*
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
242 printf("\t\"%s\" - %i items done, skipped %i, should have been %i\n", \
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
243 f->dname, f->email_count, f->skip_count, f->stored_count);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
244 */
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
245
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
246 free(f->name);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
247 free(f->dname);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
248 free(f);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
249 f = head;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
250 if (head == NULL) { //we can't go higher. Must be at start?
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
251 DEBUG_MAIN(("main: We are now trying to go above the highest level. We must be finished\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
252 break; //from main while loop
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
253 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
254 d_ptr = d_ptr->parent;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
255 skip_child = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
256 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
257
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
258 if (item != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
259 DEBUG_MAIN(("main: Freeing memory used by item\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
260 _pst_freeItem(item);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
261 item = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
262 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
263
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
264 if (!skip_child)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
265 d_ptr = d_ptr->next;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
266 else
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
267 skip_child = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
268
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
269 if (d_ptr == NULL) { DEBUG_MAIN(("main: d_ptr is now NULL\n")); }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
270
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
271 // }}}2
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
272 } // end while(d_ptr != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
273 DEBUG_MAIN(("main: Finished.\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
274
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
275 // Cleanup {{{2
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
276 pst_close(&pstfile);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
277 while (f != NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
278 if (f->output != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
279 fclose(f->output);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
280 free(f->name);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
281 free(f->dname);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
282
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
283 head = f->next;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
284 free(f);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
285 f = head;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
286 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
287 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
288 // }}}2
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
289
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
290 return 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
291 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
292 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
293 // void canonicalize_filename(char *fname) {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
294 // This function will make sure that a filename is in cannonical form. That
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
295 // is, it will replace any slashes, backslashes, or colons with underscores.
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
296 void canonicalize_filename(char *fname) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
297 DEBUG_ENT("canonicalize_filename");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
298 if (fname == NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
299 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
300 return;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
301 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
302 while ((fname = strpbrk(fname, "/\\:")) != NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
303 *fname = '_';
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
304 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
305 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
306 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
307 // int chr_count(char *str, char x) {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
308 int chr_count(char *str, char x) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
309 int r = 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
310 if (str == NULL) return 0;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
311 while (*str != '\0') {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
312 if (*str == x)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
313 r++;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
314 str++;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
315 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
316 return r;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
317 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
318 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
319 // void debug_print(char *fmt, ...) {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
320 void debug_print(char *fmt, ...) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
321 // shamlessly stolen from minprintf() in K&R pg. 156
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
322 va_list ap;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
323 char *p, *sval;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
324 void *pval;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
325 int ival;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
326 double dval;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
327 FILE *fp = stderr;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
328
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
329 va_start(ap, fmt);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
330 for(p = fmt; *p; p++) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
331 if (*p != '%') {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
332 fputc(*p, fp);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
333 continue;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
334 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
335 switch (tolower(*++p)) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
336 case 'd': case 'i':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
337 ival = va_arg(ap, int);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
338 fprintf(fp, "%d", ival);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
339 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
340 case 'f':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
341 dval = va_arg(ap, double);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
342 fprintf(fp, "%f", dval);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
343 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
344 case 's':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
345 for (sval = va_arg(ap, char *); *sval; ++sval)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
346 fputc(*sval, fp);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
347 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
348 case 'p':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
349 pval = va_arg(ap, void *);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
350 fprintf(fp, "%p", pval);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
351 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
352 case 'x':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
353 ival = va_arg(ap, int);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
354 fprintf(fp, "%#010x", ival);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
355 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
356 default:
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
357 fputc(*p, fp);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
358 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
359 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
360 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
361 va_end(ap);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
362 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
363 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
364 // char *rfc2426_escape(char *str) {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
365 char *rfc2426_escape(char *str) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
366 static char *buf = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
367 char *a, *b;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
368 int y, z;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
369
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
370 DEBUG_ENT("rfc2426_escape");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
371 if (str == NULL) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
372 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
373 return NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
374 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
375
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
376 // calculate space required to escape all the commas, semi-colons, backslashes, and newlines
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
377 y = chr_count(str, ',') + chr_count(str, '\\') + chr_count(str, ';') + chr_count(str, '\n');
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
378 // count how many carriage-returns we have to skip
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
379 z = chr_count(str, '\r');
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
380
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
381 if (y == 0 && z == 0) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
382 // there isn't any work required
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
383 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
384 return str;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
385 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
386
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
387 buf = (char *) realloc( buf, strlen(str) + y - z + 1 );
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
388 for (a = str, b = buf; *a != '\0'; ++a, ++b)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
389 switch (*a) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
390 case ',' : case '\\': case ';' : case '\n':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
391 // insert backslash to escape
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
392 *(b++) = '\\';
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
393 *b = *a;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
394 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
395 case '\r':
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
396 // skip
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
397 break;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
398 default:
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
399 *b = *a;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
400 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
401 *b = '\0'; // NUL-terminate the string
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
402
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
403 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
404 return buf;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
405 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
406 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
407 // char *rfc2445_datetime_format(FILETIME *ft) {{{1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
408 char *rfc2445_datetime_format(FILETIME *ft) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
409 static char* buffer = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
410 struct tm *stm = NULL;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
411 DEBUG_ENT("rfc2445_datetime_format");
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
412 if (buffer == NULL)
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
413 buffer = malloc(30); // should be enough
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
414 stm = fileTimeToStructTM(ft);
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
415 if (strftime(buffer, 30, "%Y%m%dT%H%M%SZ", stm)==0) {
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
416 DEBUG_INFO(("Problem occured formatting date\n"));
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
417 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
418 DEBUG_RET();
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
419 return buffer;
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
420 }
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
421 // }}}1
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
422
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
423 // vim:sw=4 ts=4:
43e8802f08c5 imported from debian 0.5.1
carl
parents:
diff changeset
424 // vim600: set foldlevel=0 foldmethod=marker: