summaryrefslogtreecommitdiff
path: root/dviware/beebe/src/alldone.h
blob: 4fc694cf36bc897c81b0f75dedf449d6f7eca949 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* -*-C-*- alldone.h */
/*-->alldone*/
/**********************************************************************/
/****************************** alldone  ******************************/
/**********************************************************************/

void
alldone()

{
    register int t;

    if ((g_errenc != 0) && g_dolog && (g_logfp != (FILE *)NULL))
    {		/* errors occurred - copy log file to stderr */
	(void)fflush(g_logfp);		/* make sure file is up-to-date */
	(void)REWIND(g_logfp);		/* rewind it */
	while ((t=(int)getc(g_logfp)) != EOF)	/* copy to stderr */
	    (void)putc((char)t,stderr);
	(void)fclose(g_logfp);		/* close it */
	g_logfp = (FILE *)NULL;
    }
    abortrun(g_errenc);
}