home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
nisttime.carsoncity.k12.mi.us
/
nisttime.carsoncity.k12.mi.us.tar
/
nisttime.carsoncity.k12.mi.us
/
pub
/
autolock
/
getautolock.c
< prev
next >
Wrap
C/C++ Source or Header
|
2003-12-09
|
1KB
|
37 lines
#include <stdio.h>
void getautolock(lop,autolock)
FILE **lop; /*file was opened in caller */
struct autolockst *autolock;
{
#include "autolock.h"
/*
this subroutine reads structure data into
the structure pointed to by autolock. the file
that is read was opened by the caller via fopen
and lop is the file structure returned from that
fopen
*/
if(fscanf(*lop,LFMT,&autolock->day) == EOF)
{
autolock->day=0;
return;
}
fscanf(*lop,LFMT,&autolock->fday);
fscanf(*lop," %d", &autolock->mode);
fscanf(*lop," %le",&autolock->x);
fscanf(*lop," %e",&autolock->rms);
fscanf(*lop," %e",&autolock->rms_avg);
fscanf(*lop," %d",&autolock->nval);
fscanf(*lop," %le",&autolock->y);
fscanf(*lop," %le",&autolock->d);
fscanf(*lop," %d",&autolock->srv);
fscanf(*lop," %d",&autolock->flags);
fscanf(*lop," %d",&autolock->waitn);
fscanf(*lop," %d",&autolock->waitx);
fscanf(*lop," %le",&autolock->errx);
fscanf(*lop," %le",&autolock->ybar);
fscanf(*lop," %d", &autolock->fcon);
fscanf(*lop," %le",&autolock->sumerr);
while(fgetc(*lop) != '\n') ; /*skip to end of line*/
}