head	1.6;
access;
symbols
	perseant-exfatfs-base-20250801:1.6
	perseant-exfatfs-base-20240630:1.6
	perseant-exfatfs:1.6.0.46
	perseant-exfatfs-base:1.6
	cjep_sun2x:1.6.0.44
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	cjep_staticlib_x:1.6.0.42
	cjep_staticlib_x-base:1.6
	phil-wifi-20200421:1.6
	phil-wifi-20200411:1.6
	phil-wifi-20200406:1.6
	pgoyette-compat-merge-20190127:1.6
	pgoyette-compat-20190127:1.6
	pgoyette-compat-20190118:1.6
	pgoyette-compat-1226:1.6
	pgoyette-compat-1126:1.6
	pgoyette-compat-1020:1.6
	pgoyette-compat-0930:1.6
	pgoyette-compat-0906:1.6
	pgoyette-compat-0728:1.6
	pgoyette-compat-0625:1.6
	pgoyette-compat-0521:1.6
	pgoyette-compat-0502:1.6
	pgoyette-compat-0422:1.6
	pgoyette-compat-0415:1.6
	pgoyette-compat-0407:1.6
	pgoyette-compat-0330:1.6
	pgoyette-compat-0322:1.6
	pgoyette-compat-0315:1.6
	pgoyette-compat:1.6.0.40
	pgoyette-compat-base:1.6
	perseant-stdc-iso10646:1.6.0.38
	perseant-stdc-iso10646-base:1.6
	prg-localcount2-base3:1.6
	prg-localcount2-base2:1.6
	prg-localcount2-base1:1.6
	prg-localcount2:1.6.0.36
	prg-localcount2-base:1.6
	pgoyette-localcount-20170426:1.6
	bouyer-socketcan-base1:1.6
	pgoyette-localcount-20170320:1.6
	bouyer-socketcan:1.6.0.34
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	pgoyette-localcount-20161104:1.6
	localcount-20160914:1.6
	pgoyette-localcount-20160806:1.6
	pgoyette-localcount-20160726:1.6
	pgoyette-localcount:1.6.0.32
	pgoyette-localcount-base:1.6
	netbsd-5-2-3-RELEASE:1.6
	netbsd-5-1-5-RELEASE:1.6
	yamt-pagecache-base9:1.6
	yamt-pagecache-tag8:1.6
	tls-earlyentropy:1.6.0.28
	tls-earlyentropy-base:1.6
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6
	riastradh-drm2-base3:1.6
	netbsd-5-2-2-RELEASE:1.6
	netbsd-5-1-4-RELEASE:1.6
	netbsd-5-2-1-RELEASE:1.6
	netbsd-5-1-3-RELEASE:1.6
	agc-symver:1.6.0.30
	agc-symver-base:1.6
	tls-maxphys-base:1.6
	yamt-pagecache-base8:1.6
	netbsd-5-2:1.6.0.26
	yamt-pagecache-base7:1.6
	netbsd-5-2-RELEASE:1.6
	netbsd-5-2-RC1:1.6
	yamt-pagecache-base6:1.6
	yamt-pagecache-base5:1.6
	yamt-pagecache-base4:1.6
	netbsd-5-1-2-RELEASE:1.6
	netbsd-5-1-1-RELEASE:1.6
	yamt-pagecache-base3:1.6
	yamt-pagecache-base2:1.6
	yamt-pagecache:1.6.0.24
	yamt-pagecache-base:1.6
	bouyer-quota2-nbase:1.6
	bouyer-quota2:1.6.0.22
	bouyer-quota2-base:1.6
	matt-nb5-pq3:1.6.0.20
	matt-nb5-pq3-base:1.6
	netbsd-5-1:1.6.0.18
	netbsd-5-1-RELEASE:1.6
	netbsd-5-1-RC4:1.6
	netbsd-5-1-RC3:1.6
	netbsd-5-1-RC2:1.6
	netbsd-5-1-RC1:1.6
	netbsd-5-0-2-RELEASE:1.6
	netbsd-5-0-1-RELEASE:1.6
	jym-xensuspend-nbase:1.6
	netbsd-5-0:1.6.0.16
	netbsd-5-0-RELEASE:1.6
	netbsd-5-0-RC4:1.6
	netbsd-5-0-RC3:1.6
	netbsd-5-0-RC2:1.6
	jym-xensuspend:1.6.0.14
	jym-xensuspend-base:1.6
	netbsd-5-0-RC1:1.6
	netbsd-5:1.6.0.12
	netbsd-5-base:1.6
	mjf-devfs2:1.6.0.10
	mjf-devfs2-base:1.6
	yamt-pf42-base4:1.6
	yamt-pf42-base3:1.6
	hpcarm-cleanup-nbase:1.6
	yamt-pf42-base2:1.6
	yamt-pf42:1.6.0.8
	yamt-pf42-base:1.6
	keiichi-mipv6-nbase:1.6
	keiichi-mipv6:1.6.0.6
	keiichi-mipv6-base:1.6
	cube-autoconf:1.6.0.4
	cube-autoconf-base:1.6
	hpcarm-cleanup:1.6.0.2
	hpcarm-cleanup-base:1.6
	netbsd-1-1-PATCH001:1.5
	netbsd-1-1-RELEASE:1.5
	netbsd-1-1:1.5.0.4
	netbsd-1-1-base:1.5
	netbsd-1-0-PATCH06:1.5
	netbsd-1-0-PATCH05:1.5
	netbsd-1-0-PATCH04:1.5
	netbsd-1-0-PATCH03:1.5
	netbsd-1-0-PATCH02:1.5
	netbsd-1-0-PATCH1:1.5
	netbsd-1-0-PATCH0:1.5
	netbsd-1-0-RELEASE:1.5
	netbsd-1-0:1.5.0.2
	nvi-1-34b:1.1.1.4
	nvi-1-33b:1.1.1.3
	netbsd-1-0-base:1.3
	nvi-1-11b:1.1.1.2
	nvi-1-03:1.1.1.1
	bostic-nvi:1.1.1;
