Removed the -clear switch from scan(1).
authormarkus schnalke <meillo@marmaro.de>
Fri, 10 Feb 2012 10:55:48 +0000 (11:55 +0100)
committermarkus schnalke <meillo@marmaro.de>
Fri, 10 Feb 2012 10:55:48 +0000 (11:55 +0100)
If you want to have a clear or form-feed, call `clear' or `printf "\f"' at
the shell level. Anyway, what's the sense of a clear *after* the scan output?

docs/COMPLETION-BASH
docs/COMPLETION-ZSH
man/mh-chart.man1
man/scan.man1
uip/scan.c

index 3f3829c..e4af65d 100644 (file)
@@ -105,7 +105,7 @@ _nmh()
             options=(-link -nolink -version -help)
             ;;
         scan )
             options=(-link -nolink -version -help)
             ;;
         scan )
-            options=(-clear -noclear -form -header -noheader
+            options=(-form -header -noheader
                     -width -file -version -help )
             ;;
         show )
                     -width -file -version -help )
             ;;
         show )
index f6d0197..da0b027 100644 (file)
@@ -149,7 +149,7 @@ compctl -K mhfseq -x 's[+][@]' \
   rmmproc normmproc help)" -- refile
 
 compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
   rmmproc normmproc help)" -- refile
 
 compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
-  's[-]' -k "(clear noclear form \
+  's[-]' -k "(form \
   file help width)" - 'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile -- scan
 
 compctl -K mhfseq -x 's[+][@]'  -K mhcomp -S / -q - \
   file help width)" - 'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile -- scan
 
 compctl -K mhfseq -x 's[+][@]'  -K mhcomp -S / -q - \
index 4da4094..afb3fc1 100644 (file)
@@ -545,7 +545,6 @@ all/to/cc/me]
 .B scan
 .RI [ +folder ]
 .RI [ msgs ]
 .B scan
 .RI [ +folder ]
 .RI [ msgs ]
-.RB [ \-clear " | " \-noclear ]
 .RB [ \-form
 .IR formatfile ]
 .RB [ \-width
 .RB [ \-form
 .IR formatfile ]
 .RB [ \-width
index 2b9c0f6..e4c357a 100644 (file)
@@ -10,7 +10,6 @@ scan \- produce a one line per message scan listing
 .B scan
 .RI [ +folder ]
 .RI [ msgs ]
 .B scan
 .RI [ +folder ]
 .RI [ msgs ]
-.RB [ \-clear " | " \-noclear ]
 .RB [ \-form
 .IR formatfile ]
 .RB [ \-width
 .RB [ \-form
 .IR formatfile ]
 .RB [ \-width
@@ -84,38 +83,16 @@ The switch
 may be used to specify the width of
 the scan line.  The default is to use the width of the terminal.
 .PP
 may be used to specify the width of
 the scan line.  The default is to use the width of the terminal.
 .PP
-If the
-.B \-clear
-switch is used and
-.BR scan 's
-output is directed
-to a terminal, then
-.B scan
-will consult the environment variables
-.B $TERM
-and
-.B $TERMCAP
-to determine your terminal type in order
-to find out how to clear the screen prior to exiting.  If the
-.B \-clear
-switch is used and
-.BR scan 's
-output is not directed to a terminal
-(e.g., a pipe or a file), then
-.B scan
-will send a formfeed prior
-to exiting.
-.PP
-For example, the command:
+The command:
 .PP
 .RS 5
 .PP
 .RS 5
-(scan \-clear ; show all \-show pr \-f) | lpr
+(scan | pr ; show a \-showproc pr) | lpr
 .RE
 .PP
 .RE
 .PP
-produces a scan listing of the current folder, followed by a formfeed,
+produces a scan listing of the current folder,
 followed by a formatted listing of all messages in the folder, one
 per page.  Omitting
 followed by a formatted listing of all messages in the folder, one
 per page.  Omitting
-.RB \*(lq "\-show\ pr\ \-f" \*(rq
+.RB \*(lq "\-showproc\ pr" \*(rq
 will cause the messages to be
 concatenated, separated by a one\-line header and two blank lines.
 .PP
 will cause the messages to be
 concatenated, separated by a one\-line header and two blank lines.
 .PP
index cfcd3e4..1b58eb5 100644 (file)
 #include <errno.h>
 
 static struct swit switches[] = {
 #include <errno.h>
 
 static struct swit switches[] = {
-#define CLRSW  0
-       { "clear", 0 },
-#define NCLRSW  1
-       { "noclear", 0 },
-#define FORMSW  2
+#define FORMSW  0
        { "form formatfile", 0 },
        { "form formatfile", 0 },
-#define WIDTHSW  3
+#define WIDTHSW  1
        { "width columns", 0 },
        { "width columns", 0 },
-#define FILESW  4
+#define FILESW  2
        { "file file", 4 },
        { "file file", 4 },
-#define VERSIONSW 5
+#define VERSIONSW 3
        { "version", 0 },
        { "version", 0 },
-#define HELPSW  6
+#define HELPSW  4
        { "help", 0 },
        { NULL, 0 }
 };
 
 
        { "help", 0 },
        { NULL, 0 }
 };
 
 
-/*
-** prototypes
-*/
-void clear_screen(void);  /* from termsbr.c */
-
-
 int
 main(int argc, char **argv)
 {
 int
 main(int argc, char **argv)
 {
-       int clearflag = 0, ontty;
+       int ontty;
        int width = 0;
        int i, state, msgnum;
        int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
        int width = 0;
        int i, state, msgnum;
        int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
@@ -83,13 +73,6 @@ main(int argc, char **argv)
                                print_version(invo_name);
                                done(1);
 
                                print_version(invo_name);
                                done(1);
 
-                       case CLRSW:
-                               clearflag++;
-                               continue;
-                       case NCLRSW:
-                               clearflag = 0;
-                               continue;
-
                        case FORMSW:
                                if (!(form = *argp++) || *form == '-')
                                        adios(NULL, "missing argument to %s",
                        case FORMSW:
                                if (!(form = *argp++) || *form == '-')
                                        adios(NULL, "missing argument to %s",
@@ -248,8 +231,6 @@ main(int argc, char **argv)
        }
 
        folder_free(mp);  /* free folder/message structure */
        }
 
        folder_free(mp);  /* free folder/message structure */
-       if (clearflag)
-               clear_screen();
 
        done(0);
        return 1;
 
        done(0);
        return 1;