diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-12 18:23:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-12 18:23:53 +0100 |
commit | b5aedf3e228d35821591da9ae8501b61cf2e264c (patch) | |
tree | 39cdf29566db1e5ed8b2235d2b0240c859163bd8 /src/macros.h | |
parent | 8774845ce1a7def122ea07c057a79417f3be3d17 (diff) | |
download | vim-git-b5aedf3e228d35821591da9ae8501b61cf2e264c.tar.gz |
patch 8.0.0448: some macros are in lower casev8.0.0448
Problem: Some macros are in lower case, which can be confusing.
Solution: Make a few lower case macros upper case.
Diffstat (limited to 'src/macros.h')
-rw-r--r-- | src/macros.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/macros.h b/src/macros.h index faa8ccc9c..559a4bef0 100644 --- a/src/macros.h +++ b/src/macros.h @@ -11,46 +11,46 @@ */ /* - * pchar(lp, c) - put character 'c' at position 'lp' + * PCHAR(lp, c) - put character 'c' at position 'lp' */ -#define pchar(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c)) +#define PCHAR(lp, c) (*(ml_get_buf(curbuf, (lp).lnum, TRUE) + (lp).col) = (c)) /* * Position comparisons */ #ifdef FEAT_VIRTUALEDIT -# define lt(a, b) (((a).lnum != (b).lnum) \ +# define LT_POS(a, b) (((a).lnum != (b).lnum) \ ? (a).lnum < (b).lnum \ : (a).col != (b).col \ ? (a).col < (b).col \ : (a).coladd < (b).coladd) -# define ltp(a, b) (((a)->lnum != (b)->lnum) \ +# define LT_POSP(a, b) (((a)->lnum != (b)->lnum) \ ? (a)->lnum < (b)->lnum \ : (a)->col != (b)->col \ ? (a)->col < (b)->col \ : (a)->coladd < (b)->coladd) -# define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd)) -# define clearpos(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} +# define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col) && ((a).coladd == (b).coladd)) +# define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0; (a)->coladd = 0;} #else -# define lt(a, b) (((a).lnum != (b).lnum) \ +# define LT_POS(a, b) (((a).lnum != (b).lnum) \ ? ((a).lnum < (b).lnum) : ((a).col < (b).col)) -# define ltp(a, b) (((a)->lnum != (b)->lnum) \ +# define LT_POSP(a, b) (((a)->lnum != (b)->lnum) \ ? ((a)->lnum < (b)->lnum) : ((a)->col < (b)->col)) -# define equalpos(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col)) -# define clearpos(a) {(a)->lnum = 0; (a)->col = 0;} +# define EQUAL_POS(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col)) +# define CLEAR_POS(a) {(a)->lnum = 0; (a)->col = 0;} #endif -#define ltoreq(a, b) (lt(a, b) || equalpos(a, b)) +#define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b)) /* - * lineempty() - return TRUE if the line is empty + * LINEEMPTY() - return TRUE if the line is empty */ -#define lineempty(p) (*ml_get(p) == NUL) +#define LINEEMPTY(p) (*ml_get(p) == NUL) /* - * bufempty() - return TRUE if the current buffer is empty + * BUFEMPTY() - return TRUE if the current buffer is empty */ -#define bufempty() (curbuf->b_ml.ml_line_count == 1 && *ml_get((linenr_T)1) == NUL) +#define BUFEMPTY() (curbuf->b_ml.ml_line_count == 1 && *ml_get((linenr_T)1) == NUL) /* * toupper() and tolower() that use the current locale. |