home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / xblockbuster / patch3.sh / lock.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  1.1 KB  |  35 lines

  1. /*
  2. ** lock.h: headerfile for lock.c
  3. **
  4. **         LockScoreFile(filename) locks the given file. returns -1 on error.
  5. **         UnlockScoreFile(filename) unlocks the given file.
  6. **
  7. ** the lockfilename is built from the given parameter by adding ".lock" at
  8. ** the end of it. the callers process id will be written in the file.
  9. ** when the file is unlocked again the pid will be read and checked
  10. ** before the file is unlinked.
  11. **
  12. ** Copyright (C) 1993, Gerald Vogt <vogt@isa.de>
  13. ** 
  14. ** This program is free software; you can redistribute it and/or modify
  15. ** it under the terms of the GNU General Public License as published by
  16. ** the Free Software Foundation; either version 1, or (at your option)
  17. ** any later version.
  18. **
  19. ** This program is distributed in the hope that it will be useful,
  20. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. ** GNU General Public License for more details.
  23. **
  24. */
  25.  
  26. #ifdef LOCK_FILE
  27. extern char *CreateLockFileName();
  28. extern int LockScoreFile();
  29. extern void UnlockScoreFile();
  30. #endif
  31. #ifdef LOCK_FCNTL
  32. extern int LockFile();
  33. extern void UnlockFile();
  34. #endif
  35.