summaryrefslogtreecommitdiff
path: root/usr.bin/vi/ex/ex_script.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/vi/ex/ex_script.c')
-rw-r--r--usr.bin/vi/ex/ex_script.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/vi/ex/ex_script.c b/usr.bin/vi/ex/ex_script.c
index 50692c2899e..a98bc633fa1 100644
--- a/usr.bin/vi/ex/ex_script.c
+++ b/usr.bin/vi/ex/ex_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_script.c,v 1.11 2003/09/02 22:44:06 dhartmei Exp $ */
+/* $OpenBSD: ex_script.c,v 1.12 2005/10/17 19:12:16 otto Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -385,7 +385,7 @@ sscr_input(sp)
/* Allocate space for rdfd. */
maxfd = STDIN_FILENO;
- for (sp = gp->dq.cqh_first; sp != (void *)&gp->dq; sp = sp->q.cqe_next)
+ CIRCLEQ_FOREACH(sp, &gp->dq, q)
if (F_ISSET(sp, SC_SCRIPT) && sp->script->sh_master > maxfd)
maxfd = sp->script->sh_master;
rdfd = (fd_set *)malloc(howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
@@ -399,7 +399,7 @@ loop: memset(rdfd, 0, howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
tv.tv_usec = 0;
/* Set up the input mask. */
- for (sp = gp->dq.cqh_first; sp != (void *)&gp->dq; sp = sp->q.cqe_next)
+ CIRCLEQ_FOREACH(sp, &gp->dq, q)
if (F_ISSET(sp, SC_SCRIPT))
FD_SET(sp->script->sh_master, rdfd);
@@ -417,7 +417,7 @@ loop: memset(rdfd, 0, howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
}
/* Read the input. */
- for (sp = gp->dq.cqh_first; sp != (void *)&gp->dq; sp = sp->q.cqe_next)
+ CIRCLEQ_FOREACH(sp, &gp->dq, q)
if (F_ISSET(sp, SC_SCRIPT) &&
FD_ISSET(sp->script->sh_master, rdfd) && sscr_insert(sp)) {
free(rdfd);
@@ -626,7 +626,7 @@ sscr_check(sp)
GS *gp;
gp = sp->gp;
- for (sp = gp->dq.cqh_first; sp != (void *)&gp->dq; sp = sp->q.cqe_next)
+ CIRCLEQ_FOREACH(sp, &gp->dq, q)
if (F_ISSET(sp, SC_SCRIPT)) {
F_SET(gp, G_SCRWIN);
return;