update to 1.01
[nvi.git] / common / msg.h
blob66e1b4759758c18a1588344a8f2c2de9e8fc31a4
1 /*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
7 * $Id: msg.h,v 8.8 1993/11/18 13:47:39 bostic Exp $ (Berkeley) $Date: 1993/11/18 13:47:39 $
8 */
11 * M_BERR -- Error: ring a bell if O_VERBOSE not set, else
12 * display in inverse video.
13 * M_ERR -- Error: display in inverse video.
14 * M_INFO -- Info: display in normal video.
15 * M_SYSERR -- M_ERR, but use standard error message.
16 * M_VINFO -- Info: display only if O_VERBOSE set.
18 * In historical vi, O_VERBOSE didn't exist, and O_TERSE made the
19 * error messages shorter. In this version, O_TERSE has no effect
20 * and O_VERBOSE results in informational displays about common
21 * errors.
23 enum msgtype { M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO };
25 typedef struct _msgh MSGH; /* MESG list head structure. */
26 LIST_HEAD(_msgh, _msg);
28 struct _msg {
29 LIST_ENTRY(_msg) q; /* Linked list of messages. */
30 char *mbuf; /* Message buffer. */
31 size_t blen; /* Message buffer length. */
32 size_t len; /* Message length. */
34 #define M_EMPTY 0x01 /* No message. */
35 #define M_INV_VIDEO 0x02 /* Inverse video. */
36 u_int flags; /* Flags. */
39 /* Messages. */
40 void msg_app __P((GS *, SCR *, int, char *, size_t));
41 int msg_rpt __P((SCR *, int));
42 void msgq __P((SCR *, enum msgtype, const char *, ...));