/* Copyright (c) 1979 Regents of the University of California */
* Print the current active headings.
register struct message
*mp
;
mp
= &message
[screen
* SCREEN
];
if (mp
> &message
[msgCount
])
mp
= &message
[msgCount
- SCREEN
];
for (; mp
< &message
[msgCount
]; mp
++) {
if (mp
->m_flag
& MDELETED
)
printf("No more messages.\n");
* Print out the headlines for each message
* in the passed message list.
for (ip
= msgvec
; *ip
!= NULL
; ip
++) {
* Print out the header of a specific message.
* This is a slight improvement to the standard one.
char headline
[LINESIZE
], wcount
[10], *subjline
, dispc
;
readline(ibuf
, headline
);
subjline
= hfield("subj", mp
);
else if (mp
->m_flag
& MPRESERVED
)
sprintf(wcount
, " %d/%d", mp
->m_lines
, mp
->m_size
);
printf("%c%3d %-8s %16.16s %s \"%s\"\n", dispc
, mesg
,
hl
.l_from
, hl
.l_date
, wcount
, subjline
);
printf("%c%3d %-8s %16.16s %s\n", dispc
, mesg
,
hl
.l_from
, hl
.l_date
, wcount
);
* Print out the value of dot.
printf("%d\n", dot
- &message
[0] + 1);
* Print out all the possible commands.
extern struct cmd cmdtab
[];
printf("Commands are:\n");
for (cc
= 0, cp
= cmdtab
; cp
->c_name
!= NULL
; cp
++) {
cc
+= strlen(cp
->c_name
) + 2;
cc
= strlen(cp
->c_name
) + 2;
if ((cp
+1)->c_name
!= NOSTR
)
printf("%s, ", cp
->c_name
);
printf("%s\n", cp
->c_name
);
* Go to the previous message and type it.
* If at the top, just bitch.
register struct message
*mp
;
printf("Nonzero address required\n");
list
[0] = dot
- &message
[0] + 1;
* Type out the messages requested.
register struct message
*mp
;
for (ip
= msgvec
; *ip
&& ip
-msgvec
< msgCount
; ip
++) {
* Print the indicated message on standard output.
register struct message
*mp
;
if (value("quiet") == NOSTR
)
printf("Message %2d:\n", mp
- &message
[0] + 1);
touch(mp
- &message
[0] + 1);
* Print the top so many lines of each desired message.
* The number of lines is taken from the variable "toplines"
register struct message
*mp
;
int c
, topl
, lines
, lineb
;
char *valtop
, linebuf
[LINESIZE
];
valtop
= value("toplines");
if (topl
< 0 || topl
> 10000)
for (ip
= msgvec
; *ip
&& ip
-msgvec
< msgCount
; ip
++) {
if (value("quiet") == NOSTR
)
printf("Message %2d:\n", mesg
);
for (lines
= 0; lines
< c
&& lines
<= topl
; lines
++) {
if (readline(ibuf
, linebuf
) <= 0)
lineb
= blankline(linebuf
);
* Touch all the given messages so that they will
for (ip
= msgvec
; *ip
!= 0; ip
++) {