Deleted Added
full compact
subr_prf.c (9977) subr_prf.c (9979)
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
1/*-
2 * Copyright (c) 1986, 1988, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
39 * $Id: subr_prf.c,v 1.14 1995/06/14 07:55:07 bde Exp $
39 * $Id: subr_prf.c,v 1.15 1995/08/06 22:00:17 davidg Exp $
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/buf.h>
45#include <sys/conf.h>
46#include <sys/reboot.h>
47#include <sys/msgbuf.h>

--- 451 unchanged lines hidden (view full) ---

499 flags |= TOTTY;
500 }
501 if ((flags & TOTTY) && tp && tputchar(c, tp) < 0 &&
502 (flags & TOCONS) && tp == constty)
503 constty = NULL;
504 if ((flags & TOLOG) &&
505 c != '\0' && c != '\r' && c != 0177 && msgbufmapped) {
506 mbp = msgbufp;
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/buf.h>
45#include <sys/conf.h>
46#include <sys/reboot.h>
47#include <sys/msgbuf.h>

--- 451 unchanged lines hidden (view full) ---

499 flags |= TOTTY;
500 }
501 if ((flags & TOTTY) && tp && tputchar(c, tp) < 0 &&
502 (flags & TOCONS) && tp == constty)
503 constty = NULL;
504 if ((flags & TOLOG) &&
505 c != '\0' && c != '\r' && c != 0177 && msgbufmapped) {
506 mbp = msgbufp;
507 if (mbp->msg_magic != MSG_MAGIC) {
508 bzero((caddr_t)mbp, sizeof(*mbp));
507 if (mbp->msg_magic != MSG_MAGIC ||
508 mbp->msg_bufx >= MSG_BSIZE ||
509 mbp->msg_bufr >= MSG_BSIZE) {
510 bzero(mbp, sizeof(struct msgbuf));
509 mbp->msg_magic = MSG_MAGIC;
510 }
511 mbp->msg_bufc[mbp->msg_bufx++] = c;
512 if (mbp->msg_bufx < 0 || mbp->msg_bufx >= MSG_BSIZE)
513 mbp->msg_bufx = 0;
514 /* If the buffer is full, keep the most recent data. */
515 if (mbp->msg_bufr == mbp->msg_bufx) {
516 if (++mbp->msg_bufr >= MSG_BSIZE)

--- 109 unchanged lines hidden ---
511 mbp->msg_magic = MSG_MAGIC;
512 }
513 mbp->msg_bufc[mbp->msg_bufx++] = c;
514 if (mbp->msg_bufx < 0 || mbp->msg_bufx >= MSG_BSIZE)
515 mbp->msg_bufx = 0;
516 /* If the buffer is full, keep the most recent data. */
517 if (mbp->msg_bufr == mbp->msg_bufx) {
518 if (++mbp->msg_bufr >= MSG_BSIZE)

--- 109 unchanged lines hidden ---