lint
[nvi.git] / common / mark.h
blob98ce03e9af5519ed8946c5c9aceb4c004a4d5b8e
1 /*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
7 * $Id: mark.h,v 8.4 1993/11/18 08:17:09 bostic Exp $ (Berkeley) $Date: 1993/11/18 08:17:09 $
8 */
11 * The MARK structure defines a position in the file. Because of the different
12 * interfaces used by the db(3) package, curses, and users, the line number is
13 * 1 based, while the column number is 0 based. Additionally, it is known that
14 * the out-of-band line number is less than any legal line number. The line
15 * number is of type recno_t, as that's the underlying type of the database.
16 * The column number is of type size_t, guaranteeing that we can malloc a line.
18 struct _mark {
19 LIST_ENTRY(_mark) q; /* Linked list of marks. */
20 #define OOBLNO 0 /* Out-of-band line number. */
21 recno_t lno; /* Line number. */
22 size_t cno; /* Column number. */
23 CHAR_T name; /* Mark name. */
25 #define MARK_DELETED 0x01 /* Mark was deleted. */
26 #define MARK_USERSET 0x02 /* User set this mark. */
27 u_char flags;
30 #define ABSMARK1 '\'' /* Absolute mark name. */
31 #define ABSMARK2 '`' /* Absolute mark name. */
33 /* Mark routines. */
34 void mark_delete __P((SCR *, EXF *, recno_t));
35 int mark_end __P((SCR *, EXF *));
36 MARK *mark_get __P((SCR *, EXF *, ARG_CHAR_T));
37 int mark_init __P((SCR *, EXF *));
38 void mark_insert __P((SCR *, EXF *, recno_t));
39 int mark_set __P((SCR *, EXF *, ARG_CHAR_T, MARK *, int));