More whitespace consistency tweaks

This commit is contained in:
lukem 2005-05-16 11:42:04 +00:00
parent 248b38c348
commit a1273fe760
1 changed files with 23 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: unvis.c,v 1.26 2005/05/16 11:40:16 lukem Exp $ */
/* $NetBSD: unvis.c,v 1.27 2005/05/16 11:42:04 lukem Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: unvis.c,v 1.26 2005/05/16 11:40:16 lukem Exp $");
__RCSID("$NetBSD: unvis.c,v 1.27 2005/05/16 11:42:04 lukem Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -103,7 +103,7 @@ __unvis13(cp, c, astate, flag)
|| *astate == S_HEX2) {
*astate = S_GROUND;
return (UNVIS_VALID);
}
}
return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
}
@ -114,7 +114,7 @@ __unvis13(cp, c, astate, flag)
if (c == '\\') {
*astate = S_START;
return (0);
}
}
if ((flag & VIS_HTTPSTYLE) && c == '%') {
*astate = S_HEX1;
return (0);
@ -191,7 +191,7 @@ __unvis13(cp, c, astate, flag)
}
*astate = S_GROUND;
return (UNVIS_SYNBAD);
case S_META:
if (c == '-')
*astate = S_META1;
@ -202,12 +202,12 @@ __unvis13(cp, c, astate, flag)
return (UNVIS_SYNBAD);
}
return (0);
case S_META1:
*astate = S_GROUND;
*cp |= c;
return (UNVIS_VALID);
case S_CTRL:
if (c == '?')
*cp |= 0177;
@ -218,15 +218,15 @@ __unvis13(cp, c, astate, flag)
case S_OCTAL2: /* second possible octal digit */
if (isoctal(uc)) {
/*
* 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);
@ -248,23 +248,23 @@ __unvis13(cp, c, astate, flag)
*astate = S_HEX2;
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);
case S_HEX2:
*astate = S_GROUND;
if (isxdigit(uc)) {
*cp = xtod(uc) | (*cp << 4);
*astate = S_GROUND;
if (isxdigit(uc)) {
*cp = xtod(uc) | (*cp << 4);
return (UNVIS_VALID);
}
return (UNVIS_VALIDPUSH);
return (UNVIS_VALIDPUSH);
default:
/*
* decoder in unknown state - (probably uninitialized)
default:
/*
* decoder in unknown state - (probably uninitialized)
*/
*astate = S_GROUND;
return (UNVIS_SYNBAD);
@ -272,7 +272,7 @@ __unvis13(cp, c, astate, 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.