Commit 8e127f21 8e127f21bf8b5036a1a08437de6959b6d4b41a27 by Sean 'Shaleh' Perry

mh code flesh out

1 parent eda27cd4
1 2000-01-19 Sean 'Shaleh' Perry 1 2000-01-19 Sean 'Shaleh' Perry
2 2
3 * mailbox/mbx_mh.c: some more code fleshing, still ugly
4
5 2000-01-19 Sean 'Shaleh' Perry
6
3 * mailbox/mbx_mh.c: new file 7 * mailbox/mbx_mh.c: new file
4 no header, no error checking, no hable englais 8 no header, no error checking, no hable englais
5 * url/url_mh.{c,h}: new files 9 * url/url_mh.{c,h}: new files
......
...@@ -109,6 +109,7 @@ mh_scan (mailbox_t mbox, size_t *msgs) ...@@ -109,6 +109,7 @@ mh_scan (mailbox_t mbox, size_t *msgs)
109 struct dirent *entry; 109 struct dirent *entry;
110 mh_data *data; 110 mh_data *data;
111 unsigned int count = 0; 111 unsigned int count = 0;
112 int parse_sequence_file = 0;
112 113
113 data = mbox->data; 114 data = mbox->data;
114 115
...@@ -129,6 +130,7 @@ mh_scan (mailbox_t mbox, size_t *msgs) ...@@ -129,6 +130,7 @@ mh_scan (mailbox_t mbox, size_t *msgs)
129 continue; /* spurious file beginning w/ '.' */ 130 continue; /* spurious file beginning w/ '.' */
130 else { /* MH info in .mh_sequences */ 131 else { /* MH info in .mh_sequences */
131 /* FIXME: parse this file */ 132 /* FIXME: parse this file */
133 parse_sequence_file = 1;
132 } 134 }
133 } 135 }
134 if(mh_sequence(entry->d_name)) { 136 if(mh_sequence(entry->d_name)) {
...@@ -138,6 +140,17 @@ mh_scan (mailbox_t mbox, size_t *msgs) ...@@ -138,6 +140,17 @@ mh_scan (mailbox_t mbox, size_t *msgs)
138 } 140 }
139 closedir(maildir); 141 closedir(maildir);
140 142
143 if(parse_sequence_file && count) {
144 char *path = malloc(strlen(mbox->name) + strlen(".mh_sequences") + 2);
145 sprintf(path, "%s/.mh_sequences", mbox->name);
146 fp = fopen(path, "r");
147 while(!feof(fp)) {
148 /* FIXME: parse the contents */
149 }
150 fclose(fp);
151 free(path);
152 }
153
141 stat(mbox->name, &st); 154 stat(mbox->name, &st);
142 data->mtime = st.st_mtime; 155 data->mtime = st.st_mtime;
143 156
......