pos.h
Go to the documentation of this file.
1 #ifndef NVIM_POS_H
2 #define NVIM_POS_H
3 
4 typedef long linenr_T; // line number type
6 #define PRIdLINENR "ld"
7 
9 typedef int colnr_T;
11 #define PRIdCOLNR "d"
12 
14 enum { MAXLNUM = 0x7fffffff };
16 enum { MAXCOL = 0x7fffffff };
17 
18 /*
19  * position in file or buffer
20  */
21 typedef struct {
22  linenr_T lnum; /* line number */
23  colnr_T col; /* column number */
25 } pos_T;
26 
27 # define INIT_POS_T(l, c, ca) {l, c, ca}
28 
29 /*
30  * Same, but without coladd.
31  */
32 typedef struct {
33  linenr_T lnum; /* line number */
34  colnr_T col; /* column number */
35 } lpos_T;
36 
37 #endif // NVIM_POS_H
Definition: pos.h:16
int colnr_T
Column number type.
Definition: pos.h:9
colnr_T col
Definition: pos.h:23
colnr_T coladd
Definition: pos.h:24
linenr_T lnum
Definition: pos.h:22
linenr_T lnum
Definition: pos.h:33
Definition: pos.h:32
long linenr_T
Definition: pos.h:4
Definition: pos.h:21
Definition: pos.h:14
colnr_T col
Definition: pos.h:34