projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build system simplifications.
[apps/madmutt.git]
/
state.c
diff --git
a/state.c
b/state.c
index
2f0c8f7
..
f21db7e
100644
(file)
--- a/
state.c
+++ b/
state.c
@@
-6,13
+6,8
@@
* 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 <stdarg.h>
+#include <lib-lib/lib-lib.h>
#include <lib-mime/rfc3676.h>
#include <lib-mime/rfc3676.h>
@@
-74,7
+69,7
@@
void state_prefix_putc (char c, STATE * s)
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') {
- char buf[2 * S
HORT_S
TRING];
+ char buf[2 * STRING];
int j = 0, offset = 0;
regmatch_t pmatch[1];
int j = 0, offset = 0;
regmatch_t pmatch[1];
@@
-92,8
+87,8
@@
void state_prefix_putc (char c, STATE * s)
for (i = 0; i < offset; i++)
if (Quotebuf[i] != ' ')
j = i;
for (i = 0; i < offset; i++)
if (Quotebuf[i] != ' ')
j = i;
-
strncpy (buf
, Quotebuf, j + 1);
-
strcpy (buf + j +
1, Quotebuf + j);
+
m_strncpy(buf, sizeof(buf)
, Quotebuf, j + 1);
+
m_strcpy(buf + j + 1, sizeof(buf) - j -
1, Quotebuf + j);
}
else
snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
}
else
snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
@@
-124,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) && !m_strcmp(Pager, "builtin")
)
+ if (
s->flags & M_DISPLAY
)
state_puts (AttachmentMarker, s);
}
state_puts (AttachmentMarker, s);
}