commit 3599542683b933ea98127fa214ca3c751b851c23
Author: Oswald Buddenhagen <[email protected]>
Date:   Sat Feb 6 10:40:36 2010 +0100

    add extra verbose mode which dumps the message contents
    
    i needed that to debug the line ending issues. maybe it will find other
    uses as well ...

 src/compat/main.c |    4 ++--
 src/drv_imap.c    |    5 +++++
 src/isync.h       |    7 ++++---
 src/main.c        |   14 ++++++++++----
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/src/compat/main.c b/src/compat/main.c
index faeaadc..3255bb5 100644
--- a/src/compat/main.c
+++ b/src/compat/main.c
@@ -270,7 +270,7 @@ main( int argc, char **argv )
                        Debug = 1;
                        break;
                case 'V':
-                       Verbose = 1;
+                       Verbose++;
                        break;
                case 'q':
                        Quiet++;
@@ -390,7 +390,7 @@ main( int argc, char **argv )
                return 0;
        args = 0;
        add_arg( &args, "mbsync" );
-       if (Verbose)
+       while (--Verbose >= 0)
                add_arg( &args, "-V" );
        if (Debug)
                add_arg( &args, "-D" );
diff --git a/src/drv_imap.c b/src/drv_imap.c
index dc90678..d50fe11 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -696,6 +696,11 @@ parse_imap_list_l( imap_store_t *ctx, char **sp, list_t 
**curp, int level )
                                s += n;
                                bytes -= n;
                        }
+                       if (DFlags & XVERBOSE) {
+                               puts( "=========" );
+                               fwrite( cur->val, cur->len, 1, stdout );
+                               puts( "=========" );
+                       }
 
                        if (buffer_gets( &ctx->buf, &s ))
                                goto bail;
diff --git a/src/isync.h b/src/isync.h
index 8e7ec51..79cc9a9 100644
--- a/src/isync.h
+++ b/src/isync.h
@@ -227,9 +227,10 @@ extern const char *Home;
 
 #define DEBUG        1
 #define VERBOSE      2
-#define QUIET        4
-#define VERYQUIET    8
-#define KEEPJOURNAL  16
+#define XVERBOSE     4
+#define QUIET        8
+#define VERYQUIET    16
+#define KEEPJOURNAL  32
 
 extern int DFlags, Ontty;
 
diff --git a/src/main.c b/src/main.c
index 1bb0418..107c2e8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -265,9 +265,12 @@ main( int argc, char **argv )
                                                DFlags |= VERYQUIET;
                                        else
                                                DFlags |= QUIET;
-                               } else if (!strcmp( opt, "verbose" ))
-                                       DFlags |= VERBOSE | QUIET;
-                               else if (!strcmp( opt, "debug" ))
+                               } else if (!strcmp( opt, "verbose" )) {
+                                       if (DFlags & VERBOSE)
+                                               DFlags |= XVERBOSE;
+                                       else
+                                               DFlags |= VERBOSE | QUIET;
+                               } else if (!strcmp( opt, "debug" ))
                                        DFlags |= DEBUG | QUIET;
                                else if (!strcmp( opt, "pull" ))
                                        cops |= XOP_PULL, mvars->ops[M] |= 
XOP_HAVE_TYPE;
@@ -424,7 +427,10 @@ main( int argc, char **argv )
                                DFlags |= QUIET;
                        break;
                case 'V':
-                       DFlags |= VERBOSE | QUIET;
+                       if (DFlags & VERBOSE)
+                               DFlags |= XVERBOSE;
+                       else
+                               DFlags |= VERBOSE | QUIET;
                        break;
                case 'D':
                        DFlags |= DEBUG | QUIET;

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to