Mercurial > libpst
diff src/lspst.c @ 211:94bde95d7e18
the shared library interface should now be thread safe
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 08 Jun 2009 11:49:39 -0700 |
parents | 2f38c4ce606f |
children | 898118c3675e |
line wrap: on
line diff
--- a/src/lspst.c Sat Jun 06 13:53:34 2009 -0700 +++ b/src/lspst.c Mon Jun 08 11:49:39 2009 -0700 @@ -47,6 +47,8 @@ { struct file_ll ff; pst_item *item = NULL; + char *result = NULL; + size_t resultlen = 0; DEBUG_ENT("process"); memset(&ff, 0, sizeof(ff)); @@ -82,7 +84,7 @@ } printf("Contact"); if (item->contact->fullname.str) - printf("\t%s", pst_rfc2426_escape(item->contact->fullname.str)); + printf("\t%s", pst_rfc2426_escape(item->contact->fullname.str, &result, &resultlen)); printf("\n"); } else if (item->email && ((item->type == PST_TYPE_NOTE) || (item->type == PST_TYPE_SCHEDULE) || (item->type == PST_TYPE_REPORT))) { @@ -105,7 +107,7 @@ DEBUG_INFO(("I have a journal entry, but folder isn't specified as a journal type. Processing...\n")); } if (item->subject.str) - printf("Journal\t%s\n", pst_rfc2426_escape(item->subject.str)); + printf("Journal\t%s\n", pst_rfc2426_escape(item->subject.str, &result, &resultlen)); } else if (item->appointment && (item->type == PST_TYPE_APPOINTMENT)) { char time_buffer[30]; @@ -117,7 +119,7 @@ } printf("Appointment"); if (item->subject.str) - printf("\tSUMMARY: %s", pst_rfc2426_escape(item->subject.str)); + printf("\tSUMMARY: %s", pst_rfc2426_escape(item->subject.str, &result, &resultlen)); if (item->appointment->start) printf("\tSTART: %s", pst_rfc2445_datetime_format(item->appointment->start, sizeof(time_buffer), time_buffer)); if (item->appointment->end) @@ -139,6 +141,7 @@ } } close_enter_dir(&ff); + if (result) free(result); DEBUG_RET(); }