summaryrefslogtreecommitdiff
path: root/src/pty.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-05 21:10:38 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-05 21:10:38 +0100
commit63d9e730f726341bf41ee4f4b829253cb9879110 (patch)
tree02d6ed210385b78f06d7df1e30ede7d48f718600 /src/pty.c
parent0f8737355d291679659579a48db1861b88970293 (diff)
downloadvim-git-63d9e730f726341bf41ee4f4b829253cb9879110.tar.gz
patch 8.1.2394: using old C style commentsv8.1.2394
Problem: Using old C style comments. Solution: Use // comments where appropriate.
Diffstat (limited to 'src/pty.c')
-rw-r--r--src/pty.c66
1 files changed, 32 insertions, 34 deletions
diff --git a/src/pty.c b/src/pty.c
index 86fbca279..a44d0a088 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -20,26 +20,25 @@
* copyright notice below.
*/
-/* Copyright (c) 1993
- * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
- * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
- * Copyright (c) 1987 Oliver Laumann
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program (see the file COPYING); if not, write to the
- * Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+// Copyright (c) 1993
+// Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
+// Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
+// Copyright (c) 1987 Oliver Laumann
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program (see the file COPYING); if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#include "vim.h"
@@ -124,7 +123,7 @@
# define PTYRANGE1 "0123456789abcdef"
#endif
-/* SVR4 pseudo ttys don't seem to work with SCO-5 */
+// SVR4 pseudo ttys don't seem to work with SCO-5
#ifdef M_UNIX
# undef HAVE_SVR4_PTYS
#endif
@@ -240,7 +239,7 @@ mch_openpty(char **ttyn)
{
char *m, *s;
int f;
- /* used for opening a new pty-pair: */
+ // used for opening a new pty-pair:
static char PtyName[32];
static char TtyName[32];
@@ -289,7 +288,7 @@ mch_openpty(char **ttyn)
{
int f;
stat_T buf;
- /* used for opening a new pty-pair: */
+ // used for opening a new pty-pair:
static char TtyName[32];
if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_NONBLOCK | O_EXTRA, 0)) < 0)
@@ -309,8 +308,8 @@ mch_openpty(char **ttyn)
#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) \
&& !(defined(MACOS_X) && !defined(MAC_OS_X_VERSION_10_6))
-/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work!
- * Same for Mac OS X Leopard (10.5). */
+// NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work!
+// Same for Mac OS X Leopard (10.5).
#define PTY_DONE
int
mch_openpty(char **ttyn)
@@ -318,7 +317,7 @@ mch_openpty(char **ttyn)
int f;
char *m;
RETSIGTYPE (*sigcld) SIGPROTOARG;
- /* used for opening a new pty-pair: */
+ // used for opening a new pty-pair:
static char TtyName[32];
if ((f = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_EXTRA, 0)) == -1)
@@ -354,10 +353,10 @@ static int aixhack = -1;
mch_openpty(char **ttyn)
{
int f;
- /* used for opening a new pty-pair: */
+ // used for opening a new pty-pair:
static char TtyName[32];
- /* a dumb looking loop replaced by mycrofts code: */
+ // a dumb looking loop replaced by mycrofts code:
if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0)
return -1;
vim_strncpy((char_u *)TtyName, (char_u *)ttyname(f), sizeof(TtyName) - 1);
@@ -401,7 +400,7 @@ mch_openpty(char **ttyn)
{
char *p, *q, *l, *d;
int f;
- /* used for opening a new pty-pair: */
+ // used for opening a new pty-pair:
static char PtyName[32];
static char TtyName[32];
@@ -425,13 +424,12 @@ mch_openpty(char **ttyn)
continue;
}
#if defined(SUN_SYSTEM) && defined(TIOCGPGRP) && !defined(SUNOS3)
- /* Hack to ensure that the slave side of the pty is
- * unused. May not work in anything other than SunOS4.1
- */
+ // Hack to ensure that the slave side of the pty is
+ // unused. May not work in anything other than SunOS4.1
{
int pgrp;
- /* tcgetpgrp does not work (uses TIOCGETPGRP)! */
+ // tcgetpgrp does not work (uses TIOCGETPGRP)!
if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO)
{
close(f);
@@ -474,4 +472,4 @@ mch_isatty(int fd)
return isatty(fd);
}
-#endif /* FEAT_GUI || FEAT_JOB_CHANNEL */
+#endif // FEAT_GUI || FEAT_JOB_CHANNEL