Removed the -header option from scan(1).
authormarkus schnalke <meillo@marmaro.de>
Wed, 25 Jan 2012 21:29:34 +0000 (22:29 +0100)
committermarkus schnalke <meillo@marmaro.de>
Wed, 25 Jan 2012 21:29:34 +0000 (22:29 +0100)
The heading had been very simple since the advent of format strings anyway.
If someone wants a heading, he can run folder(1) before.

man/mh-chart.man1
man/scan.man1
uip/scan.c

index 3a1ffa2..94000d7 100644 (file)
@@ -600,7 +600,6 @@ all/to/cc/me]
 .IR formatfile ]
 .RB [ \-format
 .IR string ]
 .IR formatfile ]
 .RB [ \-format
 .IR string ]
-.RB [ \-header " | " \-noheader ]
 .RB [ \-width
 .IR columns ]
 .RB [ \-reverse " | " \-noreverse ]
 .RB [ \-width
 .IR columns ]
 .RB [ \-reverse " | " \-noreverse ]
index a4007d3..30021bc 100644 (file)
@@ -15,7 +15,6 @@ scan \- produce a one line per message scan listing
 .IR formatfile ]
 .RB [ \-format
 .IR string ]
 .IR formatfile ]
 .RB [ \-format
 .IR string ]
-.RB [ \-header " | " \-noheader ]
 .RB [ \-width
 .IR columns ]
 .RB [ \-reverse " | " \-noreverse ]
 .RB [ \-width
 .IR columns ]
 .RB [ \-reverse " | " \-noreverse ]
@@ -103,15 +102,6 @@ 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
-The
-.B \-header
-switch produces a header line prior to the
-.B scan
-listing.  Currently, the name of the folder and the current date and
-time are output (see the
-.B HISTORY
-section for more information).
-.PP
 If the
 .B \-clear
 switch is used and
 If the
 .B \-clear
 switch is used and
@@ -137,7 +127,7 @@ to exiting.
 For example, the command:
 .PP
 .RS 5
 For example, the command:
 .PP
 .RS 5
-(scan \-clear \-header; show all \-show pr \-f) | lpr
+(scan \-clear ; show all \-show pr \-f) | lpr
 .RE
 .PP
 produces a scan listing of the current folder, followed by a formfeed,
 .RE
 .PP
 produces a scan listing of the current folder, followed by a formfeed,
@@ -224,20 +214,12 @@ inc(1), pick(1), show(1), mh\-format(5)
 .RB ` +folder "' defaults to the current folder"
 .RB ` msgs "' defaults to all"
 .RB ` \-format "' defaulted as described above"
 .RB ` +folder "' defaults to the current folder"
 .RB ` msgs "' defaults to all"
 .RB ` \-format "' defaulted as described above"
-.RB ` \-noheader '
 .RB ` \-width "' defaulted to the width of the terminal"
 .fi
 
 .SH CONTEXT
 If a folder is given, it will become the current folder.
 
 .RB ` \-width "' defaulted to the width of the terminal"
 .fi
 
 .SH CONTEXT
 If a folder is given, it will become the current folder.
 
-.SH HISTORY
-Prior to using the format string mechanism,
-.B \-header
-used to generate
-a heading saying what each column in the listing was.  Format strings
-prevent this from happening.
-
 .SH BUGS
 The argument to the
 .B \-format
 .SH BUGS
 The argument to the
 .B \-format
index cb4bac4..e5fb55a 100644 (file)
@@ -23,21 +23,17 @@ static struct swit switches[] = {
        { "form formatfile", 0 },
 #define FMTSW  3
        { "format string", 5 },
        { "form formatfile", 0 },
 #define FMTSW  3
        { "format string", 5 },
-#define HEADSW  4
-       { "header", 0 },
-#define NHEADSW  5
-       { "noheader", 0 },
-#define WIDTHSW  6
+#define WIDTHSW  4
        { "width columns", 0 },
        { "width columns", 0 },
-#define REVSW  7
+#define REVSW  5
        { "reverse", 0 },
        { "reverse", 0 },
-#define NREVSW  8
+#define NREVSW  6
        { "noreverse", 0 },
        { "noreverse", 0 },
-#define FILESW  9
+#define FILESW  7
        { "file file", 4 },
        { "file file", 4 },
-#define VERSIONSW 10
+#define VERSIONSW 8
        { "version", 0 },
        { "version", 0 },
-#define HELPSW  11
+#define HELPSW  9
        { "help", 0 },
        { NULL, 0 }
 };
        { "help", 0 },
        { NULL, 0 }
 };
@@ -52,7 +48,7 @@ void clear_screen(void);  /* from termsbr.c */
 int
 main(int argc, char **argv)
 {
 int
 main(int argc, char **argv)
 {
-       int clearflag = 0, hdrflag = 0, ontty;
+       int clearflag = 0, ontty;
        int width = 0, revflag = 0;
        int i, state, msgnum;
        int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
        int width = 0, revflag = 0;
        int i, state, msgnum;
        int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
@@ -115,13 +111,6 @@ main(int argc, char **argv)
                                form = NULL;
                                continue;
 
                                form = NULL;
                                continue;
 
-                       case HEADSW:
-                               hdrflag++;
-                               continue;
-                       case NHEADSW:
-                               hdrflag = 0;
-                               continue;
-
                        case WIDTHSW:
                                if (!(cp = *argp++) || *cp == '-')
                                        adios(NULL, "missing argument to %s",
                        case WIDTHSW:
                                if (!(cp = *argp++) || *cp == '-')
                                        adios(NULL, "missing argument to %s",
@@ -178,7 +167,7 @@ main(int argc, char **argv)
                m_unknown(in);
                for (msgnum = 1; ; ++msgnum) {
                        state = scan(in, msgnum, -1, nfs, width, 0, 0,
                m_unknown(in);
                for (msgnum = 1; ; ++msgnum) {
                        state = scan(in, msgnum, -1, nfs, width, 0, 0,
-                                       hdrflag ? file : NULL, 0L, 1);
+                                       NULL, 0L, 1);
                        if (state != SCNMSG && state != SCNENC)
                                break;
                }
                        if (state != SCNMSG && state != SCNENC)
                                break;
                }
@@ -275,7 +264,6 @@ main(int argc, char **argv)
                                advise(NULL, "message %d: empty", msgnum);
                                break;
                        }
                                advise(NULL, "message %d: empty", msgnum);
                                break;
                        }
-                       hdrflag = 0;
                        fclose(in);
                        if (ontty)
                                fflush(stdout);
                        fclose(in);
                        if (ontty)
                                fflush(stdout);