-/* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*-
+/* Tags file maker to go with GNU Emacs -*- coding: utf-8 -*-
Copyright (C) 1984 The Regents of the University of California
* 1985 Emacs TAGS format by Richard Stallman.
* 1989 Sam Kendall added C++.
* 1992 Joseph B. Wells improved C and C++ parsing.
- * 1993 Francesco Potortì reorganized C and C++.
+ * 1993 Francesco Potortì reorganized C and C++.
* 1994 Line-by-line regexp tags by Tom Tromey.
- * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba).
- * 2002 #line directives by Francesco Potortì.
+ * 2001 Nested classes by Francesco Potortì (concept by Mykola Dzyuba).
+ * 2002 #line directives by Francesco Potortì.
*
- * Francesco Potortì <pot@gnu.org> has maintained and improved it since 1993.
+ * Francesco Potortì <pot@gnu.org> has maintained and improved it since 1993.
*/
/*
static void Yacc_entries (FILE *);
static void just_read_file (FILE *);
-static void print_language_names (void);
-static void print_version (void);
-static void print_help (argument *);
-int main (int, char **);
-
-static compressor *get_compressor_from_suffix (char *, char **);
static language *get_language_from_langname (const char *);
-static language *get_language_from_interpreter (char *);
-static language *get_language_from_filename (char *, bool);
static void readline (linebuffer *, FILE *);
static long readline_internal (linebuffer *, FILE *);
static bool nocase_tail (const char *);
static void free_tree (node *);
static void free_fdesc (fdesc *);
static void pfnote (char *, bool, char *, int, int, long);
-static void make_tag (const char *, int, bool, char *, int, int, long);
static void invalidate_nodes (fdesc *, node **);
static void put_entries (node *);
#ifndef VERSION
# define VERSION "17.38.1.4"
#endif
-static void
+static _Noreturn void
print_version (void)
{
char emacs_copyright[] = COPYRIGHT;
# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE
#endif
-static void
+static _Noreturn void
print_help (argument *argbuffer)
{
bool help_for_lang = FALSE;
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
%[
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,
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;
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];
* Perl variable names: /^(my|local).../
* Original code by Bart Robinson <lomew@cs.utah.edu> (1995)
* Additions by Michael Ernst <mernst@alum.mit.edu> (1997)
- * Ideas by Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> (2001)
+ * Ideas by Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> (2001)
*/
static void
Perl_functions (FILE *inf)
* Contents of <title>, <h1>, <h2>, <h3> are tags.
* Contents of <a name=xxx> are tags with name xxx.
*
- * Francesco Potortì, 2002.
+ * Francesco Potortì, 2002.
*/
static void
HTML_labels (FILE *inf)
/* regexfile is a file containing regexps, one per line. */
regexfp = fopen (regexfile, "r");
if (regexfp == NULL)
- {
- pfatal (regexfile);
- return;
- }
+ pfatal (regexfile);
linebuffer_init (®exbuf);
while (readline_internal (®exbuf, regexfp) > 0)
analyse_regex (regexbuf.buffer);