summaryrefslogtreecommitdiff
path: root/usr.bin/vi/mark.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/vi/mark.h')
-rw-r--r--usr.bin/vi/mark.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/usr.bin/vi/mark.h b/usr.bin/vi/mark.h
index 9c28151314b9..04b445298a7e 100644
--- a/usr.bin/vi/mark.h
+++ b/usr.bin/vi/mark.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1992, 1993
+ * Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,22 +30,31 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)mark.h 8.5 (Berkeley) 12/27/93
+ * @(#)mark.h 8.8 (Berkeley) 3/16/94
*/
/*
- * The MARK structure defines a position in the file. Because of the different
- * interfaces used by the db(3) package, curses, and users, the line number is
- * 1 based, while the column number is 0 based. Additionally, it is known that
- * the out-of-band line number is less than any legal line number. The line
- * number is of type recno_t, as that's the underlying type of the database.
- * The column number is of type size_t, guaranteeing that we can malloc a line.
+ * The MARK and LMARK structures define positions in the file. There are
+ * two structures because the mark subroutines are the only places where
+ * anything cares about something other than line and column.
+ *
+ * Because of the different interfaces used by the db(3) package, curses,
+ * and users, the line number is 1 based and the column number is 0 based.
+ * Additionally, it is known that the out-of-band line number is less than
+ * any legal line number. The line number is of type recno_t, as that's
+ * the underlying type of the database. The column number is of type size_t,
+ * guaranteeing that we can malloc a line.
*/
struct _mark {
- LIST_ENTRY(_mark) q; /* Linked list of marks. */
#define OOBLNO 0 /* Out-of-band line number. */
recno_t lno; /* Line number. */
size_t cno; /* Column number. */
+};
+
+struct _lmark {
+ LIST_ENTRY(_lmark) q; /* Linked list of marks. */
+ recno_t lno; /* Line number. */
+ size_t cno; /* Column number. */
CHAR_T name; /* Mark name. */
#define MARK_DELETED 0x01 /* Mark was deleted. */
@@ -57,8 +66,8 @@ struct _mark {
#define ABSMARK2 '`' /* Absolute mark name. */
/* Mark routines. */
-int mark_end __P((SCR *, EXF *));
-MARK *mark_get __P((SCR *, EXF *, ARG_CHAR_T));
-int mark_init __P((SCR *, EXF *));
-void mark_insdel __P((SCR *, EXF *, enum operation, recno_t));
-int mark_set __P((SCR *, EXF *, ARG_CHAR_T, MARK *, int));
+int mark_end __P((SCR *, EXF *));
+int mark_get __P((SCR *, EXF *, ARG_CHAR_T, MARK *));
+int mark_init __P((SCR *, EXF *));
+void mark_insdel __P((SCR *, EXF *, enum operation, recno_t));
+int mark_set __P((SCR *, EXF *, ARG_CHAR_T, MARK *, int));