[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.18-12-gb446793
From: |
Paul Eggert |
Subject: |
grep branch, master, updated. v2.18-12-gb446793 |
Date: |
Sat, 01 Mar 2014 07:47:46 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via b446793dcff5c3fe5a5ab81c336e2fb05f7e5376 (commit)
from c50283a3a8d15d382691c447c3a1e1fde1c548fc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=b446793dcff5c3fe5a5ab81c336e2fb05f7e5376
commit b446793dcff5c3fe5a5ab81c336e2fb05f7e5376
Author: Paul Eggert <address@hidden>
Date: Fri Feb 28 23:46:53 2014 -0800
grep: avoid 'inline' when it doesn't matter
These days, compilers generally do just fine without advice from
users about 'inline', and there's little need for 'static inline',
just as there's little need for 'register'.
* src/dfa.c (to_uchar):
* src/dosbuf.c (guess_type, undossify_input, dossified_pos):
* src/main.c (undossify_input):
No longer inline.
* src/search.h (mb_case_map_apply): Move from here ...
* src/kwsearch.c (mb_case_map_apply): ... to here, and
make it no longer 'inline'.
diff --git a/src/dfa.c b/src/dfa.c
index b3d9da8..80bb807 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -93,7 +93,7 @@ typedef unsigned int charclass[CHARCLASS_INTS];
/* Convert a possibly-signed character to an unsigned character. This is
a bit safer than casting to unsigned char, since it catches some type
errors that the cast doesn't. */
-static inline unsigned char
+static unsigned char
to_uchar (char ch)
{
return ch;
diff --git a/src/dosbuf.c b/src/dosbuf.c
index d7db81d..3648371 100644
--- a/src/dosbuf.c
+++ b/src/dosbuf.c
@@ -50,7 +50,7 @@ static int dos_pos_map_used = 0;
static int inp_map_idx = 0, out_map_idx = 1;
/* Guess DOS file type by looking at its contents. */
-static inline File_type
+static File_type
guess_type (char *buf, size_t buflen)
{
int crlf_seen = 0;
@@ -76,7 +76,7 @@ guess_type (char *buf, size_t buflen)
/* Convert external DOS file representation to internal.
Return the count of characters left in the buffer.
Build table to map character positions when reporting byte counts. */
-static inline int
+static int
undossify_input (char *buf, size_t buflen)
{
int chars_left = 0;
@@ -164,7 +164,7 @@ undossify_input (char *buf, size_t buflen)
}
/* Convert internal byte count into external. */
-static inline off_t
+static off_t
dossified_pos (off_t byteno)
{
off_t pos_lo;
diff --git a/src/kwsearch.c b/src/kwsearch.c
index 643c6d8..d5653b8 100644
--- a/src/kwsearch.c
+++ b/src/kwsearch.c
@@ -75,6 +75,26 @@ Fcompile (char const *pattern, size_t size)
error (EXIT_TROUBLE, 0, "%s", err);
}
+/* Apply the MAP (created by mbtolower) to the lowercase-buffer-relative
+ *OFF and *LEN, converting them to be relative to the original buffer. */
+
+static void
+mb_case_map_apply (mb_len_map_t const *map, size_t *off, size_t *len)
+{
+ if (map)
+ {
+ intmax_t off_incr = 0;
+ intmax_t len_incr = 0;
+ size_t k;
+ for (k = 0; k < *off; k++)
+ off_incr += map[k];
+ for (k = *off; k < *off + *len; k++)
+ len_incr += map[k];
+ *off += off_incr;
+ *len += len_incr;
+ }
+}
+
size_t
Fexecute (char const *buf, size_t size, size_t *match_size,
char const *start_ptr)
diff --git a/src/main.c b/src/main.c
index b07bde8..7c04d77 100644
--- a/src/main.c
+++ b/src/main.c
@@ -398,7 +398,7 @@ static enum
static int grepfile (int, char const *, int, int);
static int grepdesc (int, int);
#if defined HAVE_DOS_FILE_CONTENTS
-static inline int undossify_input (char *, size_t);
+static int undossify_input (char *, size_t);
#endif
static int
diff --git a/src/search.h b/src/search.h
index 12d0822..91f0271 100644
--- a/src/search.h
+++ b/src/search.h
@@ -61,23 +61,4 @@ extern size_t Fexecute (char const *, size_t, size_t *, char
const *);
extern void Pcompile (char const *, size_t);
extern size_t Pexecute (char const *, size_t, size_t *, char const *);
-/* Apply the MAP (created by mbtolower) to the lowercase-buffer-relative
- *OFF and *LEN, converting them to be relative to the original buffer. */
-static inline void
-mb_case_map_apply (mb_len_map_t const *map, size_t *off, size_t *len)
-{
- if (map)
- {
- intmax_t off_incr = 0;
- intmax_t len_incr = 0;
- size_t k;
- for (k = 0; k < *off; k++)
- off_incr += map[k];
- for (k = *off; k < *off + *len; k++)
- len_incr += map[k];
- *off += off_incr;
- *len += len_incr;
- }
-}
-
#endif /* GREP_SEARCH_H */
-----------------------------------------------------------------------
Summary of changes:
src/dfa.c | 2 +-
src/dosbuf.c | 6 +++---
src/kwsearch.c | 20 ++++++++++++++++++++
src/main.c | 2 +-
src/search.h | 19 -------------------
5 files changed, 25 insertions(+), 24 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.18-12-gb446793,
Paul Eggert <=