projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Syntactic and comment changes.
[mmh]
/
uip
/
scan.c
diff --git
a/uip/scan.c
b/uip/scan.c
index
cb4bac4
..
a11ca0d
100644
(file)
--- a/
uip/scan.c
+++ b/
uip/scan.c
@@
-23,21
+23,13
@@
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
- { "reverse", 0 },
-#define NREVSW 8
- { "noreverse", 0 },
-#define FILESW 9
+#define FILESW 5
{ "file file", 4 },
{ "file file", 4 },
-#define VERSIONSW 10
+#define VERSIONSW 6
{ "version", 0 },
{ "version", 0 },
-#define HELPSW 11
+#define HELPSW 7
{ "help", 0 },
{ NULL, 0 }
};
{ "help", 0 },
{ NULL, 0 }
};
@@
-52,8
+44,8
@@
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 width = 0, revflag = 0;
+ int clearflag = 0, ontty;
+ int width = 0;
int i, state, msgnum;
int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
char *cp, *maildir, *file = NULL, *folder = NULL;
int i, state, msgnum;
int seqnum[NUMATTRS], unseen, num_unseen_seq = 0;
char *cp, *maildir, *file = NULL, *folder = NULL;
@@
-115,25
+107,12
@@
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",
argp[-2]);
width = atoi(cp);
continue;
case WIDTHSW:
if (!(cp = *argp++) || *cp == '-')
adios(NULL, "missing argument to %s",
argp[-2]);
width = atoi(cp);
continue;
- case REVSW:
- revflag++;
- continue;
- case NREVSW:
- revflag = 0;
- continue;
case FILESW:
if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
case FILESW:
if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
@@
-178,7
+157,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;
}
@@
-239,9
+218,7
@@
main(int argc, char **argv)
ontty = isatty(fileno(stdout));
ontty = isatty(fileno(stdout));
- for (msgnum = revflag ? mp->hghsel : mp->lowsel;
- (revflag ? msgnum >= mp->lowsel : msgnum <= mp->hghsel);
- msgnum += (revflag ? -1 : 1)) {
+ for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
if (is_selected(mp, msgnum)) {
if ((in = fopen(cp = m_name(msgnum), "r")) == NULL) {
admonish(cp, "unable to open message");
if (is_selected(mp, msgnum)) {
if ((in = fopen(cp = m_name(msgnum), "r")) == NULL) {
admonish(cp, "unable to open message");
@@
-275,7
+252,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);