/* How “hello, world” really *should* have been written in K&R C. */

#include <varargs.h>
#include <stdio.h>

print(format, va_alist)
char *format;
va_dcl
{   
	va_list ap;

	va_start(ap);
	if (vprintf(format, ap) < 0) abort();
	va_end(ap);
}

flush(file)
FILE *file;
{
	if (fflush(file) == EOF) abort();
}

main()
{
	print("hello, world\n");
	flush(stdout);
	return 0;
}

