home *** CD-ROM | disk | FTP | other *** search
/ nisttime.carsoncity.k12.mi.us / nisttime.carsoncity.k12.mi.us.tar / nisttime.carsoncity.k12.mi.us / pub / lockclock / putlock.c < prev    next >
C/C++ Source or Header  |  1996-11-18  |  721b  |  27 lines

  1. #include <stdio.h>
  2. #include "lock.h"
  3. void putlock(lop,lock)
  4. FILE **lop;        /*file was opened in caller */
  5. struct lockst *lock;
  6. {
  7. /*
  8.     this subroutine writes structure data from
  9.     structure to the stream file lop. The file
  10.     was opened by the caller via fopen
  11.     and lop is the file structure returned from that
  12.     fopen
  13. */
  14.     fprintf(*lop,L5FMT,lock->day);
  15.     fprintf(*lop,L5FMT,lock->fday);
  16.     fprintf(*lop," %2d",lock->mode);
  17.     fprintf(*lop," % .4le % .4le % .4le",lock->x,lock->y,
  18.         lock->d);
  19.     fprintf(*lop," %3d",lock->flags);
  20.     fprintf(*lop," %d",lock->waitn);
  21.     fprintf(*lop," %d",lock->waitx);
  22.     fprintf(*lop," % .4le",lock->errx);
  23.     fprintf(*lop," % .4le",lock->ybar);
  24.     fprintf(*lop," % .4le",lock->sumerr);
  25.     fprintf(*lop,"  \n");
  26. }
  27.