#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
+#include <lib-lib/rx.h>
+
+#include <lib-ui/curses.h>
#include "mutt.h"
-#include "mutt_curses.h"
#include "history.h"
#include "keymap.h"
#include "mbyte.h"
#include "mutt_idna.h"
#if defined(USE_SSL) || defined(USE_GNUTLS)
-#include "mutt_ssl.h"
+#include <lib-sys/mutt_ssl.h>
#endif
#if defined (USE_LIBESMTP) && (defined (USE_SSL) || defined (USE_GNUTLS))
#include "mx.h"
#include "init.h"
-#include "lib/rx.h"
#include "lib/list.h"
-#include "lib/debug.h"
#include <ctype.h>
#include <stdlib.h>
i = rx_lookup ((*list), rx->pattern);
if (i >= 0)
- rx_free (&rx);
+ rx_delete(&rx);
else
list_push_back (list, rx);
return 0;
return 0;
if (spam->rx && !m_strcmp(spam->rx->pattern, pat)) {
*list = spam->next;
- rx_free (&spam->rx);
+ rx_delete(&spam->rx);
p_delete(&spam->template);
p_delete(&spam);
return 1;
for (spam = prev->next; spam;) {
if (!m_strcmp(spam->rx->pattern, pat)) {
prev->next = spam->next;
- rx_free (&spam->rx);
+ rx_delete(&spam->rx);
p_delete(&spam->template);
p_delete(&spam);
spam = prev->next;
int i = 0;
if (m_strcmp("*", str) == 0) {
- list_del (l, (list_del_t*) rx_free);
+ list_del (l, (list_del_t*) rx_delete);
return (0);
}
else {
i = rx_lookup ((*l), str);
if (i >= 0) {
rx_t* r = list_pop_idx ((*l), i);
- rx_free (&r);
+ rx_delete(&r);
return (0);
}
}
/* "*" is a special case. */
if (!m_strcmp(buf->data, "*")) {
mutt_free_spam_list (&SpamList);
- list_del (&NoSpamList, (list_del_t*) rx_free);
+ list_del (&NoSpamList, (list_del_t*) rx_delete);
return 0;
}
int Num_matched = 0; /* Number of matches for completion */
char Completed[STRING] = { 0 }; /* completed string (command or variable) */
-const char *Matches[MAX (NUMVARS, NUMCOMMANDS) + 1]; /* all the matches + User_typed */
+char *Matches[MAX (NUMVARS, NUMCOMMANDS) + 1]; /* all the matches + User_typed */
/* helper function for completion. Changes the dest buffer if
necessary/possible to aid completion.
if (numtabs == 1) {
Num_matched = 0;
m_strcpy(User_typed, sizeof(User_typed), pt);
- p_clear(Matches, sizeof(Matches));
- p_clear(Completed, sizeof(Completed));
+ p_clear(Matches, countof(Matches));
+ p_clear(Completed, countof(Completed));
for (num = 0; Commands[num].name; num++)
candidate (Completed, User_typed, Commands[num].name,
sizeof(Completed));
if (numtabs == 1) {
Num_matched = 0;
m_strcpy(User_typed, sizeof(User_typed), pt);
- p_clear(Matches, sizeof(Matches));
- p_clear(Completed, sizeof(Completed));
+ p_clear(Matches, countof(Matches));
+ p_clear(Completed, countof(Completed));
for (num = 0; MuttVars[num].option; num++)
candidate(Completed, User_typed, MuttVars[num].option,
sizeof(Completed));
if (numtabs == 1) {
Num_matched = 0;
m_strcpy(User_typed, sizeof(User_typed), pt);
- p_clear(Matches, sizeof(Matches));
- p_clear(Completed, sizeof(Completed));
+ p_clear(Matches, countof(Matches));
+ p_clear(Completed, countof(Completed));
for (num = 0; menu[num].name; num++)
candidate (Completed, User_typed, menu[num].name, sizeof(Completed));
/* try the generic menu */
/* Process the global rc file if it exists and the user hasn't explicity
requested not to via "-n". */
if (!skip_sys_rc) {
- snprintf (buffer, sizeof(buffer), "%s/Muttngrc-%s", SYSCONFDIR,
+ snprintf (buffer, sizeof(buffer), "%s/Madmuttrc-%s", SYSCONFDIR,
MUTT_VERSION);
if (access (buffer, F_OK) == -1)
- snprintf (buffer, sizeof(buffer), "%s/Muttngrc", SYSCONFDIR);
+ snprintf (buffer, sizeof(buffer), "%s/Madmuttrc", SYSCONFDIR);
if (access (buffer, F_OK) == -1)
- snprintf (buffer, sizeof(buffer), "%s/Muttngrc-%s", PKGDATADIR,
+ snprintf (buffer, sizeof(buffer), "%s/Madmuttrc-%s", PKGDATADIR,
MUTT_VERSION);
if (access (buffer, F_OK) == -1)
- snprintf (buffer, sizeof(buffer), "%s/Muttngrc", PKGDATADIR);
+ snprintf (buffer, sizeof(buffer), "%s/Madmuttrc", PKGDATADIR);
if (access (buffer, F_OK) != -1) {
if (source_rc (buffer, &err) != 0) {
fputs (err.data, stderr);