[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5911] ignore pseudotty executable, trivial source formatting
From: |
karl |
Subject: |
[5911] ignore pseudotty executable, trivial source formatting |
Date: |
Thu, 06 Nov 2014 18:35:47 +0000 |
Revision: 5911
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5911
Author: karl
Date: 2014-11-06 18:35:46 +0000 (Thu, 06 Nov 2014)
Log Message:
-----------
ignore pseudotty executable, trivial source formatting
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/pseudotty.c
Property Changed:
----------------
trunk/info/
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-11-06 17:18:26 UTC (rev 5910)
+++ trunk/ChangeLog 2014-11-06 18:35:46 UTC (rev 5911)
@@ -1,12 +1,16 @@
-2014-11-04 Karl Berry <address@hidden>
+2014-11-06 Karl Berry <address@hidden>
+ * info/pseudotty.c: localize variables, main signature, formatting.
+
+2014-11-06 Karl Berry <address@hidden>
+
* install-info/tests/Makefile.am (TESTS, EXTRA_DIST):
new tests 55, 56 for --defsection; plus the new files.
Turns out --defentry was a no-op, so omit it from help string
but leave code in case someone wants it.
* NEWS: mention new option.
-2014-11-04 Pietro Cerutti <address@hidden>
+2014-11-06 Pietro Cerutti <address@hidden>
* install-info/install-info.c: new options --defentry and
--defsection (written for BSD). Retrieved from
Property changes on: trunk/info
___________________________________________________________________
Modified: svn:ignore
- .deps
Makefile
Makefile.in
doc.c
funs.h
ginfo
infokey
key.c
makedoc
*.o
+ .deps
Makefile
Makefile.in
doc.c
funs.h
ginfo
infokey
key.c
makedoc
*.o
pseudotty
Modified: trunk/info/pseudotty.c
===================================================================
--- trunk/info/pseudotty.c 2014-11-06 17:18:26 UTC (rev 5910)
+++ trunk/info/pseudotty.c 2014-11-06 18:35:46 UTC (rev 5911)
@@ -1,5 +1,9 @@
-/* Copyright 2014 Free Software Foundation, Inc.
+/* pseudotty - open pseudo-terminal and print name of slave device to
+ standard output. Read and ignore any data sent to terminal. This
+ is so we can run tests interactively without messing up the screen.
+ Copyright 2014 Free Software Foundation, Inc.
+
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 3 of the License, or
@@ -11,12 +15,10 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Originally written by Gavin Smith. */
-/* pseudotty - open pseudo-terminal and print name of slave device to
- standard output. Read and ignore any data sent to terminal. This
- is so we can run tests interactively without messing up the screen. */
-
#define _XOPEN_SOURCE
#include <config.h>
@@ -28,16 +30,15 @@
#include <sys/types.h>
#include <stdlib.h>
-int master;
-char *name;
-char dummy;
-
-fd_set read_set;
-
#define CONTROL 3
-main ()
+int
+main (void)
{
+ int master;
+ char *name;
+ fd_set read_set;
+
error (0, 0, "getting pty master fd");
master = posix_openpt (O_RDWR);
if (master == -1)
@@ -58,7 +59,7 @@
FD_ZERO (&read_set);
error (0, 0, "entering main loop");
- while (1)
+ for (;;)
{
int ret;
@@ -71,7 +72,9 @@
int c, success;
errno = 0;
do
- success = read (CONTROL, &c, 1);
+ {
+ success = read (CONTROL, &c, 1);
+ }
while (success != 1 && errno == EINTR);
if (!success)
{
@@ -89,7 +92,9 @@
int c, success;
errno = 0;
do
- success = read (master, &c, 1);
+ {
+ success = read (master, &c, 1);
+ }
while (success != 1 && errno == EINTR);
if (!success)
{
@@ -98,4 +103,6 @@
}
}
}
+
+ return 0; /* NOTREACHED */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5911] ignore pseudotty executable, trivial source formatting,
karl <=