summaryrefslogtreecommitdiffstats
path: root/compat/unvis.c
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 /compat/unvis.c
parenta7b6445cc39983fb33466529a904fe749d3d6885 (diff)
Trim spaces.
Diffstat (limited to 'compat/unvis.c')
-rw-r--r--compat/unvis.c32
1 files changed, 16 insertions, 16 deletions
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.