#include <lib-lib/buffer.h>
#include <lib-lib/mapping.h>
+#include <lib-ui/curses.h>
+
#include "mutt.h"
-#include "mutt_curses.h"
#include "history.h"
#include "keymap.h"
#include "mbyte.h"
#include "charset.h"
#include "thread.h"
-#include "mutt_crypt.h"
+#include <lib-crypt/crypt.h>
#include "mutt_idna.h"
#if defined(USE_SSL) || defined(USE_GNUTLS)
-#include "mutt_ssl.h"
+#include <lib-network/mutt_ssl.h>
#endif
#if defined (USE_LIBESMTP) && (defined (USE_SSL) || defined (USE_GNUTLS))
char *val = NULL, *t = NULL;
int clean = 0;
- /* get some $muttng_ values dynamically */
- if (ascii_strcmp ("muttng_pwd", option->option) == 0) {
+ /* get some $madmutt_ values dynamically */
+ if (ascii_strcmp ("madmutt_pwd", option->option) == 0) {
val = p_new(char, _POSIX_PATH_MAX);
val = getcwd (val, _POSIX_PATH_MAX-1);
clean = 1;
- } else if (ascii_strcmp ("muttng_folder_path", option->option) == 0 &&
+ } else if (ascii_strcmp ("madmutt_folder_path", option->option) == 0 &&
CurrentFolder && *CurrentFolder) {
val = CurrentFolder;
- } else if (ascii_strcmp ("muttng_folder_name", option->option) == 0 &&
+ } else if (ascii_strcmp ("madmutt_folder_name", option->option) == 0 &&
CurrentFolder && *CurrentFolder) {
ssize_t Maildirlength = m_strlen(Maildir);
break;
}
- /* the $muttng_ variables are read-only */
+ /* the $madmutt_ variables are read-only */
if (!FuncTable[DTYPE (option->type)].opt_from_string) {
snprintf (err->data, err->dsize, _("$%s is read-only"),
option->option);
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 */
else
Hostname = m_strdup(utsname.nodename);
-#ifndef DOMAIN
-#define DOMAIN buffer
if (!p && getdnsdomainname (buffer, sizeof(buffer)) == -1)
Fqdn = m_strdup("@");
else
-#endif /* DOMAIN */
- if (*DOMAIN != '@') {
- Fqdn = p_new(char, m_strlen(DOMAIN) + m_strlen(Hostname) + 2);
- sprintf (Fqdn, "%s.%s", NONULL (Hostname), DOMAIN); /* __SPRINTF_CHECKED__ */
+ if (*buffer != '@') {
+ Fqdn = p_new(char, m_strlen(buffer) + m_strlen(Hostname) + 2);
+ sprintf (Fqdn, "%s.%s", NONULL(Hostname), buffer); /* __SPRINTF_CHECKED__ */
}
else
Fqdn = m_strdup(NONULL (Hostname));
p = "vi";
}
Editor = m_strdup(p);
- Visual = m_strdup(p);
if ((p = getenv ("REPLYTO")) != NULL) {
BUFFER buf, token;
CurrentMenu = MENU_MAIN;
-
-#ifndef LOCALES_HACK
/* Do we have a locale definition? */
if (((p = getenv ("LC_ALL")) != NULL && p[0]) ||
((p = getenv ("LANG")) != NULL && p[0]) ||
((p = getenv ("LC_CTYPE")) != NULL && p[0]))
set_option (OPTLOCALES);
-#endif
#ifdef HAVE_GETSID
/* Unset suspend by default if we're the session leader */
if (!Muttrc) {
#if 0
- snprintf (buffer, sizeof(buffer), "%s/.muttngrc-%s", NONULL (Homedir),
+ snprintf (buffer, sizeof(buffer), "%s/.madmuttrc-%s", NONULL (Homedir),
MUTT_VERSION);
if (access (buffer, F_OK) == -1)
#endif
- snprintf (buffer, sizeof(buffer), "%s/.muttngrc", NONULL (Homedir));
+ snprintf (buffer, sizeof(buffer), "%s/.madmuttrc", NONULL (Homedir));
if (access (buffer, F_OK) == -1)
#if 0
- snprintf (buffer, sizeof(buffer), "%s/.muttng/muttngrc-%s",
+ snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc-%s",
NONULL (Homedir), MUTT_VERSION);
if (access (buffer, F_OK) == -1)
#endif
- snprintf (buffer, sizeof(buffer), "%s/.muttng/muttngrc",
+ snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc",
NONULL (Homedir));
default_rc = 1;
/* 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);