projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace deprecated luaL_openlib() by luaL_register()
[apps/madmutt.git]
/
lib-lib
/
mapping.c
diff --git
a/lib-lib/mapping.c
b/lib-lib/mapping.c
index
d8d8200
..
4c1e7f0
100644
(file)
--- a/
lib-lib/mapping.c
+++ b/
lib-lib/mapping.c
@@
-29,10
+29,7
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#include <stdlib.h>
-
-#include "mapping.h"
-#include "ascii.h"
+#include "lib-lib.h"
const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
{
const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
{
@@
-40,7
+37,7
@@
const char *mutt_getnamebyvalue(int val, const struct mapping_t *map)
for (i = 0; map[i].name; i++)
if (map[i].value == val)
for (i = 0; map[i].name; i++)
if (map[i].value == val)
- return
(map[i].name)
;
+ return
map[i].name
;
return NULL;
}
return NULL;
}
@@
-51,7
+48,7
@@
int mutt_getvaluebyname(const char *name, const struct mapping_t *map)
for (i = 0; map[i].name; i++)
if (ascii_strcasecmp (map[i].name, name) == 0)
for (i = 0; map[i].name; i++)
if (ascii_strcasecmp (map[i].name, name) == 0)
- return
(map[i].value)
;
+ return
map[i].value
;
return -1;
}
return -1;
}