pos.h
Go to the documentation of this file.
1 #ifndef NVIM_POS_H
2 #define NVIM_POS_H
3 
4 // for INT_MAX, LONG_MAX et al.
5 #include <limits.h>
6 
7 typedef long linenr_T; // line number type
9 #define PRIdLINENR "ld"
10 
12 typedef int colnr_T;
14 #define PRIdCOLNR "d"
15 
17 enum { MAXLNUM = 0x7fffffff, };
19 enum { MAXCOL = INT_MAX, };
20 // Minimum line number
21 enum { MINLNUM = 1, };
22 // minimum column number
23 enum { MINCOL = 1, };
24 
25 /*
26  * position in file or buffer
27  */
28 typedef struct {
29  linenr_T lnum; // line number
30  colnr_T col; // column number
32 } pos_T;
33 
34 
35 /*
36  * Same, but without coladd.
37  */
38 typedef struct {
39  linenr_T lnum; // line number
40  colnr_T col; // column number
41 } lpos_T;
42 
43 #endif // NVIM_POS_H
lpos_T
Definition: pos.h:38
MINCOL
@ MINCOL
Definition: pos.h:23
lpos_T::lnum
linenr_T lnum
Definition: pos.h:39
pos_T::lnum
linenr_T lnum
Definition: pos.h:29
pos_T::col
colnr_T col
Definition: pos.h:30
colnr_T
int colnr_T
Column number type.
Definition: pos.h:12
pos_T
Definition: pos.h:28
pos_T::coladd
colnr_T coladd
Definition: pos.h:31
MAXLNUM
@ MAXLNUM
Definition: pos.h:17
lpos_T::col
colnr_T col
Definition: pos.h:40
MAXCOL
@ MAXCOL
Definition: pos.h:19
linenr_T
long linenr_T
Definition: pos.h:7
MINLNUM
@ MINLNUM
Definition: pos.h:21