static char **be_include_messages(char *msg, char **buf, int *bufmax,
int *buflen, int pfx, int inc_hdrs)
{
- int offset, bytes, n;
+ int n;
+ // int offset, bytes;
char tmp[LONG_STRING];
if (!msg || !buf || !bufmax || !buflen)
mutt_mem_realloc(&buf, sizeof(char *) * (*bufmax += 25));
buf[(*buflen)++] = mutt_str_strdup(tmp);
+#if 0
+ /* This only worked for mbox Mailboxes because they had Context->fp set.
+ * As that no longer exists, the code is now completely broken. */
bytes = Context->mailbox->hdrs[n]->content->length;
if (inc_hdrs)
{
}
else
offset = Context->mailbox->hdrs[n]->content->offset;
- /* This only worked for mbox Mailboxes because they had Context->fp set.
- * As that no longer exists, the code is now completely broken. */
- // buf = be_snarf_data(Context->fp, buf, bufmax, buflen, offset, bytes, pfx);
+ buf = be_snarf_data(Context->fp, buf, bufmax, buflen, offset, bytes, pfx);
+#endif
if (*bufmax == *buflen)
mutt_mem_realloc(&buf, sizeof(char *) * (*bufmax += 25));
const char *name = "fruit:Apple";
mutt_buffer_reset(&err);
- int result = cs_str_string_get(cs, name, &err);
- if (TEST_CHECK(CSR_RESULT(result) == CSR_SUCCESS))
+ rc = cs_str_string_get(cs, name, &err);
+ if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
TEST_MSG("%s = '%s'\n", name, err.data);
}
}
mutt_buffer_reset(&err);
- result = cs_str_native_set(cs, name, 42, &err);
- if (TEST_CHECK(CSR_RESULT(result) == CSR_SUCCESS))
+ rc = cs_str_native_set(cs, name, 42, &err);
+ if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
TEST_MSG("Set %s\n", name);
}
return;
mutt_buffer_reset(&err);
- result = cs_str_initial_set(cs, name, "42", &err);
+ rc = cs_str_initial_set(cs, name, "42", &err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
- TEST_MSG("Expected error\n");
- }
- else
- {
- TEST_MSG("This test should have failed\n");
+ TEST_MSG("%s\n", err.data);
return;
}
mutt_buffer_reset(&err);
- result = cs_str_initial_get(cs, name, &err);
+ rc = cs_str_initial_get(cs, name, &err);
if (TEST_CHECK(CSR_RESULT(rc) != CSR_SUCCESS))
{
TEST_MSG("Expected error\n");
return;
mutt_buffer_reset(&err);
- result = cs_he_native_set(cs, he, 42, &err);
- if (TEST_CHECK(CSR_RESULT(result) == CSR_SUCCESS))
+ rc = cs_he_native_set(cs, he, 42, &err);
+ if (TEST_CHECK(CSR_RESULT(rc) == CSR_SUCCESS))
{
TEST_MSG("Set %s\n", name);
}