dotlock.h functions.h gen_defs \
enter.h recvattach.h handler.h thread.h \
globals.h history.h init.h keymap.h mutt_crypt.h \
- mapping.h mime.h mutt.h mutt_curses.h mutt_menu.h \
+ mime.h mutt.h mutt_curses.h mutt_menu.h \
mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
mbox.h mh.h mx.h pager.h pgp.h protos.h rfc1524.h rfc2047.h \
rfc2231.h rfc822.h rfc3676.h \
#include <lib-lib/str.h>
#include <lib-lib/file.h>
#include <lib-lib/macros.h>
+#include <lib-lib/mapping.h>
#include "lib/rx.h"
#include "lib/debug.h"
#include "mutt_curses.h"
#include "mutt_idna.h"
#include "mutt_menu.h"
-#include "mapping.h"
#include "sort.h"
#define RSORT(x) (SortAlias & SORT_REVERSE) ? -x : x
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "enter.h"
#include "mutt_curses.h"
#include "mutt_menu.h"
#include "buffy.h"
-#include "mapping.h"
#include "sort.h"
#include "browser.h"
#include "attach.h"
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "mutt_curses.h"
-#include "mapping.h"
#include "lib/debug.h"
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "enter.h"
#include "mime.h"
#include "attach.h"
#include "recvattach.h"
-#include "mapping.h"
#include "sort.h"
#include "charset.h"
#include "mx.h"
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "mutt_curses.h"
#include "mx.h"
#include "mutt_menu.h"
-#include "mapping.h"
#include "sort.h"
#include "recvattach.h"
#include "buffy.h"
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
#include <lib-lib/str.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "mutt_curses.h"
#include "keymap.h"
#include "pager.h"
-#include "mapping.h"
#include <wchar.h>
#include <ctype.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
-#include "mapping.h"
#include "mutt_curses.h"
#include "history.h"
#include "keymap.h"
return 0;
}
-const char *mutt_getnamebyvalue (int val, const struct mapping_t *map)
-{
- int i;
-
- for (i = 0; map[i].name; i++)
- if (map[i].value == val)
- return (map[i].name);
- return NULL;
-}
-
-int mutt_getvaluebyname (const char *name, const struct mapping_t *map)
-{
- int i;
-
- for (i = 0; map[i].name; i++)
- if (ascii_strcasecmp (map[i].name, name) == 0)
- return (map[i].value);
- return (-1);
-}
-
static int mutt_execute_commands (LIST * p)
{
BUFFER err, token;
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
-#include "mapping.h"
#include "mutt_crypt.h"
#ifndef KEYMAP_H
#define KEYMAP_H
-#include "mapping.h"
+#include <lib-lib/mapping.h>
/* maximal length of a key binding sequence used for buffer in km_bindkey */
#define MAX_SEQ 8
noinst_LIBRARIES = liblib.a
-liblib_a_SOURCES = mem.h str.h ascii.h buffer.h hash.h list.h file.h \
- str.c ascii.c buffer.c hash.c list.c file.c
+liblib_a_SOURCES = mem.h str.h ascii.h buffer.h hash.h list.h file.h mapping.h \
+ str.c ascii.c buffer.c hash.c list.c file.c mapping.c
-noinst_HEADERS = mem.h str.h ascii.h buffer.h hash.h list.h file.h
+noinst_HEADERS = mem.h str.h ascii.h buffer.h hash.h list.h file.h mapping.h
--- /dev/null
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Copyright © 2006 Pierre Habouzit
+ */
+
+/*
+ * Copyright notice from original mutt:
+ * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
+ *
+ * Parts were written/modified by:
+ * Rocco Rutte <pdmef@cs.tu-berlin.de>
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
+#include <stdlib.h>
+
+#include "mapping.h"
+
+const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
+{
+ int i;
+
+ for (i = 0; map[i].name; i++)
+ if (map[i].value == val)
+ return (map[i].name);
+
+ return NULL;
+}
+
+int mutt_getvaluebyname(const char *name, const struct mapping_t *map)
+{
+ int i;
+
+ for (i = 0; map[i].name; i++)
+ if (ascii_strcasecmp (map[i].name, name) == 0)
+ return (map[i].value);
+
+ return -1;
+}
+
--- /dev/null
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Copyright © 2006 Pierre Habouzit
+ */
+
+/*
+ * Copyright notice from original mutt:
+ * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
+#ifndef MUTT_LIB_LIB_MAPPING_H
+#define MUTT_LIB_LIB_MAPPING_H
+
+struct mapping_t {
+ const char *name;
+ int value;
+};
+
+const char *mutt_getnamebyvalue(int, const struct mapping_t *);
+int mutt_getvaluebyname(const char *, const struct mapping_t *);
+
+#endif
+
};
const char *mutt_getnamebyvalue (int, const struct mapping_t *);
-char *mutt_compile_help (char *, size_t, int, struct mapping_t *);
-
int mutt_getvaluebyname (const char *, const struct mapping_t *);
#endif
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "enter.h"
#include "mutt_curses.h"
#include "keymap.h"
#include "mutt_menu.h"
-#include "mapping.h"
#include "sort.h"
#include "pager.h"
#include "attach.h"
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "handler.h"
#include "enter.h"
#include "mx.h"
-#include "mapping.h"
#include "keymap.h"
#include "copy.h"
#include "mime.h"
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "enter.h"
#include "mutt_menu.h"
#include "rfc1524.h"
#include "mime.h"
-#include "mapping.h"
#include "sort.h"
#include "thread.h"
#include "mx.h"
#include "mbyte.h"
#include <lib-lib/buffer.h>
+#include <lib-lib/mapping.h>
#define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#')
void mutt_make_attribution (CONTEXT * ctx, HEADER * cur, FILE * out);
void mutt_make_forward_subject (ENVELOPE * env, CONTEXT * ctx, HEADER * cur);
void mutt_make_help (char *, size_t, char *, int, int);
+char *mutt_compile_help(char *, size_t, int, struct mapping_t *);
void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx,
HEADER * cur, ENVELOPE * curenv);
void mutt_make_post_indent (CONTEXT * ctx, HEADER * cur, FILE * out);
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "mutt_menu.h"
#include "mutt_idna.h"
-#include "mapping.h"
#include "sort.h"
#include "lib/debug.h"
#include <lib-lib/macros.h>
#include <lib-lib/ascii.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "enter.h"
#include "rfc1524.h"
#include "mime.h"
#include "attach.h"
-#include "mapping.h"
#include "mx.h"
#include "copy.h"
#include "mutt_crypt.h"
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "enter.h"
#include "rfc1524.h"
#include "mime.h"
#include "attach.h"
-#include "mapping.h"
#include "mx.h"
#include "copy.h"
#include "mutt_idna.h"
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "recvattach.h"
#include "mutt_curses.h"
#include "mutt_menu.h"
-#include "mapping.h"
#include "remailer.h"
/* FIXME: This one does not belong to here */
WHERE short PgpSortKeys INITVAL (SORT_ADDRESS);
-#include "mapping.h"
+#include <lib-lib/mapping.h>
extern const struct mapping_t SortMethods[];
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "sort.h"
-#include "mapping.h"
#include "mx.h"
#include "buffy.h"
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
+#include <lib-lib/mapping.h>
#include "mutt.h"
-#include "mapping.h"
#include "url.h"
#include "mime.h"