Whitespace consistency fixes.
This commit is contained in:
parent
46884a1759
commit
248b38c348
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: unvis.c,v 1.25 2005/04/19 16:33:53 rillig Exp $ */
|
||||
/* $NetBSD: unvis.c,v 1.26 2005/05/16 11:40:16 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.25 2005/04/19 16:33:53 rillig Exp $");
|
||||
__RCSID("$NetBSD: unvis.c,v 1.26 2005/05/16 11:40:16 lukem Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -69,8 +69,8 @@ __warn_references(unvis,
|
||||
#define S_CTRL 4 /* control char started (^) */
|
||||
#define S_OCTAL2 5 /* octal digit 2 */
|
||||
#define S_OCTAL3 6 /* octal digit 3 */
|
||||
#define S_HEX1 7 /* hex digit */
|
||||
#define S_HEX2 8 /* hex digit 2 */
|
||||
#define S_HEX1 7 /* hex digit */
|
||||
#define S_HEX2 8 /* hex digit 2 */
|
||||
|
||||
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
|
||||
#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10))
|
||||
@ -241,6 +241,7 @@ __unvis13(cp, c, astate, flag)
|
||||
* we were done, push back passed char
|
||||
*/
|
||||
return (UNVIS_VALIDPUSH);
|
||||
|
||||
case S_HEX1:
|
||||
if (isxdigit(uc)) {
|
||||
*cp = xtod(uc);
|
||||
@ -252,6 +253,7 @@ __unvis13(cp, c, astate, flag)
|
||||
*/
|
||||
*astate = S_GROUND;
|
||||
return (UNVIS_VALIDPUSH);
|
||||
|
||||
case S_HEX2:
|
||||
*astate = S_GROUND;
|
||||
if (isxdigit(uc)) {
|
||||
@ -259,6 +261,7 @@ __unvis13(cp, c, astate, flag)
|
||||
return (UNVIS_VALID);
|
||||
}
|
||||
return (UNVIS_VALIDPUSH);
|
||||
|
||||
default:
|
||||
/*
|
||||
* decoder in unknown state - (probably uninitialized)
|
||||
@ -289,7 +292,7 @@ strunvisx(dst, src, flag)
|
||||
_DIAGASSERT(dst != NULL);
|
||||
|
||||
while ((c = *src++) != '\0') {
|
||||
again:
|
||||
again:
|
||||
switch (__unvis13(dst, c, &state, flag)) {
|
||||
case UNVIS_VALID:
|
||||
dst++;
|
||||
|
Loading…
Reference in New Issue
Block a user