int globals (int);
void yyerror (char *, char *);
void usage (int) NO_RETURN;
-void version () NO_RETURN;
+void version (void) NO_RETURN;
\f
name and line number. */
void
-yyerror (format, s)
- char *format, *s;
+yyerror (char *format, char *s)
{
fprintf (stderr, "%s:%d: ", filename, yyline);
fprintf (stderr, format, s);
available. */
void *
-xmalloc (nbytes)
- int nbytes;
+xmalloc (int nbytes)
{
void *p = malloc (nbytes);
if (p == NULL)
/* Like realloc but print an error and exit if out of memory. */
void *
-xrealloc (p, sz)
- void *p;
- int sz;
+xrealloc (void *p, int sz)
{
p = realloc (p, sz);
if (p == NULL)
available.. If S is null, return null. */
char *
-xstrdup (s)
- char *s;
+xstrdup (char *s)
{
if (s)
s = strcpy (xmalloc (strlen (s) + 1), s);
special symbol for globals (`*Globals*'). */
void
-init_sym ()
+init_sym (void)
{
global_symbols = add_sym (GLOBALS_NAME, NULL);
}
create a new symbol and set it to default values. */
struct sym *
-add_sym (name, nested_in_class)
- char *name;
- struct sym *nested_in_class;
+add_sym (char *name, struct sym *nested_in_class)
{
struct sym *sym;
unsigned h;
/* Add links between superclass SUPER and subclass SUB. */
void
-add_link (super, sub)
- struct sym *super, *sub;
+add_link (struct sym *super, struct sym *sub)
{
struct link *lnk, *lnk2, *p, *prev;
found or null if not found. */
struct member *
-find_member (cls, name, var, sc, hash)
- struct sym *cls;
- char *name;
- int var, sc;
- unsigned hash;
+find_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
{
struct member **list;
struct member *p;
F_* defines). */
void
-add_member_decl (cls, name, regexp, pos, hash, var, sc, vis, flags)
- struct sym *cls;
- char *name;
- char *regexp;
- int pos;
- unsigned hash;
- int var;
- int sc;
- int vis;
- int flags;
+add_member_decl (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int vis, int flags)
{
struct member *m;
F_* defines). */
void
-add_member_defn (cls, name, regexp, pos, hash, var, sc, flags)
- struct sym *cls;
- char *name;
- char *regexp;
- int pos;
- unsigned hash;
- int var;
- int sc;
- int flags;
+add_member_defn (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
{
struct member *m;
if it is non-null. POS is the position in the file. */
void
-add_define (name, regexp, pos)
- char *name, *regexp;
- int pos;
+add_define (char *name, char *regexp, int pos)
{
add_global_defn (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
add_global_decl (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
F_* defines). */
void
-add_global_defn (name, regexp, pos, hash, var, sc, flags)
- char *name, *regexp;
- int pos;
- unsigned hash;
- int var;
- int sc;
- int flags;
+add_global_defn (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
{
int i;
struct sym *sym;
F_* defines). */
void
-add_global_decl (name, regexp, pos, hash, var, sc, flags)
- char *name, *regexp;
- int pos;
- unsigned hash;
- int var;
- int sc;
- int flags;
+add_global_decl (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
{
/* Add declaration only if not already declared. Header files must
be processed before source files for this to have the right effect.
Value is a pointer to the member's structure. */
struct member *
-add_member (cls, name, var, sc, hash)
- struct sym *cls;
- char *name;
- int var;
- int sc;
- unsigned hash;
+add_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
{
struct member *m = (struct member *) xmalloc (sizeof *m + strlen (name));
struct member **list;
in base classes. */
void
-mark_virtual (r)
- struct sym *r;
+mark_virtual (struct sym *r)
{
struct link *p;
struct member *m, *m2;
are virtual because of a virtual declaration in a base class. */
void
-mark_inherited_virtual ()
+mark_inherited_virtual (void)
{
struct sym *r;
int i;
/* Create and return a symbol for a namespace with name NAME. */
struct sym *
-make_namespace (name, context)
- char *name;
- struct sym *context;
+make_namespace (char *name, struct sym *context)
{
struct sym *s = (struct sym *) xmalloc (sizeof *s + strlen (name));
bzero (s, sizeof *s);
/* Find the symbol for namespace NAME. If not found, retrun NULL */
struct sym *
-check_namespace (name, context)
- char *name;
- struct sym *context;
+check_namespace (char *name, struct sym *context)
{
struct sym *p = NULL;
for NAME to all_namespaces. */
struct sym *
-find_namespace (name, context)
- char *name;
- struct sym *context;
+find_namespace (char *name, struct sym *context)
{
struct sym *p = check_namespace (name, context);
/* Find namespace alias with name NAME. If not found return NULL. */
struct link *
-check_namespace_alias (name)
- char *name;
+check_namespace_alias (char *name)
{
struct link *p = NULL;
struct alias *al;
/* Register the name NEW_NAME as an alias for namespace list OLD_NAME. */
void
-register_namespace_alias (new_name, old_name)
- char *new_name;
- struct link *old_name;
+register_namespace_alias (char *new_name, struct link *old_name)
{
unsigned h;
char *s;
/* Enter namespace with name NAME. */
void
-enter_namespace (name)
- char *name;
+enter_namespace (char *name)
{
struct sym *p = find_namespace (name, current_namespace);
/* Leave the current namespace. */
void
-leave_namespace ()
+leave_namespace (void)
{
assert (namespace_sp > 0);
current_namespace = namespace_stack[--namespace_sp];
/* Make sure scope_buffer has enough room to add LEN chars to it. */
void
-ensure_scope_buffer_room (len)
- int len;
+ensure_scope_buffer_room (int len)
{
if (scope_buffer_len + len >= scope_buffer_size)
{
scope name constructed. */
char *
-sym_scope_1 (p)
- struct sym *p;
+sym_scope_1 (struct sym *p)
{
int len;
as it would appear in a C*+ source file. */
char *
-sym_scope (p)
- struct sym *p;
+sym_scope (struct sym *p)
{
if (!scope_buffer)
{
list. */
int
-dump_members (fp, m)
- FILE *fp;
- struct member *m;
+dump_members (FILE *fp, struct member *m)
{
int n;
/* Dump class ROOT to stream FP. */
void
-dump_sym (fp, root)
- FILE *fp;
- struct sym *root;
+dump_sym (FILE *fp, struct sym *root)
{
fputs (CLASS_STRUCT, fp);
PUTSTR (root->name, fp);
number of classes written. */
int
-dump_tree (fp, root)
- FILE *fp;
- struct sym *root;
+dump_tree (FILE *fp, struct sym *root)
{
struct link *lk;
unsigned n = 0;
/* Dump the entire class tree to file FP. */
void
-dump_roots (fp)
- FILE *fp;
+dump_roots (FILE *fp)
{
int i, n = 0;
struct sym *r;
input buffer not consumed. */
int
-process_pp_line ()
+process_pp_line (void)
{
int in_comment = 0, in_string = 0;
int c;
/* Value is the next token from the input buffer. */
int
-yylex ()
+yylex (void)
{
int c;
char end_char;
shorter than min_regexp. */
char *
-matching_regexp ()
+matching_regexp (void)
{
char *p;
char *s;
/* Return a printable representation of token T. */
char *
-token_string (t)
- int t;
+token_string (int t)
{
static char b[3];
/* Reinitialize the scanner for a new input file. */
void
-re_init_scanner ()
+re_init_scanner (void)
{
in = inbuffer;
yyline = 1;
table. */
void
-insert_keyword (name, tk)
- char *name;
- int tk;
+insert_keyword (char *name, int tk)
{
char *s;
unsigned h = 0;
character class vectors and fills the keyword hash table. */
void
-init_scanner ()
+init_scanner (void)
{
int i;
the current lookahead token after skipping. */
int
-skip_to (token)
- int token;
+skip_to (int token)
{
while (!LOOKING_AT2 (YYEOF, token))
MATCH ();
angle brackets, curly brackets) matching the current lookahead. */
void
-skip_matching ()
+skip_matching (void)
{
int open, close, n;
}
void
-skip_initializer ()
+skip_initializer (void)
{
for (;;)
{
/* Build qualified namespace alias (A::B::c) and return it. */
struct link *
-match_qualified_namespace_alias ()
+match_qualified_namespace_alias (void)
{
struct link *head = NULL;
struct link *cur = NULL;
/* Re-initialize the parser by resetting the lookahead token. */
void
-re_init_parser ()
+re_init_parser (void)
{
tk = -1;
}
distinguish between overloaded functions. */
unsigned
-parm_list (flags)
- int *flags;
+parm_list (int *flags)
{
unsigned hash = 0;
int type_seen = 0;
/* Print position info to stdout. */
void
-print_info ()
+print_info (void)
{
if (info_position >= 0 && BUFFER_POS () <= info_position)
if (info_cls)
public). */
void
-member (cls, vis)
- struct sym *cls;
- int vis;
+member (struct sym *cls, int vis)
{
char *id = NULL;
int sc = SC_MEMBER;
union, class). */
void
-class_body (cls, tag)
- struct sym *cls;
- int tag;
+class_body (struct sym *cls, int tag)
{
int vis = tag == CLASS ? PRIVATE : PUBLIC;
int temp;
symbol for that class. */
struct sym *
-parse_classname ()
+parse_classname (void)
{
struct sym *last_class = NULL;
a static buffer holding the constructed operator name string. */
char *
-operator_name (sc)
- int *sc;
+operator_name (int *sc)
{
static int id_size = 0;
static char *id = NULL;
symbol structure for the ident. */
struct sym *
-parse_qualified_ident_or_type (last_id)
- char **last_id;
+parse_qualified_ident_or_type (char **last_id)
{
struct sym *cls = NULL;
char *id = NULL;
symbol structure for the ident. */
void
-parse_qualified_param_ident_or_type (last_id)
- char **last_id;
+parse_qualified_param_ident_or_type (char **last_id)
{
struct sym *cls = NULL;
static char *id = NULL;
Current lookahead is the class name. */
void
-class_definition (containing, tag, flags, nested)
- struct sym *containing;
- int tag;
- int flags;
- int nested;
+class_definition (struct sym *containing, int tag, int flags, int nested)
{
struct sym *current;
struct sym *base_class;
information about the member (see the F_* defines). */
void
-add_declarator (cls, id, flags, sc)
- struct sym **cls;
- char **id;
- int flags, sc;
+add_declarator (struct sym **cls, char **id, int flags, int sc)
{
if (LOOKING_AT2 (';', ','))
{
/* Parse a declaration. */
void
-declaration (flags)
- int flags;
+declaration (int flags)
{
char *id = NULL;
struct sym *cls = NULL;
otherwise. */
int
-globals (start_flags)
- int start_flags;
+globals (int start_flags)
{
int anonymous;
int class_tk;
/* Parse the current input file. */
void
-yyparse ()
+yyparse (void)
{
while (globals (0) == 0)
MATCH_IF ('}');
input files. */
void
-add_search_path (path_list)
- char *path_list;
+add_search_path (char *path_list)
{
while (*path_list)
{
unchanged file name. */
FILE *
-open_file (file)
- char *file;
+open_file (char *file)
{
FILE *fp = NULL;
static char *buffer;
"
void
-usage (error)
- int error;
+usage (int error)
{
puts (USAGE);
exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
#endif
void
-version ()
+version (void)
{
/* Makes it easier to update automatically. */
char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
table. */
void
-process_file (file)
- char *file;
+process_file (char *file)
{
FILE *fp;
is null when EOF is reached. */
char *
-read_line (fp)
- FILE *fp;
+read_line (FILE *fp)
{
static char *buffer;
static int buffer_size;
/* Main entry point. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int i;
int any_inputfiles = 0;