use pathnames.h, it now includes enough
[nvi.git] / common / mark.h
blobb9eec196b4e46db2b54085bc71d9e93961a3836c
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.5 1993/12/27 16:49:34 bostic Exp $ (Berkeley) $Date: 1993/12/27 16:49:34 $
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 int mark_end __P((SCR *, EXF *));
35 MARK *mark_get __P((SCR *, EXF *, ARG_CHAR_T));
36 int mark_init __P((SCR *, EXF *));
37 void mark_insdel __P((SCR *, EXF *, enum operation, recno_t));
38 int mark_set __P((SCR *, EXF *, ARG_CHAR_T, MARK *, int));