summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2010-09-07 19:54:40 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-09-07 19:54:40 (GMT)
commit420212a69bba00b4474b26d8da66ee338b8f771f (patch) (side-by-side diff)
tree3684c8613b2f4fe8c33cb1f70df4e049d47d0ea2
parentf08e6e0842bae2dd575b085a8182cdd0f0d55cc5 (diff)
downloadmailutils-stream-cleanup.tar.gz
mailutils-stream-cleanup.tar.bz2
Rename XSCRIPT_ macros to MU_XSCRIPT.stream-cleanup
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/pop3client.c16
-rw-r--r--imap4d/fetch.c2
-rw-r--r--imap4d/imap4d.c3
-rw-r--r--imap4d/io.c4
-rw-r--r--imap4d/uid.c2
-rw-r--r--imap4d/util.c6
-rw-r--r--include/mailutils/stream.h6
-rw-r--r--libproto/pop/mbox.c4
-rw-r--r--libproto/pop/pop3_pass.c6
-rw-r--r--libproto/pop/pop3_retr.c4
-rw-r--r--libproto/pop/pop3_stream.c2
-rw-r--r--libproto/pop/pop3_top.c4
-rw-r--r--libproto/pop/pop3_trace.c2
-rw-r--r--mailbox/xscript-stream.c4
-rw-r--r--pop3d/extra.c6
-rw-r--r--pop3d/retr.c2
-rw-r--r--pop3d/top.c2
-rw-r--r--pop3d/user.c2
18 files changed, 39 insertions, 38 deletions
diff --git a/examples/pop3client.c b/examples/pop3client.c
index 4450f22..c924638 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -519,9 +519,9 @@ static int
string_to_xlev (const char *name, int *pv)
{
if (strcmp (name, "secure") == 0)
- *pv = XSCRIPT_SECURE;
+ *pv = MU_XSCRIPT_SECURE;
else if (strcmp (name, "payload") == 0)
- *pv = XSCRIPT_PAYLOAD;
+ *pv = MU_XSCRIPT_PAYLOAD;
else
return 1;
return 0;
@@ -568,12 +568,12 @@ set_verbose_mask (mu_pop3_t p)
{
if (p)
{
- mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (XSCRIPT_SECURE)
+ mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (MU_XSCRIPT_SECURE)
? MU_POP3_TRACE_SET : MU_POP3_TRACE_CLR,
- XSCRIPT_SECURE);
- mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (XSCRIPT_PAYLOAD)
+ MU_XSCRIPT_SECURE);
+ mu_pop3_trace_mask (p, QRY_VERBOSE_MASK (MU_XSCRIPT_PAYLOAD)
? MU_POP3_TRACE_SET : MU_POP3_TRACE_CLR,
- XSCRIPT_PAYLOAD);
+ MU_XSCRIPT_PAYLOAD);
}
}
@@ -589,12 +589,12 @@ com_verbose (int argc, char **argv)
{
char *delim = " (";
- if (QRY_VERBOSE_MASK (XSCRIPT_SECURE))
+ if (QRY_VERBOSE_MASK (MU_XSCRIPT_SECURE))
{
printf("%ssecure", delim);
delim = ", ";
}
- if (QRY_VERBOSE_MASK (XSCRIPT_PAYLOAD))
+ if (QRY_VERBOSE_MASK (MU_XSCRIPT_PAYLOAD))
printf("%spayload", delim);
printf (")");
}
diff --git a/imap4d/fetch.c b/imap4d/fetch.c
index 8f9339d..04cf8c6 100644
--- a/imap4d/fetch.c
+++ b/imap4d/fetch.c
@@ -1688,7 +1688,7 @@ imap4d_fetch (struct imap4d_command *command, imap4d_tokbuf_t tok)
{
int rc;
char *err_text = "Completed";
- int xlev = set_xscript_level (XSCRIPT_PAYLOAD);
+ int xlev = set_xscript_level (MU_XSCRIPT_PAYLOAD);
rc = imap4d_fetch0 (tok, 0, &err_text);
set_xscript_level (xlev);
return io_completion_response (command, rc, "%s", err_text);
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 340c2bb..a5b29e0 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -422,7 +422,8 @@ imap4d_mainloop (int fd, FILE *infile, FILE *outfile)
RESP_PREAUTH : RESP_OK, "%s", text);
io_flush ();
- set_xscript_level ((state == STATE_AUTH) ? XSCRIPT_NORMAL : XSCRIPT_SECURE);
+ set_xscript_level ((state == STATE_AUTH) ?
+ MU_XSCRIPT_NORMAL : MU_XSCRIPT_SECURE);
tokp = imap4d_tokbuf_init ();
while (1)
diff --git a/imap4d/io.c b/imap4d/io.c
index fcae107..726cfaa 100644
--- a/imap4d/io.c
+++ b/imap4d/io.c
@@ -243,7 +243,7 @@ io_format_completion_response (mu_stream_t str,
if (new_state != STATE_NONE)
{
if (new_state == STATE_AUTH)
- set_xscript_level (XSCRIPT_NORMAL);
+ set_xscript_level (MU_XSCRIPT_NORMAL);
state = new_state;
}
@@ -574,7 +574,7 @@ imap4d_readline (struct imap4d_tokbuf *tok)
char *sp = NULL;
char *buf;
size_t len;
- int xlev = set_xscript_level (XSCRIPT_PAYLOAD);
+ int xlev = set_xscript_level (MU_XSCRIPT_PAYLOAD);
number = strtoul (last_arg + 1, &sp, 10);
/* Client can ask for non-synchronised literal,
diff --git a/imap4d/uid.c b/imap4d/uid.c
index 9d34b46..e4e5859 100644
--- a/imap4d/uid.c
+++ b/imap4d/uid.c
@@ -38,7 +38,7 @@ imap4d_uid (struct imap4d_command *command, imap4d_tokbuf_t tok)
if (mu_c_strcasecmp (cmd, "FETCH") == 0)
{
- int xlev = set_xscript_level (XSCRIPT_PAYLOAD);
+ int xlev = set_xscript_level (MU_XSCRIPT_PAYLOAD);
rc = imap4d_fetch0 (tok, 1, &err_text);
set_xscript_level (xlev);
}
diff --git a/imap4d/util.c b/imap4d/util.c
index af081fe..73d4031 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -677,13 +677,13 @@ set_xscript_level (int xlev)
{
if (imap4d_transcript)
{
- if (xlev != XSCRIPT_NORMAL)
+ if (xlev != MU_XSCRIPT_NORMAL)
{
- mu_log_level_t n = xlev == XSCRIPT_SECURE ?
+ mu_log_level_t n = xlev == MU_XSCRIPT_SECURE ?
MU_DEBUG_TRACE6 : MU_DEBUG_TRACE7;
if (mu_global_debug_level ("imap4") & MU_DEBUG_LEVEL_MASK (n))
- return XSCRIPT_NORMAL;
+ return MU_XSCRIPT_NORMAL;
}
if (mu_stream_ioctl (iostream, MU_IOCTL_LEVEL, &xlev) == 0)
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index ab1d9c4..0d50602 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -157,9 +157,9 @@ int mu_tcp_stream_create (mu_stream_t *stream, const char *host, int port,
int flags);
/* Transcript output levels */
-#define XSCRIPT_NORMAL 0 /* Normal transcript */
-#define XSCRIPT_SECURE 1 /* Security-related data are being sent/received */
-#define XSCRIPT_PAYLOAD 2 /* Actual payload (may be copious) */
+#define MU_XSCRIPT_NORMAL 0 /* Normal transcript */
+#define MU_XSCRIPT_SECURE 1 /* Security-related data are being transmitted */
+#define MU_XSCRIPT_PAYLOAD 2 /* Actual payload (may be copious) */
int mu_xscript_stream_create(mu_stream_t *pref, mu_stream_t transport,
mu_stream_t logstr,
diff --git a/libproto/pop/mbox.c b/libproto/pop/mbox.c
index 68e2d93..f513295 100644
--- a/libproto/pop/mbox.c
+++ b/libproto/pop/mbox.c
@@ -162,9 +162,9 @@ pop_open (mu_mailbox_t mbox, int flags)
if (mu_debug_check_level (mbox->debug, MU_DEBUG_PROT))
mu_pop3_trace (mpd->pop3, MU_POP3_TRACE_SET);
if (mu_debug_check_level (mbox->debug, MU_DEBUG_TRACE6))
- mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, XSCRIPT_SECURE);
+ mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, MU_XSCRIPT_SECURE);
if (mu_debug_check_level (mbox->debug, MU_DEBUG_TRACE7))
- mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, XSCRIPT_PAYLOAD);
+ mu_pop3_trace_mask (mpd->pop3, MU_POP3_TRACE_SET, MU_XSCRIPT_PAYLOAD);
do
{
diff --git a/libproto/pop/pop3_pass.c b/libproto/pop/pop3_pass.c
index 30f823f..d72c511 100644
--- a/libproto/pop/pop3_pass.c
+++ b/libproto/pop/pop3_pass.c
@@ -35,10 +35,10 @@ mu_pop3_pass (mu_pop3_t pop3, const char *passwd)
switch (pop3->state)
{
case MU_POP3_NO_STATE:
- if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, XSCRIPT_SECURE))
- _mu_pop3_xscript_level (pop3, XSCRIPT_SECURE);
+ if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, MU_XSCRIPT_SECURE))
+ _mu_pop3_xscript_level (pop3, MU_XSCRIPT_SECURE);
status = mu_pop3_writeline (pop3, "PASS %s\r\n", passwd);
- _mu_pop3_xscript_level (pop3, XSCRIPT_NORMAL);
+ _mu_pop3_xscript_level (pop3, MU_XSCRIPT_NORMAL);
MU_POP3_CHECK_ERROR (pop3, status);
/* FIXME: how to obscure the passwd in the stream buffer? */
MU_POP3_FCLR (pop3, MU_POP3_ACK);
diff --git a/libproto/pop/pop3_retr.c b/libproto/pop/pop3_retr.c
index fc454da..aca24da 100644
--- a/libproto/pop/pop3_retr.c
+++ b/libproto/pop/pop3_retr.c
@@ -50,8 +50,8 @@ mu_pop3_retr (mu_pop3_t pop3, unsigned int msgno, mu_stream_t *pstream)
MU_POP3_CHECK_OK (pop3);
status = mu_pop3_stream_create (pop3, pstream);
MU_POP3_CHECK_ERROR (pop3, status);
- if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, XSCRIPT_PAYLOAD))
- _mu_pop3_xscript_level (pop3, XSCRIPT_PAYLOAD);
+ if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, MU_XSCRIPT_PAYLOAD))
+ _mu_pop3_xscript_level (pop3, MU_XSCRIPT_PAYLOAD);
pop3->state = MU_POP3_RETR_RX;
case MU_POP3_RETR_RX:
diff --git a/libproto/pop/pop3_stream.c b/libproto/pop/pop3_stream.c
index bd2bd07..25fdba6 100644
--- a/libproto/pop/pop3_stream.c
+++ b/libproto/pop/pop3_stream.c
@@ -185,7 +185,7 @@ _pop3_event_cb (mu_stream_t str, int ev, int flags)
if (mu_stream_ioctl (str, MU_IOCTL_GET_TRANSPORT, trans) == 0)
{
struct mu_pop3_stream *sp = (struct mu_pop3_stream *) trans[0];
- _mu_pop3_xscript_level (sp->pop3, XSCRIPT_NORMAL);
+ _mu_pop3_xscript_level (sp->pop3, MU_XSCRIPT_NORMAL);
sp->pop3->state = MU_POP3_NO_STATE;
}
}
diff --git a/libproto/pop/pop3_top.c b/libproto/pop/pop3_top.c
index ebea77f..c060736 100644
--- a/libproto/pop/pop3_top.c
+++ b/libproto/pop/pop3_top.c
@@ -50,8 +50,8 @@ mu_pop3_top (mu_pop3_t pop3, unsigned msgno, unsigned int lines,
MU_POP3_CHECK_OK (pop3);
status = mu_pop3_stream_create (pop3, pstream);
MU_POP3_CHECK_ERROR (pop3, status);
- if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, XSCRIPT_PAYLOAD))
- _mu_pop3_xscript_level (pop3, XSCRIPT_PAYLOAD);
+ if (mu_pop3_trace_mask (pop3, MU_POP3_TRACE_QRY, MU_XSCRIPT_PAYLOAD))
+ _mu_pop3_xscript_level (pop3, MU_XSCRIPT_PAYLOAD);
pop3->state = MU_POP3_TOP_RX;
case MU_POP3_TOP_RX:
diff --git a/libproto/pop/pop3_trace.c b/libproto/pop/pop3_trace.c
index 514ac3c..5fa3d95 100644
--- a/libproto/pop/pop3_trace.c
+++ b/libproto/pop/pop3_trace.c
@@ -144,7 +144,7 @@ _mu_pop3_xscript_level (mu_pop3_t pop3, int xlev)
{
if (mu_stream_ioctl (pop3->carrier, MU_IOCTL_LEVEL, &xlev) == 0)
return xlev;
- return XSCRIPT_NORMAL;
+ return MU_XSCRIPT_NORMAL;
}
diff --git a/mailbox/xscript-stream.c b/mailbox/xscript-stream.c
index 054ced1..41f28ec 100644
--- a/mailbox/xscript-stream.c
+++ b/mailbox/xscript-stream.c
@@ -107,7 +107,7 @@ print_transcript (struct _mu_xscript_stream *str, int flag,
if (str->flags & TRANS_DISABLED)
return;
- if (str->level == XSCRIPT_PAYLOAD)
+ if (str->level == MU_XSCRIPT_PAYLOAD)
{
mu_stream_printf (str->logstr, "(data...)\n");
str->flags |= TRANS_DISABLED;
@@ -121,7 +121,7 @@ print_transcript (struct _mu_xscript_stream *str, int flag,
if (p > buf && p[-1] == '\r')
len--;
- if (str->level == XSCRIPT_SECURE)
+ if (str->level == MU_XSCRIPT_SECURE)
{
size_t i;
diff --git a/pop3d/extra.c b/pop3d/extra.c
index 461cd52..380435d 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -344,13 +344,13 @@ set_xscript_level (int xlev)
{
if (pop3d_transcript)
{
- if (xlev != XSCRIPT_NORMAL)
+ if (xlev != MU_XSCRIPT_NORMAL)
{
- mu_log_level_t n = xlev == XSCRIPT_SECURE ?
+ mu_log_level_t n = xlev == MU_XSCRIPT_SECURE ?
MU_DEBUG_TRACE6 : MU_DEBUG_TRACE7;
if (mu_global_debug_level ("pop3") & MU_DEBUG_LEVEL_MASK (n))
- return XSCRIPT_NORMAL;
+ return MU_XSCRIPT_NORMAL;
}
if (mu_stream_ioctl (iostream, MU_IOCTL_LEVEL, &xlev) == 0)
diff --git a/pop3d/retr.c b/pop3d/retr.c
index 103b5ef..0ffcd24 100644
--- a/pop3d/retr.c
+++ b/pop3d/retr.c
@@ -47,7 +47,7 @@ pop3d_retr (char *arg)
return ERR_UNKNOWN;
pop3d_outf ("+OK\n");
- xscript_level = set_xscript_level (XSCRIPT_PAYLOAD);
+ xscript_level = set_xscript_level (MU_XSCRIPT_PAYLOAD);
mu_stream_copy (iostream, stream, 0, NULL);
mu_stream_destroy (&stream);
diff --git a/pop3d/top.c b/pop3d/top.c
index cd069c8..6e295bb 100644
--- a/pop3d/top.c
+++ b/pop3d/top.c
@@ -63,7 +63,7 @@ pop3d_top (char *arg)
return ERR_UNKNOWN;
pop3d_outf ("+OK\n");
- xscript_level = set_xscript_level (XSCRIPT_PAYLOAD);
+ xscript_level = set_xscript_level (MU_XSCRIPT_PAYLOAD);
mu_stream_copy (iostream, stream, 0, NULL);
pop3d_outf ("\n");
diff --git a/pop3d/user.c b/pop3d/user.c
index 4147638..e6801b0 100644
--- a/pop3d/user.c
+++ b/pop3d/user.c
@@ -102,7 +102,7 @@ pop3d_user (char *arg)
pop3d_outf ("+OK\n");
pop3d_flush_output ();
- xscript_level = set_xscript_level (XSCRIPT_SECURE);
+ xscript_level = set_xscript_level (MU_XSCRIPT_SECURE);
buf = pop3d_readline (buffer, sizeof (buffer));
pop3d_parse_command (buf, &cmd, &pass);
set_xscript_level (xscript_level);

Return to:

Send suggestions and report system problems to the System administrator.