comparison src/pst2dii.cpp.in @ 195:320cfcba8058

add python module interface to the shared library for easy scripting. the shared library must never write to stdout or stderr. fix pst_attach_to_mem so the caller does not need to initialize the buffer pointer.
author Carl Byington <carl@five-ten-sg.com>
date Mon, 20 Apr 2009 19:39:26 -0700
parents 0a4f7ecd7452
children 2f38c4ce606f
comparison
equal deleted inserted replaced
194:885b47107036 195:320cfcba8058
202 } 202 }
203 DEBUG_EMAIL(("Saving attachment to %s\n", temp)); 203 DEBUG_EMAIL(("Saving attachment to %s\n", temp));
204 if (!(fp = fopen(temp, "wb"))) { 204 if (!(fp = fopen(temp, "wb"))) {
205 WARN(("write_separate_attachment: Cannot open attachment save file \"%s\"\n", temp)); 205 WARN(("write_separate_attachment: Cannot open attachment save file \"%s\"\n", temp));
206 } else { 206 } else {
207 if (current_attach->data.data) 207 (void)pst_attach_to_file(pst, current_attach, fp);
208 pst_fwrite(current_attach->data.data, 1, current_attach->data.size, fp);
209 else {
210 (void)pst_attach_to_file(pst, current_attach, fp);
211 }
212 fclose(fp); 208 fclose(fp);
213 } 209 }
214 string rc(temp); 210 string rc(temp);
215 if (temp) free(temp); 211 if (temp) free(temp);
216 DEBUG_RET(); 212 DEBUG_RET();