locks; strict;
comment	@ * @;


1.6
date	96.05.20.03.48.24;	author mrg;	state dead;
branches;
next	1.5;

1.5
date	94.08.17.20.13.23;	author cgd;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	94.08.17.16.36.37;	author cgd;	state Exp;
branches;
next	1.3;

1.3
date	94.03.28.04.30.13;	author cgd;	state Exp;
branches;
next	1.2;

1.2
date	94.01.24.06.41.03;	author cgd;	state Exp;
branches;
next	1.1;

1.1
date	94.01.24.05.53.14;	author cgd;	state Exp;
branches
	1.1.1.1;
next	;

1.5.2.1
date	94.08.17.20.13.23;	author cgd;	state dead;
branches;
next	1.5.2.2;

1.5.2.2
date	94.08.17.20.13.24;	author cgd;	state Exp;
branches;
next	;

1.1.1.1
date	94.01.24.05.53.15;	author cgd;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	94.03.28.03.00.13;	author cgd;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	94.08.17.16.18.31;	author cgd;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	94.08.17.19.22.49;	author cgd;	state Exp;
branches;
next	;


desc
@@


1.6
log
@merge in nvi 1.66
@
text
@/*-
 * Copyright (c) 1993, 1994
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef lint
static char sccsid[] = "@@(#)sex_refresh.c	8.16 (Berkeley) 8/17/94";
#endif /* not lint */

#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>

#include <bitstring.h>
#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>

#include "compat.h"
#include <curses.h>
#include <db.h>
#include <regex.h>

#include "vi.h"
#include "sex_screen.h"

#ifndef SYSV_CURSES
#define	A_NORMAL	1
#define	A_STANDOUT	2
#define	vidattr(attr)	Xvidattr(sp, attr)

static int	Xvidattr __P((SCR *, int));
#endif

/*
 * sex_refresh --
 *	In ex, just display any messages.
 */
