home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Education
/
collectionofeducationcarat1997.iso
/
SCIENCE
/
STAGES12.ZIP
/
PRINTS1.C
< prev
next >
Wrap
Text File
|
1991-04-16
|
27KB
|
913 lines
#include "header.h"
#include "file.h"
/************************************************************************/
/** print routines: part 1 **/
/************************************************************************/
/* contains: printintro
printoutputhdr
printstgdat
printstgdatHARD
printseqdat1
printseqdat
printseqdatHARD
*/
/********************************/
/* function: printintro */
/********************************/
/* prints out title page information */
printintro (termq, fileq)
int termq, fileq;
{
#if PC
int i;
#endif
#if PC
if (termq) {
i = 1;
printline(4, LNWID, '-'); /* to file and printer only */
clrscr1(3);
clrscr1(1);
gotoxy(1, i++);
highvideo();
cprintf("%sStages Program [Version %s]", tab, VERSION);
normvideo();
i++;
gotoxy(1, i++);
cprintf("%sA Spermatogenesis Stage Predictor Program", tab);
gotoxy(1, i++);
cprintf("%sDeveloped at the University of Illinois, Urbana, IL", tab);
gotoxy(1, i++);
cprintf("%s Programmer: Paul P. Chen", tab);
i++;
gotoxy(1, i++);
cprintf("%sDirect correspondence to:", tab);
gotoxy(1, i++);
cprintf("%s Dr. Rex A. Hess", tab);
gotoxy(1, i++);
cprintf("%s Veterinary Biosciences", tab);
gotoxy(1, i++);
cprintf("%s University of Illinois at Urbana-Champaign", tab);
gotoxy(1, i++);
cprintf("%s 2001 S. Lincoln Ave.", tab);
gotoxy(1, i++);
cprintf("%s Urbana, IL 61801", tab);
gotoxy(1, i++);
cprintf("%s Tel: 217/333-8933 or 333-2506", tab);
gotoxy(1, i++);
cprintf("%s FAX: 217/333-4628", tab);
clrscr1(3);
gotoxy(9, 2);
cprintf("Created using Turbo C, copyright Borland 1987, 1988.");
hitreturn(1);
} /* if termq */
if (HARDCOPY) {
introprint = 1;
fprintf(stdprn, "\n\n");
printline(2, LNWID, '-');
fprintf(stdprn, "\tStages Program [Version %s]\n", VERSION);
fprintf(stdprn, "\tA Spermatogenesis Stage Predictor Program\n");
fprintf(stdprn, "\tDeveloped at the University of Illinois, ");
fprintf(stdprn, "Urbana, IL\n");
fprintf(stdprn, "\t Programmer: Paul P. Chen\n\n");
fprintf(stdprn, "\tDirect correspondence to:\n");
fprintf(stdprn, "\t Dr. Rex A. Hess\n");
fprintf(stdprn, "\t Veterinary Biosciences\n");
fprintf(stdprn, "\t University of Illinois at ");
fprintf(stdprn, "Urbana-Champaign\n");
fprintf(stdprn, "\t 2001 S. Lincoln Avenue\n");
fprintf(stdprn, "\t Urbana, IL 61801\n");
fprintf(stdprn, "\t Tel: 217/333-8933 or 333-2506\n");
fprintf(stdprn, "\t FAX: 217/333-4628\n\n");
fprintf(stdprn, "\tCreated using Turbo C, ");
fprintf(stdprn, "copyright Borland 1987, 1988.\n");
printline(2, LNWID, '-');
} /* if HARDCOPY */
#else
if (termq) {
printf("\n\n");
printline(0, LNWID, '-');
printf("\tStages Program [Version %s]\n\n", VERSION);
printf("\tA Spermatogenesis Stage Predictor Program\n");
printf("\tDeveloped at the University of Illinois, Urbana, IL\n");
printf("\t Programmer: Paul P. Chen\n\n");
printf("\tDirect correspondence to:\n");
printf("\t Dr. Rex A. Hess\n");
printf("\t Veterinary Biosciences\n");
printf("\t University of Illinois at Urbana-Champaign\n");
printf("\t 2001 S. Lincoln Ave.\n");
printf("\t Urbana, IL 61801\n");
printf("\t Tel: 217/333-8933 or 333-2506\n");
printf("\t FAX: 217/333-4628\n\n");
printf("\tCreated using Turbo C, ");
printf("copyright Borland 1987, 1988.\n");
printline(0, LNWID, '-');
} /* if termq */
#endif
if (fileq) {
fprintf(fpout, "\n\n");
printline(1, LNWID, '-');
fprintf(fpout, "\tStages Program [Version %s]\n", VERSION);
fprintf(fpout, "\tA Spermatogenesis Stage Predictor Program\n");
fprintf(fpout, "\tDeveloped at the University of Illinois, ");
fprintf(fpout, "Urbana, IL\n");
fprintf(fpout, "\t Programmer: Paul P. Chen\n\n");
fprintf(fpout, "\tDirect correspondence to:\n");
fprintf(fpout, "\t Dr. Rex A. Hess\n");
fprintf(fpout, "\t Veterinary Biosciences\n");
fprintf(fpout, "\t University of Illinois at ");
fprintf(fpout, "Urbana-Champaign\n");
fprintf(fpout, "\t 2001 S. Lincoln Avenue\n");
fprintf(fpout, "\t Urbana, IL 61801\n");
fprintf(fpout, "\t Tel: 217/333-8933 or 333-2506\n");
fprintf(fpout, "\t FAX: 217/333-4628\n\n");
fprintf(fpout, "\tCreated using Turbo C, ");
fprintf(fpout, "copyright Borland 1987, 1988.\n");
printline(1, LNWID, '-');
} /* if fileq */
return(0);
} /* printintro */
/********************************/
/* function: printoutputhdr */
/********************************/
printoutputhdr (argc, argv, pbadipfil, interactive, ok,
ipfil, opfil, stgfil, seqfil)
int argc;
char *argv[];
int *pbadipfil, interactive, ok;
char *ipfil, *opfil, *stgfil, *seqfil;
{
int j, ok1, val;
char dummy[MAXLEN]; /* user string input (y/n) */
#if PC
int i;
i = 3;
printline(4, LNWID, '-'); /* to file and printer only */
topline(""); /* puts animal name at top */
clrscr1(1);
gotoxy(1, i++);
cprintf("%sStages Program Output", tab);
gotoxy(1, i++);
cprintf("%sCalled by command: ", tab);
if (HARDCOPY) {
fprintf(stdprn, "\tStages Program Output\n\n");
fprintf(stdprn, "\tCalled by command: ");
}
#else
printf("\n\n");
printline(3, LNWID, '-');
printf("\tStages Program Output\n\n");
printf("\tCalled by command: ");
#endif
if (FILEq && FILECOPY) {
fprintf(fpout, "\tStages Program Output\n\n");
fprintf(fpout, "\tCalled by command: ");
}
for ( j=0; j<argc; j++ ) {
#if PC
cprintf(" %s", argv[j]);
if (HARDCOPY)
fprintf(stdprn, " %s", argv[j]);
#else
printf(" %s", argv[j]);
#endif
if (FILEq && FILECOPY)
fprintf(fpout, " %s", argv[j]);
} /* for j */
#if PC
i++; /* skip a line */
if (HARDCOPY)
fprintf(stdprn, "\n\n");
#else
printf("\n\n");
#endif
if (FILEq && FILECOPY)
fprintf(fpout, "\n\n");
if (! ok) {
#if PC
msgwin();
gotoxy(1, 1);
cprintf("%sUnrecognized option(s) ignored.", tab);
if (HARDCOPY)
fprintf(stdprn, "\tUnrecognized option(s) ignored.\n\n");
#else
printf("\tUnrecognized option(s) ignored.\n\n");
#endif
if (FILEq && FILECOPY)
fprintf(fpout, "\tUnrecognized option(s) ignored.\n\n");
} /* !ok */
if (*pbadipfil) { /* interactive because ipfil not found */
/* reset badipfil: don't want to print out this error msg more than once */
*pbadipfil = 0;
#if PC
msgwin();
gotoxy(1, 2);
cprintf("%sInvalid batch input file <%s> specified.", tab, ipfil);
gotoxy(1, 3);
cprintf("%sInput must be entered interactively.", tab);
outputwin();
gotoxy(1, i++);
cprintf("%sInput must be entered interactively.", tab);
if (HARDCOPY) {
fprintf(stdprn, "\tInvalid batch input file <%s> specified.\n", ipfil);
fprintf(stdprn, "\t Input must be entered interactively.\n");
}
#else
printf("\tInvalid batch input file <%s> specified.\n", ipfil);
printf("\t Input must be entered interactively.\n");
#endif
if (FILEq && FILECOPY) {
fprintf(fpout, "\tInvalid batch input file <%s> specified.\n", ipfil);
fprintf(fpout, "\t Input entered interactively.\n");
}
} else { /* !badipfil */
if (interactive) {
#if PC
outputwin();
gotoxy(1, i++);
cprintf("%sInput entered interactively.", tab);
if (HARDCOPY)
fprintf(stdprn, "\tInput entered interactively.\n");
#else
printf("\tInput entered interactively.\n");
#endif
if (FILEq && FILECOPY)
fprintf(fpout, "\tInput entered interactively.\n");
} else { /* input from file */
#if PC
outputwin();
gotoxy(1, i++);
cprintf("%sInput taken from file <%s>.", tab, ipfil)