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 / putmsg.c < prev    next >
C/C++ Source or Header  |  1996-11-18  |  435b  |  17 lines

  1. void putmsg(msg)
  2. char *msg;
  3. {
  4. /*
  5.     this subroutine is called if the lock program finds
  6.     a problem.  it writes the text message contained in
  7.     msg. to the log file and returns.  if this subroutine
  8.     was called by lockerr, then the program will stop.
  9.     The subroutine returns if the lock file won't open.
  10. */
  11. #include <stdio.h>
  12. FILE *lop,*fopen();
  13.     if( (lop=fopen("lock.err","a+")) == NULL) return;
  14.     fprintf(lop,"\n %s",msg);
  15.     fclose(lop);
  16. }
  17.