int
sex_refresh(sp, ep)
	SCR *sp;
	EXF *ep;
{
	MSG *mp;

	/* Check for screen resize. */
	if (F_ISSET(sp, S_RESIZE)) {
		sp->rows = O_VAL(sp, O_LINES);
		sp->cols = O_VAL(sp, O_COLUMNS);
		F_CLR(sp, S_RESIZE);
	}

	/* Ring the bell. */
	if (F_ISSET(sp, S_BELLSCHED)) {
		sex_bell(sp);
		F_CLR(sp, S_BELLSCHED);
	}

	/* Display messages. */
	for (mp = sp->msgq.lh_first;
	    mp != NULL && !(F_ISSET(mp, M_EMPTY)); mp = mp->q.le_next) {
		if (F_ISSET(mp, M_INV_VIDEO) &&
		    vidattr(A_STANDOUT) == ERR && O_ISSET(sp, O_ERRORBELLS))
			(void)printf("\07");
		(void)printf("%.*s.\n", (int)mp->len, mp->mbuf);
		F_SET(mp, M_EMPTY);

		if (F_ISSET(mp, M_INV_VIDEO))
			vidattr(A_NORMAL);
		(void)fflush(stdout);
	}
	return (0);
}

#ifndef SYSV_CURSES
/*
 * Xvidattr --
 *	Set the video attributes to a value.
 *
 * XXX
 * Just enough to make the above code work when using non-System V
 * curses.
 */
static int
Xvidattr(sp, attr)
	SCR *sp;
	int attr;
{
	SEX_PRIVATE *sxp;

	sxp = SXP(sp);

	/* Check to see if standout isn't available. */
	if (sxp->SO == NULL)
		return (ERR);

	switch (attr) {
	case A_NORMAL:
		(void)tputs(SXP(sp)->SE, 1, vi_putchar);
		break;
	case A_STANDOUT:
		(void)tputs(SXP(sp)->SO, 1, vi_putchar);
		break;
	default:
		abort();
	}
	return (0);
}
#endif
@


1.5
log
@clean up import.
@
text
@@


1.5.2.1
log
@file sex_refresh.c was added on branch netbsd-1-0 on 1994-08-17 20:13:24 +0000
@
text
@d1 140
@


1.5.2.2
log
@clean up import.
@
text
@a0 140
/*-
 * Copyright (c) 1993, 1994
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef lint
static char sccsid[] = "@@(#)sex_refresh.c	8.16 (Berkeley) 8/17/94";
#endif /* not lint */

#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>

#include <bitstring.h>
#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>

#include "compat.h"
#include <curses.h>
#include <db.h>
#include <regex.h>

#include "vi.h"
#include "sex_screen.h"

#ifndef SYSV_CURSES
#define	A_NORMAL	1
#define	A_STANDOUT	2
#define	vidattr(attr)	Xvidattr(sp, attr)

static int	Xvidattr __P((SCR *, int));
#endif

/*
 * sex_refresh --
 *	In ex, just display any messages.
 */
int
sex_refresh(sp, ep)
	SCR *sp;
	EXF *ep;
{
	MSG *mp;

	/* Check for screen resize. */
	if (F_ISSET(sp, S_RESIZE)) {
		sp->rows = O_VAL(sp, O_LINES);
		sp->cols = O_VAL(sp, O_COLUMNS);
		F_CLR(sp, S_RESIZE);
	}

	/* Ring the bell. */
	if (F_ISSET(sp, S_BELLSCHED)) {
		sex_bell(sp);
		F_CLR(sp, S_BELLSCHED);
	}

	/* Display messages. */
	for (mp = sp->msgq.lh_first;
	    mp != NULL && !(F_ISSET(mp, M_EMPTY)); mp = mp->q.le_next) {
		if (F_ISSET(mp, M_INV_VIDEO) &&
		    vidattr(A_STANDOUT) == ERR && O_ISSET(sp, O_ERRORBELLS))
			(void)printf("\07");
		(void)printf("%.*s.\n", (int)mp->len, mp->mbuf);
		F_SET(mp, M_EMPTY);

		if (F_ISSET(mp, M_INV_VIDEO))
			vidattr(A_NORMAL);
		(void)fflush(stdout);
	}
	return (0);
}

#ifndef SYSV_CURSES
/*
 * Xvidattr --
 *	Set the video attributes to a value.
 *
 * XXX
 * Just enough to make the above code work when using non-System V
 * curses.
 */
