mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
Move MAX and MIN macros to macros.h
vim.h is too big, and these were missing parens around the arguments. These may already be defined in <sys/param.h> or <windef.h>, so guard them with an #ifndef. extracted from #810
This commit is contained in:
parent
7c135b8ccb
commit
2b39453912
@ -12,6 +12,13 @@
|
||||
* macros.h: macro definitions for often used code
|
||||
*/
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(X, Y) ((X) < (Y) ? (X) : (Y))
|
||||
#endif
|
||||
#ifndef MAX
|
||||
# define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Position comparisons
|
||||
*/
|
||||
|
@ -8,9 +8,6 @@
|
||||
#ifndef NVIM_VIM_H
|
||||
#define NVIM_VIM_H
|
||||
|
||||
#define MIN(X, Y) (X < Y ? X : Y)
|
||||
#define MAX(X, Y) (X > Y ? X : Y)
|
||||
|
||||
#include "nvim/types.h"
|
||||
#include "nvim/pos.h" // for linenr_T, MAXCOL, etc...
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user