File:  [Research Unix] / researchv9 / jerq / sgs / libsdp / fatal.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:22:00 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

static char ID[] = "@(#) fatal.c: 1.1 3/16/82";
#include <stdio.h>
#include "sdp.h"

char	*llaerrfile = "stderr" ;
int	mesg_flag = MESGON ;

FATAL(msg,v1,v2,v3,v4,v5,v6,v7)
char	*msg ;
int	v1 ;
int	v2 ;
int	v3 ;
int	v4 ;
int	v5 ;
int	v6 ;
int	v7 ;
{
	static FILE	*fp = NULL ;

	switch(fp)
	{
		case NULL:
			if(strcmp(llaerrfile,"stderr") == 0)
				fp = stderr ;
			else if( (fp = fopen(llaerrfile,"w")) == NULL )
				exit(-2) ;
		default:
			if(mesg_flag == MESGON)
				fprintf(fp,msg,v1,v2,v3,v4,v5,v6,v7) ;
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.