projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
continue the include dance
[apps/madmutt.git]
/
state.c
diff --git
a/state.c
b/state.c
index
ca73d4a
..
f5642af
100644
(file)
--- a/
state.c
+++ b/
state.c
@@
-12,14
+12,15
@@
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
+
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "state.h"
#include "rfc3676.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, ssize_t dlen, STATE * s)
{
if (s->prefix)
while (dlen--)
{
if (s->prefix)
while (dlen--)
@@
-28,12
+29,12
@@
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 (cd != (iconv_t) (-1)) {
if (!bufi) {
if (cd != (iconv_t) (-1)) {
@@
-70,7
+71,7
@@
void state_prefix_putc (char c, STATE * s)
if (s->flags & M_PENDINGPREFIX) {
int i;
if (s->flags & M_PENDINGPREFIX) {
int i;
- i =
str_len
(Quotebuf);
+ i =
m_strlen
(Quotebuf);
Quotebuf[i++] = c;
Quotebuf[i] = '\0';
if (i == sizeof (Quotebuf) - 1 || c == '\n') {
Quotebuf[i++] = c;
Quotebuf[i] = '\0';
if (i == sizeof (Quotebuf) - 1 || c == '\n') {
@@
-102,11
+103,11
@@
void state_prefix_putc (char c, STATE * s)
snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
#ifdef DEBUG
snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
#ifdef DEBUG
- if (
str_len
(buf) >= 2) {
- save = buf[
str_len
(buf) - 1];
- buf[
str_len
(buf) - 1] = '\0';
+ if (
m_strlen
(buf) >= 2) {
+ save = buf[
m_strlen
(buf) - 1];
+ buf[
m_strlen
(buf) - 1] = '\0';
debug_print (2, ("buf = '%s'\n", buf));
debug_print (2, ("buf = '%s'\n", buf));
- buf[
str_len
(buf)] = save;
+ buf[
m_strlen
(buf)] = save;
}
#endif
}
#endif
@@
-136,7
+137,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);
}