summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2011-01-10 22:45:10 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2011-01-10 22:45:10 +0000
commitabd1f615b2413f17fdc447cba10f8764a1eb5f08 (patch)
tree5c7e517fd56b8b430d430c6cc94ddea5e9286bf0
parenta7b6445cc39983fb33466529a904fe749d3d6885 (diff)
Trim spaces.
-rw-r--r--compat/forkpty-aix.c6
-rw-r--r--compat/forkpty-sunos.c4
-rw-r--r--compat/strsep.c4
-rw-r--r--compat/unvis.c32
-rw-r--r--compat/vis.c4
5 files changed, 25 insertions, 25 deletions
diff --git a/compat/forkpty-aix.c b/compat/forkpty-aix.c
index f7bc1b8b..22f0ddfb 100644
--- a/compat/forkpty-aix.c
+++ b/compat/forkpty-aix.c
@@ -1,4 +1,4 @@
-/* $Id: forkpty-aix.c,v 1.4 2009-09-20 18:31:16 nicm Exp $ */
+/* $Id: forkpty-aix.c,v 1.5 2011-01-10 22:45:09 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -52,10 +52,10 @@ forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws)
ioctl(fd, TIOCNOTTY, NULL);
close(fd);
}
-
+
if (setsid() < 0)
fatal("setsid");
-
+
fd = open(_PATH_TTY, O_RDWR|O_NOCTTY);
if (fd >= 0)
fatalx("open succeeded (failed to disconnect)");
diff --git a/compat/forkpty-sunos.c b/compat/forkpty-sunos.c
index 67d8a029..66319892 100644
--- a/compat/forkpty-sunos.c
+++ b/compat/forkpty-sunos.c
@@ -1,4 +1,4 @@
-/* $Id: forkpty-sunos.c,v 1.9 2009-10-15 07:11:25 nicm Exp $ */
+/* $Id: forkpty-sunos.c,v 1.10 2011-01-10 22:45:10 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -73,7 +73,7 @@ forkpty(int *master, char *name, struct termios *tio, struct winsize *ws)
dup2(slave, 1);
dup2(slave, 2);
if (slave > 2)
- close(slave);
+ close(slave);
return (0);
}
diff --git a/compat/strsep.c b/compat/strsep.c
index b89e2ee8..e373c602 100644
--- a/compat/strsep.c
+++ b/compat/strsep.c
@@ -1,4 +1,4 @@
-/* $Id: strsep.c,v 1.1 2009-08-16 16:15:53 nicm Exp $ */
+/* $Id: strsep.c,v 1.2 2011-01-10 22:45:10 nicm Exp $ */
/* $OpenBSD: strsep.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */
/*-
@@ -35,7 +35,7 @@
/*
* Get next token from string *stringp, where tokens are possibly-empty
- * strings separated by characters from delim.
+ * strings separated by characters from delim.
*
* Writes NULs into the string at *stringp to end tokens.
* delim need not remain constant from call to call.
diff --git a/compat/unvis.c b/compat/unvis.c
index 7071764c..e1f09ec9 100644
--- a/compat/unvis.c
+++ b/compat/unvis.c
@@ -57,7 +57,7 @@ unvis(char *cp, char c, int *astate, int flag)
if (*astate == S_OCTAL2 || *astate == S_OCTAL3) {
*astate = S_GROUND;
return (UNVIS_VALID);
- }
+ }
return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
}
@@ -68,7 +68,7 @@ unvis(char *cp, char c, int *astate, int flag)
if (c == '\\') {
*astate = S_START;
return (0);
- }
+ }
*cp = c;
return (UNVIS_VALID);
@@ -141,7 +141,7 @@ unvis(char *cp, char c, int *astate, int flag)
}
*astate = S_GROUND;
return (UNVIS_SYNBAD);
-
+
case S_META:
if (c == '-')
*astate = S_META1;
@@ -152,12 +152,12 @@ unvis(char *cp, char c, int *astate, int flag)
return (UNVIS_SYNBAD);
}
return (0);
-
+
case S_META1:
*astate = S_GROUND;
*cp |= c;
return (UNVIS_VALID);
-
+
case S_CTRL:
if (c == '?')
*cp |= 0177;
@@ -168,15 +168,15 @@ unvis(char *cp, char c, int *astate, int flag)
case S_OCTAL2: /* second possible octal digit */
if (isoctal(c)) {
- /*
- * yes - and maybe a third
+ /*
+ * yes - and maybe a third
*/
*cp = (*cp << 3) + (c - '0');
- *astate = S_OCTAL3;
+ *astate = S_OCTAL3;
return (0);
- }
- /*
- * no - done with current sequence, push back passed char
+ }
+ /*
+ * no - done with current sequence, push back passed char
*/
*astate = S_GROUND;
return (UNVIS_VALIDPUSH);
@@ -191,10 +191,10 @@ unvis(char *cp, char c, int *astate, int flag)
* we were done, push back passed char
*/
return (UNVIS_VALIDPUSH);
-
- default:
- /*
- * decoder in unknown state - (probably uninitialized)
+
+ default:
+ /*
+ * decoder in unknown state - (probably uninitialized)
*/
*astate = S_GROUND;
return (UNVIS_SYNBAD);
@@ -202,7 +202,7 @@ unvis(char *cp, char c, int *astate, int flag)
}
/*
- * strunvis - decode src into dst
+ * strunvis - decode src into dst
*
* Number of chars decoded into dst is returned, -1 on error.
* Dst is null terminated.
diff --git a/compat/vis.c b/compat/vis.c
index 5aca58cc..97eb5271 100644
--- a/compat/vis.c
+++ b/compat/vis.c
@@ -136,10 +136,10 @@ done:
/*
* strvis, strnvis, strvisx - visually encode characters from src into dst
- *
+ *
* Dst must be 4 times the size of src to account for possible
* expansion. The length of dst, not including the trailing NULL,
- * is returned.
+ * is returned.
*
* Strnvis will write no more than siz-1 bytes (and will NULL terminate).
* The number of bytes needed to fully encode the string is returned.