projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
macros to create usual functions : new/delete and init/wipe.
[apps/madmutt.git]
/
keymap.c
diff --git
a/keymap.c
b/keymap.c
index
0c450f7
..
208fce0
100644
(file)
--- a/
keymap.c
+++ b/
keymap.c
@@
-16,12
+16,12
@@
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.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_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
#include "mutt.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
-#include "mapping.h"
#include "mutt_crypt.h"
#include "mutt_crypt.h"
@@
-29,7
+29,8
@@
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-#include "functions.h"
+#define MUTT_FUNCTIONS_VALUES
+#include "functions.def"
struct mapping_t Menus[] = {
{"alias", MENU_ALIAS},
struct mapping_t Menus[] = {
{"alias", MENU_ALIAS},
@@
-144,7
+145,7
@@
static int parsekeys (const char *str, keycode_t * d, int max)
char c;
char *s, *t;
char c;
char *s, *t;
-
strfcpy (buff, str, sizeof (buff)
);
+
m_strcpy(buff, sizeof(buff), str
);
s = buff;
while (*s && len) {
s = buff;
while (*s && len) {
@@
-492,7
+493,7
@@
int km_expand_key (char *s, size_t len, struct keymap_t *map)
return (0);
for (;;) {
return (0);
for (;;) {
-
strfcpy (s, km_keyname (map->keys[p]), len
);
+
m_strcpy(s, len, km_keyname(map->keys[p])
);
len -= (l = m_strlen(s));
if (++p >= map->len || !len)
len -= (l = m_strlen(s));
if (++p >= map->len || !len)
@@
-661,7
+662,7
@@
int mutt_parse_push (BUFFER * buf, BUFFER * s, unsigned long data,
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
if (MoreArgs (s)) {
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
if (MoreArgs (s)) {
-
strfcpy (err->data, _("push: too many arguments"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("push: too many arguments")
);
r = -1;
}
else
r = -1;
}
else
@@
-703,13
+704,13
@@
static char *parse_keymap (int *menu, BUFFER * s, int maxmenus, int *nummenus,
mutt_extract_token (&buf, s, 0);
if (!*buf.data) {
mutt_extract_token (&buf, s, 0);
if (!*buf.data) {
-
strfcpy (err->data, _("null key sequence"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("null key sequence")
);
}
else if (MoreArgs (s))
return (buf.data);
}
else {
}
else if (MoreArgs (s))
return (buf.data);
}
else {
-
strfcpy (err->data, _("too few arguments"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("too few arguments")
);
}
error:
p_delete(&buf.data);
}
error:
p_delete(&buf.data);
@@
-788,7
+789,7
@@
int mutt_parse_bind (BUFFER * buf, BUFFER * s, unsigned long data,
/* function to execute */
mutt_extract_token (buf, s, 0);
if (MoreArgs (s)) {
/* function to execute */
mutt_extract_token (buf, s, 0);
if (MoreArgs (s)) {
-
strfcpy (err->data, _("bind: too many arguments"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("bind: too many arguments")
);
r = -1;
}
else if (ascii_strcasecmp ("noop", buf->data) == 0) {
r = -1;
}
else if (ascii_strcasecmp ("noop", buf->data) == 0) {
@@
-833,7
+834,7
@@
int mutt_parse_macro (BUFFER * buf, BUFFER * s, unsigned long data,
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
/* make sure the macro sequence is not an empty string */
if (!*buf->data) {
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
/* make sure the macro sequence is not an empty string */
if (!*buf->data) {
-
strfcpy (err->data, _("macro: empty key sequence"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("macro: empty key sequence")
);
}
else {
if (MoreArgs (s)) {
}
else {
if (MoreArgs (s)) {
@@
-841,7
+842,7
@@
int mutt_parse_macro (BUFFER * buf, BUFFER * s, unsigned long data,
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
if (MoreArgs (s)) {
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
if (MoreArgs (s)) {
-
strfcpy (err->data, _("macro: too many arguments"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("macro: too many arguments")
);
}
else {
for (i = 0; i < nummenus; ++i) {
}
else {
for (i = 0; i < nummenus; ++i) {
@@
-873,7
+874,7
@@
int mutt_parse_exec (BUFFER * buf, BUFFER * s, unsigned long data,
char *function;
if (!MoreArgs (s)) {
char *function;
if (!MoreArgs (s)) {
-
strfcpy (err->data, _("exec: no arguments"), err->dsize
);
+
m_strcpy(err->data, err->dsize, _("exec: no arguments")
);
return (-1);
}
return (-1);
}