patch 8.1.2380: using old C style comments
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
diff --git a/src/gui_at_fs.c b/src/gui_at_fs.c
index c50816b..315723f 100644
--- a/src/gui_at_fs.c
+++ b/src/gui_at_fs.c
@@ -43,11 +43,11 @@
#include "vim.h"
-/* Only include this when using the file browser */
+// Only include this when using the file browser
#ifdef FEAT_BROWSE
-/* Weird complication: for "make lint" Text.h doesn't combine with Xm.h */
+// Weird complication: for "make lint" Text.h doesn't combine with Xm.h
#if defined(FEAT_GUI_MOTIF) && defined(FMT8BIT)
# undef FMT8BIT
#endif
@@ -56,7 +56,7 @@
# include "gui_at_sb.h"
#endif
-/***************** SFinternal.h */
+////////////////// SFinternal.h
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
@@ -170,7 +170,7 @@
static int SFstatus = SEL_FILE_NULL;
-/***************** forward declare static functions */
+///////////////// forward declare static functions
static void SFsetText(char *path);
static void SFtextChanged(void);
@@ -184,7 +184,7 @@
static Boolean SFworkProc(void);
static int SFcompareEntries(const void *p, const void *q);
-/***************** xstat.h */
+////////////////// xstat.h
#ifndef S_IXUSR
# define S_IXUSR 0100
@@ -198,7 +198,7 @@
#define S_ISXXX(m) ((m) & (S_IXUSR | S_IXGRP | S_IXOTH))
-/***************** Path.c */
+////////////////// Path.c
#include <pwd.h>
@@ -515,7 +515,7 @@
SFhomeDir.path = SFcurrentPath;
SFhomeDir.entries = entries;
SFhomeDir.nEntries = i;
- SFhomeDir.vOrigin = 0; /* :-) */
+ SFhomeDir.vOrigin = 0; // :-)
SFhomeDir.nChars = maxChars + 2;
SFhomeDir.hOrigin = 0;
SFhomeDir.changed = 1;
@@ -969,7 +969,7 @@
SFdirModTimer, (XtPointer) NULL);
}
-/* Return a single character describing what kind of file STATBUF is. */
+// Return a single character describing what kind of file STATBUF is.
static char
SFstatChar(stat_T *statBuf)
@@ -981,11 +981,11 @@
#ifdef S_ISSOCK
if (S_ISSOCK (statBuf->st_mode))
return '=';
-#endif /* S_ISSOCK */
+#endif // S_ISSOCK
return ' ';
}
-/***************** Draw.c */
+////////////////// Draw.c
#ifdef FEAT_GUI_NEXTAW
# include <X11/neXtaw/Cardinals.h>
@@ -1604,7 +1604,7 @@
{
int nw;
- /* sanity */
+ // sanity
if (SFcurrentInvert[n] != -1)
{
SFinvertEntry(n);
@@ -1980,7 +1980,7 @@
return True;
}
-/***************** Dir.c */
+////////////////// Dir.c
static int
SFcompareEntries(const void *p, const void *q)
@@ -2020,7 +2020,7 @@
while ((dp = readdir(dirp)))
{
- /* Ignore "." and ".." */
+ // Ignore "." and ".."
if (strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0)
continue;
if (i >= Alloc)
@@ -2051,7 +2051,7 @@
return 0;
}
-/***************** SFinternal.h */
+////////////////// SFinternal.h
#include <sys/param.h>
#include <X11/cursorfont.h>
@@ -2202,7 +2202,7 @@
XSetForeground(gui.dpy, SFtextGC, fg);
XSetForeground(gui.dpy, SFlineGC, fg);
- /* This is an xor GC, so combine the fg and background */
+ // This is an xor GC, so combine the fg and background
XSetBackground(gui.dpy, SFinvertGC, fg ^ bg);
XSetForeground(gui.dpy, SFinvertGC, fg ^ bg);
}
@@ -2250,7 +2250,7 @@
XtNtitle, prompt,
NULL);
- /* Add WM_DELETE_WINDOW protocol */
+ // Add WM_DELETE_WINDOW protocol
XtAppAddActions(XtWidgetToApplicationContext(selFile),
actions, XtNumber(actions));
XtOverrideTranslations(selFile,
@@ -2522,7 +2522,7 @@
XtSetMappedWhenManaged(selFile, False);
XtRealizeWidget(selFile);
- /* Add WM_DELETE_WINDOW protocol */
+ // Add WM_DELETE_WINDOW protocol
SFwmDeleteWindow = XInternAtom(SFdisplay, "WM_DELETE_WINDOW", False);
XSetWMProtocols(SFdisplay, XtWindow(selFile), &SFwmDeleteWindow, 1);
@@ -2609,7 +2609,7 @@
XtNstring, &wcbuf,
NULL);
mbslength = wcstombs(NULL, wcbuf, 0);
- /* Hack: some broken wcstombs() returns zero, just get a large buffer */
+ // Hack: some broken wcstombs() returns zero, just get a large buffer
if (mbslength == 0 && wcbuf != NULL && wcbuf[0] != 0)
mbslength = MAXPATHL;
buf=(char *)XtMalloc(mbslength + 1);
@@ -2645,7 +2645,7 @@
guicolor_T fg,
guicolor_T bg,
guicolor_T scroll_fg,
- guicolor_T scroll_bg) /* The "Scrollbar" group colors */
+ guicolor_T scroll_bg) // The "Scrollbar" group colors
{
static int firstTime = 1;
XEvent event;
@@ -2731,4 +2731,4 @@
}
}
}
-#endif /* FEAT_BROWSE */
+#endif // FEAT_BROWSE