summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib-src/ChangeLog7
-rw-r--r--lib-src/ebrowse.c2
-rw-r--r--lib-src/etags.c20
-rw-r--r--lib-src/make-docfile.c2
4 files changed, 17 insertions, 14 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index e60b415ae17..00a42ccf49f 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,12 @@
2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
+ Prefer plain 'static' to 'static inline' (Bug#12541).
+ I missed these instances of 'static inline' in an earlier sweep.
+ * ebrowse.c (putstr):
+ * etags.c (hash):
+ * make-docfile.c (put_char): No longer inline.
+ * etags.c (hash): Prefer int to unsigned when either will do.
+
Use C99-style flexible array members if available.
* ebrowse.c: Include <stddef.h>, for offsetof.
(struct member, struct alias, struct sym):
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 2828591ed3f..407f769afc8 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -1096,7 +1096,7 @@ leave_namespace (void)
/* Write string S to the output file FP in a Lisp-readable form.
If S is null, write out `()'. */
-static inline void
+static void
putstr (const char *s, FILE *fp)
{
if (!s)
diff --git a/lib-src/etags.c b/lib-src/etags.c
index f6b173bf465..aa8c773e357 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -2240,10 +2240,6 @@ enum sym_type
st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef
};
-static unsigned int hash (const char *, unsigned int);
-static struct C_stab_entry * in_word_set (const char *, unsigned int);
-static enum sym_type C_symtype (char *, int, int);
-
/* Feed stuff between (but not including) %[ and %] lines to:
gperf -m 5
%[
@@ -2302,10 +2298,10 @@ and replace lines between %< and %> with its output, then:
struct C_stab_entry { const char *name; int c_ext; enum sym_type type; };
/* maximum key range = 33, duplicates = 0 */
-static inline unsigned int
-hash (register const char *str, register unsigned int len)
+static int
+hash (const char *str, int len)
{
- static unsigned char asso_values[] =
+ static char const asso_values[] =
{
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -2334,15 +2330,15 @@ hash (register const char *str, register unsigned int len)
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35
};
- register int hval = len;
+ int hval = len;
switch (hval)
{
default:
- hval += asso_values[(unsigned char)str[2]];
+ hval += asso_values[(unsigned char) str[2]];
/*FALLTHROUGH*/
case 2:
- hval += asso_values[(unsigned char)str[1]];
+ hval += asso_values[(unsigned char) str[1]];
break;
}
return hval;
@@ -2400,11 +2396,11 @@ in_word_set (register const char *str, register unsigned int len)
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
- register const char *s = wordlist[key].name;
+ const char *s = wordlist[key].name;
if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
return &wordlist[key];
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 8fa70dd430e..9bc91bc4f77 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -276,7 +276,7 @@ struct rcsoc_state
/* Output CH to the file or buffer in STATE. Any pending newlines or
spaces are output first. */
-static inline void
+static void
put_char (int ch, struct rcsoc_state *state)
{
int out_ch;