Whitespace.
This commit is contained in:
parent
eac2170da1
commit
7c248df2ae
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: str.c,v 1.28 2013/08/11 01:49:40 dholland Exp $ */
|
||||
/* $NetBSD: str.c,v 1.29 2013/08/11 01:54:35 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)str.c 8.2 (Berkeley) 4/28/95";
|
||||
#endif
|
||||
__RCSID("$NetBSD: str.c,v 1.28 2013/08/11 01:49:40 dholland Exp $");
|
||||
__RCSID("$NetBSD: str.c,v 1.29 2013/08/11 01:54:35 dholland Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -53,20 +53,20 @@ __RCSID("$NetBSD: str.c,v 1.28 2013/08/11 01:49:40 dholland Exp $");
|
||||
struct str {
|
||||
enum { STRING1, STRING2 } which;
|
||||
enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE, SET } state;
|
||||
int cnt; /* character count */
|
||||
int lastch; /* last character */
|
||||
int equiv[2]; /* equivalence set */
|
||||
int *set; /* set of characters */
|
||||
int cnt; /* character count */
|
||||
int lastch; /* last character */
|
||||
int equiv[2]; /* equivalence set */
|
||||
int *set; /* set of characters */
|
||||
const char *str; /* user's string */
|
||||
};
|
||||
|
||||
static int backslash(STR *);
|
||||
static int bracket(STR *);
|
||||
static int c_class(const void *, const void *);
|
||||
static int backslash(STR *);
|
||||
static int bracket(STR *);
|
||||
static int c_class(const void *, const void *);
|
||||
static int *genclass(const char *, size_t);
|
||||
static void genequiv(STR *);
|
||||
static int genrange(STR *);
|
||||
static void genseq(STR *);
|
||||
static void genequiv(STR *);
|
||||
static int genrange(STR *);
|
||||
static void genseq(STR *);
|
||||
|
||||
STR *
|
||||
str_create(int whichstring, const char *txt)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tr.c,v 1.19 2013/08/11 00:49:15 dholland Exp $ */
|
||||
/* $NetBSD: tr.c,v 1.20 2013/08/11 01:54:35 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95";
|
||||
#endif
|
||||
__RCSID("$NetBSD: tr.c,v 1.19 2013/08/11 00:49:15 dholland Exp $");
|
||||
__RCSID("$NetBSD: tr.c,v 1.20 2013/08/11 01:54:35 dholland Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -107,8 +107,8 @@ main(int argc, char **argv)
|
||||
|
||||
setup(string1, argv[0], 1, cflag);
|
||||
setup(string2, argv[1], 2, 0);
|
||||
|
||||
for (lastch = OOBCH; (ch = getchar()) != EOF;)
|
||||
|
||||
for (lastch = OOBCH; (ch = getchar()) != EOF; )
|
||||
if (!string1[ch] && (!string2[ch] || lastch != ch)) {
|
||||
lastch = ch;
|
||||
(void)putchar(ch);
|
||||
|
Loading…
Reference in New Issue
Block a user