pos: define MAXCOL to INT_MAX

Partial port of patch v8.1.0953.
Remove useless casts on MAXCOL.
This commit is contained in:
Jan Edmund Lazo
2021-02-23 22:49:57 -05:00
parent ceed85ea43
commit ab5083b5fc
11 changed files with 41 additions and 37 deletions

View File

@@ -1,6 +1,9 @@
#ifndef NVIM_POS_H
#define NVIM_POS_H
// for INT_MAX, LONG_MAX et al.
#include <limits.h>
typedef long linenr_T; // line number type
/// Format used to print values which have linenr_T type
#define PRIdLINENR "ld"
@@ -12,8 +15,8 @@ typedef int colnr_T;
/// Maximal (invalid) line number
enum { MAXLNUM = 0x7fffffff };
/// Maximal column number, 31 bits
enum { MAXCOL = 0x7fffffff };
/// Maximal column number
enum { MAXCOL = INT_MAX };
// Minimum line number
enum { MINLNUM = 1 };
// minimum column number