commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. release-2.2-533-ga837453


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-533-ga837453
Date: Fri, 16 Dec 2011 09:40:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=a837453677a2888155aa565666acc956cdd3f896

The branch, master has been updated
       via  a837453677a2888155aa565666acc956cdd3f896 (commit)
      from  fa42589cef090379bda4ea4e0838474520f9f4f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a837453677a2888155aa565666acc956cdd3f896
Author: Sergey Poznyakoff <address@hidden>
Date:   Fri Dec 16 11:39:30 2011 +0200

    Minor cleanup in imap client.
    
    * include/mailutils/imap.h (mu_imap_session_state): Remove.
    (mu_imap_state): Rename to mu_imap_session_state.
    (mu_imap_state_str): Rename to mu_imap_session_state_str.
    * libproto/imap/create.c (mu_imap_session_state)
    (mu_imap_iserror,mu_imap_clearerr): Move to state.c
    * mu/imap.c: Update accordingly.

-----------------------------------------------------------------------

Summary of changes:
 include/mailutils/imap.h |    5 ++---
 libproto/imap/create.c   |   26 --------------------------
 libproto/imap/state.c    |   30 ++++++++++++++++++++++++------
 mu/imap.c                |    5 +++--
 4 files changed, 29 insertions(+), 37 deletions(-)

diff --git a/include/mailutils/imap.h b/include/mailutils/imap.h
index ab20716..63a5eae 100644
--- a/include/mailutils/imap.h
+++ b/include/mailutils/imap.h
@@ -47,7 +47,6 @@ void mu_imap_destroy (mu_imap_t *pimap);
 int mu_imap_connect (mu_imap_t imap);
 int mu_imap_disconnect (mu_imap_t imap);
 
-int mu_imap_session_state (mu_imap_t imap);
 int mu_imap_iserror (mu_imap_t imap);
 void mu_imap_clearerr (mu_imap_t imap);
   
@@ -126,8 +125,8 @@ int mu_imap_trace_mask (mu_imap_t imap, int op, int lev);
 
 int mu_imap_strerror (mu_imap_t imap, const char **pstr);
 
-int mu_imap_state (mu_imap_t imap, int *pstate);
-int mu_imap_state_str (int state, const char **pstr);
+int mu_imap_session_state (mu_imap_t imap);
+int mu_imap_session_state_str (int state, const char **pstr);
 
 int mu_imap_tag (mu_imap_t imap, const char **pseq);
 
diff --git a/libproto/imap/create.c b/libproto/imap/create.c
index 5aebcae..8ddc4cd 100644
--- a/libproto/imap/create.c
+++ b/libproto/imap/create.c
@@ -65,29 +65,3 @@ _mu_imap_init (mu_imap_t imap)
   return 0;
 }
 
-int
-mu_imap_session_state (mu_imap_t imap)
-{
-  if (!imap)
-    return -1;
-  return imap->session_state;
-}
-
-int
-mu_imap_iserror (mu_imap_t imap)
-{
-  if (!imap)
-    return -1;
-  return imap->client_state == MU_IMAP_CLIENT_ERROR;
-}
-
-void
-mu_imap_clearerr (mu_imap_t imap)
-{
-  if (imap)
-    {
-      imap->client_state = MU_IMAP_CLIENT_READY;
-      if (imap->io)
-       mu_imapio_clearerr (imap->io);
-    }
-}
diff --git a/libproto/imap/state.c b/libproto/imap/state.c
index a957aa1..b7d2028 100644
--- a/libproto/imap/state.c
+++ b/libproto/imap/state.c
@@ -32,19 +32,37 @@ const char *_mu_imap_state_name[] = {
 int _mu_imap_state_count = MU_ARRAY_SIZE (_mu_imap_state_name);
 
 int
-mu_imap_state (mu_imap_t imap, int *pstate)
+mu_imap_session_state (mu_imap_t imap)
 {
-  if (imap == NULL || pstate == NULL)
-    return EINVAL;
-  *pstate = imap->session_state;
-  return 0;
+  if (!imap)
+    return -1;
+  return imap->session_state;
 }
 
 int
-mu_imap_state_str (int state, const char **pstr)
+mu_imap_session_state_str (int state, const char **pstr)
 {
   if (state < 0 || state >= _mu_imap_state_count)
     return EINVAL;
   *pstr = gettext (_mu_imap_state_name[state]);
   return 0;
 }
+
+int
+mu_imap_iserror (mu_imap_t imap)
+{
+  if (!imap)
+    return -1;
+  return imap->client_state == MU_IMAP_CLIENT_ERROR;
+}
+
+void
+mu_imap_clearerr (mu_imap_t imap)
+{
+  if (imap)
+    {
+      imap->client_state = MU_IMAP_CLIENT_READY;
+      if (imap->io)
+       mu_imapio_clearerr (imap->io);
+    }
+}
diff --git a/mu/imap.c b/mu/imap.c
index 2bebae4..92e9c42 100644
--- a/mu/imap.c
+++ b/mu/imap.c
@@ -70,7 +70,7 @@ current_imap_state ()
   if (imap == NULL)
     state = MU_IMAP_SESSION_INIT;
   else
-    mu_imap_state (imap, &state);
+    state = mu_imap_session_state (imap);
   return state;
 }
 
@@ -152,7 +152,8 @@ imap_prompt_env ()
   mutool_prompt_env[11] = PACKAGE_VERSION;
 
   mutool_prompt_env[12] = "status";
-  if (mu_imap_state_str (state, (const char **) &mutool_prompt_env[13]))
+  if (mu_imap_session_state_str (state,
+                                (const char **) &mutool_prompt_env[13]))
     mutool_prompt_env[12] = NULL;
 
   mutool_prompt_env[14] = NULL;


hooks/post-receive
-- 
GNU Mailutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]