#include <ncbi.h>
#include <gish.h>
#include <gishlib.h>
#include "blastapp.h"

/*
	banner -- display a program banner consisting of program name
	and version on stdout.
*/
void
banner(fullname, version, rel_date, citation, notice)
	CharPtr	fullname;
	CharPtr	version, rel_date, citation, notice;
{
	register char	*cp, ch;

	module = cp = str_dup(basename(fullname, NULL));
	for (; isalnum(ch = *cp); ++cp) {
		if (islower(ch))
			ch = toupper(ch);
		putchar(ch);
	}

	if (version != NULL)
#ifdef MPROC_AVAIL
		printf(" %sMP", version);
#else
		printf(" %s", version);
#endif

	if (rel_date != NULL)
		printf(" [%s]", rel_date);

#if defined(__DATE__) && defined(__TIME__)
	if (cc_date[0] != '\0' && cc_time[0] != '\0')
		printf(" [Build %s %s]", cc_time, cc_date);
#endif

	printf("\n\n");

	if (citation != NULL) {
		wrap(stdout, "Reference:  ", citation, -1, 79, 0);
		putchar('\n');
	}

	if (notice != NULL) {
		wrap(stdout, "Notice:  ", notice, -1, 79, 0);
		putchar('\n');
	}
}
