[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] grep: remove more register keywords
From: |
Paolo Bonzini |
Subject: |
[PATCH] grep: remove more register keywords |
Date: |
Wed, 17 Mar 2010 11:01:13 +0100 |
* dosbuf.c: Remove register keywords.
* grep.c: Remove register keywords.
* kwset.c: Remove register keywords.
* search.c: Remove register keywords.
---
src/dosbuf.c | 6 +++---
src/grep.c | 4 ++--
src/kwset.c | 46 +++++++++++++++++++++++-----------------------
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/dosbuf.c b/src/dosbuf.c
index 906904a..dc22682 100644
--- a/src/dosbuf.c
+++ b/src/dosbuf.c
@@ -51,10 +51,10 @@ static int inp_map_idx = 0, out_map_idx = 1;
/* Guess DOS file type by looking at its contents. */
static inline File_type
-guess_type (char *buf, register size_t buflen)
+guess_type (char *buf, size_t buflen)
{
int crlf_seen = 0;
- register char *bp = buf;
+ char *bp = buf;
while (buflen--)
{
@@ -77,7 +77,7 @@ guess_type (char *buf, register size_t buflen)
Return the count of characters left in the buffer.
Build table to map character positions when reporting byte counts. */
static inline int
-undossify_input (register char *buf, size_t buflen)
+undossify_input (char *buf, size_t buflen)
{
int chars_left = 0;
diff --git a/src/grep.c b/src/grep.c
index 2dc3ee9..8193bc5 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -373,7 +373,7 @@ static enum
static int grepdir (char const *, struct stats const *);
#if defined(HAVE_DOS_FILE_CONTENTS)
-static inline int undossify_input (register char *, size_t);
+static inline int undossify_input (char *, size_t);
#endif
/* Functions we'll use to search. */
@@ -1072,7 +1072,7 @@ static int
grepbuf (char const *beg, char const *lim)
{
int nlines, n;
- register char const *p;
+ char const *p;
size_t match_offset;
size_t match_size;
diff --git a/src/kwset.c b/src/kwset.c
index 1cdaabb..9e3a675 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -132,10 +132,10 @@ const char *
kwsincr (kwset_t kws, char const *text, size_t len)
{
struct kwset *kwset;
- register struct trie *trie;
- register unsigned char label;
- register struct tree *link;
- register int depth;
+ struct trie *trie;
+ unsigned char label;
+ struct tree *link;
+ int depth;
struct tree *links[DEPTH_SIZE];
enum { L, R } dirs[DEPTH_SIZE];
struct tree *t, *r, *l, *rl, *lr;
@@ -302,10 +302,10 @@ enqueue (struct tree *tree, struct trie **last)
from the given tree, given the failure function for their parent as
well as a last resort failure node. */
static void
-treefails (register struct tree const *tree, struct trie const *fail,
+treefails (struct tree const *tree, struct trie const *fail,
struct trie *recourse)
{
- register struct tree *link;
+ struct tree *link;
if (!tree)
return;
@@ -337,8 +337,8 @@ treefails (register struct tree const *tree, struct trie
const *fail,
/* Set delta entries for the links of the given tree such that
the preexisting delta value is larger than the current depth. */
static void
-treedelta (register struct tree const *tree,
- register unsigned int depth,
+treedelta (struct tree const *tree,
+ unsigned int depth,
unsigned char delta[])
{
if (!tree)
@@ -351,7 +351,7 @@ treedelta (register struct tree const *tree,
/* Return true if A has every label in B. */
static int
-hasevery (register struct tree const *a, register struct tree const *b)
+hasevery (struct tree const *a, struct tree const *b)
{
if (!b)
return 1;
@@ -384,10 +384,10 @@ treenext (struct tree const *tree, struct trie *next[])
const char *
kwsprep (kwset_t kws)
{
- register struct kwset *kwset;
- register int i;
- register struct trie *curr;
- register char const *trans;
+ struct kwset *kwset;
+ int i;
+ struct trie *curr;
+ char const *trans;
unsigned char delta[NCHAR];
kwset = (struct kwset *) kws;
@@ -425,7 +425,7 @@ kwsprep (kwset_t kws)
}
else
{
- register struct trie *fail;
+ struct trie *fail;
struct trie *last, *next[NCHAR];
/* Traverse the nodes of the trie in level order, simultaneously
@@ -501,9 +501,9 @@ static size_t
bmexec (kwset_t kws, char const *text, size_t size)
{
struct kwset const *kwset;
- register unsigned char const *d1;
- register char const *ep, *sp, *tp;
- register int d, gc, i, len, md2;
+ unsigned char const *d1;
+ char const *ep, *sp, *tp;
+ int d, gc, i, len, md2;
kwset = (struct kwset const *) kws;
len = kwset->mind;
@@ -591,12 +591,12 @@ cwexec (kwset_t kws, char const *text, size_t len, struct
kwsmatch *kwsmatch)
struct trie const *trie;
struct trie const *accept;
char const *beg, *lim, *mch, *lmch;
- register unsigned char c;
- register unsigned char const *delta;
- register int d;
- register char const *end, *qlim;
- register struct tree const *tree;
- register char const *trans;
+ unsigned char c;
+ unsigned char const *delta;
+ int d;
+ char const *end, *qlim;
+ struct tree const *tree;
+ char const *trans;
#ifdef lint
accept = NULL;
--
1.6.6.1
- [PATCH] grep: remove more register keywords,
Paolo Bonzini <=