static int
Xvidattr(sp, attr)
	SCR *sp;
	int attr;
{
	SEX_PRIVATE *sxp;

	sxp = SXP(sp);

	/* Check to see if standout isn't available. */
	if (sxp->SO == NULL)
		return (ERR);

	switch (attr) {
	case A_NORMAL:
		(void)tputs(SXP(sp)->SE, 1, vi_putchar);
		break;
	case A_STANDOUT:
		(void)tputs(SXP(sp)->SO, 1, vi_putchar);
		break;
	default:
		abort();
	}
	return (0);
}
#endif
@


1.4
log
@clean up import.  still have to hack some things.
@
text
@d35 1
a35 1
static const char sccsid[] = "@@(#)sex_refresh.c	8.15 (Berkeley) 8/17/94";
@


1.3
log
@nvi 1.11(beta) from bostic.  reconcile conflicts/kill rcsids.
@
text
@d35 1
a35 1
static char sccsid[] = "@@(#)sex_refresh.c	8.6 (Berkeley) 3/8/94";
d46 2
d51 1
d58 8
d77 1
d90 1
d93 4
a96 1
		(void)fprintf(stdout, "%.*s\n", (int)mp->len, mp->mbuf);
d98 39
d140 1
@


1.2
log
@more Ids than you'll ever want.
@
text
@d2 1
a2 1
 * Copyright (c) 1993
d35 1
a35 2
/* from: static char sccsid[] = "@@(#)sex_refresh.c	8.5 (Berkeley) 11/18/93"; */
static char *rcsid = "$Id$";
d39 12
@


1.1
log
@Initial revision
@
text
@d35 2
a36 1
static char sccsid[] = "@@(#)sex_refresh.c	8.5 (Berkeley) 11/18/93";
@


1.1.1.1
log
@nvi 1.03, from ftp.cs.berkeley.edu, per keith bostic's permission.
@
text
@@


1.1.1.2
log
@nvi/nex 1.11beta from bostic.
@
text
@d2 1
a2 1
 * Copyright (c) 1993, 1994
d35 1
a35 1
static char sccsid[] = "@@(#)sex_refresh.c	8.6 (Berkeley) 3/8/94";
a38 12
#include <sys/queue.h>
#include <sys/time.h>

#include <bitstring.h>
#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <termios.h>

#include "compat.h"
#include <db.h>
#include <regex.h>
@


1.1.1.3
log
@new public version of nvi
@
text
@d35 1
a35 1
static const char sccsid[] = "@@(#)sex_refresh.c	8.15 (Berkeley) 8/17/94";
a45 2
#include <stdlib.h>
#include <string.h>
a48 1
#include <curses.h>
a54 8
#ifndef SYSV_CURSES
#define	A_NORMAL	1
#define	A_STANDOUT	2
#define	vidattr(attr)	Xvidattr(sp, attr)

static int	Xvidattr __P((SCR *, int));
#endif

a65 1
	/* Check for screen resize. */
a77 1
	/* Display messages. */
d80 1
a80 4
		if (F_ISSET(mp, M_INV_VIDEO) &&
		    vidattr(A_STANDOUT) == ERR && O_ISSET(sp, O_ERRORBELLS))
			(void)printf("\07");
		(void)printf("%.*s.\n", (int)mp->len, mp->mbuf);
a81 39

		if (F_ISSET(mp, M_INV_VIDEO))
			vidattr(A_NORMAL);
		(void)fflush(stdout);
	}
	return (0);
}

#ifndef SYSV_CURSES
/*
 * Xvidattr --
 *	Set the video attributes to a value.
 *
 * XXX
 * Just enough to make the above code work when using non-System V
 * curses.
 */
static int
Xvidattr(sp, attr)
	SCR *sp;
	int attr;
{
	SEX_PRIVATE *sxp;

	sxp = SXP(sp);

	/* Check to see if standout isn't available. */
	if (sxp->SO == NULL)
		return (ERR);

	switch (attr) {
	case A_NORMAL:
		(void)tputs(SXP(sp)->SE, 1, vi_putchar);
		break;
	case A_STANDOUT:
		(void)tputs(SXP(sp)->SO, 1, vi_putchar);
		break;
	default:
		abort();
a84 1
#endif
@


1.1.1.4
log
@new public version of nvi
@
text
@d35 1
a35 1
static char sccsid[] = "@@(#)sex_refresh.c	8.16 (Berkeley) 8/17/94";
@
