summaryrefslogtreecommitdiffstats
path: root/src/macros.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-30 19:44:38 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-30 19:44:38 +0100
commit9bf703d46a79fbffeb829246ea5ce385bddc4166 (patch)
tree6afff788b4fbd8fbf61557c47c24c26c975ea8ee /src/macros.h
parent20ebbeac461ffc2a5e5dbfbb0ba380b8854615bd (diff)
patch 8.1.2366: using old C style commentsv8.1.2366
Problem: Using old C style comments. Solution: Use // comments where appropriate.
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/macros.h b/src/macros.h
index 5da0e5c0ff..72fc26af0e 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -74,7 +74,7 @@
# endif
#endif
-/* toupper() and tolower() for ASCII only and ignore the current locale. */
+// toupper() and tolower() for ASCII only and ignore the current locale.
#ifdef EBCDIC
# define TOUPPER_ASC(c) (islower(c) ? toupper(c) : (c))
# define TOLOWER_ASC(c) (isupper(c) ? tolower(c) : (c))
@@ -92,13 +92,13 @@
#define MB_TOLOWER(c) vim_tolower(c)
#define MB_TOUPPER(c) vim_toupper(c)
-/* Use our own isdigit() replacement, because on MS-Windows isdigit() returns
- * non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
- * below 0 and above 255. */
+// Use our own isdigit() replacement, because on MS-Windows isdigit() returns
+// non-zero for superscript 1. Also avoids that isdigit() crashes for numbers
+// below 0 and above 255.
#define VIM_ISDIGIT(c) ((unsigned)(c) - '0' < 10)
-/* Like isalpha() but reject non-ASCII characters. Can't be used with a
- * special key (negative value). */
+// Like isalpha() but reject non-ASCII characters. Can't be used with a
+// special key (negative value).
#ifdef EBCDIC
# define ASCII_ISALPHA(c) isalpha(c)
# define ASCII_ISALNUM(c) isalnum(c)
@@ -111,7 +111,7 @@
# define ASCII_ISALNUM(c) (ASCII_ISALPHA(c) || VIM_ISDIGIT(c))
#endif
-/* Returns empty string if it is NULL. */
+// Returns empty string if it is NULL.
#define EMPTY_IF_NULL(x) ((x) ? (x) : (char_u *)"")
#ifdef FEAT_LANGMAP
@@ -138,7 +138,7 @@
} \
} while (0)
#else
-# define LANGMAP_ADJUST(c, condition) /* nop */
+# define LANGMAP_ADJUST(c, condition) // nop
#endif
/*
@@ -153,10 +153,10 @@
*/
#ifdef VMS
# define mch_access(n, p) access(vms_fixfilename(n), (p))
- /* see mch_open() comment */
+ // see mch_open() comment
# define mch_fopen(n, p) fopen(vms_fixfilename(n), (p))
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
- /* VMS does not have lstat() */
+ // VMS does not have lstat()
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
#else
@@ -190,8 +190,8 @@
# define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p))
#endif
-/* mch_open_rw(): invoke mch_open() with third argument for user R/W. */
-#if defined(UNIX) || defined(VMS) /* open in rw------- mode */
+// mch_open_rw(): invoke mch_open() with third argument for user R/W.
+#if defined(UNIX) || defined(VMS) // open in rw------- mode
# define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
#else
# if defined(MSWIN) // open read/write
@@ -217,7 +217,7 @@
#endif
#ifdef FEAT_RIGHTLEFT
- /* Whether to draw the vertical bar on the right side of the cell. */
+ // Whether to draw the vertical bar on the right side of the cell.
# define CURSOR_BAR_RIGHT (curwin->w_p_rl && (!(State & CMDLINE) || cmdmsg_rl))
#endif
@@ -229,13 +229,13 @@
* MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
* PTR2CHAR(): get character from pointer.
*/
-/* Advance multi-byte pointer, skip over composing chars. */
+// Advance multi-byte pointer, skip over composing chars.
#define MB_PTR_ADV(p) p += (*mb_ptr2len)(p)
-/* Advance multi-byte pointer, do not skip over composing chars. */
+// Advance multi-byte pointer, do not skip over composing chars.
#define MB_CPTR_ADV(p) p += enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p)
-/* Backup multi-byte pointer. Only use with "p" > "s" ! */
+// Backup multi-byte pointer. Only use with "p" > "s" !
#define MB_PTR_BACK(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
-/* get length of multi-byte char, not including composing chars */
+// get length of multi-byte char, not including composing chars
#define MB_CPTR2LEN(p) (enc_utf8 ? utf_ptr2len(p) : (*mb_ptr2len)(p))
#define MB_COPY_CHAR(f, t) do { if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++; } while (0)
@@ -265,7 +265,7 @@
#if defined(FEAT_EVAL) && defined(FEAT_FLOAT)
# include <float.h>
# if defined(HAVE_MATH_H)
- /* for isnan() and isinf() */
+ // for isnan() and isinf()
# include <math.h>
# endif
# ifdef USING_FLOAT_STUFF
@@ -335,7 +335,7 @@
} \
} while (0)
-/* Whether a command index indicates a user command. */
+// Whether a command index indicates a user command.
#define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
// Give an error in curwin is a popup window and evaluate to TRUE.