DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T c

⟦4d564b858⟧ TextFile

    Length: 864 (0x360)
    Types: TextFile
    Names: »cvinit.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Crystal/cvinit.c« 

TextFile

/*	cvinit.c
 *		initialization called the first time (taken care of by the
 *		makefile.
 ************************************************************************/

#include	<stdio.h>
#include	<fcntl.h>
#include	"cvmisc.h"
#include	"cvinit.h"

extern long time();
extern long ptime;

cvinit(argc,argv)
int argc;
char *argv[];
{
	auto int r;
	auto unsigned length;
	auto long where,offset;
	extern char datastart,bssstart;
	if ( (r = open(path,O_RDWR|O_EXCL|O_CREAT,0700)) == EOF) {
		perror(argv[0]);
		exit(1);
	}
	fixrmsg();	/* fix up messages that are too long for C */
	checkloc();	/* check the location array */
	checkobj();	/* check the objects array */
	saved = 1;
	(void) time(&ptime);
	length = &bssstart - &datastart;
	if (write(r,&datastart,length) == EOF) {
		perror(argv[0]);
		exit(1);
	}
	if (close(r)) {
		perror(argv[0]);
		exit(1);
	}
	return;
}