diff options
author | Carl Worth <cworth@cworth.org> | 2009-11-02 16:08:24 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-02 16:08:24 -0800 |
commit | dac7e1d4b15af5a7fa6cce3112bc08eb8e8f02e6 (patch) | |
tree | 4d8b4f64f253c3bc458f09575c69fd5e5932ec1a /message-file.c | |
parent | ab2d904e060c6dada013f8bd731fbb4ff824b040 (diff) |
Remove notmuch_message_get_header_size and notmuch_message_get_all_headers
The notmuch.c main program now uses GMime directly rather than using
these functions, and I'd rather not export any functions unless we
have good evidence that the functions are necessary.
Diffstat (limited to 'message-file.c')
-rw-r--r-- | message-file.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/message-file.c b/message-file.c index 0cb85d8..75caba6 100644 --- a/message-file.c +++ b/message-file.c @@ -350,40 +350,3 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, return NULL; } - -size_t -notmuch_message_file_get_header_size (notmuch_message_file_t *message) -{ - if (! message->parsing_finished) - notmuch_message_file_get_header (message, NULL); - - if (! message->parsing_finished) - INTERNAL_ERROR ("Parsing for NULL header did not force parsing to finish.\n"); - - return message->header_size; -} - -const char * -notmuch_message_file_get_all_headers (notmuch_message_file_t *message) -{ - char *headers = NULL; - size_t header_size = notmuch_message_file_get_header_size (message); - - if (header_size == 0) - return ""; - - headers = talloc_size (message, header_size + 1); - if (unlikely (headers == NULL)) - return NULL; - - rewind (message->file); - if (fread (headers, 1, header_size, message->file) != header_size) { - fprintf (stderr, "Error: Short read occurred trying to read message header.\n"); - talloc_free (headers); - return NULL; - } - - headers[header_size] = '\0'; - - return headers; -} |