projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix multiple compilation warnings
[apps/madmutt.git]
/
state.c
diff --git
a/state.c
b/state.c
index
3c87f3c
..
1d41017
100644
(file)
--- a/
state.c
+++ b/
state.c
@@
-6,20
+6,15
@@
* It's licensed under the GNU General Public License,
* please see the file GPL in the top level source directory.
*/
* It's licensed under the GNU General Public License,
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <stdlib.h>
-#include <stdio.h>
+#include <lib-lib/lib-lib.h>
+
+#include <lib-mime/rfc3676.h>
#include "mutt.h"
#include "state.h"
#include "mutt.h"
#include "state.h"
-#include "rfc3676.h"
-
-#include "lib/debug.h"
-static void state_prefix_put (const char *d, size_t dlen, STATE * s)
+static void state_prefix_put (const char *d, s
s
ize_t dlen, STATE * s)
{
if (s->prefix)
while (dlen--)
{
if (s->prefix)
while (dlen--)
@@
-28,15
+23,15
@@
static void state_prefix_put (const char *d, size_t dlen, STATE * s)
fwrite (d, dlen, 1, s->fpout);
}
fwrite (d, dlen, 1, s->fpout);
}
-void mutt_convert_to_state (iconv_t cd, char *bufi, size_t * l, STATE * s)
+void mutt_convert_to_state (iconv_t cd, char *bufi, s
s
ize_t * l, STATE * s)
{
char bufo[BUFO_SIZE];
const char *ib;
char *ob;
{
char bufo[BUFO_SIZE];
const char *ib;
char *ob;
- size_t ibl, obl;
+ s
s
ize_t ibl, obl;
if (!bufi) {
if (!bufi) {
- if (cd !=
(iconv_t) (-1)
) {
+ if (cd !=
MUTT_ICONV_ERROR
) {
ob = bufo, obl = sizeof (bufo);
my_iconv(cd, 0, 0, &ob, &obl);
if (ob != bufo)
ob = bufo, obl = sizeof (bufo);
my_iconv(cd, 0, 0, &ob, &obl);
if (ob != bufo)
@@
-47,7
+42,7
@@
void mutt_convert_to_state (iconv_t cd, char *bufi, size_t * l, STATE * s)
return;
}
return;
}
- if (cd ==
(iconv_t) (-1)
) {
+ if (cd ==
MUTT_ICONV_ERROR
) {
state_prefix_put (bufi, *l, s);
*l = 0;
return;
state_prefix_put (bufi, *l, s);
*l = 0;
return;
@@
-77,9
+72,6
@@
void state_prefix_putc (char c, STATE * s)
char buf[2 * SHORT_STRING];
int j = 0, offset = 0;
regmatch_t pmatch[1];
char buf[2 * SHORT_STRING];
int j = 0, offset = 0;
regmatch_t pmatch[1];
-#ifdef DEBUG
- unsigned char save = '\0';
-#endif
state_reset_prefix (s);
while (regexec
state_reset_prefix (s);
while (regexec
@@
-101,15
+93,6
@@
void state_prefix_putc (char c, STATE * s)
else
snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
else
snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
-#ifdef DEBUG
- if (m_strlen(buf) >= 2) {
- save = buf[m_strlen(buf) - 1];
- buf[m_strlen(buf) - 1] = '\0';
- debug_print (2, ("buf = '%s'\n", buf));
- buf[m_strlen(buf)] = save;
- }
-#endif
-
state_puts (buf, s);
}
}
state_puts (buf, s);
}
}
@@
-136,7
+119,7
@@
int state_printf (STATE * s, const char *fmt, ...)
void state_mark_attach (STATE * s)
{
void state_mark_attach (STATE * s)
{
- if ((s->flags & M_DISPLAY) && !
str_cmp
(Pager, "builtin"))
+ if ((s->flags & M_DISPLAY) && !
m_strcmp
(Pager, "builtin"))
state_puts (AttachmentMarker, s);
}
state_puts (AttachmentMarker, s);
}