summaryrefslogtreecommitdiff
path: root/ex/ex_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ex/ex_screen.c')
-rw-r--r--ex/ex_screen.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/ex/ex_screen.c b/ex/ex_screen.c
index 9bc5bf04b06a4..9cb108f976a70 100644
--- a/ex/ex_screen.c
+++ b/ex/ex_screen.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)ex_screen.c 10.11 (Berkeley) 6/29/96";
+static const char sccsid[] = "$Id: ex_screen.c,v 10.12 2001/06/25 15:19:19 skimo Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -33,9 +33,7 @@ static const char sccsid[] = "@(#)ex_screen.c 10.11 (Berkeley) 6/29/96";
* PUBLIC: int ex_bg __P((SCR *, EXCMD *));
*/
int
-ex_bg(sp, cmdp)
- SCR *sp;
- EXCMD *cmdp;
+ex_bg(SCR *sp, EXCMD *cmdp)
{
return (vs_bg(sp));
}
@@ -47,9 +45,7 @@ ex_bg(sp, cmdp)
* PUBLIC: int ex_fg __P((SCR *, EXCMD *));
*/
int
-ex_fg(sp, cmdp)
- SCR *sp;
- EXCMD *cmdp;
+ex_fg(SCR *sp, EXCMD *cmdp)
{
SCR *nsp;
int newscreen;
@@ -73,9 +69,7 @@ ex_fg(sp, cmdp)
* PUBLIC: int ex_resize __P((SCR *, EXCMD *));
*/
int
-ex_resize(sp, cmdp)
- SCR *sp;
- EXCMD *cmdp;
+ex_resize(SCR *sp, EXCMD *cmdp)
{
adj_t adj;
@@ -104,22 +98,21 @@ ex_resize(sp, cmdp)
* PUBLIC: int ex_sdisplay __P((SCR *));
*/
int
-ex_sdisplay(sp)
- SCR *sp;
+ex_sdisplay(SCR *sp)
{
GS *gp;
SCR *tsp;
int cnt, col, len, sep;
gp = sp->gp;
- if ((tsp = gp->hq.cqh_first) == (void *)&gp->hq) {
+ if ((tsp = TAILQ_FIRST(gp->hq)) == NULL) {
msgq(sp, M_INFO, "149|No background screens to display");
return (0);
}
col = len = sep = 0;
- for (cnt = 1; tsp != (void *)&gp->hq && !INTERRUPTED(sp);
- tsp = tsp->q.cqe_next) {
+ for (cnt = 1; tsp != NULL && !INTERRUPTED(sp);
+ tsp = TAILQ_NEXT(tsp, q)) {
col += len = strlen(tsp->frp->name) + sep;
if (col >= sp->cols - 1) {
col = len;