/* %Z%%M% %I% %E% */

/*
 * Copyright (c) 1991, 1992, 1993, 1995 by Wayne C. Gramlich.
 * All rights reserved.
 *
 * Permission to use, copy, modify, distribute, and sell this software
 * for any purpose is hereby granted without fee provided that the above
 * copyright notice and this permission are retained.  The author makes
 * no representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */

/* This program generates the file stheaders.h. */

#ifndef UNIX_ASSERT_H
#include "unix_assert.h"
#endif

#ifndef UNIX_STDIO_H
#include "unix_stdio.h"
#endif

extern char *run__time__enums;
extern char *run__time__type_defs;
extern char *run__time__struct_defs;

int
main(void)
{
	Stdio		out_file;

	out_file = fopen("stheaders.h", "w");
	assert(out_file != (Stdio)0);
	(void)fprintf(out_file,
		"/* This file is machine generated by stheaders: */\n");
	(void)fprintf(out_file, "\n");
	(void)fprintf(out_file, "#ifndef STHEADERS_H\n");
	(void)fprintf(out_file, "#define STHEADERS_H\n");
	(void)fprintf(out_file, "\n");
	(void)fprintf(out_file, "#ifndef ROUTINE_INFO_TYPES\n");
	(void)fprintf(out_file, "#include \"routine_info_types.h\"\n");
	(void)fprintf(out_file, "#endif\n");
	(void)fprintf(out_file, "\n");
	(void)fprintf(out_file, "%s", run__time__enums);
	(void)fprintf(out_file, "%s", run__time__type_defs);
	(void)fprintf(out_file, "%s", run__time__struct_defs);
	(void)fprintf(out_file, "#endif /* STHEADERS_H */\n");
	(void)fclose(out_file);
	return 0;
}
