Changes for WEB2C.YACC by Andreas Scherer, March 23, 1995.

@x l.23
#include "web2c.h"
@y
#include "andyweb2c.h"
@z

@x l.48
static long my_labs();
static void compute_array_bounds(), fixup_var_list();
static void do_proc_args(), gen_function_head();
static boolean doreturn();
@y
static long my_labs(long);
static void compute_array_bounds(void);
static void fixup_var_list(void);
static void do_proc_args(void);
static void gen_function_head(void);
static boolean doreturn(char *);
@z

@x l.1118
static void compute_array_bounds()
@y
static void compute_array_bounds(void)
@z

@x l.1170
fixup_var_list ()
@y
fixup_var_list (void)
@z

@x l.1204
doreturn (label)
    char *label;
@y
doreturn (
    char *label)
@z

@x l.1219
my_labs (x)
  long x;
@y
my_labs (
  long x)
@z

The following code is from Web2C 5.8 and produces `real' function
declarations in the automatically created header files.

@x l.1227
do_proc_args ()
{
  fprintf (coerce, "%s %s();\n", fn_return_type, z_id);
}
@y
do_proc_args (void)
{
    int i, var;
    boolean ansi=true;

    /*
     * If we want ANSI code and one of the parameters is a var parameter,
     * then use the #define to add the &.  We do this by adding a 'z' at
     * the front of the name.  gen_function_head will do the real work.
     */
    if (ansi) {
	var = 0;
	for (i=0; i<ids_paramed; ++i)
	    var += sym_table[param_id_list[i]].var_formal;
	if (var) {
	    for (i=strlen(z_id); i>=0; --i)
		z_id[i+1] = z_id[i];
	    z_id[0] = 'z';
	}

	fprintf(coerce, "%s %s(", fn_return_type, z_id);
	if (ids_paramed == 0) fprintf(coerce, "void");
	for (i=0; i<ids_paramed; i++) {
	    if (i > 0) putc(',', coerce);
	    fprintf(coerce, "%s %s",
		arg_type[i],
		symbol(param_id_list[i]));
	}
	fprintf(coerce, ");\n");
    } else
	fprintf(coerce, "%s %s();\n", fn_return_type, z_id);
}
@z

@x l.1233
gen_function_head()
@y
gen_function_head(void)
@z
