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 $
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.
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. */
30 #define ABSMARK1 '\'' /* Absolute mark name. */
31 #define ABSMARK2 '`' /* Absolute mark name. */
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));